Skip to content

feat(web): review Crew proposals from the composer - #751

Merged
bryantderosier merged 15 commits into
j5/741-quieter-captain-timelinefrom
j5/742-flat-roster-card
Nov 3, 2026
Merged

bryantderosier merged 15 commits into
j5/741-quieter-captain-timelinefrom
j5/742-flat-roster-card

Conversation

@bryantderosier

@bryantderosier bryantderosier commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Crew proposals took too much space above chat and exposed member editing in the roster. I moved the proposal into a collapsible composer attachment alongside Playbooks, kept member rows compact, and added shared Add/Edit modals with saved-persona defaults. Closes #742.

This PR targets j5/741-quieter-captain-timeline.

Review fixes since the first version:

  • Roster edits survive: the composer hides the card while a Captain approval or question is up. The edited roster now lives in a small J5 store keyed by proposal, so it comes back when the card does (cb9eab8f71).
  • Persona text: an edited persona text now replaces the persona's instructions at launch instead of being sent on top of them. It's carried by a new optional personaInstructions field that only the roster card sets; agents' instructions still mean "additional". The dialog has a "Reset to persona text" button, and an edited seat doesn't show the "persona changed" chip. Clearing the box entirely isn't allowed: Save stays off with a message until the text is reset (e2cdd71bd2, a116922787, 0335681d8b).
  • Approver: the settled roster summary ends with "· by {name}" when the approver is recorded, which is only in shared conversations (cee5047b8a).
  • Cleanup: removed the preview hook's unused debounce (a74015ae0f).

Evidence

At 0335681d8b, on top of #750, after the stack was rebased onto j5/main. The commit-level checks for the review fixes are listed first, then the earlier evidence at 99284552af:

  • The CI typecheck command exits 0 here. Web src/j5 (510 tests) and server src/j5/a2a (787 tests) pass at e2cdd71bd2, and the chip commit's focused tests (drift and launch) pass with lint and typecheck clean.
  • At 99284552af, 80 focused tests passed:
    vp test run apps/web/src/j5/crew/CrewProposalCard.test.tsx apps/web/src/j5/crew/crewProposalDraft.test.ts apps/web/src/j5/crew/crewSeatRuntime.test.ts apps/web/src/j5/crew/useCrewProposalPreview.test.tsx apps/web/src/j5/crew/crewPlaybookPlan.test.ts apps/web/src/j5/crew/crewProposals.logic.test.ts apps/web/src/j5/crew/crewNotices.logic.test.ts apps/web/src/j5/playbooks/PlaybookStages.test.tsx
  • Disclosure tests cover starting collapsed, expanding/collapsing without losing roster edits, remembering the choice across composer remounts, isolating it by environment/thread, and expanding a brief clamped to two lines.
  • Modal tests cover Save/Cancel, incomplete additions, duplicate names, persona name/instruction population, inherited runtime settings, stale persona reads, read-error retry, portalled model selection, workspace repair, Escape/focus restoration, permissions, and fresh full-roster approval tokens.
  • A persona text the person edits replaces the persona's instructions at launch, and the original is not also sent. The tests cover edit, save and reopen, reset to the persona text, a cleared box blocking Save, the approval token changing with the edit, and an agent's own instructions request still replaying unchanged.
  • Web typecheck passed: vp run --filter @t3tools/web typecheck.
  • Targeted lint passed:
    vp lint apps/web/src/j5/crew/CrewProposalCard.tsx apps/web/src/j5/crew/CrewProposalMemberDialog.tsx apps/web/src/j5/crew/CrewProposalMemberRow.tsx apps/web/src/j5/crew/CrewSeatEditor.tsx apps/web/src/j5/crew/CrewRosterGate.tsx apps/web/src/j5/crew/CrewProposalCard.test.tsx
  • git diff --check passed.

UI changes

The proposal starts collapsed above the composer and remembers its disclosure state. The brief is limited to two lines with View more / View less. Compact member rows show provider logos, names, model/reasoning/access, short reasons, and Edit/Remove icons. Add member, Decline, and Approve Crew stay in the footer. The shared Add/Edit modal follows the approved layout, with separate Provider/Model controls and saved-persona name, instructions, and runtime defaults.

Before: 04b7a0df9ad77d27abe7dbb75360c34db8e0b866. After: 99284552af8a120355005d6435dd0c18a0c3c6f9. Both use isolated TODO-filter proposals at 1280×800; the original base and current head proposals were generated in separate authorized turns, so their text is not byte-identical.

