Skip to content

feat(mobile): add the Linger Mobile App and its computer side - #685

Open
jeffrey-bin wants to merge 32 commits into
mainfrom
feat/mobile-app
Open

jeffrey-bin wants to merge 32 commits into
mainfrom
feat/mobile-app

Conversation

@jeffrey-bin

@jeffrey-bin jeffrey-bin commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

What and why

Adds the Linger Mobile App (apps/mobile, React Native + Expo): a phone client for the user's own computer. The phone has no account of its own. It pairs with a computer and then reaches it end to end encrypted, over the local network or through Relay nodes that only forward ciphertext.

  • Phone app: Messages-first menu with the Another Me card, chats and group faces matching the desktop, an offline outbox, run status and Stop, answering decision cards of every kind, a read-only Agent sheet, the Library (meetings, documents, Wiki) with an offline in-app viewer for PDF, Office, tables, HTML, Mermaid and video, a Language setting (System, English, Simplified Chinese), meeting recording, Live voice with every Agent, push notifications, and a local log with Save or Send Diagnostics.
  • TeamHub: the Mobile Gateway (Noise XK sessions, LAN listener, Relay links with spare data sockets), Paired Phones with approval by confirmation code, the stored Relay node list (/v0/mobile/relays), push delivery through the Push Service, and the Mobile API allowlist.
  • Relay (apps/relay): host control links, splices, spare data sockets, and the Push Service.
  • Voice Runtime: the Voice Bridge that publishes the phone's audio to LiveKit.
  • Web: Settings > Phones to pair, approve and remove phones and to manage Relay nodes.
  • Docs and acceptance: docs/mobile.md specifies the protocol. .agents/skills/verify-linger/features/mobile.md adds the app's acceptance recipes.

An adversarial review hardened both sides, for example:

  • the phone deletes data only on a refusal inside the handshake;
  • recordings are deleted only after delivery;
  • dialed Relay addresses are checked;
  • a phone may add only public Relay nodes;
  • push grants go only to the trusted Push Service;
  • Relay links stay off on the public development seed.

How it was verified

  • Focused tests: mobile (151 tests, typecheck, lint), relay and push, Voice Bridge, and the TeamHub mobile, phone and decision integration tests on a real PostgreSQL.
  • make check BASE=origin/main. One unrelated failure remains locally: scripts/ci/desktop-release.test.ts under macOS's bash 3.2. This branch does not touch that script.
  • Contracts regenerated.
  • A fresh iOS Simulator ran every Simulator-capable recipe in features/mobile.md against a Desktop running this branch: pairing, routes and pinned nodes, Relay node refusals, messaging, offline outbox across a computer restart, Agent sheet, Library, meeting recording, Live entries, diagnostics, and removal. Push, QR scanning, a second computer and attachments need hardware and were not run.
  • The in-app viewer rendered pptx, docx, xlsx, PDF, csv, HTML, Mermaid, text, an image and mp4 in the iOS 18.2 Simulator, and a real 3.5 MB pptx inside the app. iOS 15 to 17 were not run; no such runtime is installed.
  • The new decision card answer flows (Room creation, AnotherMe setup, connection sign-in, Composio and search keys, decline-only cards) were not run on a device or Simulator. They need a non-production TeamHub with pending cards of each kind. Covered only by unit tests of the answer rules and by TeamHub's existing decision integration tests.
  • TestFlight build 14 and an Android APK were built from 508fd3c4. Both Relay nodes run 508fd3c4's Relay.

Boundary

  • Decision cards on the phone (widened boundary): TeamHub no longer limits which decision kinds a phone may answer. phoneDecisionKinds, DecisionAnswerCommand.OnlyKinds, ErrDecideElsewhere and the 403 DECIDE_ON_COMPUTER response are removed. A paired phone holds its owner's device Session, so it may answer any card that owner may answer, under the same server rules as the Web:
    • browser_connection and computer_permission stay decline-only on the server; the phone shows them with guidance to finish on the computer.
    • room_creation, the AnotherMe setup cards, connection_auth, provider_key and search_key can now be answered from the phone.
    • The allowlist gains the external connection routes (create, reauthorize, status check) and the routes that save the Composio key and a web search key. A paired phone can therefore save those keys at any time, as the desktop can; the app offers it only on a key card.
    • A connection sign-in opens in the phone's in-app browser with no desktop callback. TeamHub's pending-connection poll settles the card. Not yet tried against a real Composio sign-in.
  • Docs: docs/mobile.md, apps/teamhub/AGENTS.md, apps/voice-runtime/AGENTS.md, the OpenAPI contracts and .env.example are updated.
  • Message to provider_ready path: Web and Desktop requests add no network round trip and no file walk. A phone's request reaches TeamHub's handler in process through the Gateway. The phone's own hop over LAN or a Relay is the transport.
  • Migrations:
    • 00897 to 00899 add the mobile tables and a voice_sessions.client column with a default. A trigger enqueues push jobs only for phones that hold a grant. They are rerunnable, because the mobile preview desktop build recorded them as 00894–00896 and earlier builds of this branch as 00895–00899.
    • 00900 is a forward-only repair for those databases: goose skips main's 00894–00896 there, so it creates the room handoff tables, the runtime_local_computers view and messages.continues if missing, and changes nothing elsewhere. TestMobileMigrationsUpgradeEarlierVersionHistories upgrades both histories.
    • 00901 adds each phone's push preferences (push_replies, push_decisions, push_when_active).
  • Push: a reply alerts once per Agent turn after 30 seconds, unless superseded in the direct chat, still running, already read, or the Human is looking at the Room. A decision alerts only its decider, at once. Alerts collapse per Room and kind.
  • Compatibility:
    • New configuration: TEAMHUB_MOBILE_RELAY_URL (an extra node; empty turns Relay links off) and TEAMHUB_MOBILE_PUSH_SERVICE_URL. Both have code defaults.
    • Older phones that read only relay keep working, and an explicitly empty relays means every node is off.
    • No existing request shape changes.

The Mobile App (apps/mobile) reaches its own computer over a Noise XK session,
on the local network or through Relay nodes that forward only ciphertext
(apps/relay). TeamHub gains the Mobile Gateway, Paired Phones, the Relay node
list, push delivery through the Push Service, and the Voice Bridge for
recording and Live from the phone. Web Settings > Phones pairs and approves
phones and manages Relay nodes; docs/mobile.md specifies the protocol.

The mobile migrations follow main's (00894 to 00896).

@linger-review linger-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approve with nits (1 P2, 2 P3)

Scope: base main, merge base 8b7fe39b, 5 commits, 517 files (+41,346 / −846). Loaded coderbook, ponytail-review and karpathy-guidelines; ran in a separate session. The PR is very large, so most of the time went to the security boundary on the computer side: the TeamHub Mobile Gateway (handshake, allowlist, dispatch, streams), Paired Phones, Relay nodes, push, the Voice Bridge proxy and config/env. The React Native app under apps/mobile (about 22k lines) got only a targeted look at its pairing and refusal handling. The Relay server internals got only -race tests, not a line-by-line read.

Findings

P2

  • apps/teamhub/internal/mobilegateway/session_test.go:36: the pipeWire test double races with the gateway, so this test file is flaky. serve writes the encrypted refusal welcome and then calls w.Close right away (session.go, refuse(closeRefused, code)). pipeWire.Read uses select on both p.in and p.closed. When both are ready, Go picks one at random, so the phone side sometimes gets io.EOF even though the welcome is already buffered. A real WebSocket delivers queued messages before the close frame, so the fake behaves worse than the real wire. I ran go test -count=3 -run TestPairingIsRateLimited ./internal/mobilegateway/ on this head and got session_test.go:448: EOF in one of three runs. A plain -race run of the package also failed once. make -C apps/teamhub test runs this package, so check (teamhub) will fail now and then. Fix: in Read, first try p.in with a non-blocking select, and only then wait on in, closed and ctx.

P3

  • apps/teamhub/internal/pairedphone/pairedphone.go:103: every CreatePendingPairedPhone error becomes ErrBadPairRequest. That includes a lost connection, a constraint error or a NUL byte in name. The phone shows BAD_HELLO and nothing is logged. The comment says this branch is a retry that must resume, but a real retry fails first at ConsumeMobilePairingInvite, because the invite was already spent, and gets INVITE_INVALID. The app handles that case in apps/mobile/src/computer/pairing.ts:122. Map only the unique violation on public_key (pgconn code 23505) to ErrBadPairRequest, and wrap and return the rest, so phoneErrorCode logs them as UNAVAILABLE.
  • apps/teamhub/internal/mobilepush/mobilepush.go:29: the comment says "the trigger in migration 00887 names it", but the trigger is in 00894_paired_phones.sql.

