Skip to content

feat: add timer presets and completion state#6

Open
qxbyte wants to merge 2 commits into
Codex/upcoming-alarm-summaryfrom
Codex/timer-presets-finish-state
Open

feat: add timer presets and completion state#6
qxbyte wants to merge 2 commits into
Codex/upcoming-alarm-summaryfrom
Codex/timer-presets-finish-state

Conversation

@qxbyte

@qxbyte qxbyte commented May 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • add 1/5/10/25 minute presets to the timer screen
  • show live running, paused, and completed status copy
  • present a completion alert as soon as the countdown reaches zero

Testing

  • xcodebuild -project Alarm.xcodeproj -scheme Alarm -destination 'generic/platform=iOS' -derivedDataPath /private/tmp/alarm-derived build (blocked by signing profile for org.xue.Alarm)

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ffe0615297

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

.padding()
}
.navigationTitle("计时器")
.alert("计时结束", isPresented: $didComplete) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep completion state separate from alert visibility

Using didComplete as the isPresented binding for .alert causes SwiftUI to reset it to false as soon as the user dismisses the alert, so the timer immediately leaves the completed state and falls through to the paused copy (remainingSeconds == 0 but didComplete == false). This makes the new completion status non-persistent and misleading right after acknowledgement; use a separate showCompletionAlert flag so completion status can remain true until reset/restart.

Useful? React with 👍 / 👎.

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