Skip to content

feat(web): a Captain's timeline shows only what needs the person - #750

Merged
bryantderosier merged 6 commits into
j5/mainfrom
j5/741-quieter-captain-timeline
Nov 3, 2026
Merged

bryantderosier merged 6 commits into
j5/mainfrom
j5/741-quieter-captain-timeline

Conversation

@bryantderosier

@bryantderosier bryantderosier commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Most of what landed in a Captain's conversation was the platform talking about itself: a "Crew launched" roster card after every approval, a "Seat finished" card every time a seat's run ended, and member messages as full cards. The stuff I'd actually act on got buried. Closes #741.

What changed

It's all at render time. The Captain still gets the exact same notice text and turns, and nothing on the server or in contracts moves.

  • crew/crewNotices.logic.ts: new crewNoticeLines turns a launch report or finish notice into one line per seat that needs me:

    • red if it couldn't start, was never created (no link), or its run failed (with the error);
    • amber if it hasn't confirmed it started, or it finished with its declared handoff missing or unreadable.

    isHiddenCrewNotice is true when there's nothing to draw. The helpers only the old cards used are gone.

  • MessagesTimeline.tsx (upstream, one line, FORK.md case 104): withoutHiddenCrewNotices drops a clean launch or finish notice's row after upstream derives the rows. It has to be after, because upstream treats every user message as a turn boundary for folding, the terminal message and rollback, and dropping the notice earlier merges the Captain turn it started into the one before. It hands back the same array when nothing's hidden, cached per input, since useStableRows checks identity.

  • crew/CrewNoticeRenderer.tsx: approved gates and finish notices render as those lines, each opening its seat. A line names its Crew only when one folded notice spans several Crews. Declined gates keep today's card.

  • crew/crewState.ts → seatRunLabel: a Crew seat's row on the Fleet page and in the Captain's expander says Failed, Interrupted or Completed instead of Idle once upstream's pill has nothing to say. Solo agents keep upstream's Idle.

  • Docs: crews.md (definition paragraph, AC22, History) and the user guide in docs/j5/user/personas.md.

Things I left on purpose:

  • j5/main now renders peers' messages in upstream's user row, so the compact row for Crew members' messages that was part of this PR is gone. The before/after shot of that row below shows the old behavior.
  • An interruption after a seat's first turn stays silent in the timeline. The server only reports completed and failed finishes (AC21, so Stop crew doesn't wake the Captain), and the seat row shows Interrupted.
  • A retired Crew's old member messages go back to the full card, since spawned children only covers live Crews.
  • The minimap's reply preview can now run past a hidden notice.
  • A member's message shows the full card until the sidebar has read the Captain's children, and always on a connection that never gets that read (a narrow guest).
  • The notice parser still reads fields the timeline no longer draws. The strict parse is what keeps an unreadable block raw, and Crews: a flat roster card with members edited in place #742 reads the decision fields again.
  • "You changed the roster" goes away. The approver ("· by {name}", shown in shared conversations) is dropped here and comes back on the collapsed approval summary in feat(web): review Crew proposals from the composer #751.

UI changes

Before After
Captain timeline after a clean launch and finishes Captain timeline after a clean launch and finishes, before Captain timeline after a clean launch and finishes, after
Crew member message to its Captain Crew member message to its Captain, before Crew member message to its Captain, after
Fleet page seat rows Fleet page seat rows, before Fleet page seat rows, after
Captain's sidebar expander Captain's sidebar expander, before Captain's sidebar expander, after

The Fleet and expander "before" shots are the same image, since one screenshot showed both. The review panel saw the red failure line live at the stack tip (screenshot); there's no shot of an amber line.

Upstream impact

  • apps/web/src/components/chat/MessagesTimeline.tsx: one J5 import and one changed line in ConversationTimeline (rows = useStableRows(withoutHiddenCrewNotices(rawRows), ...)). It's recorded as FORK.md case 104, and the file-table row now lists 104. It doesn't change what upstream's product does; it only leaves J5's own notices out of the rows.

Live testing

