Skip to content

Navigation stack: Ctrl+− / Ctrl+Shift+− back and forward through tab history #52

Description

@JoshuaRowePhantom

Summary

Maintain a linear navigation history of tabs and top-level views visited. Ctrl+−
navigates backward and Ctrl+Shift+− (Ctrl+_) navigates forward, analogous to
browser back/forward or Visual Studio Ctrl+−/Ctrl+Shift+−.

Design

See docs/design/navigation-stack.md.

Scope

INavigationHistoryService

  • Linear list with current-position pointer (max 200 entries)
  • Push(NavigationEntry) — called by every tab/view activation
  • GoBack / GoForward — move the pointer, activate the entry
  • Deduplication: skip push if entry is identical to the one immediately before current
  • No persistence — stack is in-memory only

NavigationEntry / TabDescriptor

  • Each entry stores: workspace id, tab id, and a TabDescriptor for reopening closed tabs
  • TabDescriptor subclasses per tab kind: entity, agent-session, browser, entity-browser
  • Closed tab reopen: call TabDescriptor.OpenAsync; skip and try next on failure

Push sources

  • MainWindowViewModel.OpenTabAsync
  • MainWindowViewModel top-level view selection
  • Notification click / F7/F8 navigation
  • (AI tool integration tracked separately)

Guard against double-push

  • _navigatingViaHistory bool in MainWindowViewModel suppresses push during GoBack/GoForward activations

Key bindings

  • Ctrl+OemMinusNavigateBackCommand
  • Ctrl+Shift+OemMinusNavigateForwardCommand
  • Added to MainWindow.axaml

Acceptance

  • Ctrl+− navigates to the previously active tab/view
  • Ctrl+Shift+− navigates forward after going back
  • Navigating to a new tab while mid-history truncates forward history
  • Navigating to a closed tab reopens it; deleted entities are skipped

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions