Repository navigation
feat(mobile): ask whose device it is and renew the session on a level change - #844
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
This review includes 21 billable files and costs up to $5.25.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 23 minutes for your next included review. View limit details
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Shared J5 sharing helpers packages/client-runtime/src/j5/sharing.ts, packages/client-runtime/src/j5/sharing.test.ts |
Client-runtime adds helpers for name-prompt selection, offered access levels, name messages and conflicts, and permission notices. Tests cover prompt selection and notice conditions. |
Web adopts shared helpers apps/web/src/j5/sharing/* |
Web sharing imports the shared helpers and removes their former local implementations and associated tests. |
Mobile identity prompts apps/mobile/src/j5/sharing/identity.ts, apps/mobile/src/j5/sharing/NameQuestion.tsx, apps/mobile/src/j5/sharing/guestAccess.ts, apps/mobile/src/App.tsx |
Mobile adds identity commands and environment selection for naming prompts. The app mounts a prompt for device claims and first-owner naming. Successful saves refresh connection access. Sharing data is configured to reread on sharing changes. |
Mobile permission-notice filtering apps/mobile/src/j5/sharing/upstreamNotices.ts, apps/mobile/src/features/connection/permissionUpdateNotice.ts |
Mobile derives environment IDs that meet the permission-notice predicate and requires a matching ID when filtering sessions with legacy permissions. |
Mobile Session Renewal
| Layer / File(s) | Summary |
|---|---|
Provide session renewal to the mobile runtime apps/mobile/src/connection/runtime.ts, apps/mobile/src/j5/upstreamSeams.test.ts, FORK.md |
The mobile connection runtime provides J5 session renewal before the provided client connection layer. The seam checks cover the runtime and related mobile integrations. Case 70 records manual pairing when an offline mobile session outlasts its lifetime. |
Estimated code review effort: 3 (Moderate) | ~25 minutes
Sequence Diagram(s)
sequenceDiagram
participant NameQuestionHost
participant nameToAskAtom
participant identityCommands
participant DeviceOwner
participant ConnectionAccess
NameQuestionHost->>nameToAskAtom: Read selected environment and prompt kind
nameToAskAtom-->>NameQuestionHost: Return environment and prompt kind
NameQuestionHost->>identityCommands: Query claimable people
identityCommands-->>NameQuestionHost: Return claimable people
DeviceOwner->>NameQuestionHost: Choose a person or enter a name
NameQuestionHost->>identityCommands: Submit device claim or first-owner name
identityCommands-->>NameQuestionHost: Return command result
NameQuestionHost->>ConnectionAccess: Refresh access after success
Possibly related issues
- Issue 40 includes mobile pairing and daily-use parity; this PR adds mobile device-owner prompts and session renewal.
- Issue 831 specifies mobile device-owner prompts and session renewal after access-level changes; this PR adds the prompts and session-renewal layer.
- Issue 609 tracks mobile sharing and guest-access work; this PR changes sharing-data rereads and access-related notices.
Suggested reviewers: bryantderosier
Merge Risk: 
Minimal · previous review 64052
-
Mobile now asks who a device belongs to and renews the session after a level change, while the name-question helpers are shared with web. No concrete defect was found in the changed code. Refused renewal and iOS behavior were not exercised, so a quick device check of those paths is worthwhile before release.
Pre-merge checks: 
4
-
Full details: Title check
-
Explanation
The title "feat(mobile): ask whose device it is and renew the session on a level change" matches the main changes in the changeset. The changes add a name-question host that asks for a person name for unplaced devices and unnamed first owners, plus a J5 session-renewal layer wired into mobile's connection runtime for level changes. The title also names the two primary behaviors. It omits the shared client-runtime move and the permission-notice change, which are secondary details and acceptable to omit.
Full details: Description check
-
Explanation
The description follows the repository template. It has Problem, What changed, UI changes, Live testing, Upstream impact, and Checklist sections, and each is substantively filled. It states the problem (mobile devices paired without a person name, and no session renewal on level change) and links the tracking issue as part of
#831. It lists the code changes and the upstream-owned files, with their FORK.md cases (70 and 73). It gives Android before/after screenshots and live test verdicts with commit hashes, and it names what was not exercised (iOS, relay, tunnel, DPoP, and several servers at once). The Checklist has one unchecked item, the Docs item, which the author defers to a separate docs PR. The template asks for a closing line naming the model and harness. The description ends with 'Built by Claude Opus 5.5 in Claude Code', which satisfies that. Minor gaps: the Problem section does not use a 'Closes#123' line, because the work is part of#831rather than a single issue, and the Docs item is unchecked with a stated deferral. Neither gap leaves the description largely incomplete.
-
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Jacksondr5
left a comment
There was a problem hiding this comment.
Combined review: reviewer-opus and reviewer-sol (Claude Opus 5.5 and GPT Sol 6.1), head 2891176
Both of us reviewed the PR independently. Neither found anything that blocks merge.
Checked and fine
- P1, the name question.
NameQuestionmatches web'sNameDialogstep for step:- the same
serverToAskNameForrule, now shared and covered by the newsharing.test.tscases; - the claim list with each person's highest level, plus "Someone new";
- the
isPersonNamecheck before sending, and the name-in-use refusal; - after a claim, the session ends for renewal; the first owner's access is read again (
refreshConnectionAccess, as web'srefreshSharingdoes).
- the same
- P2, session renewal.
J5SessionRenewal.layersits at the same place in mobile's connection runtime as in web's. The nativeRuntime.layersuppliesHttpClient, and the connection storage supplies the credential get and put the renewal needs. T3 Connect (DPoP) routes are excluded bybearerOf, as on web. - Rereading.
j5Sharingnow rereads on thesharingrevision, as web's does, so a level change reaches mobile's access atoms without a reconnect. - Moved helpers. The helpers lifted into
client-runtime/j5/sharing.tsare unchanged, and web imports them from there. The web tests for the moved helpers are running on reviewer-sol's side; the shared tests (27) and mobile seam tests (21) pass. - FORK and docs. Case 70's text and file-index rows, and both new rows in
upstreamSeams.test.ts, are present. The AC17 rewrite and the History entry match Jackson's 2026-10-31 decision on #831.
Note, not blocking
- The full-screen modal blocks the whole app, not only the server that asks, and has no way out. This follows the spec ("can't be put off") and web. On a phone with several saved servers, though, pairing a second server from a link that names no person locks every server until the question is answered. If that server then becomes unreachable, Continue fails and Settings → Remove server is behind the modal. We aren't asking for a change here, because claiming as "Someone new" always works while the server is reachable. It's one for Jackson to try at Checkpoint 1.
Not yet done (merge gates, not code findings)
- The before/after captures (Android and iOS: this adds a screen), the tester's run of P1 and P2 on a device, and green J5 CI.
- This PR edits
docs/j5/product/features/people-and-access.mdanddocs/j5/user/people-and-sharing.md.
Jacksondr5
left a comment
There was a problem hiding this comment.
Combined review: reviewer-opus and reviewer-sol, head bbd3648
The only change since 2891176 removes the edits to docs/j5/product/features/people-and-access.md and docs/j5/user/people-and-sharing.md. #831's docs move to their own PR. The code is unchanged, so our review of 2891176 stands: the panel has no open code findings. The merge-order note about the docs conflict with #848 no longer applies, though the FORK.md file-index rows still overlap.
Before merge it still needs the before/after captures (Android and iOS), the tester's run of P1 and P2, and green J5 CI.
Jacksondr5
left a comment
There was a problem hiding this comment.
Combined review: reviewer-opus and reviewer-sol, head 640526e
Both of us reviewed the two commits that fix the tester's findings. Neither found anything that blocks merge.
- 82efaa9, no "Pair again" after a renewal.
permissionNoticeAppliesmoves from web intoclient-runtime/j5/sharing.tsunchanged, with its tests. A person, an unknown device or a server that hasn't answered gets no notice. A server from before people, or a service session, keeps upstream's notice. Mobile'spermissionNoticeEnvironmentIdsAtommirrors web's. The edit to upstream'spermissionUpdateNotice.tsis one import and one condition, recorded in case 73 with a file-index row and a seam row. - 640526e, the name question stays on "Saving…". A failure clears
busyand shows the error. A success keeps "Saving…" until the re-read access unmounts the question, and the claimable list's error is hidden while saving, so the error no longer flashes during renewal. - Note, not blocking: after a success, the only way out is that unmount. If the server refuses the renewal, or the first owner's re-read fails, the question stays on "Saving…". It was just as stuck before (only showing an error), so we're not asking for recovery code.
The focused tests pass: 31 shared tests (sharing and renewal) and 22 mobile seam tests.
The panel has no open code findings. Before merge it still needs the before/after captures, the tester's re-run and green J5 CI.
… change Mobile now asks the name question when a pairing link names no person, or when the first owner has no name (People and access AC5, AC6), and renews a saved server's session when J5 ends it for a change of level (AC17), as web does. The name-question rule moves into client-runtime so both clients share it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Upstream's notice reads a Viewer's renewed one-permission session as legacy and told the person to pair again. Mobile now skips it for a connection J5 places as a person, as web does (case 73); the rule moves into client-runtime. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ion closes it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
640526e to
8e9c9b1
Compare
Problem
On mobile, a device paired with a link that names no person lands on an empty "No projects found" and can't say whose it is. And when an Owner changes a person's level, the phone is cut off until someone pairs it again by hand. Web handles both. Part of #831 (gaps P1 and P2).
What changed
NameDialogdoes. It asks when a saved server can't place the device (pick an existing person or name someone new), and when the first owner has no name yet. It's a full-screen modal that can't be swiped away, because the device reaches nothing on that server until it's answered. The rule for which server asks (serverToAskNameFor), plusofferedLevel,levelLabel, the name-refusal messages andnameIsInUse, now live inpackages/client-runtime/src/j5/sharing.ts, so web and mobile share one copy. Web imports them from there; its behaviour is unchanged.@t3tools/client-runtime/j5/session-renewallayer, as web's does. When J5 ends a saved server's bearer session for a level change, the phone renews it with its old token and reconnects once. Claiming a device goes through the same path: the server ends the unknown device's session and the phone renews into the claimed person.permissionNoticeAppliesmoves intoclient-runtime.j5Sharingnow re-reads access when the server'ssharingrevision moves, as web's does. A scope added while the connection stays open is then picked up.Managing sharing (Share, People, Leave, Rename) stays on web and desktop (#609).
UI changes
iOS is deferred to Checkpoint 1, per the Captain's wave-1 Simulator hold.
Live testing
Verdict: PASS on Android 16 at head
640526e8a7. The crew tester ran it (GPT-6 Astra) against isolated test servers, with a real Claude Haiku 5.5 turn. Report:artifacts/test-reports/j5code-mobile-wave1a-tester/640526e8a7.md.bbd364827e, and that logic is unchanged since.--freshhome: asked for a name only, with Continue disabled while the field is empty. Saving closes the question. Base31447c91c6vs head, as above.Not exercised: iOS (deferred to Checkpoint 1), relay, tunnel and DPoP routes (never renewed, as on web), and several servers asking at once. No native video: the change has no motion beyond the modal opening.
I also ran a smaller check myself at
2891176a03: claiming a new person on Android, with before/after captures (the first rows above).Upstream impact
apps/mobile/src/App.tsx: one import and one<NameQuestionHost />besideDialog.Host. FORK.md case 70.apps/mobile/src/connection/runtime.ts: one import and oneLayer.provideMerge(J5SessionRenewal.layer), as web's runtime does. FORK.md case 70, plus a new file-table row.apps/mobile/src/features/connection/permissionUpdateNotice.ts: one import and one condition, web's case-73 rule. FORK.md case 73, plus a new file-table row.apps/mobile/src/j5/upstreamSeams.test.ts. Neither changes what upstream's product does: J5's own people model is what asks and renews.Checklist
serverToAskNameFortests moved toclient-runtimeand pass. Renewal is covered bysessionRenewal.test.ts, and the seams test pins both wirings.FORK.md(case text and file-table row) in this PR.Built by Claude Opus 5.5 in Claude Code (J5 crew seat builder-identity).
🤖 Generated with Claude Code