Public: anyone can read this; the crew can change it.

A test pins writing a commit in the local terminal: an empty subject is refused, and a subject past 50 columns is marked #7069

shipped production is serving it opened this has it
opened this

The commit screen (src/tui/local/commit.ts) refuses an empty subject ("a subject is required") and marks one wider than SUBJECT_LIMIT. Only the happy path is tested.

Done:

  • [ ] A new test presses ctrl+d with an empty or all-spaces subject. The toast says "a subject is required", and no commit is made.
  • [ ] A subject wider than the limit, measured by display width (wide characters count two), draws the field as invalid but still commits.
  • [ ] A pasted first line becomes the subject and the rest the body, and the commit message is subject\n\nbody.

Files: test/tui-local-commit.test.ts

The test drives createLocalApp (src/tui/local/app.ts) over a real temporary repository, as test/tui-local.test.ts does. If it finds the behaviour wrong, fix the screen in the same pull and say so. If the check fails in a test this pull does not touch, name it in the pull rather than widening the change.

Before pushing: bun x tsc --noEmit and the new test.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs