Repository navigation
fix(ios): keep sidebar pins and sessions visible during reconnect - #208682
Conversation
|
🦞👀 |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Codex review: passed. What this changesThis PR retains loaded iOS sidebar sessions and personal pins during reconnects and gives the header an opaque background. Example: Return to the running iOS app with Atlas and Notes pinned.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR addresses a source-confirmed reconnect bug, and no blocking defect was found. Reviewed head: Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe iOS sidebar combines Gateway session rosters and personal pin preferences into navigation rows, with cached sessions available offline. flowchart TD
A[Gateway connection and viewer] --> B[NodeAppModel]
C[Session roster and pin preferences] --> B
B --> D[Sidebar owner identity]
D --> E[RootSidebarModel retained roster]
E --> F[RootSidebar session rows]
B --> F
Technical reviewBest possible solution: Retain confirmed sidebar data within the existing models for the same Gateway, agent, and viewer, while preserving cold-start loading and existing send routing. Do we have a high-confidence way to reproduce the issue? Current main clears personal pins on connection transitions and ties loaded-list readiness to the connection generation; the supplied simulator comparisons show the resulting reconnect flicker. Is this the best way to solve the issue? The change repairs the existing presentation owners without adding persistent storage or changing routing, and shares partial-roster rejection across both refresh paths. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a62a1471842a. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +81, Tests +57. Total +138 across 5 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall readiness starts with the lower of the proof and patch scores. It is capped at 3/6 if the fix is partial, the change offers little benefit, a product decision is still open, or the PR reverses an earlier decision without saying why. ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 29, 2026, 8:06 PM ET / November 30, 2026, 01:06 UTC. |
What Problem This Solves
When you return to the open iOS app, the sidebar can lose your pins and briefly replace its Pinned and Sessions lists with loading bars.
User Impact
The loaded sessions stay visible, with personal pins in their existing order, while the app reconnects. If the refresh takes longer than half a second, a small spinner appears at the right of the Sessions heading. Rows remain tappable. The spinner disappears when the refresh finishes; a failed refresh keeps the old rows without a warning. Cold startup and the offline cache are unchanged.
Why This Change Was Made
A new socket does not mean a different viewer. The sidebar can reuse the list already in memory for the same Gateway, agent, and account without storing another copy. When the default agent is temporarily unavailable during reconnect, the sidebar can still show the confirmed list; that display state cannot authorize a chat send.
Evidence
16b04e24a41e. Final tested commit:d3eaf0207ff0. The recording shows the original reconnect fix, before the delayed indicator was added. The screenshots below show the indicator on the updated app.Sessions refresh on iPhone 17
Annotated comparison
Clean comparison
Reconnect recording
The side-by-side replay starts after the app returns to the foreground. The last two seconds hold the same instant from each recording so the loading bars are easy to see.
ios-sidebar-reconnect.mp4