Commit Graph
2 Commits
Author SHA1 Message Date
Hermes cf2457b494 [pending-judge] feat(DC-168): calendar widget UX + theming — "No upcoming appointments" state, month grid with highlighted appointment days, theme-correct styling
Owner requests (2026-10-10/11):
1. "Instead of showing no calendar like it does now It should just show no
   upcoming appointments but if there are appointments it should show a
   calendar with the days and times highlighted for each appointment"
2. "We should properly stylize the calendar to fit with each theme correctly"
3. "Should also be a relatively small widget basically about the size of the
   weather widget"

Changes (status/ only — frontend):
- Chip: empty state now says "No upcoming appointments" (the calendar IS
  connected — the old "No calendar" string was wrong); with events it shows
  title + day/time with .cal-chip-when accent highlight. Chip CSS keeps the
  existing weather-widget proportions (padding 4px 10px, 0.85rem, pill).
- Modal: month GRID (cal-grid, 7 columns, prev/next month nav) with:
  appointment days highlighted (accent-tinted background + border), today
  ring, per-event dots with time tooltips; Upcoming list kept below with
  day/time emphasis. Sources manager unchanged functionally, restyled via
  CSS vars.
- Theming: every color via CSS variables (--fg/--muted/--accent/--border/
  --base/--hover/--error). Per-theme overrides for dark-accent themes where
  small accent text fails contrast on dark surfaces (taxi/ocean/
  solarized-dark get brightened chip-when/dots; black gets its red accent;
  solarized-light dark-on-light). User/custom themes derive automatically
  via color-mix(--accent, white). No hardcoded hex in the shared rules.

Bug fixed en route: escapeHtml was previously expected as a global (never
defined in this file — latent XSS/ReferenceError if another bundle didn't
provide it). Now defined locally.

Verification: node --check clean; DC-168 smoke harness (DOM shim) proves
empty chip → "No upcoming appointments", events chip → title + highlighted
when-span, modal grid renders correct day-cell counts with cal-day/cal-dow
structure; eslint 0 errors (parser-options run).
2026-10-11 23:40:46 -07:00
Hermes 74e21c1edc [pending-judge] feat(DC-161): calendar widget + Radicale auto-wiring
- Top-bar calendar widget (status/js/calendar-widget.js): next-appointment
  display, settings modal with CalDAV/ICS source management and a
  Test-connection probe. Follows the weather-widget pattern.
- Backend routes/calendar.js: sources CRUD (secrets in credential manager,
  never in responses), aggregated events across sources with per-source
  error isolation, Radicale provision endpoint, CalDAV discover probe.
- src/calendar/ics-parser.js: dependency-free RFC 5545 parser with bounded
  RRULE expansion (DAILY/WEEKLY-BYDAY/MONTHLY/YEARLY, COUNT/UNTIL/INTERVAL,
  EXDATE consumes COUNT, RECURRENCE-ID overrides), 500-event cap.
- src/calendar/caldav-client.js: CalDAV REPORT time-range queries over
  node:https (no new deps), HTTPS-enforced off localhost, 5MiB response cap.
- src/calendar/radicale-provisioner.js: zero-config auto-wiring - generates
  a 24-char password, writes Radicale htpasswd config (pure-Node APR1 hash
  verified byte-for-byte against openssl passwd -apr1 vectors), stores
  credentials, registers the source. Deploy hook in routes/apps/deploy.js
  wires any Radicale deployed via the App Selector automatically.
- Radicale app template (tomsquest/docker-radicale) in the catalog.
- Tests: 32 new (parser unit, provisioner unit incl. openssl vectors,
  route tests). Full suite 3552 passed; only pre-existing pdf-parse
  billing/invoice failures remain (proven red at base 448f535).
- OpenAPI: 5 calendar paths documented. CHANGELOG entry added.
2026-10-07 19:57:22 -07:00