I tested on a disposable test server with real Claude and Codex seats. I took the "before" shots from a j5/main base build and the "after" shots from this branch's diff.

  • Verdict: works as intended.
  • Compact rows: they have the provider logo and sender link with no border. The clamp sits at 40px against 60px of content, and "Show full message" / "Show less" toggle it. "Expects reply" shows on a message that asks for one.
  • Hidden notices: a Captain thread with one launch and two finish notices drew 11 timeline rows and none of them was a notice. On base the same flow drew rows for "Crew launched" and "Seat finished".
  • No animation: there are no animation or transition classes on the new elements, and getAnimations() returns 0.
  • Seat rows: Fleet and expander rows read Completed where base read Idle.
  • Not exercised live by me: the red and amber lines, and the Failed and Interrupted labels. With a provider broken, the roster check refuses to approve the seat ("Runtime unavailable… Nothing was spawned"), so I couldn't make a seat fail at start without a race. The review panel later saw the red failure line live at the stack tip; the amber line and the Failed and Interrupted labels are covered by the logic tests in crewNotices.logic.test.ts and crewState.test.ts.

I live-tested the feature commit (814b5b2e4a) before the code-review fixes. Since then, 3c1aa7d331 moved the hide filter from the entries to the derived rows, re-keyed lines, limited the seat labels to Crew seats, cut re-renders and trimmed a doc line. None of that was re-run live: the rendered output for the cases above is the same, and the boundary fix is covered by the new withoutHiddenCrewNotices test plus upstream's own MessagesTimeline tests, which pass.

vp test run apps/web/src/j5/crew apps/web/src/j5/a2a/ThreadA2ARenderer.test.tsx apps/web/src/j5/sharing apps/web/src/j5/threads apps/web/src/j5/fleet apps/web/src/components/chat/MessagesTimeline.test.tsx apps/web/src/components/chat/MessagesTimeline.logic.test.ts
  31 files, 530 tests passed
vp lint <changed files>              # 0 errors, only warnings that were already there
(cd apps/web && vp run typecheck)    # exit 0, rerun on the head after the stack was rebased onto j5/main

I also ran plan reviews, three code-review rounds and two security reviews on it. There were no security findings, and the code-review fixes are in 3c1aa7d331.

Checklist

  • One concern: the description has no "also"
  • Tests cover the changed behavior (backend changes ship with focused tests)
  • UI changes: before/after screenshots above, and a video for motion or interaction
  • Live testing: the section above says what ran live and what did not
  • Upstream-owned files: each one is recorded in FORK.md (case text and file-table row) in this PR (case 104)
  • Upstream product: any change to what upstream's product does has a human decision linked above and a register entry in docs/j5/product/upstream.md (n/a)
  • Surfaces: entry points, clients, providers, contracts, reverse states, connection modes (see AGENTS.md)
  • Docs: definitions under docs/j5/product/ and user docs rewritten where this changes them

Claude Opus 5.5 via J5 Code (Claude Code harness)

🤖 Generated with Claude Code

@vercel

vercel Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
j5-code Ready Ready Preview Nov 2, 2026 3:12pm UTC

Request Review

@bryantderosier bryantderosier self-assigned this Oct 27, 2026
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XL 500-999 effective changed lines (test files excluded in mixed PRs). labels Oct 27, 2026
bryantderosier added a commit that referenced this pull request Oct 27, 2026
@bryantderosier
bryantderosier added this pull request to stack #753 October 27, 2026 15:02
@bryantderosier
bryantderosier marked this pull request as ready for review October 27, 2026 17:43
@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@Jacksondr5

Copy link
Copy Markdown
Owner

Panel review: #750

Live: the quiet timeline, compact member rows and the red failure line all worked at the stack tip (red line, member rows).

Should fix: an approved roster no longer says who approved it. crewApprovalSummary (crew/crewNotices.logic.ts:346) returns only "Crew approved · N members", and CrewNoticeRenderer.tsx:147 renders just that. The declined card still shows "· by {decidedBy}" (:50). Once the gate closes, this line is the only settled record, and shared-conversations.md AC10 says the settled prompt shows who answered. This PR said #742 would bring it back, but #751 didn't. The fix is to append " · by {decidedBy}" when it's present. Dropping "You changed the roster" is fine.


Review panel for the #750–#762 stack, judged as the code that lands at da64b2795c: Claude Opus 5.5 (lead and three code reviewers), GPT-6.1-Sol (process, docs, CI) and GPT-6-Astra (live test on an isolated server, Haiku 5.5 and GPT-6 Luna turns). Every finding here was agreed by the whole panel. Product questions are with Jackson and are not listed. Posted by Claude Opus 5.5 via J5 Code.

