Repository navigation
fix: keep restored sessions unpinned unless archive is undone - #181721
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesRemove the current profile’s personal session pin after a confirmed archive so Unarchive and Undo restore an unpinned conversation. Example: Personally pin “Release checklist” with shared pinned=false, archive it, then select Unarchive.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it fixes a source-confirmed current-main defect, has approved maintainer direction, and has no actionable correctness or security findings. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherControl UI archive actions send mutations through the session capability, then update personal navigation preferences after successful confirmation; sidebar rendering consumes those preferences independently of shared session pin metadata. flowchart TD
A[Header sidebar or Sessions page] --> B[Existing archive action owners]
B --> C[Session capability]
C --> D[Gateway archive confirmation]
D --> E[Current profile navigation preferences]
E --> F[Sidebar placement]
D --> G[Unarchive or Undo]
G --> C
Technical reviewBest possible solution: Retire only the acting profile’s personal session reference after successful archive confirmation, preserving shared-pin Undo, rail shortcuts, other profiles, and sorting. Do we have a high-confidence way to reproduce the issue? Current-main source establishes that a personal reference survives archive when shared pinned=false and becomes visible again on restore; the supplied browser captures corroborate the symptom, but this read-only review ran no target code. Is this the best way to solve the issue? The patch is the smallest complete repair at the existing single, batch, and Sessions-page confirmation owners, without introducing another state store or changing shared archive semantics. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against eae9bc4058a7. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +3, Tests +84. Total +87 across 6 files. Added test files: 0. View PR surface stats
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. 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 Reviewed October 23, 2026, 11:43 AM ET / 15:43 UTC. |
|
Merged via squash.
|
…aw#181721) * fix: keep restored sessions personally unpinned after archiving * fix: restore personal session pins when undoing archive * test: reject archive Undo pins from a retired profile
Closes #181719
What Problem This Solves
Fixes personal session pins reappearing when a user restores an archived session later.
User Impact
Archiving takes effect immediately and removes the current profile's personal pin. The toast's explicit Undo restores both the session and its previous personal pin. Once the toast is gone, Restore session on the Archived page restores the session unpinned, using the existing selected sort.
Why This Change Was Made
Personal navigation references are independent of shared session pin metadata. Confirmed archive actions remove the reference; only the Undo callback retains the previous personal pin. Its restore operation adds pins only for successful, current-profile restorations and preserves newer manual pin changes.
Other profiles, rail shortcuts, shared-pin behavior, and sorting remain unchanged. No archive delay, new persistent state, or retrospective preference rewrite is introduced.
Evidence
Main before the fix: ordinary restoration brings the session back under Pinned.
After: restoration from Archived after the toast expires leaves the session unpinned.
Explicit Undo before this correction (original PR head
d3b7850c58f3): the personal pin was lost.Explicit Undo after this correction restores the personal pin.