Verified as fine

  • Allowlist runs before dispatch. dispatchRequest matches the decoded target.Path against mobileRoutes before building the request, and rebuilds it from target.RequestURI() (mobilegateway/dispatch.go). Gin routes on the same decoded URL.Path, so %2F or .. cannot make the allowlist and the router see different paths. Gin answers unmatched paths with a redirect, not an internal re-dispatch. mobile_allowlist_test.go checks that every entry is a real public route. Sign-in, password, logout, phone approval and removal, and relay PATCH/DELETE are not on the list.
  • Identity comes only from the session. Authorization, Cookie, Origin, Host and the forwarding headers are stripped (dispatch.go). optionalPrincipal takes the digest from the context set by WithPhoneSession before it looks at cookies (app/app.go:1194). PhoneSession returns false for an empty digest (gateway.go:292), so a pending phone gets no principal. Pending sessions also reset every request and socket frame with PAIRING_PENDING (session.go handle). The device session's token_hash is random and no raw token exists for it (pairedphone.createSession), so no cookie can present it. /v0/session/renew is not on the allowlist, so a phone never renews a cookie session.
  • Handshake. Noise XK uses a prologue bound to the computer's public key, and the first message must have an empty payload (handshake.go). The phone's identity is the static key proved in message 3. The pair attempts are rate-limited, and TestAHandshakeForAnotherComputerFails covers a wrong-key handshake.
  • Approve/remove races with a live handshake. After track, serve calls Resume again, so a removal or approval that lands between admission and tracking still takes effect (session.go). Approve requires approved_at IS NULL AND removed_at IS NULL and the pending lifetime (queries/paired_phone.sql). Remove revokes the device session in the same transaction.
  • Password change. It does not unpair phones; Resume rotates the revoked session. This is a deliberate choice and is documented in docs/mobile.md:45.
  • Decision kinds. The phone-only restriction is enforced on the server inside the authorization step (typedcard/decisions.go, OnlyKinds) and returns DECIDE_ON_COMPUTER. It does not depend on what the client shows.
  • Push grants. A push grant is accepted only when service_url equals the configured Push Service (handlers_mobile_phones.go). callingPhone returns 403 to browser sessions. The push HTTP client refuses redirects (app.go, CheckRedirect). On 410/401 the worker clears the grant with a compare-and-clear on the same grant value.
  • Relay links. Relay links are forced off on the public development seed (config/service_credentials.go), because every checkout on that seed shares one host key. Relay dials reject link-local, multicast and unspecified addresses after DNS (transport.go relayDialer). The Relay checks host ownership with an X25519+HMAC proof bound to a nonce (apps/relay/internal/relay/proof.go).
  • Voice Bridge. The proxy requires TeamHub's node-services credential (bridge-proxy.ts). The Bridge worker trusts only a per-process random token, and checks the LiveKit grant for each start and that a resumed session belongs to the same phone (voice-runtime/src/bridge.ts:197-210).
  • Env and config. The new variables are in .env.example or scripts/env-inventory.json, and apps/relay/**/*.go was added to the inventory scan. TeamHub reads the env only in internal/config. user.env drops empty values (local-installation/src/user-environment.ts, readUserEnvironment), so the template's empty TEAMHUB_MOBILE_RELAY_URL= does not turn Relay links off for Desktop users.
  • Migrations. The new migrations are forward-only. voice_sessions.client has a default, so existing rows and old callers keep working. 00894 to 00896 do not collide with main, whose latest migration is 00893.
  • Language. No CJK in added lines outside the locale catalogs, and none in any commit message. The added-line grep hit only on · (U+00B7), which is not CJK.

Not verified: most of the apps/mobile UI and offline outbox logic; the Relay's splice and rate-limit code beyond its tests; the Push Service sealing in apps/relay/internal/push; and how a phone recovers when a password change revokes its device session mid-session (requests get 401 until it reconnects).

Process notes

  • The branch is 9 commits behind main. main requires up-to-date branches, so it needs a rebase before merge.
  • No merge commits. No fixup or "address review" commits that need squashing.

CI

  • All required checks pass on 8bc9865e.
  • CI does not run check-relay, check-mobile or check-voice-runtime. scripts/check-plan.mjs gives them no ci key, so they only run locally, the same as the existing voice-runtime convention. The Relay is a public internet-facing service with no CI coverage.
  • I ran locally:
    • go test -race -count=1 ./... in apps/relay: pass.
    • go test -race -count=1 on internal/mobilerelay and internal/mobilepush: pass.
    • internal/mobilegateway: TestPairingIsRateLimited failed intermittently with and without -race (the P2 above), and passed in a 3× -race rerun.

Automated review by Claude Code


Automated review of 8bc9865 by Claude Code.

@linger-review linger-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approve (0 findings)

Follow-up on 8bc9865. Scope: base main, merge base 8b7fe39, 6 commits, 517 files in the PR. The incremental diff since the previous review touches 3 files, and all 3 were reviewed in full context. Loaded the review skill's own rules only. The helper skills (coderbook, ponytail-review, karpathy-guidelines) were not loaded separately for this small follow-up. This review ran in a separate session.

Previous findings

  • P2 – test pipe Read race (mobilegateway/session_test.go): Resolved. pipeWire.Read (apps/teamhub/internal/mobilegateway/session_test.go:37-43) first takes a queued message without blocking, then falls back to the blocking select. A message sent before the close now always wins, which matches WebSocket ordering. go test -count=3 ./internal/mobilegateway/ passed locally.
  • P3 – every pairing insert error swallowed as BAD_HELLO (pairedphone/pairedphone.go): Resolved. Only a 23505 on paired_phones_public_key_key now maps to ErrBadPairRequest (apps/teamhub/internal/pairedphone/pairedphone.go:111-116). Any other error is wrapped (record pending phone: %w). phoneErrorCode logs it as mobile.authenticate_failed and returns UNAVAILABLE (apps/teamhub/internal/mobilegateway/session.go:207-209).
  • P3 – comment names the wrong migration (mobilepush/mobilepush.go): Resolved. The comment now names 00894 (apps/teamhub/internal/mobilepush/mobilepush.go:28), which is where the trigger lives (apps/teamhub/migrations/00894_paired_phones.sql).

Findings

None.

Verified as fine

  • Constraint name: public_key bytea NOT NULL UNIQUE (apps/teamhub/migrations/00894_paired_phones.sql:23) on table paired_phones gets PostgreSQL's default name paired_phones_public_key_key, so the new match fires. The insert's only other unique keys are a fresh idgen.New("phone") ID and paired_phones_session_id_key, and pending phones do not set session_id.
  • Retry after UNAVAILABLE: the invite is consumed in the same transaction (pairedphone.go:96-103), and defer tx.Rollback returns it on failure. The phone's message "Your computer could not pair right now. Try again in a moment." (apps/mobile/src/computer/pairing.ts:52-53) is therefore accurate: the same code still works.
  • Failure handling on the phone: UNAVAILABLE is a known pairing failure (apps/mobile/src/computer/pairing.ts:31-39) and maps to a retry message. It is not one of the "removed/unknown" refusals.
  • Error matching pattern: the inline errors.As(..., *pgconn.PgError) check with code 23505 and a constraint name follows the existing pattern (apps/teamhub/internal/agentruntimestate/runner.go:534 and apps/teamhub/internal/document/tree.go:385). TeamHub has no shared helper this check should reuse.
  • English-only: the grep for \p{Han} on added lines matched only the middle dot · (U+00B7) in UI separators. That is not a CJK ideograph. No commit message contains CJK.
  • Merge commits: none in the PR.
  • Unverified: this follow-up did not repeat a full assumption check of the 41k-line feature beyond the previous review. Only the incremental diff and the pairing error path were re-traced end to end.

Process notes

  • 8bc9865, c21e2ace, 41664891 and 9e399c95 are follow-up fix/test commits that patch code added earlier in this PR, mostly in 505b5858. main takes rebase merges, so these patch commits will land on main as they are. Consider squashing them into the commits they fix.
  • Merge state is BLOCKED, probably because the required checks are still pending.

CI

At review time most checks were pending: check (teamhub), check (contracts), check (packages), check (desktop), check (computer-go), check (computer-go-windows), check (installer), check (teamhub-cli), both web tests shards, web-static and repository-gate. CodeQL, Analyze (actions) and changes passed. Ran locally: go test -count=3 -p 4 ./internal/mobilegateway/, which passed.

Automated review by Claude Code


Automated review of 9e399c9 by Claude Code.

linger-review[bot]
linger-review Bot previously approved these changes Nov 25, 2026

@linger-review linger-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approve (0 P0, 0 P1, 0 P2, 0 P3)

Scope: follow-up on 9e399c9. Base main, merge base 02d6c317 (the current origin/main tip). 7 commits, 517 files (+41359 / −846). I ran the review in a separate session. The coderbook, ponytail-review and karpathy-guidelines checklists were applied from the review recipe.

Previous findings

The previous review at 9e399c9 reported no findings, so there is nothing to carry forward.

What changed since 9e399c9

The only new commit is 77f0890b, "Merge branch 'main' into feat/mobile-app".

  • git show --remerge-diff 77f0890b is empty, so the merge resolved no conflicts by hand.
  • I compared the PR's own diff before and after the merge: git diff <old merge base> 9e399c9 against git diff 02d6c317 HEAD. Apart from blob index lines, the two are identical. No PR code changed in this push.
  • The 27 commits brought in from main share one file with this PR: apps/web/src/i18n/locales/zh-CN.json. Main only added keys to it, and every locale catalog still parses as JSON.
  • Main added no TeamHub migrations, so this PR's 00894–00896 stay the newest, in order and without number collisions.
  • Main's gatewayUrl change (da6c9481) concerns the node-services gateway, not the Mobile Gateway. It touches none of this PR's files.

Findings

None.

Verified as fine

Because "unchanged since the last review" doesn't prove the code is correct, I re-checked the riskiest parts of the full PR:

  • Mobile API allowlist runs before dispatch.
    • apps/teamhub/internal/mobilegateway/dispatch.go:47-59 parses the path with url.ParseRequestURI and rejects any request that carries a host.
    • It then calls allowed() on the decoded path. That function (allowlist.go:69-100) matches whole segments only, and a : segment never matches an empty segment.
    • The request is rebuilt from the same parsed URL (dispatch.go:61-64), so the path that was checked is the path that gets routed.
    • A dot segment such as /v0/rooms/../messages only fills a parameter (roomID=".."). It cannot reach a route outside the allowlist.
  • Phone identity can't be spoofed through headers. Callers can't inject the identity. The session digest is carried in the context (WithPhoneSession), strippedRequestHeaders is applied after the caller's headers are copied (dispatch.go:70-77), and RemoteAddr is set server-side.
  • Gateway setup fails safe. It is disabled when no static key secret is configured. A bad key is logged as mobile.gateway_unavailable and the gateway is not started (feature_mobile.go:26-33).
  • Relay sync is serialized. It is held under mobileRelaySync and reads the stored list with context.WithoutCancel, so a caller that stops waiting can't leave the Gateway on the old list (feature_mobile.go:59-79).
  • Migration 00894 keeps its invariants in the schema.
    • approved_at and session_id are set together, and so are push_grant and push_service_url.
    • Phone public keys and session_id are unique.
    • The push service URL must use https.
    • The trigger enqueues push jobs only when an approved phone that holds a grant exists for the tenant.
    • The down migration refuses with an error, so the migration is forward-only.