Before After
Crew proposal roster Crew proposal roster, before Crew proposal roster, after
Member editing Member editing, before Member editing, after
Collapsed proposal New surface Collapsed proposal, after
Persona defaults New surface Persona defaults, after
Add member New surface Add member, after

The PNGs are uploaded on j5/evidence, outside the source branch. I verified all seven uploaded files byte-for-byte through GitHub's API. The local corporate proxy returns 403 for raw image URLs, so inline rendering could not be confirmed here.

Video pending: a fresh interaction recording could not be made. J5 browser snapshots repeatedly timed out; Chrome provided the screenshot fallback, but native recording failed with cgWindowNotFound / timeoutReached. No superseded video is presented as current-head evidence. Manual capture steps: expand the proposal, toggle View more, edit/cancel a member, select a saved persona and cancel, add/remove a member, then collapse the proposal. Stop before approval.

Live testing

PASS for the changed proposal/editor UI at 99284552af8a120355005d6435dd0c18a0c3c6f9; PARTIAL for the full Crew lifecycle. I re-tested the integrated final UI on the isolated setup-agent-live-test.ts server through the authorized Chrome fallback. The proposal was generated by the previously authorized Haiku 5.5 turn at 137f12057092d8e069cd043a11fa06695f81091b; no additional provider turns ran for this final pass.

Verified the initially collapsed strip, expanded roster, two-line brief disclosure, Edit/Cancel/Save, saved-persona name/instructions/provider/model/reasoning/access defaults, retained edits across folding, and adding/removing a draft member with the live count returning from four to three. No Crew was approved and no members launched. Focused tests cover approval tokens, permission checks, stale preview handling, and keyboard restoration.

Not verified: approval/launch and the resulting Captain notice, playbook proposals, Inbox in a real browser, desktop shell, remote/relay/tunnel modes, and multi-device approval races. Those need a separate live pass; approval would require a new explicit model/launch grant. The interaction video remains outstanding. The roster-edit restore, the persona replacement and the approver line were not re-run live here; tests cover them.

Upstream impact

ChatView.tsx passes the J5 gate through the existing threadProgressControl slot alongside Playbooks. The integration is recorded in FORK.md, case 24; it reuses upstream's composer attachment primitives without changing their behavior.

Source scope is web and desktop's shared UI, including Inbox proposal cards. The proposal seat gains one optional personaInstructions field and the persona assignment one optional instructionsEdited marker, both J5-owned and only set by the roster card; provider adapters are unchanged and mobile is outside this feature. Destination-environment permissions and server preview validation remain authoritative.

Merge Danger

Door: two-way; reverting restores the previous presentation. No migrations. The two new fields are optional and only appear in approved seats, so a revert just ignores them.

Blast Radius: Crew proposals in web/desktop chat and Inbox, plus Captain approval-notice rendering from the earlier work in this PR.

The main risks are persona defaults/instruction handling, modal picker/focus behavior, and stale approval previews. Approval continues to require a matching full-roster token and server validation. The final proposal/editor UI was checked in Chrome; the earlier independent code/security reviews covered the superseded head, not this redesign.

After merge: nothing; no migration or activation step.

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 — screenshots uploaded; current-head video blocked as described above
  • UI screenshots: current-head before/after images uploaded and verified through GitHub
  • Interaction video: still outstanding; the review panel's tester recorded one that isn't attached yet
  • 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
  • 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 — not applicable; existing J5 integration only
  • Surfaces: entry points, clients, providers, contracts, reverse states, connection modes (see AGENTS.md) — scope and live gaps assessed above
  • Docs: definitions under docs/j5/product/ and user docs rewritten where this changes them

Implemented with GPT-6.1-Sol in the Codex harness.

@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

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL 1,000+ effective changed lines (test files excluded in mixed PRs). labels Oct 27, 2026
@bryantderosier bryantderosier linked an issue Oct 27, 2026 that may be closed by this pull request
20 tasks
@bryantderosier bryantderosier self-assigned this Oct 27, 2026
@bryantderosier
bryantderosier added this pull request to stack #753 October 27, 2026 15:02
bryantderosier added a commit that referenced this pull request Oct 27, 2026
@bryantderosier bryantderosier changed the title feat(web): edit Crew proposal members in place feat(web): review Crew proposals from the composer Oct 27, 2026
bryantderosier added a commit that referenced this pull request Oct 27, 2026
@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: #751

