Skip to content

fix: hide stale personal pins after sharing changes - #185067

Merged
shakkernerd merged 2 commits into
mainfrom
personal-pin-invalidation
Oct 26, 2026
Merged

shakkernerd merged 2 commits into
mainfrom
personal-pin-invalidation

Conversation

@shakkernerd

@shakkernerd shakkernerd commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

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

Open preview

Before After
Revoked Shared research pin remains visible before the fix Revoked Shared research pin is hidden after the fix

Same-connection revocation and restoration

[email protected]

Visual verification

  • Baseline: 0d31d1f
  • Exact head: d462dc8e29776e2092013995a8acebd106f75af2
  • Scenario: Resolve an off-page personal pin; revoke access through a synthetic broad sharing event on the same connection; restore access.
  • Runtime/build: OpenClaw d462dc8; Chromium 1248; production UI with synthetic Gateway responses; 1280x900, dark theme.
  • Revoked rows before / after: 1 / 0
  • Socket count: 1 throughout
  • Saved reference: retained; pin returns when access is restored
  • Synthetic Gateway event is explicitly cued
  • Production UI and session owner exercised
  • Equivalent route, fixture, viewport and theme
  • Mounted lifecycle tests preserve synchronous host moves and loaded rows

@clawsweeper

clawsweeper Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@shakkernerd

Copy link
Copy Markdown
Contributor Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 26, 2026
@clawsweeper

clawsweeper Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Personal 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.

  • Before: The connected sidebar continues displaying Shared research.
  • After: The row disappears while its saved shortcut remains available for access restoration.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Focused, owner-aligned repair with inspected shipped-UI evidence, meaningful lifecycle coverage, and no actionable finding; broad CI remains pending.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected production-UI before/after screenshots demonstrate stale-pin removal for the declared same-connection synthetic sharing scenario on the reviewed head; mounted coverage supports restoration and observation cleanup.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: An unavailable off-page session remains visible as a personal pin until reconnection.
Reason: The maintainer-authored direction restores sidebar freshness while preserving saved shortcuts, ordering, and existing presentation contracts.

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
Reviewed head: d462dc8e29776e2092013995a8acebd106f75af2

Before merge

None.

Findings

None.

Agent review details

How this fits together

The 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
Loading

Technical review

Best 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

  • Connection-scoped pinned descriptor lifetime changes intended behavior with a stated reason (6443c30: The controller retirement preserved synchronous cache admission, connection/source scoping, loaded-row precedence, and rejection of stale async results.)
  • Pending presentation seeds keeps the original intent (3f1e3f5: Retain displayed pin labels during list-query replacement until the authoritative descriptor confirms presence or absence.)
  • Background descriptor admission keeps the original intent (86dc22d: Allow foreground conversation startup requests to precede off-page pin reads through the existing bootstrap coordinator.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

PR surface

Source +91, Tests +100. Total +191 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 123 32 +91
Tests 1 101 1 +100
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 224 33 +191

Review metrics

Metric Value Why it matters
Production versus test growth Production net +91 lines; tests net +100 lines Growth provides bounded observation lifetime and invalidation handling, with regression coverage in the existing mounted suite.

Labels

Label changes:

  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P2: Stale personal-pin presentation has limited sidebar impact and a focused repair.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-26T21:56:22.716Z sha 8301afa :: needs maintainer review before merge. :: none

Reviewed October 26, 2026, 6:12 PM ET / 22:12 UTC (Revision 2).

@shakkernerd

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 26, 2026
@shakkernerd
shakkernerd merged commit 51da49b into main Oct 26, 2026
116 of 117 checks passed
@shakkernerd
shakkernerd deleted the personal-pin-invalidation branch October 26, 2026 22:30
@shakkernerd

Copy link
Copy Markdown
Contributor Author

Fixed: personal sidebar pins now follow access changes and session updates without requiring a reconnect.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 27, 2026
Keep personal sidebar pins current after sharing changes and session-generation replacement, while preserving saved shortcuts and loaded-row presentation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant