Repository navigation
fix(ui): nested archive dialog misses worker-owned children and overcounts promoted sessions - #173014
Conversation
…ounts promoted sessions Follow-up to #172489 review: the sidebar hint now also counts unloaded worker branches (childLoadParentKeys), and the dialog copy counts only direct children, the sessions that actually move to the top level.
|
🦞👀 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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR restores archive choices for unloaded worker-owned descendants and counts only children that become top-level sessions. Example: Archive root in a root → child → grandchild tree.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenanceRegression provenance — verified: source commit Merge readiness✅ Ready for maintainer review Keep this PR open: it corrects two source-confirmed archive-dialog bugs still present on fetched main, with no introduced correctness or security findings. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Control UI sidebar supplies a descendant hint to the shared archive runtime, which reads the Gateway-owned tree, presents archive choices, and delegates confirmed writes to existing mutation owners. flowchart TD
A[Sidebar archive action] --> B[Descendant hint]
B --> C[Shared archive runtime]
C --> D[Gateway child discovery]
D --> E[Persistent ancestor map]
E --> F[Archive choice dialog]
F --> G[Existing guarded mutations]
Technical reviewBest possible solution: Use the retained sidebar load-parent facts for discovery and the existing persistent-ancestor map for promotion counts. Do we have a high-confidence way to reproduce the issue? Source establishes both triggers: an unloaded worker produces no navigation child but retains a load-parent hint, and a three-level tree has two descendants but only one child promoted by parent-only archive; no target code was executed. Is this the best way to solve the issue? The focused repair uses existing projection facts and archive-tree ownership, preserves leaf behavior and full-tree counts, and adds regression coverage through the sidebar action and shared dialog runtime. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 97d03398c3e1. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +13, Tests +24. Total +37 across 5 files. Added test files: 0. View PR surface stats
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 15, 2026, 6:16 AM ET / 10:16 UTC. |
|
Merged via squash.
|
…ounts promoted sessions (openclaw#173014) Follow-up to openclaw#172489 review: the sidebar hint now also counts unloaded worker branches (childLoadParentKeys), and the dialog copy counts only direct children, the sessions that actually move to the top level.
Related: #172489
What Problem This Solves
Fixes two gaps in the nested-session archive dialog from #172489, both raised in its review:
User Impact
User impact: the Archive session? choice now also appears when a session's nested sessions sit behind a worker run that hasn't loaded yet. The message now counts only the sessions that actually move to the top level. Archive N sessions still archives the full tree.
Why This Change Was Made
The sidebar projection leaves unloaded worker branches out of a row's
childSessionKeysbut keeps them inchildLoadParentKeys. The archive hint now checks both, throughsidebarSessionHasArchiveDescendantsinsession-menu-descendants.ts. The dialog's count now uses the archive tree's existingancestorsByKey. Only rows whose sole persistent ancestor is the root are counted, which matches what moves up when only the root is archived.Evidence
pnpm tsgo:uiandtsconfig.core.test.ui-{components,other}.jsonreport 0 errors, and oxlint and oxfmt are clean.