新增 Apple Watch 课表概览页、表盘小组件与使用引导 - #168
Open
qingye0312-cpu wants to merge 25 commits into
Open
Conversation
qingye0312-cpu
marked this pull request as ready for review
July 29, 2026 14:00
added 11 commits
July 30, 2026 15:41
- add a fully interactive, localized onboarding flow for all Watch views - refine touch and Digital Crown paging, scrolling, course details, and floating controls - precompute and persist derived schedule data to reduce first-entry stalls - consolidate Watch state lifecycles, remove stale localization entries, and document the current architecture
Keep exactly three rendered day pages and recycle them as the selected date advances. Prewarm one direction-aware data snapshot and interpolate crown movement per display frame without replaying stale input.
Owner
|
您慢慢写,当前我在重构网络部分代码,估计得下个月了。 |
- add comprehensive and focused Apple Watch complications\n- unify localized schedule formatting, course colors, and 5x7 matrices\n- precompute timeline data and document the current watch architecture
Drive overview and course-list content from the existing teaching drag stream without changing input classification. Keep the proxy isolated to the matching onboarding steps, preserve watchOS 10 native scrolling, and place the dismissible stale-schedule notice in the screen safe area.
Author
手表上本来就没有登陆,现在的结构是只要手机端登录好能正常显示,手表这边就正常了,手表永远调用的是手机端端缓存数据 |
Owner
|
你的等我搞完 slang 再说 |
BenderBlog
reviewed
Aug 29, 2026
Author
|
日志现在恢复了,请您检查一下 |
Capture the Apple Watch implementation before the backend audit. Refine complication progress, typography and compact locations, and route widget links to the overview with current/next courses and daily summaries. Build and runtime validation are left to the user as requested.
Share protocol, language, date, location and cache helpers across the phone, watch and widgets. Reduce repeated parsing and schedule scans, reject outdated or inconsistent transfers, and keep language updates working while signed out. Complete Simplified Chinese, Traditional Chinese and English resources while preserving existing UI styling and diagnostic logs. Add audit documentation and regression cases for the user to run. Build, tests and simulator validation were not run, as requested.
### 功能概述 为 XDYou 增加原生 SwiftUI Apple Watch 配套应用,让用户在手表上查看当前课程、下一节课和学期安排。iPhone 提供日程数据,手表保存已同步内容,手机暂时不可达时仍可浏览有效缓存。最低支持 watchOS 10。 - **五种课表视图**:概览、课程列表、日、周、月视图,支持触摸和数码表冠。概览最多展示当前与下一项两张卡片,另提供今日课程、考试、实验及完成情况;本周统计依据有效同步范围显示。 - **四类表盘与 Smart Stack 小组件**:综合课表、课程名称、时间地点、日程概览,支持单行、圆形和长方形;综合课表额外支持表角。组件根据课程状态展示时间、地点或进度,点击统一进入概览;综合课表支持在组件内预览下一节。 - **操作引导**:实操教程介绍视图、滑动和表冠操作,三秒长按共用逐渐增强、加快的触觉反馈;误操作可恢复当前步骤。五页小组件指南使用实机截图裁切素材,介绍状态、形态和添加方法,支持持续轮播、手动翻页及结束后自动退出。 - **语言与辅助功能**:界面支持简体中文、繁体中文和英语,跟随手机端实际生效的语言;减少动态效果或 VoiceOver 开启时,组件指南停止自动轮播并保留手动操作。学校提供的课程文字和固定示例图片保留原文。 ### 同步与数据处理 手机复用原有课程、自定义课程、考试和实验数据,展开为完整学期快照,通过 Pigeon 和 WatchConnectivity 传递。手表不保存校园账号凭据,也不直接请求学校接口。 同步先获取当天,再获取近 14 天,最后分批获取完整学期;局部数据仅替换覆盖范围,学期分页接收完整后再安装。课表版本及账号代次均相同时返回轻量确认。即时消息与后台回复复用同一套处理逻辑,通过请求标识、状态修订和超时管理过滤重复或过期结果;Application Context 提供近 14 天数据作为回退。 针对退出登录后的状态:手表没有独立登录会话。手机退出或清缓存时发布清空状态并更新账号代次,手表收到后清理数据;延迟到达的旧回复不能恢复旧账号课表。离线时清空无法立即送达,实际后台传输时机仍由系统决定。 共享层统一协议、日期、语言、课程状态和覆盖范围计算,复用分页、缓存校验及可取消任务逻辑,并保留原有日志。iPhone 端同时修正既有课表小组件的时间线:包含当前节点、当天未来课程边界和跨日刷新,日期按时间线节点显示。课程提醒继续由手机已有通知流程负责。 ### 验证 2026-09-08,使用 Xcode 27.0(27A5209h)和 watchOS/iOS Simulator 27.0 SDK 完成: | 检查 | 结果 | | --- | --- | | `TraintimeWatch` 与 `Runner` 模拟器构建 | 均成功,包含相关扩展,`CODE_SIGNING_ALLOWED=NO` | | Swift 日程、缓存、交互及生命周期回归 | 216 项检查通过 | | Flutter Watch 快照回归 | 8 项通过 | | Python 本地化审计与签名脚本回归 | 分别 8 项、6 项通过 | | String Catalog 审计 | 187 条可翻译文案完整 | | `git diff --check` | 通过 | 设备触觉、界面布局和配对传输已由贡献者确认通过实体机操作验证;该记录与上述自动化结果分开。自动化构建不验证设备签名,也不代表已覆盖所有受支持的系统版本。iPhone 构建仍有第三方插件及 `LaunchImage` 资源警告,未阻断构建。 ### 文档 - `watchOS/README.md`:功能、操作方式和源码入口。 - `watchOS/apple_watch_technical_overview.md`:iPhone 接入职责、同步协议、缓存、交互生命周期、小组件、国际化和验证方法。 - `docs/README.md`:以上两份文档的统一入口。
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
功能概述
为 XDYou 增加原生 SwiftUI Apple Watch 配套应用,让用户在手表上查看当前课程、下一节课和学期安排。iPhone 提供日程数据,手表保存已同步内容,手机暂时不可达时仍可浏览有效缓存。最低支持 watchOS 10。
同步与数据处理
手机复用原有课程、自定义课程、考试和实验数据,展开为完整学期快照,通过 Pigeon 和 WatchConnectivity 传递。手表不保存校园账号凭据,也不直接请求学校接口。
同步先获取当天,再获取近 14 天,最后分批获取完整学期;局部数据仅替换覆盖范围,学期分页接收完整后再安装。课表版本及账号代次均相同时返回轻量确认。即时消息与后台回复复用同一套处理逻辑,通过请求标识、状态修订和超时管理过滤重复或过期结果;Application Context 提供近 14 天数据作为回退。
针对退出登录后的状态:手表没有独立登录会话。手机退出或清缓存时发布清空状态并更新账号代次,手表收到后清理数据;延迟到达的旧回复不能恢复旧账号课表。离线时清空无法立即送达,实际后台传输时机仍由系统决定。
共享层统一协议、日期、语言、课程状态和覆盖范围计算,复用分页、缓存校验及可取消任务逻辑,并保留原有日志。iPhone 端同时修正既有课表小组件的时间线:包含当前节点、当天未来课程边界和跨日刷新,日期按时间线节点显示。课程提醒继续由手机已有通知流程负责。
验证
2026-09-08,使用 Xcode 27.0(27A5209h)和 watchOS/iOS Simulator 27.0 SDK 完成:
TraintimeWatch与Runner模拟器构建CODE_SIGNING_ALLOWED=NOgit diff --check设备触觉、界面布局和配对传输已由贡献者确认通过实体机操作验证;该记录与上述自动化结果分开。自动化构建不验证设备签名,也不代表已覆盖所有受支持的系统版本。iPhone 构建仍有第三方插件及
LaunchImage资源警告,未阻断构建。文档
watchOS/README.md:功能、操作方式和源码入口。watchOS/apple_watch_technical_overview.md:iPhone 接入职责、同步协议、缓存、交互生命周期、小组件、国际化和验证方法。docs/README.md:以上两份文档的统一入口。