Skip to content

🤖 fix: keep monitored sub-agents active in the composer - #4341

Merged
ThomasK33 merged 2 commits into
refactor/workspace-activity-helpersfrom
fix/composer-monitor-activity-stack
Sep 23, 2026
Merged

ThomasK33 merged 2 commits into
refactor/workspace-activity-helpersfrom
fix/composer-monitor-activity-stack

Conversation

@ThomasK33

Copy link
Copy Markdown
Member

Summary

Keep a reported sub-agent active in the composer while its background Bash monitor is armed. Show Monitoring, then return to Completed when the last monitor retires. Fixes #4327.

Stack Context

Layer 2 of 2, based on #4338. This layer changes the composer tray and its regression coverage; the lower layer supplies shared activity helpers.

Why

Task-turn completion does not mean the workspace is idle. The sidebar already knows about armed monitors; the composer now consumes the same activity signals.

Review focus

The subscription tracks activity per child, so moving a monitor between children still updates the rows. Multiple monitors count as one active child. The completed-report fence rejects stale stream hints after retirement. Running/error/interrupted labels retain precedence; queued work retains the tray's existing active convention. No backend or persistence changes.

All 465 changed lines are handwritten; no generated files.

Validation

On 15c051b06, using repository-pinned Bun 1.3.5:

  • Composer, workspace-filtering, and sidebar-group suites: 103 passed.
  • Separate ProjectSidebar.test.tsx: 54 passed.
  • make static-check, Storybook build, and both affected Storybook suites: 10 stories passed.
  • Independent comment and simplicity audits: no remaining findings.

Remote mock-driven full-app UAT on checkpoint c5d0b7410 captured desktop and pinned 375px phone transitions, navigation, collapse/expand, and light/dark legibility. Publication split the commits and cleaned comments; all seven changed files produce identical TypeScript-transpiled output to that checkpoint. The new branch heads were validated locally, not by another remote UAT run. Recordings and screenshots are attached below.

Hands-on reproduction and evidence limits

Start Storybook with make storybook. Open App/PersistentSubagents/BackgroundMonitor, then its pinned phone variant. The play drives monitor counts 0 → 1 → 2 → 1 → 0 → 1 while stale interrupt hints remain set. Check the tray and sidebar agree, retirement shows Completed/inactive, and re-arming restores Monitoring/active. On phone, close the sidebar drawer to inspect the tray.

The recorded evidence uses mock activity updates through the real renderer store. It does not test backend monitor lifecycles, Electron, real providers, or the Pixel capture matrix. Recordings include setup/reset and debugger-paced steps; continuity applies to the held forward sequence after setup.


Generated with xum • Model: coder:openai/gpt-6-astra • Thinking: high • Cost: $129.41

Count armed background monitors as workspace activity while preserving the completed-report fence against stale live hints. Show Monitoring for settled rows with armed monitors and cover live desktop/mobile transitions.

---