Process notes

  • The branch includes the merge commit 77f0890b. main only takes rebase merges, so please rebase onto main instead of merging it in.

CI

Most checks were still pending at review time, and none had failed. I ran no tests myself: this push changed no PR code, and the merge needed no conflict resolution.

Automated review by Claude Code


Automated review of 77f0890 by Claude Code.

@jeffrey-bin
jeffrey-bin disabled auto-merge November 25, 2026 02:51
@jeffrey-bin
jeffrey-bin added this pull request to the merge queue Nov 25, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 25, 2026
@jeffrey-bin
jeffrey-bin added this pull request to the merge queue Nov 25, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 25, 2026

@linger-review linger-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approve (0 findings)

Scope: follow-up on 77f0890. Base main, merge base 02d6c317; 8 commits on the PR. The new delta is one commit (6431d40, 1 file, +8 lines). I re-ran the assumption check across the whole merge-base diff and spot-checked the high-risk areas. Helper skills: the review recipe from linger-pr-review was applied directly; coderbook, ponytail-review and karpathy-guidelines were not loaded separately. This review ran in a separate session.

Previous findings

The previous review (77f0890) had no findings.

Findings

None.

Verified as fine

  • The new test fix is sound. In packages/local-installation/src/byok-source.ts:696 the heartbeat setInterval is registered before applySource. applySource then awaits a real file read (readPreviousRuntimePaths, byok-source.ts:549) before it calls localmodels (:550). The earlier native-preparation steps also involve real I/O, which fake timers don't move. That means vi.advanceTimersByTimeAsync could run before the interval existed. The test now waits for its localmodels double to be called (byok-source.test.ts:387-396) before advancing time, so the interval is guaranteed to be registered by then. The change is test-only. It is outside the mobile feature, but it unblocks the packages check and is small, so I am not counting it as an unrelated change.
  • Migrations. 00894 to 00896 do not collide with anything on main since the merge base. None of the 7 newer main commits add a migration.
  • Relay node checks. mobilerelay.CheckPublic (apps/teamhub/internal/mobilerelay/mobilerelay.go:91-114) refuses loopback, private, link-local, unspecified and multicast hosts for phone-added nodes. The dialer (apps/teamhub/internal/mobilegateway/transport.go:395-411) checks the IP it actually dials after DNS, refusing link-local, unspecified and multicast addresses (this blocks cloud metadata). It deliberately allows loopback and private addresses for local and LAN Relays, and a comment documents that. Note: the public check only runs when a node is added, so a phone-added hostname that later re-resolves to a private address would still be dialed. Per the comment this is an accepted tradeoff, and only an approved paired phone can add nodes.
  • TEAMHUB_MOBILE_RELAY_URL is added to the user environment template and key list (packages/local-installation/src/user-environment.ts:17,35-37).
  • CJK check. Every Han-script match in added lines is either U+00B7 (middle dot) or in the allowed apps/web/src/i18n/locales/zh-CN.json. No commit message contains CJK.
  • Commit authors. 6431d40 is linked to the GitHub account jeffrey-bin.

Process notes

  • The branch contains merge commit 77f0890 ("Merge branch 'main' into feat/mobile-app"). main takes only rebase merges, which drop merge commits along with any conflict resolution in them, so please follow main by rebasing instead.
  • The branch is 7 commits behind main (merge state BLOCKED). main has since changed apps/web/src/i18n/locales/zh-CN.json, contracts/openapi/components/domain.yaml and the generated contracts, so expect conflicts there. Regenerate the contracts after rebasing.

CI

At review time Analyze, CodeQL and changes had passed. repository-gate, web-static, the web tests and the check (*) jobs were still pending. I ran no tests myself: the only new change is a test-timing fix, and I verified it against the source.

Automated review by Claude Code


Automated review of 6431d40 by Claude Code.

linger-review[bot]
linger-review Bot previously approved these changes Nov 25, 2026

@linger-review linger-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approve (0 findings)

Scope: base main, merge base eafcfd41, 9 commits, ~100 files (+41,367 / −846). This is a follow-up on 6431d40. Helper skills coderbook, ponytail-review and karpathy-guidelines were referenced per the review recipe. The review ran in a separate session.

Previous findings

The previous review (6431d40) approved the PR with no findings, so there is nothing to carry over.

Findings

None.

What changed since 6431d40

The only new commit is 1b5accab Merge branch 'main' into feat/mobile-app. git show --remerge-diff 1b5accab is empty, so it resolves no conflicts and adds no PR code. Its 25-file delta is exactly main's local-runtime and installer changes (eafcfd41, 59ca26b0, ...), none of which touch mobile code.

Verified as fine

  • Migrations: after the merge, main's newest migration is 00893_transcript_only_captures.sql. The PR's 00894–00896 follow it with no number collision (apps/teamhub/migrations/).
  • Mobile API allowlist: every phone request goes through allowed() (apps/teamhub/internal/mobilegateway/allowlist.go:66) before dispatch. Paths with a different segment count never match, and a : segment rejects empty segments. Anything not on the list gets a 404 inside the Gateway (apps/teamhub/internal/mobilegateway/dispatch.go:53-59), so auth, Agent API and internal routes are unreachable from a phone.
  • Phone identity:
    • The Gateway strips Authorization and Cookie (plus forwarding headers) from phone requests (dispatch.go:29-37, :75-77).
    • Identity comes only from the in-process context key (apps/teamhub/internal/mobilegateway/gateway.go:287-295). No network request can set that key.
    • optionalPrincipal resolves the phone's digest through sessions.Active on every request (apps/teamhub/internal/app/app.go:1194-1222). A revoked or rotated phone session (apps/teamhub/internal/pairedphone/pairedphone.go:169) therefore stops working at its next request.
  • Phone-specific restrictions: decision answers and Relay node additions branch on PhoneSession (apps/teamhub/internal/app/handlers_typed_card_decisions.go:51, apps/teamhub/internal/app/handlers_mobile_relays.go:64).
  • Language: the added lines contain no CJK outside the locale catalogs. The only hits from the \p{Han} grep are the separator · (U+00B7). No commit message contains Chinese.

Unverified: this follow-up did not re-walk the full 41k-line diff beyond the paths above (Noise handshake, Relay splicing, the push trigger, the RN app). For those it relies on the previous review at 6431d40, since the code is unchanged since then.

Process notes

  • The PR has two merge commits (77f0890b and 1b5accab, both "Merge branch 'main' into feat/mobile-app"). Neither resolves a conflict, but main takes rebase merges only, so please rebase onto main instead of merging it in.

CI

  • Passed: changes and CodeQL.
  • Still pending when this review ran: check (teamhub), check (contracts), check (computer-go), check (computer-go-windows), check (desktop), check (installer), check (packages), check (teamhub-cli), repository-gate, web-static, web tests (1/2, 2/2) and Analyze (actions).
  • Merge state is BLOCKED, presumably by the pending required checks. The branch already contains origin/main, so it is not behind.
  • No tests were run locally.

Automated review by Claude Code


Automated review of 1b5acca by Claude Code.

# Conflicts:
#	apps/voice-runtime/AGENTS.md
#	packages/local-installation/src/byok-source.test.ts
linger-review[bot]
linger-review Bot previously approved these changes Nov 25, 2026

@linger-review linger-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approve (0 findings)

Scope: follow-up on 1b5accab. Base main, merge base 4b5b4266 (the current main tip, so the branch is up to date). 10 commits and 517 files in the PR diff. The coderbook, ponytail-review and karpathy-guidelines checklists were applied from the review instructions. This review ran in a separate session.

Previous findings

The previous review (1b5accab) approved with no findings, so there is nothing to carry over.

What changed since 1b5accab

The only new commit is 2b8b7d69, which merges origin/main into the branch. I compared the PR's own diff before the merge (eafcfd41..1b5accab) with the diff after it (4b5b4266..2b8b7d69), ignoring hunk headers. They differ in exactly two places:

  • packages/local-installation/src/byok-source.test.ts is no longer in the PR. Its fix, which waits for the mount before advancing fake timers, is already on main in the same form. The conflict resolution took main's copy, and git diff origin/main HEAD on that file is empty.
  • apps/voice-runtime/AGENTS.md keeps the PR's Bridge bullet and main's new Live audio-stats bullet side by side. Nothing was lost in the conflict resolution.

No other line of the PR's own changes moved.

Findings

None.

Verified as fine

  • Files both sides changed: live-worker.ts, voice-media.yaml, generated contracts, zh-CN.json, and apps/voice-runtime/AGENTS.md.
    • main added browser reply-audio stats, which the worker only logs when a client sends them. The PR's clientTools(context.client) (apps/voice-runtime/src/live-worker.ts:364, used at :791) changes only the tool list. A phone that never sends stats is unaffected.
    • The check (contracts) job is green, so the regenerated contracts match the merged OpenAPI.
  • Migrations: 00894–00896 remain the highest numbers, and apps/teamhub/migrations has no duplicate prefixes after the merge.
  • Language: the only added CJK is in apps/web/src/i18n/locales/zh-CN.json, an allowed catalog. No commit message contains CJK.
  • Unchanged since the previous review: I re-ran the PR-wide check for clear P0/P1 problems in the merge-base diff and the merge commit. Because the PR's own content is identical to 1b5accab, I did not re-audit its 41k lines line by line. The previous review stands for that content.

Process notes

  • The branch has three merge commits (77f0890b, 1b5accab, 2b8b7d69). main only takes rebase merges, which drop merge commits along with any conflict resolutions inside them. Follow main by rebasing instead.

CI

All 16 checks pass, including check (teamhub), check (contracts), check (packages), check (web), web tests 1/2 and 2/2, repository-gate and CodeQL. I ran no tests locally: the merge introduced no PR-side code changes that needed one.

Automated review by Claude Code


Automated review of 2b8b7d6 by Claude Code.

…h the keyboard up; clearer diagnostics

The + opens a menu of Camera, Photos and Files; photos arrive as JPEG. With the keyboard up the Agent's face and name sit centered like a navigation bar, its current work below and Stop where Record sits. Settings draws its own title in line with the groups, the two diagnostics actions get icons and a line each, and the Library's refresh spinner shows only for a pull.
On a network change, on returning to the foreground and every 30 s, a session on a Relay dials only the stored LAN origins in the background and swaps to the first that completes its handshake, closing the Relay session without a new round or backoff. A voice call in progress keeps its route.

@linger-review linger-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approve with nits (1 P2, 1 P3)

Scope: follow-up on 2b8b7d6 (previous verdict: Approve, no findings). Base main, merge base 4b5b426; 12 commits in the PR, the 2 new commits (17e0788c, c62b8285, 24 files) reviewed in full, and the whole-PR diff re-scanned for P0/P1 in the paths the new commits touch (connection lifecycle, session streams, composer uploads). Helper skills loaded: coderbook, ponytail-review, karpathy-guidelines. Ran in a separate session.

Previous findings

None: the review of 2b8b7d6 reported no findings.

Findings

P2

Switching a Relay session to the LAN cuts off an in-flight attachment upload: apps/mobile/src/computer/connection.ts:206 and apps/mobile/src/chat/composer.tsx:171

  • upgradeToLan() holds the move only while openSockets > 0. That count covers socket streams: Live voice and meeting recording through bridge-client.ts:264. It does not cover request streams. When the LAN answers, the Relay session is closed (session.close() in the success branch), and every open request on it resets with SESSION_CLOSED (session/session.ts:529).
  • Failure scenario: the phone is on home Wi-Fi but connected through the Relay, for example because the LAN dial lost the first round. The user picks a 20 MB video, and its upload runs for a while over the Relay. The 30-second timer or a network event then wins the LAN dial. uploadAttachment rejects, the catch at composer.tsx:182 removes the chip, and the user sees "… did not upload. Try again." and has to pick the file again. docs/mobile.md:256 says requests cut off by the switch recover: "queries retry, the event stream resumes …, and the outbox resends". The composer's upload is not on that list and does not recover.
  • Fix (pick one): retry the upload once in the composer on SessionClosed/NotConnected with the same localId idempotency key it already passes; or have PhoneSession count uploads in progress next to #sockets and skip the upgrade while that count is above zero. Then add the case to the paragraph in docs/mobile.md.

P3

FoldedStage copies the Stop button from WorkLine: apps/mobile/src/chat/agent-stage.tsx:222

  • The Stop Pressable in FoldedStage (accessibility label, disabled={isStopping}, hitSlop={10}, the three style states, stopSquare) is the same as the one in WorkLine at agent-stage.tsx:152-165. A later change to one, such as the label or the disabled behavior, can easily miss the other. A small StopButton({ roomId, runId, agentName }) used by both removes the copy.

Verified as fine

  • Only one upgrade at a time, and no leaked dial. #upgrading guards against reentry (connection.ts:206-216), and the test calls upgradeToLan() twice. Every LAN dial settles because PhoneSession.open has a 10 s handshake timeout (session/session.ts:22,262). done() clears the guard once every dial has settled, so a hanging dial on cellular cannot block later upgrades.
  • The switch causes no reconnect round or backoff. #accept(next, "lan") replaces #session before session.close(), so the Relay session's close listener returns early (#sessionClosed checks this.#session !== session). The test checks that the status stays connected and the Relay is dialed only once.
  • Losing dials and stale results are closed. The success branch closes next if the upgrade was aborted, the connection stopped, the session changed, the route is no longer relay, the new session is pending, or a socket opened during the dial. reconnect(), stop(), #accept() and #sessionClosed() all call #stopUpgrade(), which aborts the dial and clears the 30 s timer.
  • Voice is protected. Live and meeting recording both use openSocket through the Bridge (voice/bridge-client.ts:264, used by live-screen.tsx and record-screen.tsx). PhoneSession.#sockets is added to in #open for FrameType.socket, and removed in release() and on close (session/session.ts:408,425,526).
  • Consumers pick up the new session. #accept emits connected, which bumps revision in ComputerProvider (computer/computer-context.tsx:181-188). useTeamHub is memoized on the session object (state/queries.tsx:99-113), so queries and effects rerun against the LAN session.
  • The picker change keeps the 25 MB check. pickFile maps fileSize to size, so the existing MAX_UPLOAD_BYTES check (composer.tsx:163) applies to Camera and Photos too. The CAMERA_USAGE string is shared by the expo-camera and expo-image-picker plugins, so the two cannot write different NSCameraUsageDescription values (app.config.ts:9-11).
  • Docs: docs/mobile.md and the acceptance recipe in .agents/skills/verify-linger/features/mobile.md describe the new behavior. Apart from the P2 above, the description matches the code.
  • Chinese text: the only real CJK in added lines is in apps/web/src/i18n/locales/zh-CN.json, where it is allowed. The other \p{Han} hits are the · middle dot. No commit message contains CJK.

Process notes

  • The branch has 3 merge commits (77f0890b, 1b5accab, 2b8b7d69) and is 3 commits behind main. main takes only rebase merges, so rebase onto main instead of merging it in.

CI

All 16 checks pass. CI does not run check-mobile, check-relay or check-voice-runtime: scripts/check-plan.mjs gives them no ci key, so they run only locally. I installed the mobile workspace and ran vitest run src/computer/connection.test.ts: 14/14 passed, including the three new upgrade tests. I did not run the rest of check-mobile (lint, typecheck, the other tests) or any device build.

Automated review by Claude Code


Automated review of c62b828 by Claude Code.

@linger-review linger-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approve with nits (0 new findings; 1 previous P2 not resolved)

Scope: follow-up on c62b828, reviewing d93a1cb against base main (merge base 4b5b426). The PR has 13 commits and 525 files; one new commit (3 files) since the previous review. Helper skills: their sections were applied from the review instructions, which name them, but the skills were not loaded separately. Ran in a separate session.

Because the PR is large (+41,890 lines), the whole-PR assumption check this time covered only the code the new commit touches and calls (composer → useTeamHub → PhoneConnection route switch → TeamHub attachment idempotency). The rest of the PR was not re-audited in this pass.

Previous findings

  • P2: switching to the LAN interrupts an in-flight attachment upload. Not resolved. The new retry at apps/mobile/src/chat/composer.tsx:173-189 cannot succeed in the case it targets. send calls teamHub.run, and teamHub is the useMemo object the component captured when attach started. useTeamHub (apps/mobile/src/state/queries.tsx:94-111) closes over the session value from that render. When the route switches, PhoneConnection accepts a new session object and closes the old one (apps/mobile/src/computer/connection.ts:250-254). One second later the retry calls the same stale run, sees session.closed === true and rejects with NotConnected. The upload is still dropped with "did not upload. Try again." Fix: make send read the current session, for example const latest = useRef(teamHub); latest.current = teamHub; and send = () => latest.current.run(...). Add a unit test where the first call fails with SessionClosed and the retry must use a different session object. The server side is ready: UploadMessageAttachment replays by the same idempotency key (apps/teamhub/internal/collaboration/message_attachments.go:114-124), so reusing localId is correct once the retry reaches a live session.
  • P3: the folded stage duplicated the Stop button. Resolved. StopButton (apps/mobile/src/chat/agent-stage.tsx:122-145) is now used by both WorkLine and FoldedStage.

Findings

None new.

Verified as fine

  • StopButton keeps the original behaviour: it uses the same useStopRun(roomId) hook, the same stopping.has(runId) disabled state and the same accessibility label (agent-stage.tsx:122-145). WorkLine and FoldedStage still read stopping for their own "Stopping…" text.
  • The retry is gated to transport errors only (SessionClosed, NotConnected). HTTP errors such as 413 still surface their specific message (composer.tsx:183-197).
  • The retry reuses the same localId as the Idempotency-Key (apps/mobile/src/api/teamhub.ts:195-227). TeamHub locks and replays by that key with a request hash over name, media type, size and sha256 (message_attachments.go:105-124), so a resend of an upload that already landed produces no duplicate.
  • docs/mobile.md is updated for the new upload behaviour. It will become accurate once the retry above reaches the live session.
  • No CJK text in the added lines or commit messages. Grep matched only the · (U+00B7) separator in UI strings, which is not Han.

Process notes

  • The branch carries three merge commits from main (2b8b7d69, 1b5accab, 77f0890b). main takes only rebase merges, so the branch should follow main by rebase.

CI

All 16 checks pass on d93a1cb. No tests were run locally: the new commit has no Go or concurrency code, and the remaining issue is clear from reading the code.

Automated review by Claude Code


Automated review of d93a1cb by Claude Code.

@linger-review linger-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approve with nits (2 P2, 2 P3)

Scope: follow-up on 7740fd0, reviewing 675c7c3. Base main, merge base 9196e8dc. 16 commits and 100+ files in the whole PR. The new commit touches 38 files (push once per turn, Room presence from the phone, push preferences, keyboard controller, attach menu). I read the incremental diff in full and rechecked the whole PR's push path. Helper skills (coderbook, ponytail-review, karpathy-guidelines) were not loaded; I followed the review checklist directly. Ran in a separate session.

Previous findings

  • Not resolved: PR description's migration numbers are stale. The Boundary section still says 00894 to 00896. The PR now adds 00895–00899: the repair migration 00898 and the new 00899_paired_phone_push_preferences.sql.

Findings

P2

  1. apps/teamhub/internal/mobilepush/mobilepush.go:170: a decision alert goes to every Human's phone in the Space, not only the decider's. GetMobilePushMessage.asks_decision (paired_phone.sql:116-120) is true when any Human has a pending decision on the Message. ListPushTargetsForRoom returns the phones of every Human in the tenant, and the query is not filtered by Room membership. Classify returns KindDecision for every target that has PushDecisions on, without comparing against the decider. The reply branches do compare (DirectHumanActorID / MentionedActorIds vs target.HumanActorID). So when Human A gets a decision card in a Space shared with Human B, B's phone shows "Linger needs your decision". The alert carries the room_id of a Room B may not be able to open. Fix: select array_agg(d.decider_actor_id) (pending, human) and have Classify require slices.Contains(deciders, target.HumanActorID). Add a case to TestClassify.

  2. apps/teamhub/internal/store/queries/paired_phone.sql:127 and apps/teamhub/internal/app/app.go:797: in a group Room, other actors can suppress a mention alert meant for this Human. Two checks cause this:

    • superseded is true when any later Agent conversation message exists in the Room. If Agent A @-mentions the Human and Agent B posts something unrelated within ReplyDelay, A's job is skipped. B's message doesn't mention the Human, so no alert is ever sent.
    • recentlyPresent(roomID) is true when any Account sent presence (handlers_room_presence.go:28-40). Another Human looking at the group therefore holds back this Human's alerts.

    The contract text (teamhub-public-mobile-phones.yaml, "while the Human looks at the Room") and the app.go comment both describe the Human's own presence. Fix:

    • Scope supersession to later messages that would also alert this target: the same direct agent, or one that mentions the Human. Alternatively, only treat a message as superseded in direct chats.
    • Check presence by accountID + "\x00" + roomID, which the throttle already keys on. This needs the target's account_id in ListPushTargetsForRoom.

P3

  1. apps/mobile/src/app/(main)/settings/index.tsx:419: when saving preferences fails, the switch shows one value and the stored record holds another. setPushPreferences (push/push.ts:132) writes preferences: next, preferencesPending: true before the PUT. If the PUT throws, the UI reverts the switch to previous and says "did not reach your computer". The record still holds next with preferencesPending, so syncPushGrant sends it on the next session. The user believed the change failed, but it gets applied later. Either keep the optimistic value and show "will be sent when connected", or restore the record on failure.

  2. apps/teamhub/internal/store/queries/paired_phone.sql:130: run_active counts queued runs and runs that already replied. The existing ListRunningRoomIDsForTenantAccount (room_run_control.sql:1-17) deliberately uses status='running' AND NOT agent_local_run_replied(run_id), because "a queued Run may wait indefinitely for an offline Computer". With the new condition, a queued Run of another Agent on an offline computer holds a reply alert for the full RunGrace (10 min). Reuse the same predicate.

Verified as fine

  • River snooze loop: a reply snoozes until ReplyDelay and then rechecks every 30 s while a run is active, bounded by RunGrace (mobilepush.go:119-131). Facts are re-read on each attempt, so read state and supersession stay current.
  • PUT /v0/me/phone/push-preferences is phone-only via callingPhone. The integration test checks a 403 for a browser session (mobile_phones_test.go:516). Unknown or removed phones map to ErrUnknownPhone (pairedphone.go:391).
  • The phone's POST /v0/rooms/:/presence goes through the same AuthorizedRoom check as the Web (handlers_room_presence.go:76-80). The allowlist entry uses the existing : segment form (allowlist.go:134).
  • Migration 00899 adds NOT NULL columns with defaults. The defaults match DEFAULT_PUSH_PREFERENCES (push/grant.ts). The PhonePushPreferences contract and generated Go/TS types are consistent.
  • disablePush now clears grantedAt/expoToken, so re-enabling push forces a fresh grant. updatePushRecord keeps preferences across other writes, which grant.test.ts covers.
  • Relay push payload: collapseId/tag = kind:room_id, threadId = room. push_test.go asserts this. docs/mobile.md is updated to match.
  • No CJK in added lines or commit messages.

Process notes

  • The branch contains 4 merge commits (7740fd08, 2b8b7d69, 1b5accab, 77f0890b). main takes rebase merges only, so rebase onto main instead. The branch is not behind origin/main.
  • 675c7c34 bundles the push rework with the keyboard-controller and attach-menu changes. These would read better as separate commits.

CI

8 checks pass and 7 are still pending (teamhub, computer-go, contracts, desktop, installer, packages, web tests). None failed. I ran no tests myself.

Automated review by Claude Code


Automated review of 675c7c3 by Claude Code.

@linger-review linger-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approve with nits (0 new findings; 4 previous P2/P3 findings still open)

Scope: follow-up on 675c7c3, reviewing head 975b774 against main (merge base 9196e8d, the current origin/main). 17 commits in the PR. The new range is 1 commit and 3 files: apps/mobile/app.config.ts, apps/relay/internal/push/push.go, docs/mobile.md. The coderbook skill was loaded. The ponytail-review and karpathy-guidelines skills were not loaded for this small delta. This review ran in a separate session.

Coverage limit: the PR adds about 42.7k lines. This pass reviewed the full new delta. It did not re-audit the whole merge-base diff line by line; it relied on the previous review for that.

Previous findings

  • P2: decision push is not limited to the decider (apps/teamhub/internal/mobilepush/mobilepush.go:170). Not resolved. Classify is unchanged and still sends KindDecision to every target with PushDecisions set, without comparing against the deciding Human.
  • P2: in a group, another participant's activity can suppress a mention alert (apps/teamhub/internal/store/queries/paired_phone.sql:120-127). Not resolved. The superseded subquery is unchanged.
  • P3: when saving preferences fails, the UI and the local record disagree (apps/mobile/src/app/(main)/settings/index.tsx:419). Not resolved. The catch still rolls back only the React state through setPreferences(previous).
  • P3: run_active counts queued Runs and Runs that already replied (apps/teamhub/internal/store/queries/paired_phone.sql:130). Not resolved. The query still uses run.status IN ('queued', 'running').

Findings

No new findings.

Verified as fine

  • Entitlement removal. apps/mobile/app.config.ts drops com.apple.developer.usernotifications.time-sensitive, which the provisioning profile lacks, so the iOS build no longer fails on a profile mismatch.
  • Relay request unchanged. The Relay still sends interruptionLevel: "time-sensitive" for decisions (apps/relay/internal/push/push.go:218 and the alerts map at push.go:51-53). Only the comment changed.
  • Docs aligned. docs/mobile.md:366-367 now states the same behavior as the code comment.
  • Unverified (Apple platform behavior). The new comment and docs say iOS delivers a time-sensitive request as active when the app lacks the entitlement. I could not confirm this from code. If Apple's behavior is different, decision alerts would still arrive but would not break through Focus. That loss is already the intended effect of removing the entitlement, and nothing else in the app depends on it.
  • No Chinese. Added lines and commit messages contain no CJK characters.
  • Commit author. 975b774 is authored by jeffrey@simplexai.com, which is linked to GitHub user jeffrey-bin.

Process notes

  • The PR contains 4 merge commits from main (7740fd0, 2b8b7d6, 1b5acca, 77f0890). main takes only rebase merges, which drop merge commits along with any conflict resolution in them, so follow main by rebase instead.
  • The branch is up to date with main; its merge base is the current origin/main. Merge state is BLOCKED, pending required review.

CI

All 16 checks pass. I ran no tests myself; the delta is one config removal plus a comment and a doc change.

Automated review by Claude Code


Automated review of 975b774 by Claude Code.

…'s own presence

A decision alert goes only to the phones of the Human it asks. Only a later reply in a direct chat supersedes one; in a group another Agent's message no longer swallows a mention. Presence counts only the phone's own Account, and the running light matches the Room's: running and not yet replied. A preference change that cannot reach the computer stays on the phone and is sent later.
linger-review[bot]
linger-review Bot previously approved these changes Nov 25, 2026

@linger-review linger-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approve (0 P0, 0 P1, 0 P2, 0 P3)

Scope: follow-up on 975b774, reviewing head 5231ef2 against main (merge base 9196e8d), 18 commits. I read the new commit 5231ef2 in full (9 files) and re-checked the push assumptions it depends on across the PR. The coderbook, ponytail-review and karpathy-guidelines conventions were applied from the review skill. Ran in a separate session. This pass did not re-read all 42k lines of the PR line by line. It covered the delta and the push, presence and decision paths the delta changes.

Previous findings

The previous review (975b774, approve with nits) had no findings to track.

Findings

None.

