Skip to content

Fix calendar bugs, unblock build, add tests + CI, harden reliability - #1

Merged
alontu merged 3 commits into
masterfrom
improve/bugfixes-tests-reliability
Jun 11, 2026
Merged

Fix calendar bugs, unblock build, add tests + CI, harden reliability#1
alontu merged 3 commits into
masterfrom
improve/bugfixes-tests-reliability

Conversation

@alontu

@alontu alontu commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Summary

Ships the pending fixes to production-bound `master`.

  • fix: unblock production build (typed DatePicker `onChange` in CalendarHeader — repo HEAD did not compile under strict).
  • fix(bugs): holidays/Hebrew-date toggles no longer reset when toggling a real calendar; edit/delete now target the event's own calendar (`_calendarId`); month-end ragged edge made consistent.
  • test: add Vitest suite — 61 tests (unit + actions integration with mocked googleapis + modal component test).
  • reliability: session-expiry → re-auth; explicit `timeZone` on timed events; inline error banner instead of `alert()`.
  • chore: type the Google I/O layer (remove `any`); GitHub Actions CI (test+build gate); harden `.gitignore` for deploy creds.

Verification

  • `npm test` → 61 passing
  • `npm run build` → green (incl. without `.env`, as in CI)

🤖 Generated with Claude Code

Alon Tuval and others added 3 commits June 9, 2026 22:54
…ader)

The two range-picker onChange handlers had untyped params, which under
strict's noImplicitAny broke `next build` (the repo HEAD did not compile).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Bug fixes:
- Holidays/Hebrew-date toggles no longer reset when toggling a real
  calendar (handleCalendarToggle preserved virtual ids only sometimes).
  All three toggles now go through a single applyCalendarsParam source.
- Edit/delete now target the event's own calendar (_calendarId), not the
  default visible one — previously 404'd for non-primary calendars.
- Month-end ragged edge: padding cells render as faint placeholders so
  every month row is a consistent full-width rectangle.

Testing/refactor:
- Add Vitest (npm test, TZ=UTC) — 61 tests.
- Extract pure logic to src/lib: calendar-params, color, event-form,
  holidays, event-layout (+ unit tests); component test for the modal.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Type the Google I/O layer (google-calendar.ts, actions.ts): remove all
  `any`, use googleapis Schema types, centralize auth + error handling.
- Re-auth on expired session: page.tsx shows the login screen when
  session.error is set, instead of leaving stale tokens / silent 401s.
- Add GitHub Actions CI (npm test + build gate; lint informational).
- Harden .gitignore against committing deploy credentials/tooling.
- Remove leftover scratch file test-date.js.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@alontu
alontu merged commit 9ce72cf into master Jun 11, 2026
1 check passed
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