feat: add week view time-axis mode - #163
Conversation
Closes t-20260720112615791999-29953-14 Co-Authored-By: Claude <noreply@anthropic.com> Agend-Agent: cb-team-impl Agend-Task: t-20260720112615791999-29953-14 Agend-Branch: feat/162-week-view-time-axis Agend-Issued-At: 2026-07-20T11:28:30.450120+00:00
Closes t-20260720112615791999-29953-14 Co-Authored-By: Claude <noreply@anthropic.com> Agend-Agent: cb-team-impl Agend-Task: t-20260720112615791999-29953-14 Agend-Branch: feat/162-week-view-time-axis Agend-Issued-At: 2026-07-20T11:28:30.450120+00:00
Closes t-20260720112615791999-29953-14 Co-Authored-By: Claude <noreply@anthropic.com> Agend-Agent: cb-team-impl Agend-Task: t-20260720112615791999-29953-14 Agend-Branch: feat/162-week-view-time-axis Agend-Issued-At: 2026-07-20T11:28:30.450120+00:00
Closes t-20260720112615791999-29953-14 Co-Authored-By: Claude <noreply@anthropic.com> Agend-Agent: cb-team-impl Agend-Task: t-20260720112615791999-29953-14 Agend-Branch: feat/162-week-view-time-axis Agend-Issued-At: 2026-07-20T11:28:30.450120+00:00
Closes t-20260720112615791999-29953-14 Co-Authored-By: Claude <noreply@anthropic.com> Agend-Agent: cb-team-impl Agend-Task: t-20260720112615791999-29953-14 Agend-Branch: feat/162-week-view-time-axis Agend-Issued-At: 2026-07-20T11:28:30.450120+00:00
Closes t-20260720112615791999-29953-14 Co-Authored-By: Claude <noreply@anthropic.com> Agend-Agent: cb-team-impl Agend-Task: t-20260720112615791999-29953-14 Agend-Branch: feat/162-week-view-time-axis Agend-Issued-At: 2026-07-20T11:28:30.450120+00:00
Closes t-20260720112615791999-29953-14 Co-Authored-By: Claude <noreply@anthropic.com> Agend-Agent: cb-team-impl Agend-Task: t-20260720112615791999-29953-14 Agend-Branch: feat/162-week-view-time-axis Agend-Issued-At: 2026-07-20T11:28:30.450120+00:00
Closes t-20260720112615791999-29953-14 Co-Authored-By: Claude <noreply@anthropic.com> Agend-Agent: cb-team-impl Agend-Task: t-20260720112615791999-29953-14 Agend-Branch: feat/162-week-view-time-axis Agend-Issued-At: 2026-07-20T11:28:30.450120+00:00
Closes t-20260720112615791999-29953-14 Co-Authored-By: Claude <noreply@anthropic.com> Agend-Agent: cb-team-impl Agend-Task: t-20260720112615791999-29953-14 Agend-Branch: feat/162-week-view-time-axis Agend-Issued-At: 2026-07-20T11:28:30.450120+00:00
VERIFIED(secondary review)Reviewer: cb-team-reviewer2(第二審/獨立判斷) Summary經完整對照 plan @ Lead 疑點回應A1. A2. Day PDF 的 bottomText 未走共享 helper A3. A4. 空 cell guard 只加註解 Plan Key Constraints 對照
Impl 自報 deviation 確認C1. 分支 A(IIFE 全域): C2. 「移除 Design §8 驗收對照
Reviewed Files
Stage 2 Adversarial Audit<stage2_audit>
Evidenceran: |
|
Scope: 2207b77..0b1fd82; D3 full-scan; correctness; all 12 changed files; plan/design are the implementation baseline. Finding [MEDIUM] — Branch A shared render dispatch does not cover ALL_SCHEDULES. Stage-2 disposition:
reviewed_head: 0b1fd82 Evidenceran: gh pr checks 163 --repo cheerc/classroombooking --json name,state,bucket,link → [{"bucket":"pass","link":"https://github.com/cheerc/classroombooking/actions/runs/29739690585/job/88343302904","name":"validate","state":"SUCCESS"}] |
Closes t-20260720112615791999-29953-14 Co-Authored-By: Claude <noreply@anthropic.com> Agend-Agent: cb-team-impl Agend-Task: t-20260720112615791999-29953-14 Agend-Branch: feat/162-week-view-time-axis Agend-Issued-At: 2026-07-20T11:28:30.450120+00:00
Closes t-20260720112615791999-29953-14 Co-Authored-By: Claude <noreply@anthropic.com> Agend-Agent: cb-team-impl Agend-Task: t-20260720112615791999-29953-14 Agend-Branch: feat/162-week-view-time-axis Agend-Issued-At: 2026-07-20T11:28:30.450120+00:00
Rework update @
|
VERIFIED(R2 secondary re-review)Reviewer: cb-team-reviewer2(第二審 R2) SummaryR2 delta 正確修復了 R1 的 finding(all-schedules dispatch 不經共享決策物件)。經完整對照 plan、design 與完整 diff(base..head),無新的 CRITICAL/WARNING findings。 A. R1 finding 修復確認primary 描述的失敗情境: R2 修復機制:
驗證:
其他 state 組合分歧檢查:窮舉
B. Delta 對抗審查B1. if (!scheduleRenderer) {
const renderTarget = ViewDecisionHelpers.resolveRenderTarget({...});
scheduleRenderer = renderTarget.scheduleRenderer;
}
B2. 簽名變更的呼叫端全覆蓋 Production 呼叫端(
Mirror 測試端(
B3. Mirror 契約同形 Production( B4. 既有測試迴歸 簽名從 Plan Key Constraints 逐條對照(完整 diff base..head)
Reviewed Files(R2 delta)
Stage 2 Adversarial Audit<stage2_audit>
Evidenceran: |
|
Scope: base 2207b77..head 76f6ca1; R2 delta 0b1fd82..76f6ca1; D3 full-scan; correctness; 12-file PR plus 5-file delta. R1 fix verified: resolveRenderTarget now computes one scheduleRenderer for normal and ALL_SCHEDULES states, renderScheduleTable resolves before the all-schedules early return, and renderAllSchedulesView consumes the passed renderer. The unsupported-mode + time regression is covered in the mirror and maps both paths to weekTime. D9 adversarial results:
Unverified/watchpoints:
reviewed_head: 76f6ca1 Evidenceran: gh pr checks 163 --repo cheerc/classroombooking --json name,state,bucket,link → [{"bucket":"pass","link":"https://github.com/cheerc/classroombooking/actions/runs/29741432548/job/88348855980","name":"validate","state":"SUCCESS"}] |
What
新增週檢視「依時間」時間軸模式,支援七日欄位、課程卡老師+教室、持久化還原、全部課表唯讀、week-time PDF,以及空白格安全 guard。日檢視行為維持不變。
How
ViewDecisionHelpers.js.html,由Index.html在 UI/JavaScript 前載入,供 restore、renderer dispatch、card fields、PDF decisions 使用。UI.js.html以 uiModule receiver 的this._flattenCoursesForDays/this._groupCoursesByStartTime收斂四個 renderer;week-time renderer 依timeStart動態分組並保留 classroom/day dataset。JavaScript.html採 view-scopedlastViewSortMode:day 強制time,week 合法值還原,非法值 fallbackclassroom。PDFExport.js.html對 week-time 輸出老師+教室,對角標籤只在 week-time 顯示「時間」。Scope
follows plan and closes issue #162. Changed files are limited to the planned UI, PDF, interaction guard, extracted decision module, tests/lib mirrors/contracts, manual TestCases, and independent verification checklist.
DataCollection.js.htmlupcoming producer 與JavaScript.htmltimer 未修改。Verification at head
0b1fd82c197d14601133ec93bb2dd1301c89fe98:./workflow.sh→ t1, t2, t3, t4, t5, t7, t8, t9 全部 PASS(8/8)Production HTML 的 WT-1~WT-9 尚待
clasp pushdev/preview 後依 provenance 規則執行;獨立 checklist:docs/verification-checklist-2026-07-20-week-view-time-axis.md。Lessons
.agend-managedmarker 會讓 alignment script 將唯一 untracked marker 誤判為 dirty;依 lead 授權保留 marker,使用具名git add,未將 marker 帶入 PR。.html被 coverage 排除,因此 mirror 測試只作決策層輔助;production correctness 由 WT-1~WT-9 provenance-bound 手動 gate。Closes #162