Skip to content

feat(entry): confirm before saving an edited time in the future - #441

Open
cartpauj wants to merge 1 commit into
developfrom
feat/431-warn-future-edit-time
Open

cartpauj wants to merge 1 commit into
developfrom
feat/431-warn-future-edit-time

Conversation

@cartpauj

Copy link
Copy Markdown
Contributor

Closes #431

What

When Apply is pressed in the edit pane and the In or Out time is later than the current time, a Future Time prompt opens:

The In time for Runner #123 is later than the current time. Save anyway?

  • Go Back closes the prompt and leaves the edit pane open with the changes, so the time can be fixed
  • Save Anyway saves exactly as before
  • Edits with no future times save immediately, same as today

It warns rather than blocks, so an operator whose clock is off can still save.

Changes

  • futureTimes.ts: getFutureTimeLabels returns which of In/Out are later than now
  • EditRunner.tsx: the save body moved into saveRunner unchanged. Submit checks for future times first and opens the prompt if needed. Uses the plain Modal, because ConfirmationModal always says "This action cannot be undone"
  • The heading avoids the word "in" so it isn't misread as "In time"
  • README and in-app Help mention the prompt

Tests

futureTimes.test.ts covers past, missing, equal-to-now, and future In/Out times. Checked manually in the app.

🤖 Generated with Claude Code

Applying an edit whose In or Out time is later than now opens a
"Future Time" prompt. Go Back keeps the edit pane open to fix it;
Save Anyway saves as before.

Closes #431

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cartpauj cartpauj self-assigned this Sep 28, 2026
@cartpauj

Copy link
Copy Markdown
Contributor Author

Screenshot
image

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.

Warn if edited in/out time is in the future

1 participant