@BastiHu BastiHu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Inline findings from the crew review of #750, #751, #754 and #755, checked against this PR's current diff. Integrated validation at #755 head 30bbf0a: 535 existing focused tests passed, six targeted correctness assertions failed, and two access-policy observations passed. Comments distinguish P2 defects, a policy decision, and nonblocking P3 notes. No source changes were made.

@bryantderosier

Copy link
Copy Markdown
Collaborator Author

Thanks. Going through the panel comment:

  • Approver: agreed. This PR doesn't draw an approved roster, so the fix is on feat(web): review Crew proposals from the composer #751: the settled summary now ends with " · by {name}" when the approver is recorded (shared conversations), with a test for both cases. It's in cee5047b8a. "You changed the roster" stays gone.
  • Live proof: thanks for the red-line and member-rows shots. I've cited the red line in the description and kept the amber line and the Failed and Interrupted labels as test-covered only.
  • Description: I also refreshed it after the rebase onto j5/main: current commit hashes, the targeted tests rerun on this head (31 files, 530 tests), and a corrected FORK.md count.

CI is green on 6858e281e7.

@BastiHu BastiHu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approved at 6858e28. The approver-attribution concern is addressed by the summary fix in #751, and the reviewed #750 behavior is unchanged. Current CI passes; the follow-up verification also passed the focused notice tests on the integrated stack.

bryantderosier and others added 3 commits October 29, 2026 08:15
A Captain's conversation was mostly the platform reporting on itself: a
roster card after every launch, a card per seat finish, and member messages
as full cards. Launch and finish notices now draw one line per seat that
needs the person (couldn't start, never created, start unconfirmed, failed,
handoff missing or unreadable) and nothing otherwise, a live Crew member's
message is a compact row led by its provider, and seat rows on the Fleet
page and the Captain's expander say how the last run ended instead of Idle.

Render-time only: the Captain receives the same notices and turns, and no
upstream file changes. Closes #741.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review fixes on the quieter Captain timeline (#741):

- Hidden notices are dropped after upstream derives the timeline rows, not
  from the entries before it, so a Captain turn started by a hidden finish
  or launch notice keeps its turn boundary (folding, terminal message,
  rollback). One line in MessagesTimeline.tsx, recorded as FORK.md case 87;
  the filter in the shared-conversation hook is gone.
- Notice lines are keyed by seat and position, since a folded notice can
  carry one seat twice.
- Failed, Interrupted and Completed label only Crew seats; solo agents keep
  upstream's Idle.
- A peer card selects one boolean for "is a live Crew seat", and only a
  compact row reads the server configs, so non-seat cards no longer
  re-render on every spawned-children read.
- A line names its Crew when one notice spans several Crews.
- Comments record why the parser keeps fields the timeline no longer
  draws, why a failed seat always carries a detail, and why a member's
  message falls back to the card before the seat read lands.
- The user guide states the behaviour without describing the UI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Jacksondr5

Copy link
Copy Markdown
Owner

From Jackson, relayed by the review lead (Claude Opus 5.5): notifying the Captain every time a member's turn ends is noise, and he'd like that explored.

This PR hides clean finish notices from the person's view, but the Captain still takes a turn on each one. Jackson says it's up to you whether you change it in this stack or later.

bryantderosier and others added 3 commits November 2, 2026 08:57
Peers' messages now render in upstream's user row, so the compact Crew
member row is dropped; the hidden Crew notices and seat run labels stay.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@bryantderosier

Copy link
Copy Markdown
Collaborator Author

Merged j5/main into this. Peers' messages now render in upstream's user row, so the compact row for Crew members' messages had nothing left to attach to and I dropped it. The hidden launch and finish notices and the seat run labels are unchanged.

On Jackson's note about the Captain taking a turn on every finish: I'm leaving that for a later change, it's its own piece of work.

@bryantderosier
bryantderosier merged commit 52140e7 into j5/main Nov 3, 2026
38 of 42 checks passed
@bryantderosier
bryantderosier deleted the j5/741-quieter-captain-timeline branch November 3, 2026 01:30

This branch was successfully deployed

1 active deployment
Preview — a330b386 Deployed Nov 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500-999 effective changed lines (test files excluded in mixed PRs). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crews: a quieter Captain timeline

3 participants