The open-source app everyone uses to manage agents at work
TypeScript acpxagent-orchestrationagent-skillsagentic-aiai-agentsai-engineeringai-governanceai-toolsautonomous-agentsclaudeclaude-codeclaude-skillscodexhermesllmmcpmulti-agentopenclawproject-managementworkflow-automation
test(ui): share repeated IssueDetail render proofs (#16091)
Dottaae6e70182132
diff --git a/doc/plans/2026-10-12-test-audit-r17-issue-detail.md b/doc/plans/2026-10-12-test-audit-r17-issue-detail.mdnew file mode 100644index 0000000000..1f18c49528--- /dev/null+++ b/doc/plans/2026-10-12-test-audit-r17-issue-detail.md@@ -0,0 +1,41 @@+# IssueDetail test audit — 2026-10-12++Parent: #16088, `codex/test-audit-r16-heartbeat-recovery`, exact head+`a454638931ee8a2e40347aef1ab4fbf17d8acf9f`.++## Retained contracts++- The empty-subtask keeper retains the default task thread checks after the+ first flush, and default file-viewer/plan-query checks after the second.+ Its explicit empty list matches the shared beforeEach default.+- The first-task properties-button keeper uses the same first-task input.+ It now checks closePanel before the toggle, then still proves opt-in opening.+- Three repeated renders disappear: 140→137 cases, 109→106 declarations,+ +14/-57 test lines (43 fewer). All 17 parameterized declarations remain.+ The full ledger and AST proof remain in temporary receipts, not this PR.++## Exact-parent proof++| Full owner phase | Passed | Failed |+|---|---|---|+| Baseline | 140 | 0 |+| Candidate | 137 | 0 |+| Reverted test | 140 | 0 |+| Default thread forced to legacy | 108 | 29 |+| File viewer forced on | 136 | 1 |+| Plan panel forced to render/query | 136 | 1 |+| Panel close paths removed | 135 | 2 |+| Production restored, candidate | 137 | 0 |++Each production mutation fails its intended moved keeper assertion at lines+2463, 2470, 2473 or 4299. Each owner restoration is byte-for-byte. No cases+are skipped. `pnpm check:token-gates`, UI typecheck and diff-check pass.+The normal command from ui is `pnpm exec vitest run src/pages/IssueDetail.test.tsx`.++Parent test SHA-256: `06b026c4bd296848011d1cc30f89711453a9db0c1e4c743fa22ae653b3e942d7`.+Candidate SHA-256: `530b6046ce0c15ece4304bc49f711af6fc95ebd62ef5b0aa0515b96ce2d94995`.+Restored owner SHA-256: `17b28ad871c2f00fa2d1153d50f151ebd0bed68c85d5a0f2a50164a2f1a612b2`.+Receipts: `/private/tmp/test-audit-r17-issue-detail-replay/receipt.json`.+No production change is included. No CI speedup is claimed from local samples.+Full repository preflight stays in isolated CI because local dependency links+are shared; it would rewrite those links. CI must pass before green handoff.diff --git a/ui/src/pages/IssueDetail.test.tsx b/ui/src/pages/IssueDetail.test.tsxindex 642f9411df..2b00aa1591 100644--- a/ui/src/pages/IssueDetail.test.tsx+++ b/ui/src/pages/IssueDetail.test.tsx@@ -2460,8 +2460,21 @@ describe("IssueDetail", () => {renderIssueView();});await flushReact();++ expect(+ container.querySelector('[data-testid="task-chat-thread"]'),+ ).not.toBeNull();+ expect(mockIssueChatThreadRender).toHaveBeenCalled();+await flushReact();+ expect(+ container.querySelector('[aria-label="Open file in this issue"]'),+ ).toBeNull();++ expect(container.textContent).not.toContain("Plan decomposition");+ expect(mockIssuesApi.listAcceptedPlanDecompositions).not.toHaveBeenCalled();+expect(container.textContent).not.toContain("Sub-issues");expect(mockIssuesListRender.mock.calls).not.toContainEqual([expect.objectContaining({ isLoading: false }),@@ -4331,24 +4344,6 @@ describe("IssueDetail", () => {});});- it("hides the plan decomposition panel by default", async () => {- mockIssuesApi.get.mockResolvedValue(createIssue());-- await act(async () => {- renderIssueView();- });-- await flushReact();- await flushReact();-- expect(- container.querySelector('[aria-label="Open file in this issue"]'),- ).toBeNull();-- expect(container.textContent).not.toContain("Plan decomposition");- expect(mockIssuesApi.listAcceptedPlanDecompositions).not.toHaveBeenCalled();- });-it("shows file viewer entry points when the experimental flag is enabled", async () => {mockIssuesApi.get.mockResolvedValue(createIssue());mockInstanceSettingsApi.getExperimental.mockResolvedValue({@@ -4368,31 +4363,6 @@ describe("IssueDetail", () => {).not.toBeNull();});- it("hides the properties sidebar on the first onboarding task until a plan document exists", async () => {- mockInstanceSettingsApi.getExperimental.mockResolvedValue({- enableIssuePlanDecompositions: false,- enableExperimentalFileViewer: false,- enableExternalObjects: false,- });- mockIssuesApi.get.mockResolvedValue(- createIssue({ originKind: ONBOARDING_FIRST_TASK_ORIGIN_KIND }),- );- // No plan yet: the hook's 404 resolves to null.- mockIssuesApi.getDocument.mockResolvedValue(null);-- await act(async () => {- renderIssueView();- });-- await flushReact();- await flushReact();-- // Panel content is withheld — openPanel is never invoked, so the sidebar- // stays hidden without touching the persisted panelVisible preference.- expect(mockOpenPanel).not.toHaveBeenCalled();- expect(mockClosePanel).toHaveBeenCalled();- });-it("starts a planning-mode task as chat-only until its plan document exists", async () => {mockSetBreadcrumbToolbar.mockClear();mockSetBreadcrumbPanelControl.mockClear();@@ -4477,6 +4447,7 @@ describe("IssueDetail", () => {await flushReact();await flushReact();expect(mockOpenPanel).not.toHaveBeenCalled();+ expect(mockClosePanel).toHaveBeenCalled();// Even though panelVisible is true, the suppressed first task routes the// single breadcrumb panel control through its per-task opt-in behavior.@@ -5218,20 +5189,6 @@ describe("IssueDetail", () => {}});- it("renders the task chat thread as the default thread", async () => {- mockIssuesApi.get.mockResolvedValue(createIssue());-- await act(async () => {- renderIssueView();- });- await flushReact();-- expect(- container.querySelector('[data-testid="task-chat-thread"]'),- ).not.toBeNull();- expect(mockIssueChatThreadRender).toHaveBeenCalled();- });-it("renders the legacy issue chat thread when the classic task interface flag is on", async () => {mockInstanceSettingsApi.getExperimental.mockResolvedValue({enableIssuePlanDecompositions: false,