Repository navigation
fix(ui): keep newly created sessions above Show more - #123828
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
191383b to
1b7bf9d
Compare
|
Codex review: needs maintainer review before merge. Reviewed August 14, 2026, 5:33 PM ET / 21:33 UTC. ClawSweeper reviewWhat this changesThe PR changes Control UI sidebar sorting to use Gateway creation timestamps so newly discovered sessions remain above the Show more boundary. Merge readinessKeep this maintainer-authored PR open for normal exact-head validation. The updated E2E addresses the prior synchronization finding, and the central comparator is the correct owner-boundary repair for refreshed sessions being hidden below the pagination boundary. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI receives Gateway session rows, sorts them for the sidebar, then limits visible rows before Show more. The change affects which refreshed sessions appear immediately to the operator. flowchart LR
A[Gateway session rows] --> B[Session refresh event]
B --> C[Canonical session list]
C --> D[Sidebar sort mode]
D --> E[Creation-time comparator]
E --> F[Visible session rows]
F --> G[Show more boundary]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +56, Tests +188. Total +244 across 4 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the shared comparator as the canonical ordering owner, preserve the legacy first-observed fallback, and proceed once required checks validate this exact head. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current main assigns a refreshed row a later first-observed index, which places it below ten existing rows; the updated E2E asserts the corrected rendered order. The scenario was not executed in this read-only review. Is this the best way to solve the issue? Yes. The shared sidebar comparator is the narrowest owner for Created and People secondary ordering; changing pagination or the refresh producer would retain an incorrect ordering policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 9f125bcee017. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
1b7bf9d to
f42240f
Compare
|
@clawsweeper re-review Addressed the P2 synchronization finding: the E2E now polls the exact refreshed sidebar key order before proof capture and assertion. Focused browser test, formatting, Oxlint, and commit-level autoreview are green on head f42240f. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
What Problem This Solves
Fixes an issue where users sorting the Control UI sidebar by Created could have a newly created session hidden below Show more when that session was discovered through a refresh or another client.
Why This Change Was Made
The Created and People sort paths now use the gateway's authoritative creation timestamp. Timestamped sessions sort newest-first, while legacy rows without a timestamp retain their stable first-observed fallback order. Updated sorting and pinned-zone priority are unchanged.
User Impact
New sessions consistently appear at the top of their unpinned sidebar section, including sessions created from another client or process.
Evidence
node scripts/run-vitest.mjs run ui/src/components/app-sidebar-session-navigation-logic.test.ts ui/src/components/app-sidebar.test.ts— 278 passed.OPENCLAW_E2E_WORKERS=1 pnpm test:ui:e2e -- ui/src/e2e/session-management.created-sort.e2e.test.ts— passed.pnpm tsgo:ui— passed.AI-assisted: implementation, tests, proof capture, and review were performed with Codex/OpenClaw tooling.