Skip to content

fix(sidebar): preserve canonical section state - #586

Open
beruro wants to merge 1 commit into
developfrom
junyu/sidebar-state-correctness
Open

fix(sidebar): preserve canonical section state#586
beruro wants to merge 1 commit into
developfrom
junyu/sidebar-state-correctness

Conversation

@beruro

@beruro beruro commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Problem

Sidebar cloud-session ordering and persisted section-collapse state can be overridden by pagination/search projections, causing unstable order or lost user state.

Solution

  • Keep the Pinned section from current develop, then sort unpinned cloud-scoped local sessions by canonical activity before pagination.
  • Keep persisted collapse state authoritative while search only filters visible rows.
  • Add focused ordering and collapse-state regression coverage.
  • Keep the ordering invariant compatible with the current Pinned section and backend/local pagination rules.

Potential risks

  • Changes to canonical activity timestamps could alter ordering semantics.
  • Search expansion must not accidentally persist temporary expanded/collapsed state.

A session missing from sessionById falls back to its incoming order until metadata arrives; this preserves visibility but can temporarily defer canonical activity ordering.

Verification

  • ./node_modules/.bin/vitest run for cloudScopedMenuItems.test.ts, menuSelection.test.ts, and workstationSidebarMenuItems.test.ts — 3 files / 20 tests passed on merge commit 1be1125b6.
  • pnpm typecheck — passed on merge commit 1be1125b6.
  • Focused Prettier and ESLint checks for the three conflict-resolution files — passed.
  • git diff --cached --check — passed before the merge commit.
  • GitHub CI on the pushed merge commit — PASS: frontend typecheck/lint/tests, Rust Clippy, and AI-attribution history scan.

@beruro
beruro force-pushed the junyu/sidebar-state-correctness branch from aa6eb07 to 4d5704b Compare July 30, 2026 15:10
@beruro
beruro force-pushed the junyu/sidebar-state-correctness branch from 399e6ae to 3c44d75 Compare August 10, 2026 04:12
@beruro
beruro force-pushed the junyu/sidebar-state-correctness branch from 3c44d75 to ee9de5d Compare August 10, 2026 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant