Commit Graph
6 Commits
Author SHA1 Message Date
ferdi2goandClaude Opus 4.8 0efb9cb853 perf(state/assets): debounce saveState, defer SheetJS script (#11)
- saveState is now debounced (~400ms) to coalesce rapid changes; a pending
  write is flushed on beforeunload and on visibilitychange→hidden so the last
  change is never lost.
- The SheetJS <script> gets defer so it no longer blocks initial parse; the
  typeof XLSX guard already covers any not-yet-available case.

Verified headless: app loads without JS/CSP errors.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 12:54:41 +00:00
ferdi2goandClaude Opus 4.8 7b53618921 fix(state): surface localStorage save failures instead of silent loss (#4)
saveState now logs a console.warn on failure and alerts the user once per
session (storage full/unavailable) so they can export their data and avoid
silent data loss.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 12:21:23 +00:00
ferdi2goandClaude Opus 4.8 065876ced4 fix(import): validate/normalize imported data, guard Excel I/O (#3)
- loadFromJSON and the localStorage startup load now run employees through
  normalizeEmployees(): fills missing constraints, drops unusable rows,
  de-duplicates ids, and discards invalid vacation ranges — preventing
  later crashes (e.g. c.neverDays on undefined) and same-day double-books.
- Excel import is wrapped in try/catch with a typeof XLSX guard and user
  feedback; the Excel export button gets the same guard.
- createEmployee reuses the shared defaultConstraints() factory.

Adds normalizeEmployees tests (defaults, dropping, dedup, vacations) and a
loadFromJSON normalization test.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 12:20:41 +00:00
ferdi2go ad680ae1f6 feat: state.settings.moderatorsPerDay with localStorage persistence 2026-04-28 10:48:58 +00:00
Ferdinand dca82fe381 feat: auto-persist state to localStorage on every change 2026-04-08 14:17:24 +02:00
Ferdinand f306c634d5 feat: project scaffold with tabs, styles and package.json 2026-04-08 10:40:32 +02:00