Repository navigation
fix(tui): expose workspace switching from providers pane #3112
Description
User Story
As an OpenShell TUI user managing providers, I want to switch the active workspace while the Providers pane is focused, so that I can inspect and manage workspace-scoped providers without navigating to the Sandboxes pane first.
Problem Statement
The TUI has one dashboard-wide workspace selection, and changing it refreshes both providers and sandboxes. However, the w workspace shortcut is handled and advertised only while the Sandboxes pane has focus. The Providers pane has no visible workspace-switch action even though provider records are workspace-scoped.
This makes the provider UI appear gateway-global and obscures the isolation behavior implemented by #2243. Users must discover the non-obvious workaround of moving focus to Sandboxes, pressing w, and then returning to Providers.
Impact / Why This Matters
Providers contain workspace-owned credentials and may share the same name across workspaces. Hiding workspace selection from the Providers pane makes it difficult to understand which provider set is being displayed and increases the chance that users inspect or mutate the wrong workspace's provider.
The current workaround is insufficient because workspace is a dashboard-level scope, not a sandbox-only concept, and the title bar alone does not explain how to change it while working with providers.
Acceptance Criteria
- Pressing
wwhile the Providers pane is focused cycles the dashboard workspace using the same sequence and semantics as the Sandboxes pane. - The Providers navigation hints display
[w] Workspacewhen workspace switching is available. - Switching workspace from Providers updates the title bar and refreshes both provider and sandbox lists.
- Provider and sandbox cursor selections reset safely when the workspace changes.
- The
allworkspace view remains supported, and provider creation continues to require selecting a specific workspace. - Tests cover workspace switching with Providers focused, including the pending refresh state and navigation hint.
Reproduction Steps
- Configure a gateway with at least two workspaces and providers in each workspace.
- Run
openshell term. - Focus the Providers pane.
- Observe that the navigation bar does not advertise a workspace action and pressing
whas no effect. - Move focus to Sandboxes and press
w. - Observe that the dashboard workspace changes and both sandbox and provider rows refresh.
Environment
- OpenShell: current
mainat07453f29 - OS: all supported TUI platforms
- Runtime, deployment, or integration:
openshell term
Agent Investigation
The provider backend is already workspace-scoped. This issue is limited to TUI discoverability and input handling.
App::cycle_workspacechanges the dashboard-wide scope, resets both sandbox and provider selection indices, and setspending_workspace_refresh.- The event loop responds by refreshing both providers and sandboxes.
refresh_providerssends either the selected workspace orall_workspaces = truetoListProviders.handle_sandboxes_keymapswtocycle_workspace, buthandle_providers_keyhas no equivalent mapping.- The Sandboxes navigation bar advertises
[w] Workspace; the Providers navigation bar does not.
Relevant locations:
crates/openshell-tui/src/app.rs:cycle_workspace,handle_providers_key,handle_sandboxes_keycrates/openshell-tui/src/lib.rs: pending workspace refresh handling andrefresh_providerscrates/openshell-tui/src/ui/mod.rs: dashboard navigation hints
Alternatives Considered
A separate provider-only workspace selector would create two competing scopes on the same dashboard and allow provider and sandbox panes to show different workspaces. Reusing the existing dashboard-wide workspace selection preserves the current model and requires only exposing the existing action consistently.
Activity
johntmyers commentedon Sep 1, 2026
Implementation Plan
Issue type:
fixComplexity: Low
Confidence: High — clear path
Summary
Expose the dashboard's existing workspace cycle action while the Providers tab is focused and advertise the shortcut in the Providers navigation bar. Reuse the existing
cycle_workspaceand pending-refresh path, which already updates the title-bar scope, resets both cursors, preserves theallview, and refreshes provider and sandbox lists.Scope
crates/openshell-tui/src/app.rs: bindwin the Providers key handler and add focused state-transition coverage.crates/openshell-tui/src/ui/mod.rs: add the Providers[w] Workspacehint and a render-level assertion for it.crates/openshell-tui/src/lib.rs: no code change; verify the existing pending-refresh handler remains the shared provider/sandbox refresh path.Implementation Steps
winput through the existingApp::cycle_workspacemethod.[w] Workspaceto the Providers-tab navigation hints.Test Plan
app.rsfor Providers-focused workspace cycling and state reset; add render coverage inui/mod.rsfor the Providers navigation hint.e2e/behavior or gateway/sandbox infrastructure changes.Risks & Open Questions
/proc, binary execution, or inter-process visibility.Documentation Impact
Revision 1 — initial plan
johntmyers commentedon Sep 1, 2026
Implementation Complete
PR: #3115
What was built
The Providers tab now handles
wwith the existing dashboard workspace cycle action and advertises[w] Workspace. The shared refresh path continues to update both provider and sandbox lists and reset both selections safely.Tests
mise run pre-commitand the fullmise run testsuite passDocs updated
.agents/skills/tui-development/SKILL.mdshortcut table and workspace-switch lifecycleThe issue will auto-close when the PR is merged.
fix(tui): expose workspace switching from providers (NVIDIA#3115)
fix(tui): expose workspace switching from providers (NVIDIA#3115)