Skip to content

Commit typed cut time on blur instead of discarding it - #3133

Merged
mifi merged 3 commits into
masterfrom
claude/cut-time-input-commit-on-blur
Oct 19, 2026
Merged

mifi merged 3 commits into
masterfrom
claude/cut-time-input-commit-on-blur

Conversation

@mifi

@mifi mifi commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

Follow-up to #3126 / #3129.

  • Commit on blur: clicking away from the start/end time input now commits the typed time instead of silently discarding it. It doesn't seek, so the click still goes where you clicked.
  • Failed commits keep the text, shown in red: this covers unparseable text and errors like start after end. The reason is shown as an error toast. Enter failures also turn red now.
  • Losing window focus keeps the text: when you switch apps, the text is kept as typed and not committed. Focus returns to the input when the window gets focus back.
  • Escape cancels: the input handles Escape itself (not during IME composition), so the edit is cancelled instead of committed.
  • Enter doesn't commit twice, so there's no extra undo step.
  • Frame count mode: no live commit on every keystroke. Every prefix of a number is a valid frame number, so typing 123 used to seek to 1, then 12, then 123.
  • Switching segments clears the text: manual text is also cleared when the current segment changes (keyed on segId).
  • Cleanups: DRYed the paste handlers and simplified setTime. parseAndSetCutTime rejects NaN and is reused by handleSubmit.

Known edge case, not addressed: a modifier-drag on the timeline right after typing can overwrite the start that the blur just committed. Timeline's mousemove closure holds stale segments. Before this PR, the typed value was discarded anyway.

Verified: tsc, lint and tests pass. Not manually tested in the app yet.

🤖 Generated with Claude Code

https://claude.ai/code/session_017QJfcnstoUXVtcR4FuTuTs

claude and others added 3 commits October 19, 2026 02:14
Clicking away from the start/end time inputs used to silently throw away
what was typed. Now valid input is committed on blur, while Escape still
cancels the edit. Also stop committing on every keystroke in frame count
mode, where every prefix of a number is itself a valid frame number.

Changelog: Cut time inputs now keep the typed time when clicking elsewhere (Escape still cancels), and frame count input no longer jumps while typing

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017QJfcnstoUXVtcR4FuTuTs
Co-authored-by: Mikael Finstad <finstaden@gmail.com>
- Handle Escape in the input itself, so the skip-commit flag can't get stuck
- Don't seek when committing on blur, it would override where the user clicked
- Keep the text with error state if the blur commit fails
- Keep the text when the whole window loses focus
- Also clear manual text when switching to another segment
- DRY paste handlers

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017QJfcnstoUXVtcR4FuTuTs
Co-authored-by: Mikael Finstad <finstaden@gmail.com>
- Keep (red) unparseable text on blur too, not only text that fails to apply
- Toast the reason when a blur commit fails, since the input no longer has focus
- Show red state when Enter fails
- Simplify setTime and blur handler

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017QJfcnstoUXVtcR4FuTuTs
Co-authored-by: Mikael Finstad <finstaden@gmail.com>
@mifi
mifi merged commit f90cbc5 into master Oct 19, 2026
6 checks passed
@mifi
mifi deleted the claude/cut-time-input-commit-on-blur branch October 19, 2026 08:28
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.

2 participants