Skip to content

fix(sidebar): scope attention sorting to projects and workspaces - #754

Merged
im-ian merged 1 commit into
mainfrom
fix/sidebar-priority-scope
Aug 5, 2026
Merged

fix(sidebar): scope attention sorting to projects and workspaces#754
im-ian merged 1 commit into
mainfrom
fix/sidebar-priority-scope

Conversation

@im-ian

@im-ian im-ian commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Summary

Waiting and error tab priority now stays within the sidebar container where the tab belongs, preventing multi-tab source workspaces from jumping around as session status changes.

  1. Container-scoped priority — prioritize direct sessions within their project and nested sessions within their own workspace, while preserving the existing project-level promotion for workspaces with zero or one tab.
  2. Consistent drag behavior — use the same workspace tab-count rule for drag priority groups so displayed positions remain reachable and stable.
  3. Clearer settings copy — describe the project/workspace boundary and single-tab exception in English, Korean, Japanese, and Simplified Chinese.
  4. Regression coverage — cover multi-root source workspaces, the single-tab fallback, internal session ordering, and reliable settings-toggle synchronization.

Expected impact

Scenario Before After
Source workspace with multiple tabs The entire workspace could jump to the project top when one tab needed attention The workspace keeps its manual slot; only the waiting/error tab moves to the top inside it
Workspace with zero or one tab The workspace moves into the project's priority group Unchanged
Project-direct tabs Waiting/error tabs move ahead of ready work in the project Unchanged
Saved manual order Preserved beneath the temporary priority view Unchanged

Design notes

  • folderGroupHasProjectPriorityStatus promotes a workspace row only when it has at most one session and that session needs attention.
  • Multi-tab workspaces remain in their saved top-level position; orderSessionsByPriority continues to stable-partition their child sessions internally.
  • The drag priority index uses the same predicate as display ordering, avoiding drops into slots that the next render would immediately undo.

Test plan

  • pnpm run test — 109 files, 1,290 tests passed
  • pnpm run typecheck — passed
  • pnpm run build — production build passed
  • pnpm exec playwright test tests/e2e/sidebar.spec.ts --grep "priority sorting" --workers=1 --repeat-each=3 — 6/6 passed
  • git diff --check — passed

@im-ian im-ian added the fix Bug fix label Aug 5, 2026
@im-ian
im-ian merged commit 21baba1 into main Aug 5, 2026
3 checks passed
@im-ian
im-ian deleted the fix/sidebar-priority-scope branch August 5, 2026 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant