-
Notifications
You must be signed in to change notification settings - Fork 0
feat: prioritize upcoming alarm context #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
qxbyte
wants to merge
5
commits into
main
Choose a base branch
from
Codex/upcoming-alarm-summary
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
ab2d843
refactor(AlarmListView): 优化闹钟显示排版
qxbyte 534fd3a
Improve alarm list guidance
codex 692a59a
Expand README for recent collaborator updates
codex 67546cc
refactor(AlarmListView, AlarmEditView, ContentView): 优化闹钟显示排版和用户体验
qxbyte 95a6d81
feat(alarm-list): 优先展示最近提醒
codex File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| # Alarm | ||
|
|
||
| 一个基于 SwiftUI 的本地闹钟原型,当前重点覆盖工作日重复、节假日跳过、调休补班和基础计时能力。 | ||
|
|
||
| ## 当前分支说明 | ||
|
|
||
| 当前分支 `Codex/optimize-alarm-display` 侧重闹钟列表的显示优化: | ||
|
|
||
| - 强化空状态提示,首次打开时更清楚地引导创建闹钟 | ||
| - 在列表中同时展示重复规则、节假日处理方式和下一次提醒时间 | ||
| - 保持现有交互结构不变,只做轻量视觉与信息层级调整 | ||
|
|
||
| ## 近期协作更新 | ||
|
|
||
| 最近几轮由不同提交者补充的内容,当前分支已经包含: | ||
|
|
||
| - 闹钟列表排版优化:补充启用数量、重复规则摘要和更清晰的信息层级 | ||
| - 闹钟编辑页样式统一:列表页与编辑页的视觉风格已基本对齐 | ||
| - 重复规则交互增强:支持每天、工作日、自定义日期组合,并优化选择流程 | ||
| - 节假日配置能力:可配置法定节假日、调休工作日、自定义跳过日期和自定义工作日 | ||
| - 秒表与计时器基础体验:已提供基础页面,秒表含空状态和运行状态文案 | ||
|
|
||
| ## 主要能力 | ||
|
|
||
| - 新增、编辑、删除闹钟 | ||
| - 每天、工作日、自定义重复 | ||
| - 节假日跳过与调休工作日识别 | ||
| - 稍后提醒开关与时长设置 | ||
| - 秒表与计时器基础页面 | ||
|
|
||
| ## 页面说明 | ||
|
|
||
| - `闹钟列表`: 查看全部闹钟、启用状态、重复规则、节假日策略和下一次提醒 | ||
| - `闹钟编辑`: 调整时间、标签、铃声、重复规则、稍后提醒和节假日跳过开关 | ||
| - `节假日配置`: 维护法定节假日、调休工作日和自定义日期 | ||
| - `秒表 / 计时器`: 提供基础计时功能,用于后续继续补强 | ||
|
|
||
| ## 项目结构 | ||
|
|
||
| - `Alarm/Views`: 闹钟列表、编辑页、节假日设置、秒表、计时器 | ||
| - `Alarm/Services`: 存储、调度、节假日计算 | ||
| - `Alarm/Models`: 闹钟、应用设置、节假日数据模型 | ||
| - `Alarm/Utilities`: 日期格式化辅助方法 | ||
|
|
||
| ## 运行说明 | ||
|
|
||
| 1. 使用 Xcode 打开 `Alarm.xcodeproj` | ||
| 2. 选择 `Alarm` scheme | ||
| 3. 在模拟器或真机运行 | ||
|
|
||
| ## 已知限制 | ||
|
|
||
| - 当前无单元测试 target | ||
| - `AlarmKit` 可用性依赖签名能力与设备环境 | ||
| - 节假日相关结果依赖本地日历和配置数据 | ||
|
|
||
| ## 后续可补强方向 | ||
|
|
||
| - 为闹钟触发时间计算补单元测试,重点覆盖工作日、节假日和调休交叉场景 | ||
| - 为列表和编辑页补首次授权与失败提示说明 | ||
| - 继续完善秒表和计时器在后台恢复、完成提醒等细节体验 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
displayAlarmscallsstore.nextTriggerDate(for:)inside the sort predicate for both sides, and that helper usesDate()internally each time. Around trigger boundaries (for example, when the current minute rolls over during sorting), the same alarm can compare differently across predicate invocations, which violatessorted’s strict weak ordering requirement and can yield unstable ordering/flicker. Computenowonce (or precompute each alarm’s next trigger once) before sorting to keep comparisons deterministic.Useful? React with 👍 / 👎.