Skip to content

BACK-555 - Fix TUI task composer editing bugs and add Ctrl+W word delete - #809

Open
janosmiko wants to merge 3 commits into
MrLesk:mainfrom
janosmiko:tasks/back-555-fix-tui-composer
Open

BACK-555 - Fix TUI task composer editing bugs and add Ctrl+W word delete#809
janosmiko wants to merge 3 commits into
MrLesk:mainfrom
janosmiko:tasks/back-555-fix-tui-composer

Conversation

@janosmiko

Copy link
Copy Markdown

Summary

Fixes editing bugs in the TUI task composer (shipped in #791) and brings it to BACK-430 first-slice parity. All four bugs trace to neo-neo-bblessed defects the composer did not work around, verified against the installed library.

Bugs fixed

Bug Root cause Fix
Backspace was a no-op in Description textarea.ts:449 backspace branch is empty under fullUnicode, which createScreen always sets Composer owns deletion + render
Backspace looked frozen in Title textbox.ts:117-122 deletes then returns before the trailing screen.render() ignoreKeys on the textbox + composer owns deletion + render
Status picker preselected "Draft" list.ts:47 hardcodes selected = 0 and ignores the selected option, so the picker always opened on index 0 (Draft) picker.select(selectedIndex) in shared filter-popup.ts
j/k didn't navigate pickers list.ts:119/124 bind j/k only under vi, which filter-popup never set vi: true in shared filter-popup.ts

The filter-popup.ts fixes also correct the board's own filter popups, which had the same preselection and j/k gaps.

Added

  • Ctrl+W deletes the previous word in Title and Description.

Parity

  • Resting Status now resolves via getDefaultCreateStatus (exported from task-wizard.ts), matching the CLI wizard's canonical "To Do" instead of a literal statuses[0].

Tests

  • Pure helpers deleteLastChar / deleteLastWord.
  • Resting-status resolves to canonical "To Do" when present but not first.
  • Rendered-harness behavioral tests: Backspace and Ctrl+W edit both Title and Description; the status picker preselects the current value so Enter keeps it (returns "To Do", not "Draft").

Verification

  • bunx tsc --noEmit clean
  • bun run check . clean
  • bun test: 1781 pass / 4 skip / 2 fail — the two failures (freezes selected task bytes, runs post-commit hooks against the real index) are pre-existing git-hook tests that also fail on a clean main checkout, unrelated to this change.

Note: j/k navigation is a TUI-only interaction the test harness can't drive (list nav binds on the raw keypress event); verified manually.

The shipped composer did not work around neo-neo-bblessed defects (verified
against the installed library):
- textbox backspace deletes then returns before the trailing render (no repaint)
- textarea backspace/delete branches are empty under fullUnicode screens (no-op)
- list hardcodes selected=0 and ignores the selected option, so the Status
  picker always opened on Draft
- list binds j/k only under vi, which filter-popup never set

Fixes:
- filter-popup: picker.select(selectedIndex) + vi:true (also fixes the board's
  own single-select filter popups' preselection and j/k navigation)
- task-composer: ignoreKeys backspace/delete on the Title textbox and own
  deletion + render via deleteLastChar/deleteLastWord; Ctrl+W deletes the
  previous word in both inputs
- resting Status resolves via getDefaultCreateStatus (exported from
  task-wizard), matching the CLI wizard
Focus was shown only by a gray/yellow border, which is too subtle in the full
layout where the Status/Type/Priority/Create/Cancel controls have no cursor.
Invert the active control in both layouts, and highlight the label of the
active text input (keeping typed text readable) so tab/shift+tab focus is
obvious.
Sign up for free to 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.

1 participant