-
Notifications
You must be signed in to change notification settings - Fork 91
feat(orchestrator): add view-mode navigation, compact switcher, and tmux keybindings #588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
4f0d7bc
research(design): add refined Option 3 keyboard-nav prototype
flora131 df11f5d
research(design): replace Esc with g-key for graph return in Option 3
flora131 f4aaaf3
research(design): fix Tab cycling to skip orchestrator in Option 3
flora131 6a479fb
feat(orchestrator): add viewMode state and subagent helpers
flora131 a855e9e
feat(tmux): add Ctrl+G graph-return and Ctrl+\ next-window bindings
flora131 6346c69
feat(orchestrator): add compact agent switcher and graph/attached nav…
flora131 a7c73ad
chore(config): exclude new orchestrator components from coverage
flora131 239443b
refactor(orchestrator): remove Tab/Shift+Tab cycling from graph panel
flora131 ab117fb
refactor(orchestrator): remove number-key direct jump from agent swit…
flora131 200cd3c
refactor(tmux): centralize status-bar defaults and escape format strings
flora131 953da95
docs(tmux): document prefix-free navigation bindings and SIGQUIT over…
flora131 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| /** @jsxImportSource @opentui/react */ | ||
| /** | ||
| * CompactSwitcher — a lightweight popup that lists all agents for quick | ||
| * direct-jump navigation. Opened with "/" from any view mode. | ||
| */ | ||
|
|
||
| import { useStore, useGraphTheme, useStoreVersion } from "./orchestrator-panel-contexts.ts"; | ||
| import { statusIcon, statusColor, fmtDuration } from "./status-helpers.ts"; | ||
| import { lerpColor } from "./color-utils.ts"; | ||
|
|
||
| export interface CompactSwitcherProps { | ||
| selectedIndex: number; | ||
| } | ||
|
|
||
| export function CompactSwitcher({ selectedIndex }: CompactSwitcherProps) { | ||
| const store = useStore(); | ||
| const theme = useGraphTheme(); | ||
| useStoreVersion(store); | ||
|
|
||
| const agents = store.sessions; | ||
| const headerHint = "\u2191\u2193 select \u00B7 \u21B5 jump \u00B7 Esc close"; | ||
|
|
||
| return ( | ||
| <box | ||
| position="absolute" | ||
| bottom={1} | ||
| left={0} | ||
| width={44} | ||
| border | ||
| borderStyle="rounded" | ||
| borderColor={theme.borderActive} | ||
| backgroundColor={theme.backgroundElement} | ||
| flexDirection="column" | ||
| > | ||
| {/* Header */} | ||
| <box height={1} flexDirection="row" paddingLeft={1} paddingRight={1}> | ||
| <text fg={theme.textDim}>agents</text> | ||
| <box flexGrow={1} /> | ||
| <text fg={theme.textDim}>{headerHint}</text> | ||
| </box> | ||
|
|
||
| {/* Agent list */} | ||
| {agents.map((agent, i) => { | ||
| const isSelected = i === selectedIndex; | ||
| const icon = statusIcon(agent.status); | ||
| const iconColor = statusColor(agent.status, theme); | ||
| const duration = | ||
| agent.startedAt !== null | ||
| ? fmtDuration((agent.endedAt ?? Date.now()) - agent.startedAt) | ||
| : "\u2014"; | ||
|
|
||
| return ( | ||
| <box | ||
| key={agent.name} | ||
| height={1} | ||
| flexDirection="row" | ||
| paddingLeft={1} | ||
| paddingRight={1} | ||
| backgroundColor={isSelected ? lerpColor(theme.backgroundElement, theme.primary, 0.12) : theme.backgroundElement} | ||
| > | ||
| <text> | ||
| <span fg={theme.textDim}>{String(i + 1).padStart(2)} </span> | ||
| <span fg={iconColor}>{icon} </span> | ||
| <span fg={isSelected ? theme.text : theme.textMuted}>{agent.name}</span> | ||
| </text> | ||
| <box flexGrow={1} /> | ||
| <text fg={theme.textDim}>{duration}</text> | ||
| </box> | ||
| ); | ||
| })} | ||
| </box> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The doc comment says these are the agents that "Tab/Shift+Tab cycles through", but the updated keyboard handling in
SessionGraphPanelno longer cycles with Tab (it attaches to the first subagent) and tmux-level navigation is bound to Ctrl+\. Please update the comment to match the actual navigation behavior so it doesn’t mislead future changes/tests.