Repository navigation
Conversation
|
Warning Review limit reachedNext included review available in 4 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe session tab strip now uses Merge Risk: ⚪ Minimal · up to Mobile tab-strip cache persistence now redacts sensitive identifiers and metadata while preserving cached-tab restoration. No concrete current-head merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description explains the privacy issue, implementation, linked follow-up issue, and tests. However, it omits required template sections, including ELI5, Visual Proof with an explicit N/A if applicable, AI Disclosure, Review, Agent skill upstream boundary, Notes, and the completed Checklist. Resolution Complete the required template sections. Add an ELI5 summary, provide before/after visual proof or state N/A with a reason, document AI use if applicable, complete the Agent skill upstream boundary and checklist items, and include the required compatibility and review notes. ✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Team
Run ID: 2c78f0d4-7657-45f6-baf4-933beed17657
📒 Files selected for processing (3)
mobile/src/cache/session-tab-strip-cache.test.tsmobile/src/cache/session-tab-strip-cache.tsmobile/src/session/mobile-session-tab-strip-entries.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 4 remain after this review.
There was a problem hiding this comment.
ℹ️ No critical issues — the fix is sound and well-tested. One documentation inconsistency the digest introduces is worth reconciling before merge, detailed below.
Reviewed changes
A privacy hardening follow-up to #19281 that closes three plaintext leaks in the cached tab strip: tab ids (an editor id embeds the absolute file path), per-type titles (file/markdown basenames and agent-session task text), and hook-controlled agent text.
- Tab id digestion —
digestTabIdstorescached:+ a 128-bit SHA-256 prefix, mapsactiveTabIdthrough the same digest, and re-digests raw ids written by older builds on load while leaving an already-digested id alone. - Exhaustive persistable titles —
getPersistableTabStripTitleis now a switch over tab type returning fixed labels, dropping thetitleargument entirely. - Agent id allowlist —
getPersistableTabStripAgentIdkeeps an id only when it is a key ofTUI_AGENT_DISPLAY_NAMES. - Tests — new and reworked cases assert digest shape and non-leakage against the written blob, and genuinely fail against main's scrub.
ℹ️ Digesting ids reverses the key continuity the strip comments still promise
The digest deliberately breaks the id equality the strip relied on to reconcile cached rows into live rows, but two in-repo comments still assert that equality, and the PR body's own rationale ("there is no key continuity to lose") contradicts the code it leaves in place. Wrong as-is, and misleading to a future maintainer who trusts the comments.
Technical details
# Reconcile the key-continuity comments with the id digest
## Affected sites
- mobile/src/session/mobile-session-tab-strip-entries.ts:105-107 — "its ids are the live ids, so the swap reuses the same React keys" is now false: stored ids are `cached:` digests, never the live id.
- mobile/src/cache/session-tab-strip-cache.ts:1-4 — "swaps in live rows under the same keys" no longer holds for the same reason.
- mobile/src/session/MobileSessionHeader.tsx:140 — `key={entry.id}` means a preview row (digest key) and its live row (raw id) no longer reconcile in place; the reconnect preview→live swap now remounts the strip rows instead of updating them.
## Required outcome
- Update the two comments to describe the new behavior truthfully, and confirm the preview→live remount on reconnect causes no visible regression — the original same-key swap existed precisely to keep that reconnect repaint clean.
## Open questions for the human
- Is the `mobile-session-reconnect-view-state.test.ts` case "then the live tabs under the same keys" still a meaningful premise now that the live id never appears in the cached preview?DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
A single tightening on top of the previously reviewed digest work: digestTabId now recognizes only the full digest shape rather than any id that merely starts with the cached: prefix.
- Full-shape digest check — the guard changed from
tabId.startsWith('cached:')toDIGESTED_TAB_ID.test(tabId)withDIGESTED_TAB_ID = /^cached:[0-9a-f]{32}$/, closing the path where a wire-supplied id likecached:/Users/.../private-file.mdwas mistaken for an already-digested id and written verbatim. - Failing-first regression test — a new case feeds a prefix-only wire id and asserts both the digest shape and that the path text never reaches the written blob; it fails against the previous
startsWithguard.
The regex is consistent with the digest it guards: digestHex slices sha256 to exactly 32 lowercase hex chars, so already-digested ids from this version match and are left stable, while the reject-path cases (cached: + non-hex, wrong length, or trailing content) fall through to digestion.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
…b, always digest wire ids - a preview row and its live successor now share a React key (the digest), so the reconnect swap no longer remounts every row; layouts and scroll lookups use the same key - storage moves to orca:session-tab-strip:v2 and the v1 blob, which holds raw editor ids and shell-set titles from older builds, is removed on first load - a wire id shaped like a stored key is digested anyway; only storage keeps one as-is
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Team
Run ID: 5dc46edb-5a35-47fb-8318-29a29c114d26
📒 Files selected for processing (9)
mobile/src/cache/session-tab-strip-cache.test.tsmobile/src/cache/session-tab-strip-cache.tsmobile/src/session/MobileSessionHeader.tsxmobile/src/session/mobile-session-reconnect-view-state.test.tsmobile/src/session/mobile-session-route-parity.test.tsmobile/src/session/mobile-session-route-source-family.test-support.tsmobile/src/session/mobile-session-tab-strip-entries.tsmobile/src/session/mobile-session-tab-strip-row-key.tsmobile/src/session/use-mobile-session-keyboard-state.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 0 remain after this review.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Since the prior Pullfrog review, this delta extracted the digest/row-key helpers, migrated the cache off the plaintext v1 blob, and restored the React key continuity the id digest had broken.
- Extracted
mobile-session-tab-strip-row-key.ts—digestHex,toMobileSessionTabStripRowKey, andisMobileSessionTabStripRowKeynow live in one module;digestWorkspaceIdreusesdigestHexinstead of inlining its own loop. - Source-aware id digestion —
toStoredTabId(tabId, source)always digests a'wire'id (even one the host shaped like a stored key), while a'storage'id is only left alone when it already matches the full/^cached:[0-9a-f]{32}$/shape, so a raw id written by an older build is digested on the way back out. v1→v2storage key with purge — the cache now writesorca:session-tab-strip:v2and best-effortremoveItems the plaintextv1blob on first load.- Restored React key continuity —
getMobileSessionTabStripRowsnow emits akeyfield (the digest) for both preview and live rows, and the header/keyboard-state key layouts and scroll on that digest, so the reconnect preview→live swap reconciles in place instead of remounting. This resolves the open concern from the prior review, and the stale "same keys" comments were rewritten to match.
The activeTabId mapping through the digest ids map preserves the cap boundary (an active id past MAX_TABS_PER_WORKSPACE still resolves to null), and the new tests assert exact digest shapes and non-leakage rather than loose truthiness.
One non-blocking sequencing note: the plaintext v1 blob is purged lazily, on the first loadCachedSessionTabStrip/deleteCachedSessionTabStripForHost call rather than at app launch. A user who upgrades and never re-opens the session keeps the old blob on disk until they do. The best-effort intent is documented in readStoredFile, and the new v2 writes stop the leak going forward, so this is informational rather than a required change.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Since the prior Pullfrog review, this delta closes the one open item (the lazy plaintext purge) by making legacy-blob removal self-healing instead of fire-and-forget.
- Retried legacy removal — a new module-level
pendingLegacyRemovalsset tracks keys whoseremoveItemhas not yet succeeded this process, andremoveLegacyBlobs()now runs on bothreadStoredFileandwriteFile, so a bridge hiccup on the first launch no longer strands the plaintextv1blob for the process's life; each key is dropped from the set (and never retried again) once a removal resolves. - Test-reset hygiene —
resetSessionTabStripCacheForTestsre-seedspendingLegacyRemovals, and a new failing-first case asserts the retry-on-next-write then stop-once-landed behavior against a mocked one-shotremoveItemrejection.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
… host deletion await it A session that only loads (offline) never reached the retry, which lived in the memoized file read. Forgetting a host now fails until the older build's blob is gone too.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Since the prior Pullfrog review, this delta hardened the legacy-blob purge so a failed removal is retried on every load (not just the memoized first file read), and made host deletion await the purge.
- Retry moved out of the memoized read —
removeLegacyBlobsBestEffort()now runs at the top ofloadCachedSessionTabStrip, so an offline session that only ever loads still retries a removal that failed on launch;readStoredFileno longer owns the retry. - Host deletion awaits the purge —
deleteCachedSessionTabStripForHostnowawaits the promise-returningremoveLegacyBlobs()after thev2rewrite and throws on failure, so a host deletion is not reported done while the legacy plaintext blob may still hold its titles. Both callers (host-removal-lifecycle,unpaired-host-credential-deletion).catch()and warn, so the throw is never fatal. - Failing-first tests — two new cases: one asserts the retry fires on a later load with no write in between, the other asserts a host deletion rejects while the legacy blob is still on disk. Both fail against the previous revision.
No prior Pullfrog threads remain open; the earlier key-continuity concern was already resolved by the row-key digest work.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
|
Closed with #19348, which reverts the mobile pass this PR fixes bugs inside. The mobile reconnect work will be re-landed one narrow, device-verified change at a time. |

Follow-up to #19281 from the post-merge adversarial review. Three privacy findings on the cached tab strip, all reproduced against main with failing-first tests.
Why
The cache's contract is that only the shape of the strip reaches plaintext AsyncStorage. Three wire-supplied fields still passed through:
id. The desktop builds an editor tab's id aseditor:<worktreeId>:<runtimeKey>:<encodeURIComponent(filePath)>(buildOwnedEditorFileId) and publishes it unchanged when the file has no unified tab row. The cache copied it verbatim, so up to 12 workspaces × 24 tabs of worktree paths and absolute file paths persisted across launches. The same commit digested the workspace id for exactly this reason.agentId. Any string was kept. Its source is the hook-reported agent type, free text on the wire and only length-normalized by the host, so ~40 characters of hook-controlled text per tab reached disk.What
cached:+ a 128-bit SHA-256 prefix of the wire id. The strip only needs the id as a React key and to mark the active row; both still work, andactiveTabIdis mapped through the same digest. A raw id written by an older build is digested on the way back out; an already-digested one is left alone. Live rows still replace preview rows wholesale, so there is no key continuity to lose.getPersistableTabStripTitleis now an exhaustive switch over the tab type with a fixed label per type (Terminal/Agentor the agent's display name,Browser,Markdown,File). It no longer takes a title at all.getPersistableTabStripAgentIdkeeps an agent id only when it is a key ofTUI_AGENT_DISPLAY_NAMES; everything else becomesnulland the title falls back to the generic label.Tests
File.null, and no title, basename, or agent-session task reaches the written blob.tsc, full mobilevitest(4326),oxlint,oxfmt --checkclean.