Skip to content

feat(app): add dynamic sidebar sorting for active projects and sessions#11758

Open
mguttmann wants to merge 4 commits intoanomalyco:devfrom
mguttmann:feat/dynamic-sidebar-sorting
Open

feat(app): add dynamic sidebar sorting for active projects and sessions#11758
mguttmann wants to merge 4 commits intoanomalyco:devfrom
mguttmann:feat/dynamic-sidebar-sorting

Conversation

@mguttmann
Copy link

@mguttmann mguttmann commented Feb 2, 2026

Summary

Closes #11759

Automatically moves projects and sessions to the top of the sidebar when Claude starts working on them. This makes it easier to track and switch between active work when managing multiple projects.

Changes

  • Server context: Added dynamicSort setting with persistence, bringToTop() function to move active project to top
  • Global sync: Track session activity via timestamps, trigger sorting when session status becomes "busy"
  • Layout: Sort sessions by activity timestamp when dynamic sorting is enabled
  • Settings UI: Added toggle in Settings → General → Desktop section
  • i18n: Included translations for all 15 supported languages

How it works

  1. When Claude starts working on a session (status → "busy"), the feature:
    • Moves the project to the top of the sidebar
    • Records a timestamp for the session
  2. Sessions within a project are sorted by their activity timestamps (most recent first)
  3. The feature can be toggled on/off in Settings → General → Desktop → "Dynamic sidebar sorting"

Screenshots

The setting appears in the new "Desktop" section under General settings.

Testing

  • Tested locally with multiple projects
  • Verified projects move to top when Claude starts working
  • Verified sessions sort correctly within projects
  • Verified setting toggle works and persists
  • TypeCheck passes

@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2026

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2026

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

@mguttmann
Copy link
Author

image

@mguttmann mguttmann force-pushed the feat/dynamic-sidebar-sorting branch from 62bed59 to 72bc6b9 Compare February 2, 2026 12:58
@mguttmann
Copy link
Author

Rebased on latest dev branch.

@mguttmann
Copy link
Author

CI Status Update ✅

All checks are passing:

  • ✅ typecheck
  • ✅ test (linux)
  • ✅ test (windows)
  • ✅ check-standards

Ready for review and merge.

@mguttmann
Copy link
Author

Update: Added Pin/Unpin Projects

Based on community feedback, I've added the ability to pin projects to the top of the sidebar.

What's new:

  • Pin to top — Right-click any project → "Pin to top" keeps it permanently at the top of the sidebar
  • Unpin — Right-click a pinned project → "Unpin" to release it
  • Dynamic sort respects pins — When Claude becomes active on a session, that project moves up but never above pinned projects. Pinned projects maintain their position at all times.
  • i18n — Pin/Unpin strings added for all 15 languages

How it works:

  • StoredProject now has an optional pinned field
  • bringToTop() skips pinned projects and inserts after the last pinned one
  • pin() moves the project to after the last pinned project
  • unpin() simply sets pinned: false (project stays in place)

This addresses the use case where users have a handful of projects they work on daily that should always be easy to find, while still benefiting from dynamic sorting for everything else.

@mguttmann
Copy link
Author

image

@mguttmann
Copy link
Author

Update: Improved settings label wording

Based on feedback from @stenci, updated the settings description to be shorter and provider-agnostic:

  • Before: "Automatically move active projects and sessions to the top when Claude starts working on them"
  • After: "Move recently active projects to the top"

Also fixed all i18n translations — title and description were previously left as English in 13 languages, now properly translated for all 15 supported languages.

@mguttmann mguttmann force-pushed the feat/dynamic-sidebar-sorting branch from 45db5b6 to 3551617 Compare February 2, 2026 18:02
@mguttmann
Copy link
Author

Rebased onto current dev and cleaned up — this branch now contains only the sidebar sorting + pin/unpin feature with no unrelated changes. Typecheck passes locally.

@mguttmann mguttmann force-pushed the feat/dynamic-sidebar-sorting branch 11 times, most recently from 7467387 to 671c85b Compare February 7, 2026 23:31
Claude Agent added 4 commits February 8, 2026 14:37
Automatically moves projects and sessions to the top of the sidebar when
Claude starts working on them. This makes it easier to track and switch
between active work when managing multiple projects.

- Add dynamicSort setting to server context with persistence
- Track session activity via timestamps to sort active sessions first
- Move project to top when any session becomes busy
- Add toggle in Settings > General > Desktop section
- Include translations for all 15 supported languages
Pinned projects stay at the top of the sidebar and are not displaced
by the dynamic sorting when Claude becomes active. Adds pin/unpin
toggle to the project dropdown menu with i18n for all 15 languages.
Previously title and description were left as English in all non-DE
languages. Now properly translated for all 15 languages. Also updates
the description wording to be shorter and provider-agnostic per
community feedback.
@mguttmann mguttmann force-pushed the feat/dynamic-sidebar-sorting branch from 671c85b to 7882105 Compare February 8, 2026 13:38
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.

feat: Dynamic sidebar sorting for active projects and sessions

1 participant