Repository navigation
fix: hide stale personal pins after sharing changes - #185067
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesPersonal sidebar pins now observe session changes and disappear when their descriptors become unavailable. Example: Access to the off-page pinned session agent:main:shared-pin is revoked.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This maintainer-authored PR addresses a current sidebar freshness bug; no actionable defect was found in the reviewed diff, and exact-head CI remains pending. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Control UI resolves saved personal references through the session capability and combines observed descriptors with loaded rows to render sidebar and rail shortcuts. flowchart LR
A[Saved personal pins] --> B[Pin lifecycle]
C[Gateway session events] --> D[Session capability]
B --> D
D --> E[Row observations]
E --> B
F[Loaded sidebar rows] --> G[Sidebar and rail]
B --> G
Technical reviewBest possible solution: Keep personal-pin presentation attached to existing session observations while retaining saved references and pending-label continuity. Do we have a high-confidence way to reproduce the issue? Current-main source retains settled pin copies across sharing invalidations, matching the supplied baseline screenshot and reported failing mounted regression; no target code was executed during this review. Is this the best way to solve the issue? Reusing the existing observation and descriptor owners is the smallest complete repair; the added lifecycle state preserves bootstrap scheduling, loaded-row precedence, and pending seeds without introducing another descriptor authority. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 40b2953684f9. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +91, Tests +100. Total +191 across 3 files. Added test files: 0. View PR surface stats
Review metrics
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 follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 26, 2026, 6:12 PM ET / 22:12 UTC (Revision 2). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Fixed: personal sidebar pins now follow access changes and session updates without requiring a reconnect. |
Keep personal sidebar pins current after sharing changes and session-generation replacement, while preserving saved shortcuts and loaded-row presentation.
What Problem This Solves
A personal pin can retain its old label after access to that session is removed when the session sits outside the loaded sidebar page. The sidebar resolves the pin once and keeps a separate descriptor copy for the entire connection, so a sharing-change notification refreshes the session owner without clearing that copy. Reconnecting hides the stale row, but an already connected sidebar keeps displaying it.
User Impact
Unavailable personal pins now disappear on the existing connection while their saved shortcuts remain intact. Restoring access makes the same pin available again. Ordinary session updates reach off-page pins, and loaded sidebar rows continue to supply their current presentation.
The change preserves pin ordering, shared pin/group state and the pending label shown during a normal list-page replacement. Moving the sidebar between its existing hosts retains the pending lookup; removing a pin or disposing the sidebar releases its observation. No configuration, permission or data migration is required.
Why This Change Was Made
Pins now consume the session capability's row observations and reconciliation instead of keeping a settled descriptor copy. Broad invalidations and successor generations admitted by supplemental reads retire the old observation. The saved reference is resolved again through the existing descriptor owner, with invalidation retained while a loaded row temporarily supplies the display. Presentation seeds remain only while the initial lookup is pending. Observation lifetime is bounded by the configured pins and sidebar lifetime.
The production change adds 91 net lines to replace the detached descriptor lifetime with observation and teardown handling; the existing mounted test file adds 100 net lines covering the missing lifecycle. The existing rail and query-replacement controls are preserved.
Evidence
The mounted regression failed on the main baseline because the initially visible pin remained after a broad sharing invalidation. On this change, all 148 tests in ten affected files pass, including revocation, access restoration, ordinary row updates, removal/disposal, connection replacement, and a synchronous host move that retains one descriptor read. The selected formatting, lint, UI i18n and affected compiler checks also pass. The test batch took 8.82 seconds in Vitest.
A Chromium scenario using the production UI and synthetic Gateway responses showed one stale pin before the fix and zero afterward, with one socket throughout. It also verified that the saved shortcut survives and the pin returns when access is restored. This exercises client invalidation; it does not claim a new server-authorization check. The before/after captures and recording below show that same scenario on the tested head.
The supplemental-read retirement regression also passes. Independent review is clean, exact-head CI passed, and the hosted review reports Diamond with no findings.
Visual evidence
Same-connection revocation and restoration
[email protected]
Visual verification
d462dc8e29776e2092013995a8acebd106f75af2