You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Navigation stack: AI workspace tools should push navigation entries #54
When AI tools (e.g. entity_invoke_shortcut, workspaces_entity_get with side-effects,
or any tool that opens a tab) navigate the workspace, those navigations should be recorded
in the navigation history stack (see #52) so the user can Ctrl+− back to where they were
before the agent took over.
Context
Issue #52 designs the navigation stack and lists AI tool push as explicitly out of scope
for the initial feature:
AI tool push integration in this feature — tracked separately.
This issue tracks that integration.
Scope
Identify all AI tool invocations that result in a tab activation or top-level view change.
After each such activation, call INavigationHistoryService.Push with the appropriate NavigationEntry.
The push must happen after the tab is visible and active, not before, to ensure the
entry reflects the final settled state.
The _navigatingViaHistory guard in MainWindowViewModel must be respected so that
tool-driven navigations do push (they are not back/forward history traversals).
Key tools to update (once #47 workspace-gui toolset is implemented)
entity_invoke_shortcut — whenever Open disposition results in a tab activation
Any other workspace-gui tool that activates a tab as a side effect
Acceptance
After an agent opens an entity tab via tool call, Ctrl+− navigates back to the
previously active tab.
Multiple sequential tool-driven navigations are all individually reachable via Ctrl+−.
Back/forward navigation triggered by the user does not create additional stack entries.
Checked: Commit 2ac4e74 (Fix #54) on the eatures branch. Files inspected:
Phantom.Workspaces/ViewModels/WorkspaceGuiContextProvider.cs — new WorkspaceGuiContextProvider class with �ntity_invoke_shortcut, workspace_close, ab_close, and open_tab tools. �ntity_invoke_shortcut routes Open through ShortcutManager.HandleShortcutAsync on the UI thread, which calls MainWindowViewModel.OpenTabAsync.
Phantom.Workspaces/ViewModels/MainWindowViewModel.cs — OpenTabAsync and ActivateTabById both push NavigationEntry when !navigatingViaHistory, satisfying the guard requirement.
Phantom.Workspaces/ViewModels/AgentSessionShortcutContext.cs — WorkspaceGuiContextProvider wired into the toolset chain.
Phantom.Workspaces.Llm.Core/FixedToolResources.cs — WorkspaceGui constant added and included in DefaultNames.
Phantom.Workspaces.Tests/MainWindowIntegrationTests.cs — two new tests: OpenTabAsync_ExistingTab_PushesNavigationEntry and NavigateBack_AfterMultipleToolDrivenNavigations_TraversesAllEntries.
Phantom.Workspaces.Tests/WorkspaceGuiContextProviderTests.cs — comprehensive tests for all tool handlers.
Result: Implementation found, all verification criteria satisfied, tests present and green.
✅ �ntity_invoke_shortcut routes through ShortcutManager → OpenTabAsync → NavigationHistory.Push
✅ _navigatingViaHistory guard respected; user back/forward does not create extra entries
✅ Multiple sequential tool-driven navigations each push an entry (verified by NavigateBack_AfterMultipleToolDrivenNavigations_TraversesAllEntries)
✅ No disabled/skipped tests, no TODOs, no timing-dependent synchronisation in new code
Activity
Fix #54: AI workspace tools push navigation entries
JoshuaRowePhantom commentedon Jun 30, 2026
Verification passed
Checked: Commit 2ac4e74 (Fix #54) on the eatures branch. Files inspected:
Result: Implementation found, all verification criteria satisfied, tests present and green.