_Generated with [`xum`](https://github.com/coder/xum) • Model: `coder:openai/gpt-6-astra` • Thinking: `high` • Cost: `$115.79`_

<!-- mux-attribution: model=coder:openai/gpt-6-astra thinking=high costs=115.79 -->
Comment-only pass over the composer-tray layer of #4327: shorten the hint and
snapshot-encoding docblocks to the non-obvious rationale, drop two comments that
restated the code or a test assertion, reword the registration race note, and
remove change narration from the story.

---

_Generated with `xum` • Model: `coder:anthropic/claude-fable-5-1` • Thinking: `xhigh`_

<!-- mux-attribution: model=coder:anthropic/claude-fable-5-1 thinking=xhigh -->

Signed-off-by: Thomas Kosiewski <tk@coder.com>
@ThomasK33
ThomasK33 added this pull request to stack #4342 September 22, 2026 15:16
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-22T15:20:13.036213Z 15c051b PR opened
🔒 Security Review ✅ Completed 2026-09-22T15:20:31.314942Z 15c051b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ThomasK33

ThomasK33 commented Sep 22, 2026 •

Copy link
Copy Markdown
Member Author

Desktop and phone evidence

Mock-driven full-app Storybook UAT on c5d0b74108124a3689678dce48250e7309e7e903, before the commit split and comment-only cleanup. All seven changed files transpile identically on this PR; final-head local tests and Storybook checks also pass.

The recordings include setup/reset and debugger-paced steps. The verified continuous forward sequence shows Monitoring → Completed/inactive → Monitoring without replacing the tray node. Phone evidence uses the pinned 375px Storybook manager viewport with the drawer closed. This is renderer/store evidence, not backend monitor or real-provider UAT.

Screenshots

Desktop: re-armed monitor, sidebar and composer active

375px phone: one monitored child active

375px phone: final monitor retired, child inactive

Recordings

Desktop recording

R3-desktop-continuous.webm

375px phone recording

R3-phone-continuous.webm

Generated with xum • Model: coder:openai/gpt-6-astra • Thinking: high • Cost: $129.41

@ThomasK33
ThomasK33 added this pull request to the merge queue Sep 22, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue because a pull request earlier in the stack was removed Sep 22, 2026
@ThomasK33

Copy link
Copy Markdown
Member Author

Blocked after merge-queue validation

Neither this PR nor foundation #4338 landed. Both remain open and are outside the queue. The source heads remain 64d1ca4f617f7157056c4bbe66a18f3ecd9e729c and 15c051b06fe036554ba72587073c5cdbafa04b71.

  1. Source-head CI passed, including the one targeted Linux E2E rerun. Codex code/security reviews and the final independent review found no actionable issues.
  2. The queue tested lower integration cf748431c41f178df4dc8a26efe7c9b90540c23f. It failed Linux E2E (stream continues after settings opens: Send button unavailable) and unit tests (post-append certification failure preserves success but expires the epoch, historyAppendProvenance.test.ts:496).
  3. Upper integration bfd53e0f12954ecfec1756b8c2c10ff7be571ee8 passed its merge-group run. That does not clear the lower integration failures.

The E2E case passed three isolated source-head runs before queue admission. The newly failed unit case also passed locally on the current source head (1 test, 7 assertions, pinned Bun 1.3.5). These passes do not validate the failed integration tree or establish a CI cause. Neither failing test was changed by this stack.

Decision: pause as incomplete. No speculative source edits, further reruns, re-enqueue, direct merge, or gate bypass. The final advisory remains valid for the unchanged code; the advisor recommends a separately scoped investigation of these integration failures before another guarded queue attempt. This is a convergence/scope checkpoint, not exhaustion of the six-review limit. Observed reviews: one code/security pair per PR and one final independent pass; the foundation may also have overlapping automatic startup activity, conservatively within five combined assessments. No findings-driven revision rounds occurred.

Follow-up owner: the assigned implementer. Trigger: authorization to continue the CI investigation. Logs, tested integration identities, and local reproduction receipts are preserved. Required merge admission checks remain failed; delivery is not complete.


Generated with xum • Model: coder:openai/gpt-6-astra • Thinking: high • Cost: $168.33

@ThomasK33
ThomasK33 added this pull request to the merge queue Sep 23, 2026
Merged via the queue into main with commit 28b73d0 Sep 23, 2026
35 of 38 checks passed
@ThomasK33
ThomasK33 deleted the fix/composer-monitor-activity-stack branch September 23, 2026 06:36
@ThomasK33

Copy link
Copy Markdown
Member Author

Landed through the merge queue

Both landed as linear squash commits on 80efaa2ac5. Each landed tree matches its reviewed source head merged onto that trunk, and each merge-group Required check passed. Attribution footers are preserved, and #4327 closed automatically.

Record

  • Tests: pinned-Bun unit, sidebar, static, build, and Storybook gates passed on both heads; source-head CI passed.
  • Reviews: one Codex code/security pair per PR plus one independent readiness review. No findings and no revision rounds.
  • Advisor: recommended one guarded queue-only stack submission. After the first attempt's integration failures, it approved one more attempt following investigation.
  • First queue attempt: lower integration failed on two intermittent tests that this stack did not change. They are tracked in 🤖 tests: intermittent streaming Settings E2E and history provenance unit failures #4361 with evidence, an owner, and a trigger. They remain unfixed.
  • Stopped because every delivery gate is satisfied.

Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high • Cost: $190.32

yermakoffivan pushed a commit to yermakoffivan/mux that referenced this pull request Sep 25, 2026
…orts (coder#4472)

## Summary

Deletes browser production code that only tests still called, and moves
the tests that guarded live behavior onto the live code path. Part of
the test-audit follow-up campaign (frontend area, WS7).

## What was removed

| Removed | Why it was dead | What happened to its tests |
| --- | --- | --- |
| `StatsTab` component + its test-only `_snapshot`/`_clearStats` props
and `useStatsData` overrides | No production caller since coder#2729 moved
the Stats tab to `StatsContainer` (`TimingPanel` +
`ModelBreakdownPanel`) | `StatsTab.clear.test.tsx` replaced by
`TimingPanel.clear.test.tsx`, which drives the live path: real
`WorkspaceStore` stats subscription + `APIProvider` client whose
`workspace.stats.clear` rejects |
| `compareRecords`, `compareArrays` (`useStableReference.ts`) | Only
`compareMaps` is used (`App.tsx`) | 12 comparator tests deleted; stale
"tested manually via useUnreadTracking…" comments fixed |
| `closeSplit` (`rightSidebarLayout.ts`) | Never called in production
since coder#1340 | Test deleted |
| `isActionableTaskExecutionStatus` | Last caller removed in coder#4341 | No
tests |
| `shouldRefreshInlineSkillSuggestions` | coder#4013 made inline suggestions
synchronously derived, so there is no refresh gate | Tests deleted |
| `getAnthropicThinkingDisableReason` + `hasAnthropicThinkingSignature`
| coder#1450 stopped disabling Anthropic thinking | Tests deleted; the one
transform test that used it as an oracle now asserts the preserved
signature directly |
| `useProjectGitStatuses` (`GitStatusStore.ts`) | No production caller |
None in CI |
| `buildReviewDiffPathFilter`, `normalizeReviewPanelAssistedHunks`
(test-only wrappers in `ReviewPanel.tsx`) | Production calls
`buildReviewDiffPathFilterSpecs` / `getReviewPanelPathContext` +
`normalizeAssistedReviewHunks` directly | Tests retargeted to those
production functions (`getReviewPanelPathContext` is now exported) |
| `computeTaskAwaitPollGroupInfos` (test-only wrapper) | ChatPane calls
`computeOperationalBundleInfos({ taskAwaitPollsOnly })` | Tests use a
local fixture helper around the production function |
| 2 `/fork` cases in `parser.test.ts` | Same contract and name as
`fork.test.ts` | Deleted |

Retained on purpose (test reset seams, not dead code): `__resetForTests`
(highlight worker), `resetAiSelectionIntentForTests`,
`overlayWorkspaceStoreRaw` (test-support module).

## Validation

- Sweep: every `export` under `src/browser` (excluding stories) checked
for non-test references across `src/`, `tests/`, `vscode/`, `scripts/`,
`.storybook/`; orphan-module sweep found only the two HTML entry points.
- `TimingPanel.clear.test.tsx` fails when `handleClearStats` stops
setting the error (mutation check).
- `bun test` on RightSidebar, hooks/useStableReference,
utils/{messages,agentSkills,ui,rightSidebarLayout},
stores/GitStatusStore: 1141 pass.
- `make static-check` green.

LOC: production +11 / −585; tests +134 / −355.

---

_Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking:
`high` • Cost: `$4.21`_

<!-- mux-attribution: model=anthropic:claude-opus-5-5 thinking=high
costs=4.21 -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🤖 fix: clarify composer activity for monitored subagents

1 participant