Skip to content

Sortable Sessions panel (recency / message count / workspace) #26

@Ron537

Description

@Ron537

Summary

Add a sort dropdown to the Sessions panel so users can sort by recency (default), message count, or workspace.

Acceptance criteria

  • Sort dropdown rendered in the Sessions panel header (next to or in the existing filter menu in src/renderer/src/components/layout/SidePanel.tsx).
  • Sort options: Recent, Most messages, Workspace.
  • Selection persists across app restarts via useSettingsStore (new field sessionsSortOrder on AppSettings).
  • SessionList receives the sort order as a prop and applies it before rendering.

Files to touch

  • src/renderer/src/types/index.ts (extend AppSettings)
  • src/renderer/src/stores/settingsStore.ts (default value, migration)
  • src/renderer/src/components/layout/SidePanel.tsx (UI control)
  • src/renderer/src/components/sessions/SessionList.tsx (apply sort)

How to test

  • Verify the default is "Recent" and matches existing behavior.
  • Switch to "Most messages" and confirm sessions reorder.
  • Restart app and confirm the setting persisted.

Effort: 4-6 hours.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions