Uh oh!
There was an error while loading. Please reload this page.
fix(fleet): advertise per-screen enter binding in TUI footer - #461
Merged
Conversation
Each drill-down screen's `enter` key now registers a priority Binding with a screen-specific label (Runs: open detail, Run detail: open step, History: replay command, Providers: expand/collapse, Registries: open workflows) so the footer surfaces what enter actually does instead of leaving it unlabeled. Priority is required because DataTable's own hidden enter binding (select_cursor) otherwise shadows the screen binding in the chain. Providers additionally hides the binding via check_action while a model/status sub-row is highlighted, since only provider rows can be expanded/collapsed. Closes#459
Blocking fixes: - providers.py: restore the cursor by row KEY (not index) after `_render_table`'s `table.clear()`, so a second `enter` collapses the provider that was just expanded instead of whichever provider now sits under the cursor-reset-to-row-0. - providers.py: rewrite the now-incorrect comment above `refresh_bindings()` to the true rationale (RowHighlighted is async, refresh_bindings is sync; a rebuild to zero rows posts no message). - docs/fleet.md: fix the rewritten sentence that incorrectly attributed `r`/`tab` to the Run detail screen instead of Step detail. - registries.py, history.py, run_detail.py: add `check_action` (paired with `on_data_table_row_highlighted`) so each screen's `enter` binding is hidden whenever no row resolves (empty/failed/loading table), matching the `runs.py` convention this PR was modeled on. Added `refresh_bindings()` calls where the row set can change without a cursor move (run_detail's poll, history's load). Recommendations applied: - Extracted the six-times-duplicated cursor-resolution block into `tui/widgets.py::highlighted_row_key()`, used by all six sites (runs.py, history.py, providers.py, run_detail.py, and both registries.py screens) -- this also fixes the two unguarded `coordinate_to_cell_key` call sites in registries.py. - registries.py: `_push_inputs_for` now notifies rather than silently no-oping when the registry's index hasn't resolved yet. - run_detail.py: extracted `_agent_name_from_row_key` so the "<agent>-<index>" stripping rule is documented once, not twice. - providers.py: corrected three stale/inaccurate docstrings (`check_provider_models`'s call-site reference, the mouse-click-only claim on `on_data_table_row_selected`, and the "defensive delimiter check" claim on `action_toggle_provider`). - Trimmed the ~7-line duplicated BINDINGS `priority` rationale in four files down to one line each, pointing at `runs.py`'s comment (and fixed the inaccurate "identical" wording). - docs/fleet.md: fixed the "every drill-down screen" overstatement. - registries.py: reordered `WorkflowInputsScreen.BINDINGS` so `escape` is last, matching the rest of the file. Regression tests added for the cursor-restore fix and for each new `check_action` (including empty-table/press-doesn't-crash coverage on Registries, Registry workflows, History, and Run detail). Skipped (see PR comment): additional footer-widget-children assertions and the threading.Event-based in-flight-load test gaps (recommendations 5-7) -- the underlying guards are now also covered by check_action, and the added scope was judged disproportionate to the remaining risk. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Jason Robert (jrob5756)
marked this pull request as ready for review
August 18, 2026 17:48
…er-footer # Conflicts: # docs/fleet.md # src/conductor/fleet/tui/screens/history.py # tests/test_fleet/test_tui_history.py
Uh oh!
There was an error while loading. Please reload this page.
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
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Each Fleet Manager TUI drill-down screen's
enterkey now registers apriority
Bindingwith a screen-specific label so the footer surfaceswhat
enteractually does, instead of leaving it unlabeled:conductor replay <log>for the selected rowDataTablebindsenteritself (select_cursor,show=False) and, asthe focused widget, sits ahead of the screen in the binding chain, so a
non-priority screen binding would be shadowed and never shown in the
footer. Providers additionally hides the binding via
check_actionwhile a model/status sub-row is highlighted, since only provider rows
can be expanded/collapsed.
Docs updated in
docs/fleet.mdwith the full enter-binding table.Closes#459