Skip to content

Settings toggle: hide sessions older than maxAge days #27

@Ron537

Description

@Ron537

Summary

Add a "Hide sessions older than N days" toggle in Settings → AI Tools that filters the Sessions panel.

Background

AppSettings.sessionMaxAgeDays already exists (default 30) but is currently used only for retention/garbage collection. The Sessions panel still shows everything regardless. Add a UI toggle that filters the in-app list to honor this same value.

Acceptance criteria

  • New boolean setting hideSessionsOlderThanMaxAge defaulting to false (preserves current behavior).
  • Toggle rendered in SettingsModal.tsx under the AI Tools tab, near the existing sessionMaxAgeDays slider/input.
  • When enabled, SessionList filters out sessions whose updatedAt is older than now - sessionMaxAgeDays * 86400_000.
  • Filter applies BEFORE search/grouping so counts stay consistent.

Files to touch

  • src/renderer/src/types/index.ts
  • src/renderer/src/stores/settingsStore.ts (default + migration)
  • src/renderer/src/components/settings/SettingsModal.tsx
  • src/renderer/src/components/sessions/SessionList.tsx (filter logic)

Effort: 3-5 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