Verified as fine

  • The decision alert goes only to the decider. GetMobilePushMessage now returns decider_actor_ids, which aggregates the pending decisions' human deciders (apps/teamhub/internal/store/queries/paired_phone.sql:116-120). Classify sends KindDecision only when target.HumanActorID is among them (apps/teamhub/internal/mobilepush/mobilepush.go:169-175). This matters because ListPushTargetsForRoom returns every paired phone of every Human in the tenant, not just Room members (paired_phone.sql:92-100). Before this commit, any Space member with decisions turned on got the alert. A new TestClassify case, "another Human's decision", covers it. AsksDecision has no remaining references.
  • Presence is counted per Account. presentFor reads the same accountID + "\x00" + roomID key that notifyRoomPresence admits (apps/teamhub/internal/app/handlers_room_presence.go:45-50, :93-94). A throttled repeat hint leaves the earlier timestamp in place, and that timestamp is still inside the 30s window (interval 15s < window 30s). The worker checks presence per target and only when !PushWhenActive (mobilepush.go:139-141). NewWorker has one caller (app.go:791), and its nil default was updated. recentlyPresent is still used by handlers_membership.go:111, so it isn't dead code. TestRoomPresenceIsPerAccount covers the other-Account case and the window expiry.
  • run_active now matches the Room's running light. The new predicate status = 'running' AND NOT agent_local_run_replied(run_id) over room_agent_runs is the same one that ListRunningRoomIDsForTenantAccount uses (room_run_control.sql:1-9). agent_local_run_replied (migrations/00852_baseline.sql:517-560) treats an output with continues=true, a later or still-open activity, and a newer input as not replied. So a multi-message turn still holds back the earlier replies until the final one.
  • Supersession is limited to direct chats. r.direct_human_actor_id IS NOT NULL AND EXISTS(...) (paired_phone.sql:121-129) means another Agent's message in a group no longer swallows a mention. The column is nullable (it is coalesced to '' above), so the NULL check is correct.
  • The offline preference is resent. setPushPreferences writes preferencesPending: true before the network call (apps/mobile/src/push/push.ts:130-137). syncPushGrant resends pending preferences on the next session and then clears the flag (push.ts:86-95). It runs from push-sync.tsx:54 and from pairing. So the new message "Saved on this phone. Your computer gets it when it connects." matches what the code does, and dropping the rollback in settings/index.tsx is correct.
  • Docs. docs/mobile.md (Push section) was updated to match all four behavior changes.
  • Generated store code. paired_phone.sql.go matches the query edits (the new account_id column and the []string scan).
  • No CJK. No CJK was found in code, comments or commit messages. The only hits are in apps/web/src/i18n/locales/zh-CN.json, which is allowed, plus false positives on · from grep.

Process notes

  • The branch has 4 merge commits from main (7740fd08, 2b8b7d69, 1b5accab, 77f0890b). main takes rebase merges only, so these merge commits and any conflict resolutions in them would be dropped. Rebase onto main instead.
  • The branch is 12 commits behind origin/main, and main requires up-to-date branches, so it needs a rebase before it can merge.
  • All commit authors are linked to GitHub accounts.

CI

All checks except changes were still pending when this review ran; changes passed. I ran no tests myself: the delta is covered by the unit tests it adds (TestClassify, TestRoomPresenceIsPerAccount), and I found nothing that needed a local run to confirm.

Automated review by Claude Code


Automated review of 5231ef2 by Claude Code.

linger-review[bot]
linger-review Bot previously approved these changes Nov 25, 2026

@linger-review linger-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approve (0 P0, 0 P1, 0 P2, 0 P3)

Scope: follow-up on 5231ef2 at head 2daf8e0. Base main, merge-base 18b77437. Reviewed 20 commits and 534 files in the merge-base diff, and the 2 commits added since the previous review (6e74ab96 merges origin/main, 2daf8e04 is a one-line test fix). Loaded coderbook. ponytail-review and karpathy-guidelines were not loaded, but their checks were applied from the review checklist. This review ran in a separate session.

Previous findings

The previous review (5231ef2) had no findings.

Findings

None.

Verified as fine

  • No PR change rode along in the merge. I compared the PR's own diff before the merge (merge-base..5231ef2) with its diff after (merge-base..2daf8e0). The only difference is mountUpgrade: () => () => {} in apps/node-services/tests/agent/executor/http/agent-manager-http-server.test.ts:1069. The merge resolved no conflicts inside PR code.
  • The test fix matches the real interface. HttpHost.mountUpgrade(path, handler): () => void is declared at apps/node-services/src/http-host.ts:45. The new fake returns a no-op unmount, the same shape as the other fakes in apps/node-services/tests/model-packages.test.ts:331.
  • Main's changes don't conflict with the mobile code.
    • Main added an optional detail to the runtime failure schema (contracts/openapi/components/agent-runtime-state.yaml) and a pending target.
    • apps/mobile does not parse these schemas strictly: there are no .strict() or runtime-failure parsers under apps/mobile.
    • Main's new Another Me failure-dismiss route is Web-only. The mobile route allowlist is enforced in apps/teamhub/internal/mobilegateway, and a route outside it never reaches TeamHub (session_test.go:330).
  • Migrations still run in order.
    • After the merge, main adds no migrations. The PR's 00895–00899 follow main's 00894_room_handoff_reports.
    • 00898_mobile_preview_handoff_repair.sql matches 00894_room_handoff_reports.sql column for column and index for index, using IF NOT EXISTS. It is a no-op on databases that already ran 00894.
    • 00899 only adds columns with defaults.
  • No CJK in added lines or commit messages. The only matches outside the locale catalogs are the · (U+00B7) separators in mobile UI strings. These are not Han ideographs.

Process notes

  • The branch contains 5 merge commits from main (6e74ab96, 7740fd08, 2b8b7d69, 1b5accab, 77f0890b). main takes only rebase merges, which drop merge commits, so follow main by rebasing instead.
  • The merge state is BLOCKED while CI runs.

CI

CodeQL, Analyze (actions) and changes pass. All other checks (teamhub, packages, contracts, desktop, installer, computer-go, computer-go-windows, teamhub-cli, web tests, web-static, repository-gate) were still pending when this review ran. I ran no tests myself, because the only new PR change is a one-line test fake.

Automated review by Claude Code


Automated review of 2daf8e0 by Claude Code.

# Conflicts:
#	apps/node-services/release-lockfiles/computer.yaml
#	pnpm-lock.yaml
linger-review[bot]
linger-review Bot previously approved these changes Nov 26, 2026

@linger-review linger-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approve (0 findings)

Scope: follow-up on 2daf8e0. Base main, merge base 760e4148 (equal to current origin/main, so the branch is up to date). 21 commits / 100+ files in the PR; since the previous review the only PR-authored change is the merge commit 9427a60d ("Merge remote-tracking branch 'origin/main'"), whose own conflict resolution touches only pnpm-lock.yaml and apps/node-services/release-lockfiles/computer.yaml. Helper skills coderbook, ponytail-review and karpathy-guidelines were not loaded for this run; the review followed the linger-pr-review checklist directly. Ran in a separate session.

Previous findings

The previous review (2daf8e0) approved with no findings, so there is nothing to track.

Findings

None.

Verified as fine

  • Merge conflict resolution (git show --remerge-diff 9427a60d): the only conflicted hunks are the @earendil-works/pi-coding-agent importer entry and the @isaacs/nonrecursive-glob-match / @jridgewell/* package entries. They were resolved to main's Pi 1.5.2 (apps/computer/package.json:20 pins 1.5.2) plus the supports-color@10.2.2 peer that the branch's dependency graph adds. No conflict markers remain in either lockfile (git grep for <<<<<<</=======/>>>>>>> is empty).
  • Peer variants that differ from main in apps/node-services/release-lockfiles/computer.yaml (@noble/hashes@2.4.0 under jsdom, terser@5.51.4 under vite/vitest) come from apps/mobile/package.json:22 (@noble/hashes 2.4.0) and Expo's toolchain. The previous head already carried them, so the merge introduced nothing new here. Whether the release lockfile matches its generator is left to release-lockfiles:check in CI; I could not run it locally because this worktree has no node_modules.
  • Migrations: apps/teamhub/migrations/00894–00899 have no duplicate version numbers after the merge, and main added no migrations that collide with 00895–00899.
  • English-only: git diff 760e4148..HEAD has CJK only in apps/web/src/i18n/locales/zh-CN.json, which is allowed. The other \p{Han} matches are the middle dot · (U+00B7, whose script extensions include Han), for example apps/mobile/src/chat/file-card.tsx:215. No commit message contains CJK.
  • Observation, not a finding, because apps/mobile/src/chat/run-status.ts is unchanged since the previous review: main's new waiting_background run status (5c045a6b) is not mapped in applyPresentationEvents (apps/mobile/src/chat/run-status.ts:54-60). While an Agent waits on a background task, the phone keeps showing its last line (for example a thinking title). Web shows "Waiting for background task" (apps/web/src/features/rooms/chat/message-timeline.tsx:675). This would be a small follow-up.
  • Unverified: I did not re-audit the full 42k-line merge-base diff line by line in this follow-up. The mobile, gateway, relay and push code is unchanged since the previous approval, and the merge changed only lockfiles in PR-owned territory.

Process notes

  • The branch contains 6 merge commits from main (9427a60d, 6e74ab96, 7740fd08, 2b8b7d69, 1b5accab, 77f0890b). main only takes rebase merges, which drop merge commits along with their conflict resolutions (here, the lockfile resolution). Rebase the branch onto main instead.

CI

changes, repository-gate and Analyze (actions) were still pending when this review was written. Merge state is BLOCKED while checks are pending. I ran no tests locally: no node_modules, and the release-lockfile check is covered by CI.

Automated review by Claude Code


Automated review of 9427a60 by Claude Code.

…roup notification settings

Files the desktop previews (PDF, Office, tables, HTML, Mermaid, images,
video) open in an offline viewer page built from the desktop's libraries.
Settings gains Language (Follow System, English, Simplified Chinese) kept on
the phone; push grants carry the language and the Push Service writes alerts
in it. Notification settings split into three groups that dim under the
master switch.
# Conflicts:
#	apps/voice-runtime/AGENTS.md
Main added migrations 895 and 896, so the branch's five mobile migrations
move to 897 through 901.
The Mobile App now uses @linger/service-kit/messages.

@linger-review linger-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Request changes (1 P1)

Scope: follow-up on 9427a60 at head d2b6724. Base main, merge base 7f124458. The PR has 26 commits since the merge base; this pass read the PR's own commits since the previous review (2b835586, 7a8d2a06, 6e30ece2, d2b67244) and the merge b2a91cfd with its conflict resolution. It also re-checked the migration history across the whole PR. The coderbook, ponytail-review and karpathy-guidelines checklists were applied from the review instructions; they were not loaded as separate skills. Ran in a separate session.

Previous findings

The previous review (9427a60) had no findings.

Findings

P1

apps/teamhub/migrations/00897_paired_phones.sql:8: renumbering the mobile migrations breaks the upgrade for databases created by the mobile preview build.

00900_mobile_preview_handoff_repair.sql and 00899_mobile_relay_nodes.sql say the preview desktop build (0.1.9-mobile.1) recorded its mobile migrations as versions 00894–00896 (paired phones, voice session client, relay nodes). TeamHub runs goose with its default settings (apps/teamhub/internal/platform/migrations/migrations.go:48). On such a database goose therefore treats every source version up to 896 as applied.

At the previous head that was harmless. The mobile migrations were 895–899, so 895 and 896 were skipped (their objects already existed), and 897 (mobile_relay_nodes) used IF NOT EXISTS.

7a8d2a06 moves the mobile migrations to 897–901 so that main's new 00895_runtime_local_computers and 00896_message_continues come first. On a preview database this now goes wrong in two ways:

  • Main's 895 and 896 never run. The runtime_local_computers view and the messages.continues column are never created. The repair in 00900 only recreates main's 894 tables. messages.continues is read by internal/store/collaboration.sql.go and internal/agentruntimestate.
  • The upgrade fails outright. 00897_paired_phones.sql runs a plain CREATE TABLE mobile_pairing_invites, CREATE TABLE paired_phones, CREATE FUNCTION enqueue_mobile_push and CREATE TRIGGER. Those objects already exist on that database, so the migration fails with "relation already exists" and Up returns an error. TeamHub, and so the Desktop, does not start. 00898_voice_session_client.sql (ADD COLUMN client) fails the same way.

Any development database that ran the previous branch head (mobile migrations at 895–899) hits the same skip of main's 895/896 and the same 00897 failure.

The PR description still says migrations 00895–00899 and that 00898 is the preview repair, which no longer matches the diff.

Fix:

  • Make 00897 and 00898 idempotent: CREATE TABLE/INDEX IF NOT EXISTS, CREATE OR REPLACE FUNCTION, DROP TRIGGER IF EXISTS before CREATE TRIGGER, ADD COLUMN IF NOT EXISTS.
  • Extend the preview repair to CREATE OR REPLACE VIEW runtime_local_computers ... and ALTER TABLE messages ADD COLUMN IF NOT EXISTS continues ....
  • Add a migration test that seeds the preview build's version history (894–896 recorded with the mobile objects) and runs Up. Nothing tests this path today.
  • Update the PR description.
  • If preview databases are no longer supported, delete the repair and say so explicitly.

Verified as fine

  • Push alert language. apps/relay/internal/push/push.go: handleGrant stores a language only if alerts knows it, and alertBody falls back to en. Grants sealed before this change have no l field (omitempty) and get English. The Chinese strings are escaped code points.
  • Offline viewer, HTML. apps/mobile/viewer/main.ts: renderHtml puts the file in an iframe with an empty sandbox attribute, so its scripts don't run.
  • Offline viewer, file reads. readFile accepts only a bare file name (^[A-Za-z0-9_.-]{1,160}$).
  • Offline viewer, other renderers. Mermaid runs with securityLevel: "strict". Table cells and plain text are written through textContent.
  • Offline viewer, network. The page's Content-Security-Policy, built by apps/mobile/scripts/build-viewer.mjs:77, allows only local sources. file-viewer.tsx limits navigation to the file's directory and to about:, blob: and data: URLs.
  • Diagnostics upload. apps/mobile/src/lib/diagnostics-upload.ts now carries structured problem codes instead of English sentences, so the screen picks its text from the code. Redirect refusal is unchanged.
  • English-only rule. Chinese appears only under apps/*/src/i18n/locales/. Other hits from the CJK grep are the middle dot ·. No commit message contains CJK.
  • Check plan. scripts/check-plan.test.ts now expects the mobile check when @linger/service-kit changes, which matches the new @linger/service-kit/messages import.

Process notes

  • The branch is 1 commit behind main, which requires up-to-date branches. It needs a rebase.
  • The branch has 7 merge commits ("Merge ... main into feat/mobile-app", including b2a91cfd and 9427a60d). main takes rebase merges only, which drop merge commits. b2a91cfd resolves a conflict in apps/voice-runtime/AGENTS.md, and that resolution has to be redone during the rebase.

CI

All 16 checks pass. I ran no tests locally. The migration failure above follows from reading the migration files and how goose applies versions; CI doesn't cover it because no test starts from a preview-build database.

Automated review by Claude Code


Automated review of d2b6724 by Claude Code.

The mobile preview build recorded its migrations as 00894 to 00896 and
earlier builds of this branch as 00895 to 00899, so goose skips main's 00895
and 00896 there and reruns the renumbered mobile migrations. The mobile
migrations are now rerunnable, the preview repair also creates the
runtime_local_computers view and messages.continues, and a migration history
test upgrades both histories.
linger-review[bot]
linger-review Bot previously approved these changes Nov 26, 2026

@linger-review linger-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approve (0 findings)

Scope: follow-up on d2b6724, reviewing c91b048 against main (merge base 7f12445). 27 commits in the PR; the delta since the previous review is 1 commit touching 6 files (migrations 00897–00901 and a new migration-history test). I loaded the helper skills coderbook, ponytail-review and karpathy-guidelines only by name, not their full text. The review ran in a separate session.

Previous findings

  • P1: renumbered migrations break upgrades of preview databases: Resolved.
    • 00897_paired_phones.sql now uses CREATE TABLE/INDEX IF NOT EXISTS, DROP CONSTRAINT IF EXISTS, CREATE OR REPLACE FUNCTION and DROP TRIGGER IF EXISTS before CREATE TRIGGER.
    • 00898 (ADD COLUMN IF NOT EXISTS client), 00899 (CREATE TABLE IF NOT EXISTS) and 00901 (ADD COLUMN IF NOT EXISTS) can also run again.
    • 00900_mobile_preview_handoff_repair.sql:28-53 now recreates what goose skips on those databases: main's 00895 view runtime_local_computers and main's 00896 column messages.continues.
    • tests/integration/mobile_preview_migration_test.go covers both version histories. I ran it locally and it passed (see CI).

Findings

None.

Verified as fine

  • Released builds match the test's histories. I listed the migration files at each released mobile tag:
    • desktop-v0.1.9-mobile.1 (1b5accab) records 00894_paired_phones, 00895_voice_session_client and 00896_mobile_relay_nodes on top of main's 00893.
    • desktop-v0.1.10-mobile.1 and .2 (675c7c34, 2daf8e04) have main's 00894 plus mobile 00895–00899.
    • These are the two histories the test simulates.
  • Content matches the released files. Apart from the added IF NOT EXISTS / OR REPLACE guards, each current file is identical to what those tags shipped: preview 00894–00896 → 00897–00899, and 0.1.10 00895–00899 → 00897–00901. An existing table therefore never lacks a column that CREATE TABLE IF NOT EXISTS would silently skip. The one exception is 00900, which only gains the view and the continues column.
  • The repair matches main.
    • The view in 00900 has the same column list and order as main's apps/teamhub/migrations/00895_runtime_local_computers.sql:4-26, so CREATE OR REPLACE VIEW does nothing on a fresh database.
    • The continues column definition matches 00896_message_continues.sql:5-6.
  • Third upgrade path. A database that went preview → 0.1.10 → this build has versions 893–899 recorded. On that database only 00900 and 00901 run, and both can run again safely. The test doesn't cover this path explicitly, but it follows from the two cases above.
  • No new migrations on main. main is 4 commits ahead and adds no migrations (git diff HEAD...origin/main -- apps/teamhub/migrations is empty), so the numbering doesn't collide.
  • English-only. Han characters in added lines appear only under */src/i18n/locales/. No commit message contains CJK.
  • Commit authors. Every commit author is linked to a GitHub account.

Process notes

  • The PR contains 7 merge commits from main (e.g. b2a91cfd, 9427a60d, 1b5accab). main takes rebase merges only, so follow main by rebase instead.
  • The branch is 4 commits behind main and needs updating before merge.

CI

  • All checks pass except check (desktop). It fails in src/main/updater.test.ts, test "defers startup cleanup until the default 60s fallback…", with "Timed out waiting for deferred cleanup".
    • This PR touches only apps/desktop/src/main/navigation.{ts,test.ts} under desktop, so the failure looks like timing flakiness unrelated to the change. A rerun should clear it. I did not rerun it.
  • The integration_migration_history tests don't run in PR CI (make -C apps/teamhub test-integration-migrations only). I ran TestMobileMigrationsUpgradeEarlierVersionHistories locally through scripts/with-test-database.sh against a throwaway PostgreSQL. Both subtests passed: preview_build and earlier_branch.

Automated review by Claude Code


Automated review of c91b048 by Claude Code.

… the splash

Hermes has no Intl.PluralRules, so the first plural message crashed the app
at launch. The splash now uses the approved logo raster: the traced SVG
leaves a seam across the tile that shows over a transparent background.
TeamHub no longer limits a phone to four kinds. The phone answers Room
creation, the AnotherMe setup cards, Connection authorization (OAuth in the
in-app browser, settled by TeamHub's own checks), and the Composio and web
search key cards; Chrome connection and macOS permission cards can only be
declined there. Denials take an optional reason.

@linger-review linger-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Request changes (1 P1, 2 P2)

Scope: follow-up on c91b048. Base main, merge base 7f124458. Reviewed the 2 new commits (081a2ad5, 76ab9958, 34 files), then re-checked the assumptions of the whole PR (29 commits). Loaded coderbook, ponytail-review and karpathy-guidelines. Ran in a separate session.

Previous findings

The previous review (c91b048) had no findings.

Findings

P1

  • The PR description still says the phone may answer only four decision kinds. See apps/teamhub/internal/app/handlers_typed_card_decisions.go:40. The body lists "a phone may answer only four decision kinds" as one of the hardenings from the adversarial review. 76ab9958 removes that boundary entirely: phoneDecisionKinds, DecisionAnswerCommand.OnlyKinds, ErrDecideElsewhere and the 403 DECIDE_ON_COMPUTER response are gone. Phones can now answer room_creation, the AnotherMe setup cards, connection_auth, provider_key and search_key. The test plan also describes a Simulator run of the old recipe, which checked the 403 boundary, not the new answer flows. The server still allows only deny for browser_connection and computer_permission (apps/teamhub/internal/typedcard/decisions.go:455), so the change itself is sound. The problem is that the description now hides a widened security boundary from reviewers. Fix: update the body (hardening list, test plan, test counts) to describe the new boundary, and say whether the new answer flows were run on a device.

P2

  • Denying a connection_auth card with a reason always fails. See apps/mobile/src/chat/decision-setup-views.tsx:702 and :787. ConnectionAuth uses ApprovalActions, which shows the "add a reason" link. When a reason is written, deny sends comment. TeamHub's normalizeDecisionAnswer rejects any comment on connection_auth (apps/teamhub/internal/typedcard/decisions.go:448-453: || command.Comment != "" → ErrInvalid → 400 INVALID_CARD). The user then sees "Your answer was not sent." The composer keeps the text, so every retry fails the same way until they clear it. The web card never sends a comment here (apps/web/src/features/rooms/cards/decision-connection-auth-view.tsx:366). Fix: hide the reason affordance for this kind, for example with a reasonAllowed={false} prop on ApprovalActions or a plain decline button. Add a test that the deny request carries no comment.
  • docs/mobile.md describes a key restriction the Gateway doesn't enforce. See docs/mobile.md:145. The doc says "The Composio and web search keys are on it only as far as a decision card asks for one." But apps/teamhub/internal/mobilegateway/allowlist.go:69-77 lets through PUT /v0/external-apps/provider-key and PUT /v0/web-search/backends/:/key unconditionally. Neither handler (apps/teamhub/internal/app/handlers_external_source_v1.go:41, saveWebSearchKey) needs a pending card, so a paired phone can replace the deployment's Composio key or a search key at any time. This is new reach for a phone: provider keys were explicitly off the allowlist before this commit. Fix: either say plainly in the doc that a phone can save these keys at any time, or enforce it on the server, for example by requiring a pending provider_key/search_key decision_id from a phone session.

Verified as fine

  • browser_connection and computer_permission stay decline-only on the server, whatever the client: apps/teamhub/internal/typedcard/decisions.go:455-461.
  • The OnlyKinds/ErrDecideElsewhere/DECIDE_ON_COMPUTER removal is complete. git grep finds no leftovers, and the OpenAPI description was edited and regenerated together (contracts/openapi/teamhub-public/teamhub-api.openapi.yaml:2070).
  • A phone-started OAuth needs no desktop callback: desktop_callback_url is optional (contracts/openapi/components/external-sources.yaml:89-97). Pending Connections are re-polled by pendingAuthorizationPoll (apps/teamhub/internal/externalsource/connection_jobs.go:43), so afterSignIn only speeds up settling.
  • The room_creation answer rules match TeamHub. The client's canDecide (apps/mobile/src/chat/decision-rules.ts:15) mirrors the server's workspace-visibility rule (apps/teamhub/internal/typedcard/decisions.go:522), and a deny requires a reason on both sides (decisions.go:463-470, reasonRequired in decision-card.tsx).
  • The Hermes Intl.PluralRules shim installs only when the engine has none (apps/mobile/src/i18n/plural-rules.ts:36). It loads before expo-router/entry (apps/mobile/index.ts).

Process notes

  • The branch is 8 commits behind main (mergeStateStatus: BLOCKED) and needs a rebase.
  • It contains 7 merge commits from main (e.g. b2a91cfd, 77f0890b). main only takes rebase merges, which drop merge commits and any conflict resolution in them. Rebase onto main instead.

CI

All 16 checks pass. I ran no tests myself. The findings come from reading the code paths cited above.

Automated review by Claude Code


Automated review of 76ab995 by Claude Code.

… types

The viewer page's libraries patch Iterator.prototype while loading, and
WebKit before iOS 18.4 has no Iterator, so the page died before it could
report and the app showed a spinner forever. core-js now fills the missing
APIs first, pdf.js comes from its legacy build, and a startup error reports
failure so the app offers the system viewer. File type labels follow the
interface language.
A connection, key, browser or permission card's denial carries no
comment on TeamHub, so the phone hides the reason link there and never
sends one. The mobile doc now says plainly that a paired phone can save
the Composio and web search keys at any time.

@linger-review linger-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approve (0 findings)

Follow-up on 76ab995. Merge base 7f124458, 31 commits, 591 files; this pass read the 19 files changed since 76ab995 in full.

Previous findings

  • Resolved: PR description still claimed the phone may answer only four decision kinds. The Boundary section now describes the widened boundary and lists each kind.
  • Resolved: a connection_auth denial with a reason was refused by TeamHub. apps/mobile/src/chat/decision-rules.ts:31 DENY_WITHOUT_REASON matches the kinds that reject a comment in apps/teamhub/internal/typedcard/decisions.go:450-459. decision-setup-views.tsx:703 now sends no reason, and reasonAllowed hides the reason input.
  • Resolved: the docs said the key routes were open only behind a card. docs/mobile.md:145 now says a paired phone can save either key at any time.

Verified as fine

  • Denial rules: room_creation still requires a reason (decisions.go:464-468, reasonRequired in decision-card.tsx:546). The default kinds keep an optional reason. decision-rules.test.ts and file-kind.test.ts pass locally (10 tests).
  • Viewer: it now uses pdf.js's legacy/build entry, and the worker plugin resolves node_modules/<args.path>. pdfjs-dist@6.2.108 ships legacy/build/pdf.worker.min.mjs. The startup error guard is removed in viewer/main.ts:34 once the libraries have loaded. core-js is pinned, and its install script is turned off in pnpm-workspace.yaml.

Process notes

  • The branch is 13 commits behind main and needs a rebase.
  • The branch contains 7 merge commits (77f0890b, 1b5accab, 2b8b7d69, 7740fd08, 6e74ab96, 9427a60d, b2a91cfd). Rebase onto main instead, because a rebase merge drops merge commits along with any conflict resolution in them.

CI

  • Every reported check passes.
  • CI has no job for check-mobile or check-relay, so the mobile changes are covered only by local runs. I ran vitest run src/chat/decision-rules.test.ts src/library/file-kind.test.ts, which passed.
  • viewer:build failed locally with an unresolved buffer import. It fails the same way on 76ab995, so it is likely caused by this host's partial install (--filter @linger/mobile...), not by this change. I did not verify that further.

Automated review by Claude Code


Automated review of 109cd37 by Claude Code.

@linger-review linger-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approve (0 findings)

Follow-up on 109cd37. Merge base 1c35212b on main; reviewed 32 commits and 591 files. The only change since the previous review is the merge commit b4721238, which pulls in main. git show --remerge-diff shows it has no conflict resolutions.

The previous review had no findings.

Verified as fine

  • The main commits brought in by the merge add no migrations, so this PR's 00897–00901 still follow 00896_message_continues.sql without a collision (apps/teamhub/migrations/). Contracts and the env inventory merged cleanly, and both check (contracts) and repository-gate pass.
  • Mobile API allowlist: allowed() matches against the decoded URL.Path, and gin routes on that same decoded path. A .. or %2F inside a : segment stays a literal route parameter and cannot reach /v0/auth/, /v0/me/phones and the other forbidden routes. Forwarding and proxy headers are stripped before the request is handed to TeamHub (apps/teamhub/internal/mobilegateway/allowlist.go:83, dispatch.go:54-78). TestMobileAllowlistNamesPublicOperations checks every entry against the public routes and the forbidden prefixes.
  • The only CJK in added lines is in the allowed locale catalogs (apps/web/src/i18n/locales/zh-CN.json, apps/mobile/src/i18n/locales/zh-CN.json). No commit message contains CJK.

Process notes

  • The PR follows main through 8 merge commits. Four of them carry conflict resolutions (9427a60d, 7740fd08, 2b8b7d69, b2a91cfd). main only takes rebase merges, which drop merge commits along with any conflict resolution in them. Rebase the branch onto main before merging.

CI: all 16 checks pass. check-mobile and check-relay have no ci key in scripts/check-plan.mjs, so CI does not run them; this PR's mobile and relay tests were run only locally by the author. I ran no tests myself.

Automated review by Claude Code


Automated review of b472123 by Claude Code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant