Skip to content

Step the date with the arrows alone - #423

Merged
jeremy merged 1 commit into
mainfrom
fanB-368
Sep 10, 2026
Merged

Step the date with the arrows alone#423
jeremy merged 1 commit into
mainfrom
fanB-368

Conversation

@jeremy

@jeremy jeremy commented Sep 9, 2026

Copy link
Copy Markdown
Member

Follows up #365, which fixed #368 by letting the hyphen through to the date input.

What is left

#365 kept +/= as a step-forward key. That pair was an undocumented extra — the help line only ever offered ↑↓ day — and with - typed through rather than stepping back, the binding is one-sided: a step forward on keys nobody was told about, with no step back to match.

dateStep answers only the arrows now; every printable key reaches the text input. The existing step test steps back with ↑ where it used +, and TestDateTimePickerTypesADateWithItsHyphens keys a whole YYYY-MM-DD into an emptied field and checks it parses clean — the reporter's repro end to end, alongside #365's separator test.

Copilot AI balanced review requested due to automatic review settings September 9, 2026 23:19
@jeremy
jeremy requested a review from a team as a code owner September 9, 2026 23:19
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-10T19:09:46.793804Z db614e1 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The behavioral change is tightly scoped, aligns with the reported repro, and is covered by a targeted regression test.

Pull request overview

This PR fixes the TUI dateTimePicker so users can type full YYYY-MM-DD dates (including the - delimiter) by limiting “step date by a day” behavior to only the Up/Down arrow keys.

Changes:

  • Restrict date stepping to ↑/↓ only; allow all printable keys (including -) to flow to the date text input.
  • Update the existing step-by-day test to use instead of +.
  • Add a regression test that types a hyphenated date and asserts it parses cleanly.

[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

File summaries
File Description
internal/tui/datetime.go Removes +/- stepping bindings so hyphens can be typed into the date field; keeps day-stepping on arrow keys only.
internal/tui/datetime_test.go Updates stepping test to use arrow keys and adds a regression test for typing hyphenated dates.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@jeremy jeremy changed the title Let the date field take a typed hyphen Step the date with the arrows alone Sep 10, 2026
hey-cli#365 let the hyphen through to the date input, so YYYY-MM-DD can
be typed again, and left + and = stepping the day forward. That pair was
an undocumented extra: the help line only ever offered ↑↓, and with the
hyphen gone the binding is one-sided, a step forward with no step back
on the keys nobody was told about. Only the arrows step now; every
printable key reaches the input. The typed-date test keys a whole date
into an emptied field and checks it parses clean.
@jeremy
jeremy enabled auto-merge (squash) September 10, 2026 19:16
@jeremy
jeremy merged commit 8976f63 into main Sep 10, 2026
23 checks passed
@jeremy
jeremy deleted the fanB-368 branch September 10, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HEY TUI Cannot enter the "-" in the date field

2 participants