Skip to content

Type the hyphen into the TUI date picker instead of stepping the date - #365

Merged
jeremy merged 2 commits into
basecamp:mainfrom
AruneshDwivedi:fix-draft-validation-error
Sep 10, 2026
Merged

Type the hyphen into the TUI date picker instead of stepping the date#365
jeremy merged 2 commits into
basecamp:mainfrom
AruneshDwivedi:fix-draft-validation-error

Conversation

@AruneshDwivedi

@AruneshDwivedi AruneshDwivedi commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Fixes #368.

- was bound as the date field's step-back key, so typing the separator of a YYYY-MM-DD date moved the date a day instead of landing in the field. - now goes through to the input like any other character; the arrows keep stepping the day both ways, and +/= still step forward since neither can appear in a date.

This branch originally carried a go.mod pin for the draft 422 fix. That half lives in hey-sdk#133 — the wrappers there are what surface HEY's reasons — and the CLI needs no code change for it beyond the routine hey-sdk bump once that ships.

Copilot AI balanced review requested due to automatic review settings August 31, 2026 01:54
@AruneshDwivedi
AruneshDwivedi requested a review from a team as a code owner August 31, 2026 01:54
@github-actions github-actions Bot added the deps label Aug 31, 2026

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.

Pull request overview

Updates the HEY SDK dependency to surface specific 422 draft validation errors.

Changes:

  • Redirects the SDK dependency to a fork containing draft error parsing.
  • Currently introduces an invalid go.mod directive and lacks regression coverage.

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.

Suppressed comments (1)

go.mod:13

  • The dependency change alters user-visible draft edit/send failures, but no command-level regression test serves a JSON 422 and asserts that its errors text reaches the CLI. Add cases for both UpdateDraft and SendDraft to the existing draft lifecycle tests so a future SDK update cannot silently restore the generic message.
replace github.com/basecamp/hey-sdk/go => github.com/AruneshDwivedi/hey-sdk/go 7f51159f3c83

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

Comment thread go.mod Outdated
@AruneshDwivedi
AruneshDwivedi force-pushed the fix-draft-validation-error branch from 1aa7065 to 9c91ad1 Compare September 2, 2026 07:19
@github-actions github-actions Bot added tui tests and removed deps labels Sep 2, 2026
@AruneshDwivedi
AruneshDwivedi force-pushed the fix-draft-validation-error branch 2 times, most recently from 1c2f677 to adcccc2 Compare September 2, 2026 07:26

@cubic-dev-ai cubic-dev-ai Bot 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.

All reported issues were addressed across 2 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread internal/tui/datetime.go Outdated
Comment thread internal/tui/datetime.go Outdated
@jeremy
jeremy force-pushed the fix-draft-validation-error branch from adcccc2 to f5cec6f Compare September 10, 2026 03:36
@jeremy jeremy changed the title fix: surface 422 validation error messages from HEY API Type the hyphen into the TUI date picker instead of stepping the date Sep 10, 2026
@jeremy

jeremy commented Sep 10, 2026

Copy link
Copy Markdown
Member

Rebased onto main and pushed f5cec6f on top: - goes through to the date field as the separator it is, and the down arrow steps the day back again. The swallow stopped the step but still left #368 unfixed, since a typed - never reached the field either way; the new test types -22 into 2026-08 to pin that.

Retitled and rewrote the description to match what the branch now contains — the force-push on Sep 2 replaced the SDK-pin change with this fix, and the go.mod thread is outdated as a result. The draft 422 half is hey-sdk#133; once that ships, the CLI picks it up through the routine hey-sdk bump with no code change here.

make check passes locally. The Test/Security/CodeQL runs are waiting on a maintainer to approve them for a first-time contributor, so CI is not green yet.

kushal and others added 2 commits September 10, 2026 00:52
The "-" key typed in the date field is now swallowed instead of
stepping the date backward or being inserted as a literal character.
This fixes basecamp#368 where users could not enter the YYYY-MM-DD delimiter.
The bug in hey-cli#368 is that a date cannot be typed: "-" was bound as
the step-back key, so the separator moved the date instead of landing in
the field. Swallowing the key stops the step but still leaves the field
without its separator, and it took the down arrow's step with it.

"-" now goes through to the input like any other character, and the
arrows keep stepping the day both ways as the help says they do.
@jeremy
jeremy force-pushed the fix-draft-validation-error branch from f5cec6f to 6428010 Compare September 10, 2026 07:52
@jeremy
jeremy merged commit 549dfa4 into basecamp:main Sep 10, 2026
20 checks passed
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

4 participants