Commit Graph
2 Commits
Author SHA1 Message Date
Hermes db99f2b54d [grade=A urn:ump:zmnws7b7c63n4sr4qr6collvmttg4ksuaju4z2ndhxo5lntczfbq] test(DC-168): update widget-contract sandbox for batch-2 widget contract
The contract test eval()s the real calendar-widget.js in a hand-rolled
sandbox; batch 2 (3a0f595) changed the contract the sandbox must provide:
- makeEl stubs gain classList (widget uses the class-based .show modal
  system now; style.display checks threw TypeError on old stubs)
- r14 modal trigger: classList.add('show') instead of display='flex'
- ErrorHandler stubs gain logError (catch path calls logError now)
- secureFetch stub provided before every widget eval (all widget API
  calls go through secureFetch now)
Post-grade polish under same URN: removed 4 leftover DBG console.log
lines (judge polish item; test-only, no assertion change).

File 9/9 green; full suite 172/172 suites, 3731/3731 tests.
2026-10-28 00:34:14 -07:00
Hermes dbede032eb [pending-judge] feat(DC-168): calendar widget UX + theming — "No upcoming appointments" state, month grid with highlighted appointment days, theme-correct styling
Owner directives (2026-10-10/11, verbatim in brief): show "no upcoming
appointments" when empty; show a month calendar with days and times
highlighted when there are events; stylize to fit every theme; keep the
widget weather-widget-sized.

Changes (status/ frontend + tests):
- status/js/calendar-widget.js: rewritten render path — chip states ("No
  upcoming appointments" / next appointment with highlighted when-span),
  month grid modal (cal-grid + prev/next nav, appointment days highlighted,
  per-event time dots), upcoming list with day/time emphasis, month-following
  fetch with window-authoritative event merge (via calendar-cache.js),
  forced refresh on periodic tick + source mutations, local escapeHtml (was
  an undefined global).
- status/js/calendar-cache.js (new): uid+start-keyed event cache; fetched
  window is authoritative for entries starting inside it (deletions and
  reschedules propagate), entries outside survive. Dual export (module +
  window) for tests and browser bundle.
- status/build.js: calendar-cache.js bundled before calendar-widget.js.
- status/css/dashboard.css: DC-168 block — chip states, month grid, day
  highlight states, dots, list/source rows, universal light-bg contrast
  rules (color-mix; WCAG >= 4.5:1 verified for all 10 builtin themes, worst
  4.60:1 ocean) + light-surface rules.

Tests: 20 total in __tests__/calendar — 9 in caldav-default-ns (extraction
incl. mixed docs, empty multistatus, namespace-aware fixture validation,
undeclared-prefix rejection both quote styles, positive declared-attr),
5 in dc168-cache-contract (merge, duplicate suppression, recurring uid+start,
window-authoritative removal on refetch, cross-window survival, ended-
exclusion), 6 in dc168-widget-contract (navigation fetch windows, forced-
refresh semantics, cache+widget integration, interval coverage). Existing
suites pass unmodified; eslint 0 errors on touched files.
2026-10-12 01:07:53 -07:00