Live (Astra, stack tip): collapsed and expanded states, View more, Add/Edit/Remove, persona defaults, Escape and focus, and approval all passed (collapsed, expanded, persona defaults). The tester also recorded the interaction video this PR is missing. Ask if you want it.

Should fix: editing a persona's loaded instructions sends both copies. The member dialog loads the persona's instructions into the editable box (CrewProposalMemberDialog.tsx:63-74). crewMemberInstructions (crewProposalDraft.ts:163) strips them only when the text still starts with the exact persona text. After any edit inside that text, the whole edited copy goes out as seat instructions (CrewLaunchService.ts:746). The seat also still gets the original persona text through its assignment. So if someone deletes "always open a PR" from a reviewer persona, the seat gets the original line plus a conflicting copy without it, and the deletion has no effect. crewProposalDraft.test.ts:205 locks this behaviour in. A smaller design: show the persona's instructions read-only and add a separate "member guidance" box.

Nits

  • useCrewProposalPreview's debounceMs defaults to 0, and neither caller passes it (CrewProposalCard.tsx:92, CrewProposalMemberDialog.tsx:111). The parameter and its timer are dead code.
  • The gate now renders in the composer's threadProgressControl. That slot is hidden while a blocking top drawer is open (ChatComposer.tsx:6432), so the proposal disappears while the Captain has a pending approval or question. That's acceptable, since Playbooks behave the same way, but FORK case 24 should say so.
  • The description says "This remains a draft", but the PR isn't marked as a draft. The before and after shots also use different proposals; your rule asks for the same data in both.

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.

Comment thread apps/web/src/components/ChatView.tsx Resolved
@bryantderosier

bryantderosier commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator Author

Thanks. Here's where each one landed:

  • Persona instructions sent twice: fixed in e2cdd71bd2. An edited persona text now replaces the persona's instructions at launch, with a reset button, and an edited seat doesn't get a false "persona changed" chip (a116922787).
  • Unused debounce: removed in a74015ae0f.
  • Hidden slot: FORK.md now says the proposal disappears while a blocking approval or question is up. Saved edits now come back when it returns (cb9eab8f71).
  • Description: fixed the "remains a draft" line. I left the before and after shots as they are, since they use different proposals.

bryantderosier and others added 10 commits October 29, 2026 08:16
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…#742)

The composer unmounts the roster gate while an approval or question is up, which threw away the card's saved edits. A small J5-owned store keyed by environment and proposal restores them, and approving or declining clears them.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…at launch (#742)

The member dialog loaded the persona's text into the editable box, so after any edit the whole copy was sent beside the persona's own. A new optional personaInstructions on the proposal seat, set only by the roster card, carries the edited text. Launch snapshots the persona with it, so the original is not also sent, and the box offers Reset to persona text. The agent's own instructions field and the agent tools are unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ch chip (#742)

An edited snapshot differs from the library's definition because the person chose it. The assignment records instructionsEdited at launch, and agentPersonaDrift reports unknown for it, so web and mobile show no chip.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…rting (#742)

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

@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 0335681. The remaining empty-persona-instructions issue is fixed: clearing the box now reports a validation error and disables Save, whitespace-only replacements are rejected, and Reset to persona text restores a valid member without silently discarding an edit.

Verified the source and ran crewProposalDraft.test.ts and CrewProposalCard.test.tsx on this exact head: 34 tests passed across 2 files, including clear/blocked/reset/save/approve and the existing nonempty replacement and draft-restoration regressions. CI is green. Range-diff confirms the previously reviewed #751 commits are unchanged by the rebase, with this fix added. The follow-up in #751 (comment) is addressed.

bryantderosier and others added 5 commits November 2, 2026 09:01
The old seat dialog is gone in this layer, so main's edits to it and its
test are dropped; the roster gate, proposal card and preview hook keep
main's compiler-friendly style.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ore reads

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…roposal UI

The React Compiler memoizes these files, so the useMemo calls are plain values. The card saves its roster draft in the handler that changes the rows instead of an effect.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@bryantderosier
bryantderosier merged commit d12baff into j5/main Nov 3, 2026
36 of 38 checks passed
@bryantderosier
bryantderosier deleted the j5/742-flat-roster-card branch November 3, 2026 01:30

This branch was successfully deployed

1 active deployment
Preview — 5be6542b 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:XXL 1,000+ 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 flat roster card with members edited in place

3 participants