Skip to content

fix(#514): Public holidays as built-in subscriptions - #617

Merged
BeSovereign merged 1 commit into
mainfrom
fix/issue-514
Oct 20, 2026
Merged

BeSovereign merged 1 commit into
mainfrom
fix/issue-514

Conversation

@BeSovereign

Copy link
Copy Markdown
Contributor

Refs #514

Added locally computed German public holidays (16 states, utils/holidays.js) as a built-in read-only subscription: country/region chosen in the settings (/api/holidays, own user_holiday_region table), shown as a hideable 'Feiertage ()' sidebar calendar and shaded as non-working days in week/day views. Own choices: own rule set instead of a library (no new dependency or licence question), Germany only, statewide holidays only, separate endpoint so /api/preferences keeps its shape, hide toggle per session like webcal subscriptions.

Driver gates (measured, not claimed)

  • Suites: lint: 1 passed, 0 failed | node: 1957 passed, 0 failed | python: 194 passed, 0 failed | e2e: 317 passed, 0 failed
  • Red/green check on declared tests: server/test/issue514_holidays.test.js, e2e/issue514_holidays.spec.js
red/green output
RED without the change:
───────────────────────────────────────────────────────────────────────────

    Error Context: test-results/issue514_holidays-Issue-51-166a3-d-only-non-working-calendar-chromium/error-context.md

    attachment #3: trace (application/zip) ─────────────────────────────────────────────────────────
    test-results/issue514_holidays-Issue-51-166a3-d-only-non-working-calendar-chromium/trace.zip
    Usage:

        npx playwright show-trace test-results/issue514_holidays-Issue-51-166a3-d-only-non-working-calendar-chromium/trace.zip

    ────────────────────────────────────────────────────────────────────────────────────────────────

  1 failed
    [chromium] › e2e/issue514_holidays.spec.js:13:1 › Issue #514 — holidays chosen in the settings show as a hideable, read-only, non-working calendar 


GREEN with the change:
5
      ...
    # Subtest: a chosen region yields read-only all-day holiday events for that user only
    ok 4 - a chosen region yields read-only all-day holiday events for that user only
      ---
      duration_ms: 37.492914
      ...
    # Subtest: switching off removes the subscription
    ok 5 - switching off removes the subscription
      ---
      duration_ms: 14.195589
      ...
    1..5
ok 2 - Issue \#514 — holiday subscription API
  ---
  duration_ms: 318.402952
  ...
1..2
# tests 11
# suites 0
# pass 11
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 492.6803


Running 1 test using 1 worker

  ✓  1 [chromium] › e2e/issue514_holidays.spec.js:13:1 › Issue #514 — holidays chosen in the settings show as a hideable, read-only, non-working calendar (2.4s)

  1 passed (3.8s)

🤖 Generated with Claude Code

Added locally computed German public holidays (16 states, utils/holidays.js) as a built-in read-only subscription: country/region chosen in the settings (/api/holidays, own user_holiday_region table), shown as a hideable 'Feiertage (<Land>)' sidebar calendar and shaded as non-working days in week/day views. Own choices: own rule set instead of a library (no new dependency or licence question), Germany only, statewide holidays only, separate endpoint so /api/preferences keeps its shape, hide toggle per session like webcal subscriptions.

Refs #514

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@BeSovereign

Copy link
Copy Markdown
Contributor Author

Security review (claude-fable-5-1): no blocking finding. All holiday routes are session-scoped behind requireSessionIdentity and the global CSRF guard; region input is allowlist-validated with a test that fails if the check is removed; all data is locally computed and HTML-escaped; no outbound requests, secrets, or injection paths. Only cosmetic note: Date.UTC two-digit-year quirk for windows before year 100.

@BeSovereign
BeSovereign merged commit e62793a into main Oct 20, 2026
5 checks passed
@BeSovereign
BeSovereign deleted the fix/issue-514 branch October 20, 2026 01:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant