Repository navigation
feat(mobile): J5's archive warning on every mobile archive door - #845
Conversation
Mobile archived directly, so an agent's open asks ended and its children were left without the person seeing either, and a Crew seat's refusal pointed to a Fleet page mobile lacks. The web archive preflight (facts read, warning payload, flow) moves to client-runtime, and mobile's one archive executor calls it after upstream's working-thread check. The native confirm shows the same measured facts as text; an agent with nothing to warn about archives at once. A seat's refusal names web or desktop for Archive crew, on mobile and in the server's message. Closes #835 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
This review includes 23 billable files and costs up to $5.75.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 4 minutes for your next included review. View limit details
|
Jacksondr5
left a comment
There was a problem hiding this comment.
Combined panel review (reviewer-opus + reviewer-sol) at 24cfb07
Verdict: one should-fix, nothing else. Not merge-ready until it's resolved, the screenshots are on the PR, and the tester has passed it on a device.
Should-fix: the mobile warning hides open asks and cuts intents short (raised by both of us)
apps/mobile/src/j5/archive/archiveWarningText.ts:66 lists the first 5 asks and then "and N more". :18–23 cuts every intent at 120 characters. Nothing lets the person see the rest before confirming.
Failure scenario: an agent has six open asks, and the sixth is BLOCKING. On mobile the person confirms "Archive anyway" and ends an obligation they never saw. An intent over 120 characters loses the decision it asks for.
That breaks docs/j5/product/features/archive-flow.md AC3 ("lists every open ask with its urgency, direction, counterpart, time open, and verbatim intent").
The constraint behind it is real. Dialog.android.tsx puts the message in Compose's AlertDialog.Text, which cuts off long text instead of scrolling. iOS's Alert does scroll. So removing the cap isn't enough on Android.
Ways to resolve it:
- (a) Preferred: show the full payload in a scrollable view that J5 owns (a sheet, modal or screen). Keep
confirmJ5Archiveas the single call fromuseThreadListActions.ts, so the executor edit doesn't change. If the view needs a mount point, record it as a FORK.md case and a seams-test row. - (b) Only as a product deviation the Captain accepts explicitly: keep the cap, but sort asks blocking > soon > fyi > none before cutting, so a hidden ask never outranks a shown one. This reduces the risk but doesn't fix missing facts or full intents. It also doesn't guarantee that a large Crew or placement section fits.
This finding stays open until (a) lands or the Captain accepts (b) in writing.
Checked and fine
- The move into
packages/client-runtime/src/j5/archiveFlow.tskeeps web's oldarchiveFlow.tsandarchiveFlowClient.tsbehaviour. Web keeps thin bindings, and its dialog and tests are unchanged. - Every mobile archive door (swipe, row menu, sidebar) goes through the one
executeAction("archive"). The command palette's "archive" entry only opens Archived threads. - The J5 check runs after upstream's working-thread check and before the undo invalidation and mutation. Declining it leaves the thread untouched (tested).
- Fast path for a clean agent or a non-agent thread: no dialog.
- A failed read shows "Couldn't check".
- A Crew seat is refused and the message names web or desktop. The server guard's message does too.
- Unarchive is unchanged.
- The preflight reads the thread's own environment:
scopeThreadRef(thread.environmentId, …). - FORK.md case 21 text, its file-table row and its
upstreamSeams.test.tsrow are all there. The D13 register text names mobile.
Considered and dropped
- On Android, a new dialog that replaces this one never calls
onCancel, so the promise would stay pending. That's rare (another dialog has to open while this one is up), so we left it out. vi.waitForinconfirmArchive.test.ts: lint passes, and it's an existing mobile test pattern.
Reviewer-run checks
- mobile:
src/j5/archive,useThreadListActions.test.ts,upstreamSeams.test.ts, 68 tests in 4 files, all passed - client-runtime:
archiveFlow.test.ts, 2 passed - web:
src/j5/a2a, 45 tests in 7 files, all passed vp lintis clean on the changed files
Still pending: before/after captures (Android and iOS) and the tester's device verdict.
Reviewed by Claude Opus 5.5 (reviewer-opus) and Sol 6.1 (reviewer-sol) in J5 Code.
…able sheet Android's alert can't scroll, so the text warning capped asks at five and cut intents, which could end a blocking ask the person never saw (archive-flow AC3). The warning is now a J5 sheet mounted beside upstream's Dialog host: every ask with its whole intent, urgent first, and one destructive confirm. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Jacksondr5
left a comment
There was a problem hiding this comment.
Combined panel re-review (reviewer-opus + reviewer-sol) at 74e28a3
Verdict: the should-fix is resolved, with no new findings. The panel approves the source. Still pending: updated before/after captures (Android and iOS) and the tester's device verdict.
What we checked
ArchiveWarningSheet.tsxrenders every ask with its full intent. There's no cap, no clipping and nonumberOfLines, and the list sits inside aflex-1ScrollView. Asks are sorted blocking > soon > fyi > none, keeping the server's order within an urgency (archiveWarningOrder.test.ts).- Crew seats, the placement subtree, each "couldn't check" line and the workspace note are all still shown.
- Every way out settles the promise:
- Confirm and Cancel each resolve it.
- Android back calls
onRequestClose, which cancels. - On iOS, a swipe-down on a
pageSheetalso cancels: React Native 0.88'sRCTModalHostViewComponentViewsendsonRequestClosefrompresentationControllerDidAttemptToDismissandpresentationControllerDidDismiss. - A new request cancels the one already showing. That also fixes the stranded-promise case we had dropped as rare.
confirmJ5Archiveis still the single seam (confirm: presentArchiveWarning).- The host mounts beside
Dialog.HostinApp.tsx. It's recorded in FORK.md case 21 and the file-table row (nowB, 21), and the seams test has an<ArchiveWarningHost />reach.
Reviewer-run checks
- mobile
src/j5/archive,useThreadListActions.test.ts,upstreamSeams.test.ts: 66 tests in 4 files, all passed (both reviewers) vp lintis clean onsrc/j5/archiveandApp.tsx
For the device pass: check that the sheet presents from every archive door on iOS, including the iPad sidebar, and that a long list scrolls with both buttons still visible.
Reviewed by Claude Opus 5.5 (reviewer-opus) and Sol 6.1 (reviewer-sol) in J5 Code.
…warning rows Co-Authored-By: Claude Opus 5.5 <[email protected]>
Jacksondr5
left a comment
There was a problem hiding this comment.
Panel note (reviewer-opus + reviewer-sol) at 8b9472c
This push only changes spacing: the urgency label and the direction text use mr-2 in place of the row's gap-x-2, which Android didn't apply (the tester's finding). It changes 3 class names in ArchiveWarningSheet.tsx. Our approval of the source at 74e28a3 still stands.
Reviewed by Claude Opus 5.5 (reviewer-opus) and Sol 6.1 (reviewer-sol) in J5 Code.
Problem
Mobile archived directly, without J5's archive preflight (register D13). On mobile, archiving an agent ended its open asks and left its children running, and archiving a Captain retired its Crews, all with no warning. A Crew seat's refusal sent people to a Fleet page that mobile doesn't have (F2).
Closes #835
What changed
packages/client-runtime/src/j5/archiveFlow.ts: reading the facts and participant names, deciding whether to warn, building the warning, and the flow itself. Web'sarchiveFlow.tsandarchiveFlowClient.tsare thin bindings, and web's dialog and its tests are unchanged.presentParticipantIdentitymoves beside it asj5/participant-identity.executeAction("archive")in upstream'suseThreadListActions.ts. After upstream's working-thread check, that branch makes one call into J5-ownedapps/mobile/src/j5/archive/confirmArchive.ts.apps/mobile/src/j5/archive/ArchiveWarningSheet.tsx. Its host mounts beside upstream'sDialog.HostinApp.tsx. The sheet shows every fact web shows: the Crews it commands seat by seat, agents placed beneath that keep running, every open ask with its full intent (urgent first), "couldn't check" for a failed read, and the workspace reassurance. One Cancel and one destructive confirm. Android's back gesture cancels.docs/j5/product/upstream.mdD13 now says the dialog shows on web and mobile.UI changes
Android 16 emulator, 1080×2400, light theme. Both sides use the same isolated test home, with real Claude Haiku agents holding six open asks and a child. Base is
31447c91c6, head is8b9472c848. iOS is deferred to Checkpoint 1 on Jackson's iPhone; no iOS UI has been verified.Archiving an agent with six open asks and a child. Before: Archive in the row menu removed the agent straight away, ending its asks without a word. After: the warning lists the child that keeps running and every ask in full, blocking first.
Archiving a Crew seat on its own. The refusal now says where Archive crew is: web or desktop.
More states after the change:
Live testing
Android: pass at
8b9472c848, run by the crew's tester (GPT-6 Astra through Codex) with real Claude Haiku 5.5 agents on an isolated test server. Report: project artifacttest-reports/j5code-mobile-wave1b-tester/8b9472c848.md.74e28a3860the tester found the urgency label running into "To";8b9472c848fixes it, and the captures above are from that head.Not exercised live, and why:
archiveThreadas the row menu, anduseThreadListActions.test.tscovers that a declined warning sends no archive.archiveThread.confirmArchive.test.tscovers that a failed read warns "Couldn't check" rather than archiving silently.Upstream impact
apps/mobile/src/features/home/useThreadListActions.ts: one import and one call intoconfirmJ5Archive.apps/mobile/src/App.tsx: one import and<ArchiveWarningHost />beside<Dialog.Host />.apps/mobile/src/j5/upstreamSeams.test.ts.Checklist
confirmArchive.test.ts(clean, warned, declined, seat refused, failed read, not an agent),archiveWarningOrder.test.ts(urgent first), a declined-warning case inuseThreadListActions.test.ts; web's 22 archive tests stay greenFORK.md(case text and file-table row) in this PRarchive-flow.mdand the user docs already describe this behaviorBuilt by Claude Opus 5.5 in J5 Code (Claude Code harness).
🤖 Generated with Claude Code