BACK-565 - Repair TUI task composer UX and navigation - #833
Conversation
97cfe30 to
43f3c1a
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 97cfe30a0e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
43f3c1a to
2a65949
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2a659497c0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 81f361bb8c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f393b63f5b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5e5ae93ad0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4b80fe51d2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…888) ## Summary The TUI's single-select filter popups could not be navigated with vim keys. `j` and `k` now move the selection in every filter popup, alongside the arrow keys. This originates from **[PR #809](#809) by @janosmiko**. That PR's status-picker fix already landed via BACK-565 / #833; vi navigation was the remaining piece. The extracted filter-popup hunk is the first commit here, kept under his authorship; the second commit is the adaptation. ## What changed | | | |---|---| | `openSingleSelectFilterPopup` | `j` / `k` bound explicitly on the picker (status, priority and milestone filters, plus the task composer's Status/Type/Priority pickers) | | `openMultiSelectFilterPopup` | help row no longer claims arrows-only — this popup is a `GenericList` and has navigated with `j`/`k` since BACK-584 | ## Why not `vi: true` That is what #809 used, and it does work, but the library's `vi` flag does not bind `j`/`k` alone: on a list it also binds `l`=select, `q`=cancel, `g`/`G`, `H`/`M`/`L` and `Ctrl+B`/`U`/`D`/`F`. No other list in the TUI behaves that way — `generic-list.ts`, which backs the multi-select filter popup, hand-wires the vim keys to plain up/down. So the flag was replaced with two explicit bindings that call the list's clamping `select()`, which is exactly what `ArrowUp`/`ArrowDown` already do in that popup. Consequences worth stating: arrow and Enter behaviour is untouched, `j`/`k` behave identically to the arrows, and each popup keeps its own pre-existing boundary behaviour — the single-select picker clamps at both ends, the `GenericList`-backed multi-select wraps, which is what their arrow keys already did and what BACK-584 deliberately left in place for popups. Neither popup contains a text input, and the board's screen-level `j`/`k` are already guarded by `filterPopupOpen`, so nothing else can swallow or double-handle the keys. ## Verification - `src/test/tui-vim-boundary-navigation.test.ts` gained a `vim keys navigate the filter popups` block driving real key events through both popups on a real screen: `j`/`k` step the single-select picker and clamp at both ends (Enter then returns the `j`/`k`-selected value, not the preselected one), and `j`/`k` step the wrapping multi-select picker so Space+Enter applies the `j`/`k`-selected label. - Mutation control: with `src/ui/components/filter-popup.ts` reverted to `main`, the single-select test fails (5 pass / 1 fail). - Real-PTY check with `expect` (board TUI in a temp project, 140x40): `p` to open the Priority Filter popup, then `j`, then Enter leaves the header button on `high`; the same script with no navigation key leaves it on `All`; and the same script with `j` against `main` also leaves it on `All`. - `bunx tsc --noEmit` clean, `bun run check .` clean, `bun run test` 2144 pass / 6 skip / 0 fail. Closes BACK-616. Supersedes the filter-popup half of #809. --------- Co-authored-by: János Mikó <mixe3y@gmail.com>
Summary
Supersedes #791.
Verification
bun test src/test/tui-task-composer.test.ts— 51 passbun test— 1884 pass, 5 skip, 0 failbunx tsc --noEmitbun run check .bun run build