Skip to content

fix(fleet): advertise per-screen enter binding in TUI footer - #461

Merged
Jason Robert (jrob5756) merged 3 commits into
mainfrom
fix/459-fleet-tui-enter-footer
Aug 18, 2026
Merged

fix(fleet): advertise per-screen enter binding in TUI footer#461
Jason Robert (jrob5756) merged 3 commits into
mainfrom
fix/459-fleet-tui-enter-footer

Conversation

@jrob5756

Copy link
Copy Markdown
Collaborator

Summary

Each Fleet Manager TUI drill-down screen's enter key now registers a
priority Binding with a screen-specific label so the footer surfaces
what enter actually does, instead of leaving it unlabeled:

  • Runs: open run detail for the selected row
  • Run detail: open step detail for the highlighted step
  • History: surface conductor replay <log> for the selected row
  • Providers: expand/collapse the highlighted provider
  • Registries: open that registry's workflows

DataTable binds enter itself (select_cursor, show=False) and, as
the 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_action
while a model/status sub-row is highlighted, since only provider rows
can be expanded/collapsed.

Docs updated in docs/fleet.md with the full enter-binding table.

Closes#459

Jason Robertand others added 2 commits August 18, 2026 13:01
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>
@jrob5756
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
@jrob5756
Jason Robert (jrob5756) merged commit 107f425 into mainAug 18, 2026
13 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fleet TUI: advertise enter in the footer on every drill-down screen

1 participant

@jrob5756