Repository navigation
feat(mobile): review a Captain's Crew proposal: approve, decline, remove seats - #983
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Jacksondr5
left a comment
There was a problem hiding this comment.
Combined panel review (reviewer-opus + reviewer-sol) at eb068f7
Verdict: one small should-fix, plus a FORK.md case-number collision to settle. The source is otherwise approved. Still pending: the tester's Android run (strip, review, remove, restore, decline, approve, read-only) and J5 CI. iOS is planned for Checkpoint 4.
Small should-fix: a failed proposal read shows "Loading" forever (raised by reviewer-sol)
CrewProposalReviewScreen.tsx (around :245–255) chooses between loading and "Already answered" using only query.data === null. useEnvironmentQuery maps a failed read to data: null and puts the cause in query.error. So a cold deep link (…/crew-proposals/:proposalId is registered) whose listCrewProposals read fails shows "Loading the proposal…" with no way out. Show query.error with a retry (query.refresh) before deciding between loading and answered.
FORK.md case 113 collides with #984
This PR adds case 113, and #984 (Metro blockList) also records itself as case 113. Whichever merges second renumbers, including its ledger rows and seams-test record.
The three hard-look points
- Approval binding: holds. The mobile hook's key is environment, proposal, the full seat list and a refresh counter.
data(and so the token) is returned only for a settled preview with the current key thatcrewPreviewIsCompleteaccepts: same proposal, non-empty token, exactly one row per seat on screen. Every removal changes the key, so Approve stays disabled until a fresh complete preview arrives. A failed attempt callsrefresh(), so the next approval uses a new token. A stale response is dropped by the effect'scurrentflag. Runtime rows from an older preview only explain unchanged seats (crewPreviewRuntimeForSeats) and never enable Approve. - Read-only path: holds. Decisions need
resolveCrewProposal's permission (AuthOrchestrationOperateScope) anduseCanOperateThreadfor the Captain's thread. Without them, Remove, Decline and Approve are disabled and the screen says why. Preview isn't guarded, so a read-only viewer still sees each seat's model, reasoning and access. - No edits beyond removal: holds. Approval sends
requestedSeatsminus the removed ones, unmodified (decision 2). There's no add, swap or settings edit, and the screen points to the Captain or to web. The last seat can't be removed, and "Restore removed seats" is the way back.
Also checked
- Faithful extraction.
crewPreviewIsCompleteandcrewPreviewRuntimeForSeatsare web's old inline logic verbatim. Web's hook keeps its request-identity rule, and its card and draft import the shared gate filter, seat lines and playbook helpers. Web's 115 crew tests pass on the shared code. - Answered elsewhere.
crewProposalsre-reads on thecrewtrigger, so the screen switches to "Already answered" and the strip disappears. - Seams.
CrewRosterStripmounts beside case 49 under the same conditions. Case 98's spread is renamed toj5ThreadRoutes, and the old artifact routes file is removed with no imports left. The ledger rows and two seams reaches are updated. - Nit: case 98's new text puts "(and, since case 113,
ThreadCrewProposal)" before(…/ThreadArtifactsScreen.tsx), so the path reads as the proposal screen's file. Reorder it. - Docs.
crews.mdandpersonas.mdstill say mobile can't answer proposals, which the PR leaves to the wave's docs PR. That's fine if it's tracked.
Reviewer-run checks
- client-runtime
crewProposals.test.ts: 10 passed. Websrc/j5/crew: 115 in 11 files. MobilereactCompilerCoverage.test.tsandupstreamSeams.test.ts: 1136 (reviewer-opus). Reviewer-sol: 75 shared, seams and web-draft tests plus 5 new mobile compiler checks. vp run typecheck: mobile exit 0 (both reviewers), web exit 0 (reviewer-opus)- lint: clean on the changed code;
git diff --check: clean
Reviewed by Claude Opus 5.5 (reviewer-opus) and Sol 6.1 (reviewer-sol) in J5 Code.
Jacksondr5
left a comment
There was a problem hiding this comment.
Panel delta check (reviewer-opus + reviewer-sol) at 3d6e242
Verdict: the should-fix is resolved, with no new code findings, and the panel approves the source. Still pending: the tester's run and captures, and J5 CI.
- Failed read.
CrewProposalReviewScreennow checksquery.errorfirst and shows "Couldn't load the Crew proposal" with Retry (query.refresh), before choosing between loading and "Already answered". J5ComposerControls. It's a transparent wrapper aroundCrewRosterStrip, mounted under the same conditions as before. The upstream edit toThreadDetailScreen.tsxstays one import and one call, and the seams reach follows the new component.- FORK.md. Case 98 now names the artifact screens' file before
ThreadCrewProposaland keeps "read-only" on the artifact screens, which resolves our nit. The cross-references, both ledger rows and the seams records use 114. - Merge order. The case paragraph itself still reads "113." at this head, because the formatter renumbers the ordered list after trunk's 112. #984 must merge first. Then rebase #983 and confirm its paragraph comes out as 114, with Metro as 113, before merging.
Reviewer-run: upstreamSeams.test.ts and reactCompilerCoverage.test.ts pass (1137, reviewer-opus; 54 selected checks, reviewer-sol). Mobile vp run typecheck exits 0. Lint and git diff --check are clean.
Reviewed by Claude Opus 5.5 (reviewer-opus) and Sol 6.1 (reviewer-sol) in J5 Code.
3b451ef to
d1c9689
Compare
Jacksondr5
left a comment
There was a problem hiding this comment.
Panel conflict check (reviewer-opus + reviewer-sol) at d1c9689: the rebase onto trunk with #984 is clean, and the source approval stands.
- All 25 app and package files in the PR are byte-identical to the last reviewed head, 3b451ef, including the removed ones. The only difference in
upstreamSeams.test.tsis trunk's Metro case-113 row. - FORK.md keeps #984's Metro entry as 113., and the roster review's own heading is now 114.. Case 98's text, the three ledger rows (
ThreadDetailScreen.tsx,Stack.tsx,packages/client-runtime/package.json) and the seams records all say 114. git diff --checkis clean. The app and package sources are unchanged, so we didn't rerun tests; the builder reportscheck:changedpasses on this head.
The tester's run, captures and J5 CI remain the gates.
Reviewed by Claude Opus 5.5 (reviewer-opus) and Sol 6.1 (reviewer-sol) in J5 Code.
…ecline, remove seats A Crew proposal could only be answered on web, so a Captain waited until the person reached a computer. Mobile now shows a row above the Captain's composer for each open proposal, and a review screen with every seat's model, reasoning and access as the server resolved them, the binding the approval carries. The person can remove seats (and restore them), decline, or approve; other edits stay on web and desktop. J5's composer rows mount once (J5ComposerControls). Agent Setup on mobile says where Crew settings live. The proposal gate, seat lines, playbook notes and preview binding move to client-runtime and web imports them. Refs #836 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
d1c9689 to
158ebb5
Compare
Jacksondr5
left a comment
There was a problem hiding this comment.
Panel conflict check (reviewer-opus) at 158ebb5: the rebase onto trunk 355672f (#985) is clean, and the source approval stands.
- Against trunk, the PR's own change to
packages/client-runtime/package.jsonis still just the./j5/crew-proposalsexport. The file's only other difference from d1c9689 is trunk's new./j5/crew-inbox-requestsexport. Every other app and package file is byte-identical to d1c9689. - FORK.md keeps Metro as 113. and the roster review as 114., and the
client-runtime/package.jsonledger row now reads "…, 101, 114, Role library". - The earlier red J5 CI was Electron download 504s, so a fresh run on this head is the gate.
Reviewed by Claude Opus 5.5 (reviewer-opus) in J5 Code.
Problem
A Captain's Crew proposal could only be answered on web or desktop. On a phone the Captain waited, since proposals never expire. Jackson's decisions on #836 (1 and 2): a phone can approve a Crew, the approval screen must show each seat's access because the approval binds the settings shown, and the only edit on a phone is removing seats.
Refs #836 (piece 3 of 7). Decision 6's one-line Settings pointer goes with it.
What changed
On mobile:
ThreadCrewProposal, pushed, not a sheet):ScreenScrollViewwith automatic insets (as in fix(mobile): J5 screens sit below the header and status bar on iOS #874).Shared with web:
packages/client-runtime/src/j5/crewProposals.tsnow holds:removeSeat;crewSeatStopsForApprovals,describeCrewSeatWorkspace);crewPreviewIsComplete,crewPreviewRuntimeForSeats).client-runtime has no React dependency, so each client keeps a thin hook. Web's card and hook import the shared logic, with no change in behaviour, and their tests moved with it.
UI changes
iOS (iOS 26.5 Simulator, light theme; head
3d6e2429e9, with the same app code as later heads). A real Claude Haiku Captain proposed a Crew with two Haiku helper seats; auto-approve was off. After only: trunk shows nothing above the composer and has no review screen.Android (head
158ebb5fe7against trunk355672f6f1; real Claude Haiku proposals).New states (after only):
Decline removes the proposal strip (excerpt):
decline-crew-excerpt-158ebb5-after.mp4
Remove and Restore wait for a fresh runtime preview:
remove-restore-confirmed-158ebb5-after.mp4
Approve creates the Crew and its playbook runs (excerpts):
approve-crew-excerpts-158ebb5-after.mp4
Live testing
iOS: partial pass at
3d6e2429e9, run by the iOS tester (Sol 6.1). The proposal row sits above the composer, and both seats' model · reasoning · access lines sit below the native header and status bar. The proposal stayed open (human approval, no Crew launched). This was a visual check only. Report: project artifacttest-reports/pr-983/ios-3d6e2429e9.md.Android: pass at
158ebb5fe7(trunk355672f6f1for the before captures), run by the Android tester (Sol 6.1) with real Claude Haiku turns. Report: project artifacttest-reports/pr-983/158ebb5fe7.md.Not exercised: nothing in scope. Head
158ebb5fe7differs from the iOS head3d6e2429e9only by squashing and rebasing (a FORK ledger conflict), with no app code change.Upstream impact
apps/mobile/src/features/threads/ThreadDetailScreen.tsx: mounts J5'sJ5ComposerControlsbeside case 49's playbook control. This is new case 114. It's one J5 slot for every J5 row above the composer: the roster strip now, and builder-timeline's adjudication dock next, so that one doesn't need another seam.apps/mobile/src/Stack.tsx: the existing case 98 spread is renamed toj5ThreadRoutes, which now also registersThreadCrewProposal.upstreamSeams.test.tsis updated.Checklist
crewProposals.test.ts(the gate filter, removal and unowned steps, seat lines, and preview binding: a token counts only for a preview of exactly the seats on screen, and stale runtime rows drop out); web's 115 crew tests pass on the shared codeFORK.md(case text and file-table row) in this PRcrews.md,personas.md) still say mobile can't answer proposals; per the wave plan they're updated in the wave's single docs PRBuilt by Claude Opus 5.5 in J5 Code (Claude Code harness).
🤖 Generated with Claude Code