This site uses one functional cookie to keep feature rollouts consistent for you. Nothing is set until you choose. See the privacy notice.
Dev notes
A full-stack personal calendar with four views, Google Calendar sync, event sharing, and Pokémon card attachments — built on Postgres and date-fns.
date-fns for all date math — named imports so only the functions used land in the bundleaddCalendarAclEntry fires fire-and-forget after the DB insert so ACL latency never delays the HTTP responseUpdate — August 10, 2026
The months jumped while you scrolled. The infinite scroller compensated for exactly one thing — prepending a period at the top, capturing scrollHeight before the insert and correcting after. Right idea, too narrow. The period renderer also depends on the events and countdowns, so cells change height whenever data arrives, and content growing above the viewport shoves what you are reading down the screen with nothing to correct it.
Rather than add a second special case I replaced it with one mechanism: anchor on the period the reader is looking at, and put it back after any render. That covers prepends, data arrival, and whatever gets added next. I had ruled out the more obvious suspect first — the period callbacks are properly memoised, so the observers were not tearing down on every scroll.
What I would take from it: compensating for a known mutation is a trap, because the next mutation will not be known. Anchoring on what the reader is looking at makes the mechanism independent of what changed. The same mistake, in a different shape, is what made the Explore Toronto rail move around before it was laid out as a grid.
The accessibility pass was not cosmetic. Enforcing axe best-practice rules rather than just violations flagged real structural problems here — a calendar is a grid of interactive cells, which is exactly where landmark and heading structure quietly goes wrong. Fixing those meant changing markup, not adding attributes, which is the right outcome and the more invasive one.
Update — November 18, 2026
A codebase audit found three calendar bugs, more than in any other feature. Each one was a failure that reported success, so none of them had ever shown up as an error.
Saving an event writes its attached cards one request at a time, and every one of those requests ended the same way:
removeCardFromEvent(eventId, id).catch(() => null)
addCardToEvent(eventId, { ... }).catch(() => null)
updateEventCard(eventId, c.id, { ... }).catch(() => null)
onClose();A failed card write turned into null, and the modal closed as if everything had saved. I expected the fix to be removing the catches. Writing the test showed something worse. For a new event, the modal made up an id and wrote the cards to it, while the page threw that id away and let the server assign the real one. So on a new event every card had always failed, and the catch had always hidden it.
Now onSave creates or updates and returns the saved event, and cards go to that event’s real id. If any card change fails, the modal stays open, says how many didn’t save, and keeps only those for the retry. The retry updates the same event instead of creating a second one. Only cards whose quantity or notes changed are sent, where before every save PUT every card.
The authenticated calendar test meant to put its event in a throwaway calendar:
const calendarBtn = page.locator(
`button[data-calendar-id="${calendarId}"]`,
);
if (await calendarBtn.isVisible({ timeout: 2_000 }).catch(() => false)) {
await calendarBtn.click();
}Nothing renders data-calendar-id, so the guard was always false, the click never happened, and every run used the default calendar. The file’s header also promised an afterEach cleanup that didn’t exist. A guard that skips instead of failing is a test asserting nothing. The test now picks the calendar from the modal’s picker, checks the created event landed there, and deletes everything it made afterwards. The picker needed a real <label> for that, which it should have had for screen readers anyway.
const res = await fetch("/api/google/auth/status");
if (!res.ok) return { connected: false };A 500 from that route turned into “not connected”, so two-way sync greyed out with “Connect Google Calendar in Settings first” for someone who already had. Settings would show them as connected, and nothing would explain the difference. Now only a 401 means not connected. Anything else, including a body that doesn’t parse, says the check couldn’t be done, and the option says that instead of pointing at Settings.