Skip to content

Remove the chat stage header and its failing-checks badge chain#3737

Merged
BunsDev merged 1 commit into
mainfrom
feat/chat-stage-header-removal
Jul 24, 2026
Merged

Remove the chat stage header and its failing-checks badge chain#3737
BunsDev merged 1 commit into
mainfrom
feat/chat-stage-header-removal

Conversation

@BunsDev

@BunsDev BunsDev commented Jul 24, 2026

Copy link
Copy Markdown
Member

Second half of cave-ohcj (Code surface phase 2b). PR 1 (#3735) retargeted file/diff open events at the Code surface; this PR removes chat's stage header now that the Code surface's per-session PR panel owns stage/PR/checks context.

Owner-confirmed scope: remove the stage header, keep the code rail as chat's manual affordance.

What's removed

The header was the only publishStageChecks publisher, so the entire subscriber chain is dead code with it:

  • chat-stage-header.tsx + chat-stage-header-wiring.test.ts
  • use-stage-checks-badge.ts + workspace-rail-checks-badge.test.ts
  • checksFailing dot on the rail's Changes tab (workspace-rail)
  • reopenChecksFailing cues on the collapsed-rail reopen strips (chat-surface, task-work-cockpit)
  • rail-controller badge subscription + return entry
  • orphaned STAGE_CHECKS_EVENT export (stage-model) and workspace-rail__badge--alert CSS
  • run-tests.mjs SUITES entries for the deleted suites

What stays

  • The code rail (Changes/Files/Terminal) — manual affordance, unchanged
  • stage-model.ts lane/join model — consumed by the Code surface PR panel + Beads work queue
  • useChangesSummary (composer git chip, header branch meta)
  • workspace-rail__badge base CSS (change-count badge)

Docs: §4/§6 of docs/chat-github-integration.md marked removed with pointers to the Code surface.

Verification

  • targeted pin suites (workspace-rail, chat-environment-panel, code-rail-fit, run-activity-strip, chat-view-render-optimization, chat-header-row, mobile-code-rail, workspace-chat-handoff, stage-model) ✓
  • pnpm typecheck ✓ · pnpm test:app 890 ✓ · pnpm test:api 239 ✓
  • e2e: code-rail, mobile/code-rail-sheet, chat-sidebar-nav — 9 passed (5 local load-flaky rerun-passes)

Bead: cave-ohcj

The Code surface's per-session PR panel now owns stage/PR/checks context
(cave-ohcj phase 2b, second half). The chat stage header was the only
publishStageChecks publisher, so the whole subscriber chain goes with it:

- delete chat-stage-header.tsx + wiring test, use-stage-checks-badge.ts,
  workspace-rail-checks-badge.test.ts
- chat-view: drop the header mount + import; reword comments that keyed
  off it (session-root derivation notes stay, cave-r0gt)
- workspace-rail / chat-surface / task-work-cockpit: drop the
  checksFailing / reopenChecksFailing badge dots and conditional labels
- use-workspace-rail-controller: drop the badge subscription + return entry
- stage-model: remove the now-orphaned STAGE_CHECKS_EVENT export
- styles: remove the orphaned workspace-rail__badge--alert rules
- run-tests.mjs: unregister the two deleted suites (check-tests-wired)
- docs/chat-github-integration.md: mark §4/§6 as removed with pointers

The code rail itself stays — it remains chat's manual affordance; only
the stage strip and its badge chain are retired.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 24, 2026 01:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes Chat’s stage header strip and the associated failing-checks badge event chain now that the Code surface’s per-session PR panel owns stage/PR/checks context, while keeping the manual code rail (Changes/Files/Terminal) intact.

Changes:

  • Deleted ChatStageHeader and its PR/beads polling + wiring tests, along with the stage-checks publish/subscribe hook and event constant.
  • Removed the failing-checks “dot” cue from the code rail (and collapsed reopen strips), including associated CSS and test pins.
  • Updated test suite wiring and docs to reflect the removal and preserve the historical design record sections.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/styles/cave-chat/auxiliary-surfaces.css Removes styling for the failing-checks alert dot badge.
src/lib/use-workspace-rail-controller.ts Drops useStageChecksBadge subscription and removes reopenChecksFailing from the controller return.
src/lib/use-stage-checks-badge.ts Deleted dead hook/publisher used only by the removed stage header.
src/lib/stage-model.ts Removes STAGE_CHECKS_EVENT export now that nothing publishes/listens.
src/components/workspace-rail.tsx Removes failing-checks badge rendering and conditional a11y label/title on the Changes tab.
src/components/workspace-rail.test.ts Updates pins to assert the Changes tab label directly (no failing-checks announcement).
src/components/workspace-rail-checks-badge.test.ts Deletes wiring pin test for the removed failing-checks badge chain.
src/components/task-work-cockpit.tsx Removes collapsed-rail reopen strip failing-checks cue and a11y/title variants.
src/components/chat-view.tsx Removes ChatStageHeader mount and updates nearby comments to reflect the new state.
src/components/chat-surface.tsx Removes reopenChecksFailing usage and the collapsed-rail failing-checks cue.
src/components/chat-stage-header.tsx Deleted stage header implementation (PR/beads fetch + stage render + checks publisher).
src/components/chat-stage-header-wiring.test.ts Deletes wiring pins for the removed stage header.
src/components/chat-environment-panel.tsx Updates prop comment (no longer references ChatStageHeader).
src/components/chat-environment-panel.test.ts Adjusts assertion message to match the updated derivation wording.
scripts/run-tests.mjs Removes deleted pin suites from the test runner’s SUITES list.
docs/chat-github-integration.md Marks §4/§6 as removed with pointers to the Code surface PR panel ownership.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@BunsDev
BunsDev merged commit 29858b6 into main Jul 24, 2026
16 checks passed
@BunsDev
BunsDev deleted the feat/chat-stage-header-removal branch July 24, 2026 05:18
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.

2 participants