Repository navigation
Hint when Shift+Enter arrives as Ctrl+J in a form (#125) - #189
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
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 free
to 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.
Fixes #125.
A terminal bound to send a bare line feed for Shift+Enter (Ghostty
keybind = shift+enter=text:\n) delivers it as Ctrl+J, which every form ignored silently.Change
map_form_edit_key:ctrl+j→ newBoardIntent::ShiftEnterAsCtrlJ. One site covers Title, Notes, Thread, Scope, the step editor, and the single-field editors.Shift+Enter sent Ctrl+J: check terminal keysas a 5 s ephemeral status (a sticky message underneath is restored). Not a save, never persists; added to the empty-step-editor allowlist so it doesn't close a fresh+ steprow. The wording fits a 52-column pane.keys.md"If Shift+Enter does not save" subsection; CHANGELOG Unreleased → Fixed.Not covered (deliberate)
Entersaves there, so nobody is stuck.src/ui/capture.rs(unreachable per invariant).Before / after
Binaries:
/tmp/tsk-t214-before(origin/main 39e3a8e, release) and/tmp/tsk-t214-after(this branch, release). Same scenario on each, in a 52×24 Herdr pane with a fresh isolatedTSK_STATE_DIR: add a ready task with notesdraft,Enterto open,ctrl+eto edit,Tabto Notes, thenherdr pane send-text <pane> $'\n'(the raw line feed Ghostty sends), read the pane, quit, read the store.Before (main): the key is swallowed; the row just says
editing….After (branch): the hint names the cause; draft and store unchanged.
How to test
Already running in Herdr (workspace of this task, tabs
beforeandafter). Each board is open on task T1 with the Notes editor active (draftdraft), against its own store:/tmp/tsk-t214-state-beforeand/tmp/tsk-t214-state-after.In each tab, press
ctrl+j(the same byte the Ghosttyshift+enter=text:\nbinding sends).before: nothing visible; the row still saysediting….after: the row readsShift+Enter sent Ctrl+J: check terminal keysin full, Notes stilldraft(no newline), still editing. It clears after ~5 s.Shift+Enterstill saves.Quit with
EscEscctrl+q. To rerun from scratch (throwaway state only; no setup or Herdr config touched):Run from inside a Git repo so the task shows under the board's project. Then
Enter(open T1),ctrl+e(edit),Tab(Notes),ctrl+j. Swap in/tmp/tsk-t214-beforeon a freshSto see the bug. Clean up withrm -rf "$S".Verification
cargo fmt --check && cargo clippy --all-targets -- -D warnings && cargo test: green.cargo clippy --all-targets --target x86_64-pc-windows-gnu -- -D warnings: green.site:npm test && npm run build: 49/49.tests/queue_board_edit.rs: input map across editors, and a render of the hint at 52 and 100 columns with the draft intact. Both fail with the mapping hunk reverted; the render test also fails at 52 columns with the old, longer wording.