fix(desktop): include pinned workspaces in sidebar navigation

Merged
YM
2mo ago
+268-11

TLDR:

Fixes up/down keyboard shortcuts to include pinned workspaces and follow the sidebar order.

What & why

Previous/Next Workspace shortcuts skip pinned workspaces because the sidebar removes pinned rows from the regular workspace lists. From a pinned workspace, the shortcuts jump to a regular session or project workspace.

Include pinned workspaces in sidebar order: Pinned → Sessions → Projects, with wraparound in both directions. Expand the Pinned section when navigation targets a hidden pinned row, and skip workspaces with deletion in progress. Numbered workspace shortcuts keep their existing targets.

How I tested it

  • Added 11 hook regression cases for pinned navigation, section boundaries, wraparound, collapsed pins, deletion, and pin changes. Six cases failed before the fix; all 11 pass after it.
  • All 185 sidebar tests pass, including the isolated regression suite.
  • bun run lint:fix and bun run lint pass.
  • Full repository bun run typecheck passes (42 tasks).
  • bun run test fails in the desktop suite: 7,592 pass and 34 fail. The same 34 Git and shell-environment tests fail on the unchanged base revision; this fix adds no failures.

Real-app verification and screenshots are unavailable: ./.superset/setup.local.sh fails during local database migration, which also prevents dev-account creation. The evidence above comes from automated tests, not an end-to-end UI run.

Checklist

  • PR title follows conventional commits (type(scope): subject)
  • bun run lint and bun run typecheck pass (CI fails on lint warnings too)
  • "Allow edits from maintainers" is checked on fork PRs

Summary by cubic

Fixes Previous/Next Workspace shortcuts so they include pinned workspaces in navigation order (Pinned → Sessions → Projects) with wraparound in both directions. Previously pinned rows were skipped because the sidebar removes them from regular workspace lists, so from a pinned workspace shortcuts jumped to a regular session or project workspace. Navigation now expands collapsed Workspaces and Pinned sections to reveal the target and skips workspaces with deletion in progress. Numbered workspace shortcuts keep their existing targets.

Testing

  • Added 11 regression test cases for pinned navigation, section boundaries, wraparound, collapsed pins, deletion, and pin changes.
  • All 185 sidebar tests pass; the 34 desktop suite failures also occur on the unchanged base and are unrelated to this fix.

Summary by CodeRabbit

  • New Features
    • Previous and next workspace shortcuts now include pinned workspaces and wrap through the combined workspace list.
    • Navigating to a pinned workspace expands the Workspaces section and, if needed, the Pinned section so the workspace is visible.
  • Bug Fixes
    • Workspaces marked for deletion are skipped during shortcut navigation.
    • Numbered workspace shortcuts continue to use the regular session and project workspaces.