Skip to content

feat: Sessions navigation with 3-column layout (#54)#64

Merged
leonardocardoso merged 8 commits into
mainfrom
feature/54-sessions-navigation
Mar 29, 2026
Merged

feat: Sessions navigation with 3-column layout (#54)#64
leonardocardoso merged 8 commits into
mainfrom
feature/54-sessions-navigation

Conversation

@leonardocardoso
Copy link
Copy Markdown
Member

Summary

Implements Sessions navigation with 3-column layout and collapsible sidebar (closes #54).

Changes

Sessions Navigation View (SessionsNavigationView.swift)

  • New 3-column split layout when Sessions is selected in the sidebar:
    • Column 1 — Sessions list: All sessions grouped by project with collapsible sections, search/filter, model badges, token counts, and time ago
    • Column 2 — Session detail: Full session content (reuses existing SessionDetailView, FileHistoryView, and skeleton loading)
  • Follows the macOS 3-pane pattern (like Mail, Notes, Finder) for better information hierarchy
  • Uses HSplitView within the existing detail area to maintain the main sidebar

ContentView Integration

  • When .sessions navigation is selected, the detail area now shows SessionsNavigationView instead of the previous conditional logic
  • The main sidebar (SidebarView) remains intact and collapsible via the standard NavigationSplitView toggle

Features

  • Session search across all projects (by title and session ID)
  • Collapsible project sections with chevron toggle
  • Highlighted search matches using existing HighlightedText utility
  • Model badge, token count, turn count display per session
  • Agent/sidechain session indicators
  • Responsive, resizable columns (min 220px list, min 400px detail)
  • Empty states for loading and no search results

Checklist

  • Uses existing layout patterns
  • SF Symbols with hierarchical rendering
  • 0 SwiftLint violations
  • SwiftFormat applied
  • Builds cleanly (xcodebuild Debug)
  • No explicit @MainActor annotations (uses default isolation)

Add a dedicated sessions browsing view with an HSplitView that provides
a sessions list panel alongside the session detail. When the Sessions
nav item is selected, users now see all sessions grouped by project in
a searchable, collapsible list on the left with the session detail on
the right — matching the macOS Mail/Notes 3-column pattern.
Relocate agent toggle, refresh, and sort controls to the sessions
navigation header. Remove projects list, search bar, and collapse/expand
from the sidebar — all session browsing now lives in the sessions tab.
Reflects sidebar simplification — removed projects list, search bar,
and collapse/expand. Session controls now in the sessions tab header.
Diff was a computed property rerunning on every render, blocking the
main thread with O(n²) worst-case complexity. Now computed once on a
background thread with a 5000-line cap and a loading spinner.
HomeView was only referenced in screenshot tests, not in the live app.
Also adds .onExitCommand to dismiss search overlay with ESC.
Replace ProjectSessionsView with SessionsNavigationView in the
screenshot test. Regenerate hero, search, and session browser images.
Replaces the empty detail pane with a selected conversation session.
Renames 10-session-browser to 03-session-browser to fill the gap left
by the removed HomeView screenshot.
@leonardocardoso leonardocardoso merged commit e5a0f93 into main Mar 29, 2026
1 check passed
@leonardocardoso leonardocardoso deleted the feature/54-sessions-navigation branch March 29, 2026 18:22
leonardocardoso added a commit that referenced this pull request May 16, 2026
* feat: Sessions navigation with 3-column layout (#54)

Add a dedicated sessions browsing view with an HSplitView that provides
a sessions list panel alongside the session detail. When the Sessions
nav item is selected, users now see all sessions grouped by project in
a searchable, collapsible list on the left with the session detail on
the right — matching the macOS Mail/Notes 3-column pattern.

* refactor: Move session controls from sidebar to sessions tab

Relocate agent toggle, refresh, and sort controls to the sessions
navigation header. Remove projects list, search bar, and collapse/expand
from the sidebar — all session browsing now lives in the sessions tab.

* chore: Regenerate showcase screenshots

Reflects sidebar simplification — removed projects list, search bar,
and collapse/expand. Session controls now in the sessions tab header.

* fix: Compute file diffs asynchronously to prevent UI hang

Diff was a computed property rerunning on every render, blocking the
main thread with O(n²) worst-case complexity. Now computed once on a
background thread with a 5000-line cap and a loading spinner.

* chore: Remove unused HomeView and its screenshot

HomeView was only referenced in screenshot tests, not in the live app.
Also adds .onExitCommand to dismiss search overlay with ESC.

* chore: Update session browser screenshot to show new sessions tab

Replace ProjectSessionsView with SessionsNavigationView in the
screenshot test. Regenerate hero, search, and session browser images.

* docs: Update session browser description for new sessions tab

* chore: Rename session browser screenshot to 03, show selected session

Replaces the empty detail pane with a selected conversation session.
Renames 10-session-browser to 03-session-browser to fill the gap left
by the removed HomeView screenshot.
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.

Sessions navigation with 3-column layout and collapsible sidebar

1 participant