@@ -1123,7 +1130,8 @@ export function DesignGuide() {
leading={
<>
-
+ {/* PAP-411: PriorityIcon hidden behind SHOW_TASK_PRIORITY_UI. */}
+ {SHOW_TASK_PRIORITY_UI &&
}
>
}
identifier="PAP-001"
@@ -1136,7 +1144,7 @@ export function DesignGuide() {
leading={
<>
-
+ {SHOW_TASK_PRIORITY_UI &&
}
>
}
identifier="PAP-002"
@@ -1149,7 +1157,7 @@ export function DesignGuide() {
leading={
<>
-
+ {SHOW_TASK_PRIORITY_UI &&
}
>
}
identifier="PAP-003"
@@ -1161,7 +1169,7 @@ export function DesignGuide() {
leading={
<>
-
+ {SHOW_TASK_PRIORITY_UI &&
}
>
}
identifier="PAP-004"
@@ -1249,7 +1257,10 @@ export function DesignGuide() {
onClick={() =>
setFilters([
{ key: "status", label: "Status", value: "Active" },
- { key: "priority", label: "Priority", value: "High" },
+ // PAP-411: priority filter demo row suppressed while SHOW_TASK_PRIORITY_UI is off.
+ ...(SHOW_TASK_PRIORITY_UI
+ ? [{ key: "priority", label: "Priority", value: "High" } as FilterValue]
+ : []),
])
}
>
@@ -1429,10 +1440,13 @@ export function DesignGuide() {
Status
-
Responsible
@@ -1500,14 +1514,15 @@ export function DesignGuide() {
2
+ {/* PAP-411: leading PriorityIcon hidden behind SHOW_TASK_PRIORITY_UI. */}
}
+ leading={SHOW_TASK_PRIORITY_UI ?
: undefined}
identifier="PAP-101"
title="Build agent heartbeat system"
onClick={() => {}}
/>
}
+ leading={SHOW_TASK_PRIORITY_UI ?
: undefined}
identifier="PAP-102"
title="Add cost tracking dashboard"
onClick={() => {}}
diff --git a/ui/src/pages/IssueDetail.test.tsx b/ui/src/pages/IssueDetail.test.tsx
index fa0d1b5c4a..8ef40448e7 100644
--- a/ui/src/pages/IssueDetail.test.tsx
+++ b/ui/src/pages/IssueDetail.test.tsx
@@ -1108,7 +1108,7 @@ describe("IssueDetail", () => {
expect(mockDecisionsApi.list).not.toHaveBeenCalled();
});
- it("updates status and priority from the task header controls", async () => {
+ it("updates status from the task header control and hides the priority control (PAP-411)", async () => {
const issue = createIssue({ status: "todo", priority: "medium" });
mockIssuesApi.get.mockResolvedValue(issue);
mockIssuesApi.update.mockImplementation(async (_issueId: string, data: Record
) => ({
@@ -1133,7 +1133,9 @@ describe("IssueDetail", () => {
'button[aria-label="Change priority (current: medium)"]',
);
expect(statusButton).not.toBeNull();
- expect(priorityButton).not.toBeNull();
+ // PAP-411: priority UI is hidden behind SHOW_TASK_PRIORITY_UI (off), so the header
+ // priority control must not render.
+ expect(priorityButton).toBeNull();
await act(async () => {
statusButton!.dispatchEvent(new MouseEvent("click", { bubbles: true, cancelable: true }));
@@ -1141,13 +1143,10 @@ describe("IssueDetail", () => {
await waitForAssertion(() => {
expect(mockIssuesApi.update).toHaveBeenCalledWith(issue.identifier, { status: "done" });
});
-
- await act(async () => {
- priorityButton!.dispatchEvent(new MouseEvent("click", { bubbles: true, cancelable: true }));
- });
- await waitForAssertion(() => {
- expect(mockIssuesApi.update).toHaveBeenCalledWith(issue.identifier, { priority: "high" });
- });
+ expect(mockIssuesApi.update).not.toHaveBeenCalledWith(
+ issue.identifier,
+ expect.objectContaining({ priority: expect.anything() }),
+ );
mockIssuesApi.update.mockReset();
});
diff --git a/ui/src/pages/IssueDetail.tsx b/ui/src/pages/IssueDetail.tsx
index 483fb2860d..1c632986e4 100644
--- a/ui/src/pages/IssueDetail.tsx
+++ b/ui/src/pages/IssueDetail.tsx
@@ -135,6 +135,7 @@ import { ArtifactFileChip } from "../components/ArtifactFileChip";
import { ScrollToBottom } from "../components/ScrollToBottom";
import { StatusIcon } from "../components/StatusIcon";
import { PriorityIcon } from "../components/PriorityIcon";
+import { SHOW_TASK_PRIORITY_UI } from "../lib/ui-flags";
import { ProductivityReviewBadge } from "../components/ProductivityReviewBadge";
import { Identity } from "../components/Identity";
import { PluginSlotMount, PluginSlotOutlet, usePluginSlots } from "@/plugins/slots";
@@ -706,7 +707,8 @@ function IssueDetailLoadingState({
{headerSeed ? (
<>
-
+ {/* PAP-411: priority UI hidden behind SHOW_TASK_PRIORITY_UI. */}
+ {SHOW_TASK_PRIORITY_UI && }
{identifier ? (
{identifier}
) : null}
@@ -4195,10 +4197,13 @@ export function IssueDetail() {
blockerAttention={issue.blockerAttention}
onChange={(status) => updateIssue.mutate({ status })}
/>
- updateIssue.mutate({ priority })}
- />
+ {/* PAP-411: priority UI hidden behind SHOW_TASK_PRIORITY_UI. */}
+ {SHOW_TASK_PRIORITY_UI && (
+ updateIssue.mutate({ priority })}
+ />
+ )}
{issue.identifier ?? issue.id.slice(0, 8)}
{hasLiveRuns && (