fix(tui): keep navigation bindings visible in narrow terminals - #118
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
abhiksark
left a comment
There was a problem hiding this comment.
Thanks for taking on #79, @xjcway123. The new pilot coverage is helpful, and the isolated TUI suite, full suite, and passing-curriculum verification all pass.
I am requesting three focused updates before merge:
- Preserve the normal binding order: F1, F2, F3, F4, F5, then quit. Essential bindings may be prioritized in the narrow presentation, but the full-width footer should not be globally reordered.
- Base the docs footer copy on the actual laid-out footer width. At 41 columns the current code selects the long label, but the modal footer is only 23 columns wide and renders
O Open official docs |, hidingEsc Close. - Attach a current 40 by 15 screenshot or GIF covering the track, docs, and topic-picker flow, as required for TUI changes.
Please add boundary coverage for the 41-column docs case and assert the intended binding order at normal width. Thank you for another pass.
| Binding("f1", "toggle_hint", "Hint"), | ||
| Binding("f2", "reset", "Reset"), | ||
| Binding("f3", "toggle_list", "List"), | ||
| Binding("f4", "topics", "Topics"), |
There was a problem hiding this comment.
Please preserve the normal logical order: F1, F2, F3, F4, F5, then quit. Moving F4, F5, and Escape to the front makes the footer read out of sequence at every width and solves narrow clipping by changing the full-width presentation. Keep the existing order at normal widths and prioritize the essential actions only in the narrow presentation. Please add an order assertion to the normal-width test.
|
|
||
| def on_resize(self, event: events.Resize) -> None: | ||
| self.query_one("#docs-footer", Static).update( | ||
| self._footer_text(event.size.width) |
There was a problem hiding this comment.
This uses the screen width, but the docs modal is only 72% wide and also has padding and a border. At 41 by 15, the footer region is 23 columns wide, the long label is selected, and the rendered line is only O Open official docs |, so Esc Close is hidden. Please choose the compact label from the laid-out footer content width and add a 41-column boundary test.
Brings in the Windows and macOS CI matrix (abhiksark#126) so this TUI change is exercised on Windows before merge, plus the ASCII-locale CLI fix (abhiksark#125).
|
Thanks @xjcway123 — reviewed and this looks good to merge. I've merged current What I verified locally on Python 3.9 with your branch merged onto current dev: 37 TUI tests pass, 215 pass overall, no conflicts. I also probed the two things that looked fragile and both hold on Textual 8.2.8 — the footer yields children whose Two non-blocking observations for a future pass, not asks:
Once the Windows jobs come back green I'll merge. |

Summary
Testing
python -m pytest tests/tui -q— 36 passedpythonlings --root tests/fixtures/passing_curriculum verify— 2 passedPYTHONUTF8=1 python -m pytest -q— 187 passed; 5 Windows-only failures remain in untouched manifest tests due to path separators and unavailable symlink privilegesgit diff --check— passedCloses #79