Repository navigation
calendar: implement #89 frontend design - #145
Merged
Merged
Conversation
michielbdejong
force-pushed
the
claude/impl-89-calendar
branch
from
September 24, 2026 18:00
c2ba9d4 to
8b26085
Compare
The controller now exposes a snapshot the designed views draw from: the imported calendar's name, colour, access role and account (kept on the table as display-only JSON), the rows as events with pending and conflict flags, and the last preview, which stays valid under an error. Pure pill(), banner() and classify() carry the copy of DESIGN.md §3 and §5.12. New local operations: drawer save, review Discard, per-field conflict resolution, keep as local event, remove local copy; none of them writes to Google. Errors from Google now carry their status and retry-after, and are no longer mistaken for a spent relay connection (the adapter's message says "reconnect" for every non-2xx, which used to drop the connection). The adapter's preview adds the local, remote and base values and the ETag to both-changed conflicts; the five-field write mapping is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
agendaDays() groups events per day in the viewer's zone, all-day first, using the exclusive all-day end and splitting timed events that cross midnight. packWeek() spans all-day bars across columns and packs overlapping timed events into lanes. time.ts builds the offset-qualified strings an edit stores from the viewer's zone; nothing is stored as a Date or a number. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Plain-DOM builders for the #89 design family's chrome: header row, status pill, connection bar with an indeterminate progress edge and overflow menu, banner with one action and a Details disclosure, empty-state card, segmented control and modal sheet. PLUGIN_CSS maps every --pl-* token to the host's --t-* variable with the design's light and dark fallbacks; theme.ts sets data-pl-theme from the host's background so the values the host has no variable for (tint strength, success green, text on accent) follow a theme switch without a reload. Reduced motion stops the spinner and the progress edge. Kept inside the Calendar plugin (per-plugin containment); written so it can move to a shared kit as is, which is the maintainer's call. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s (C4-C6, C8-C11) Replaces the plain placeholder view with the #89 design: - first run with Google connect and Outlook/Apple "Not available yet", connecting with Cancel, no-relay card (5.1-5.3); - calendar picker with colours, access roles and Read-only tags, one calendar per app as the table model requires (5.4); - first-import progress and skeleton under the final chrome (5.5); - Agenda with day strip and sticky day headers, Week with all-day bars, overlap lanes ("+N" when too narrow), now line and edited/conflict markers, 3/5/7 days by width, sidebar at 900px+ (5.6-5.8); - event drawer with viewer-zone times and the event's own offset, and a local editor of exactly the five mapped fields with adapter-equivalent validation (5.9); - review sheet with per-field before/after, Discard, per-row send status and Review again after a 412 (5.10); - conflicts sheet: per-field Keep mine / Use Google's, Keep as local event, Remove local copy behind an in-page confirmation (5.11); - banners mapped from the provider status, 429 countdown (5.12); - keyboard shortcuts t, arrows, j/k, a, w, e, Esc, ? (§6). view.test.ts drives these in jsdom against the fake store and checks that nothing reaches Google except the Review sheet's Send. contrast.test.ts checks --pl-text on the event tints of Google's 24 classic colours; the time line uses a darker mix of text and muted because plain --pl-muted fails 4.5:1 on 9 (light) and 17 (dark) of them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From an axe run over every screen at 360, 720 and 1120px in light and dark against the fake store: - landmarks: the header row and connection bar are one <header>, the content one <main>; screens without the chrome get a hidden <h1>; - buttons keep their own colours (the reset no longer out-ranks .btn-primary, which left dark text on the accent); - pill text and out-of-month mini-month days meet 4.5:1; - sidebar headings follow the page outline; the picker is a div with role=form. Week blocks under 75 minutes clamp their title to one line so the time stays visible. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Agenda (the default below 720px, where the sidebar is hidden) now ends with the same "N recurring … aren't imported yet" note. Provider status and retry-after are attached only to the adapter's own "Google Calendar returned NNN" errors, so a relay or proxy refusal keeps its "Connect again" meaning. After an uncertain write the banner offers Sync now rather than Reconnect. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
build.mjs sets minify: true (about 105 KB), so the build test keeps its 160 KB limit. A delegation revoked at the integration proxy, or a capability that expired even after the frame's retry, shows "Reconnect needed"; any other refusal by the proxy says the proxy refused and that Google was not asked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The supported-path spec now drives the #89 UI: the first-run card, the picker's Read-only tag, the status pill, Sync now, the Review sheet (Send, 412 "Changed in Google", Review again) and the lost-response banner. The connect steps (connectThroughHost) are unchanged. A second test renders the imported calendar in 360, 720 and 1200px frames under the host's light and dark themes: the host's theme switch restyles the frame without a reload, nothing scrolls sideways, axe finds no violations, and a screenshot of each is attached to the report. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… size build.mjs runs each exported stylesheet string through esbuild's CSS minifier before embedding. The bundle measures 101,723 bytes; the build test's limit is that plus about 10% (110 KiB), with the reason in a comment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…onnect, theme) - C8: the import keeps Google's htmlLink on each row (display only, never written back); the drawer's "Open in Google Calendar" goes through store.openExternal, which asks the person first. - C7: "Month" (and m) opens the app's table in the host with store.openResource, where the table's own Calendar view shows the month. - C10: a missing or rebound row gets "Open row in table". - The connection menu's Disconnect calls store.proxy.disconnect: only this app's delegation goes; the rows stay. - data-pl-theme follows store.getTheme()/onThemeChange() instead of the background's luminance (kept as the fallback for older hosts); --pl-pos reads --t-color-success. All are feature-detected: an older host shows none of these controls. The build-test limit is re-measured: 103,825 bytes, limit 112 KiB. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two e2e tests: the drawer's Open in Google Calendar reaches the host's "Open a link" confirmation with the event's htmlLink; Disconnect leaves the connection with no delegation and keeps the rows; Month opens the app's table in the host. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The mock's fixture is shared by the lane's tests, so its title may be an earlier test's; delegations are counted for this test's own agent only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, while it previews Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
michielbdejong
force-pushed
the
claude/impl-89-calendar
branch
from
September 25, 2026 07:25
eb1fcd9 to
b9266da
Compare
5 tasks
michielbdejong
marked this pull request as ready for review
September 25, 2026 07:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For users
See your Google Calendar next to your own data, edit events in Atomic, and send the changes back only once you've checked them.
Calendar brings the events of one Google calendar into a table in your Atomic drive. You can see them as a week or as an agenda, next to your projects, notes and timesheets. You can also fix an event right there: change its title, time, place or notes. Nothing goes back to Google until you've looked at the changes and pressed Send.
What you get
How it works
Good to know
Implements the approved frontend design for the Calendar plugin (#89, design in #105, now at
integrations/calendar/design/). Everything is insideintegrations/calendar/. The branch is rebased on main at pin 69602364b (candidate6, which contains the 007869464 host operations), after #142 (#54 phase 2). #142'sstore.ts,relay.tsand connect handling are kept;store.tsonly gains the pin-007869464 operations as optional members.issues.md items
controller.snapshot()feeds the views.describe(),pill(),banner()andclassify()are pure and unit-tested.--pl-*tokensapp/ui/(styles.ts"PLUGIN CSS",chrome.ts,dom.ts,theme.ts). The frame follows a host theme switch without a reload (checked in the e2e). Reduced motion stops the spinner and the progress edge.relay.ts. The adapter's ownGoogle Calendar returned NNNerrors now carry their status andretry-after. Before this, any non-2xx from Google was also read as a spent connection (the adapter's message says "reconnect").htmlLink(display only, never written back). Import shows per-page progress and a skeleton, plus "Not shown: N recurring, M cancelled". The event'stimeZoneis still not kept.agendaDays()is pure and unit-tested (exclusive all-day end, midnight crossings, viewer zone). Rows are at least 48px with complete accessible names.packWeek()is pure and unit-tested. Includes all-day bars, overlap lanes (collapsing to "+N" below 44px per lane), now line, today tint, dashed edge for edited events, "!" for conflicts, and 3/5/7 days by width. Each column is a labelled<section>, and "Switch to agenda view" comes first.m) opens this app's table in the host withstore.openResource, where the table's own Calendar view shows the month (§11 decision 1).store.openExternal, so the host shows the destination and asks first.If-Match(the host already relaysifMatch, so X1 needs nothing more). The footer says guests are not emailed (sendUpdates=none, already settled on main).store.openResource).retry-after, then retrying), 5xx/network, over 25,000 events, and an uncertain write. Only 401/403 userole="alert". Every banner says "Nothing here was changed". Rows stay visible under every banner. Proxy refusals (#142 codes) show "Reconnect needed", or "The integration proxy refused this request".t,←/→,j/k,a,w,e,Escand?(with an overlay). None of them fires while typing in a field. axe finds zero violations at 360, 720 and 1200px in light and dark, on the real host (e2e) and on every screen against the fake store. A contrast test covers the tints of Google's 24 classic colours (see decisions).store.proxy.disconnect: only this app's delegation goes; the connection and the rows stay.playwright-report-calendarartifact).Decisions I made (please check)
openExternal,openResource,proxy.disconnectandgetTheme/onThemeChangeare optional instore.ts. On an older host their controls are not shown, and dark mode falls back to the luminance of--t-color-bg-body. On pin 007869464,data-pl-themefollowscolorScheme, and--pl-posreads--t-color-success.localStorage, andbuild.test.tsforbids storage, so the default view is picked by width each time the app opens.timeZoneis not imported.--pl-mutedfalls below 4.5:1 on the design's 14%/22% tints for 9 (light) and 17 (dark) of Google's 24 colours. So the week time line uses a 60/40 mix of--pl-textand--pl-muted. Pill text is mixed a quarter towards--pl-textfor the same reason.--pl-textitself passes on every tint.app/build.mjsminifies the JS (minify: true) and runs each embedded stylesheet throughesbuild.transform(css, { loader: 'css', minify: true }). Measured 103,825 bytes; the build-test limit is 112 KiB (measured plus about 10%), with the reason in a comment.app/ui/. Money, Timesheets, Notion and Issue tracker designs use the same chrome. Extracting it to a shared kit is your call.<input type="date">/timein the editor, not the mockup's text fields.Needs outside this PR
openExternal,openResource,proxy.disconnect,colorScheme,--t-color-success).integrations/READINESS.mdcould mention the designed UI and the new e2e tests. I left it alone because it is outside the plugin folder.Conflict risk with #54 phase 2
#142 merged before this PR opened, and the branch is rebased on it. The only conflict was in
fakeStore.ts, resolved by keeping #142'srevoke()next to the newanswerNext()/throwNext().relay.ts,store.tsand the connect handler are #142's code; the only addition isbackgroundColoronCalendarEntry. Ine2e/calendar.spec.ts,connectThroughHostand the connect steps are unchanged. Only the assertions after connecting changed, plus one new test block.How I tested
node integrations/tooling/run-lane.mjs calendar --tier typecheck: passed.--tier unit: 93 tests passed. New suites:controller.test.ts(state, pill, banners, local operations),events.test.ts(time and layout),view.test.ts(every screen in jsdom against the fake store, checking that nothing reaches Google except Send),contrast.test.ts.--tier e2eagainst the pinned host (69602364b, the published e2e image) with the mock proxy: 4 tests passed. The two new ones check that "Open in Google Calendar" reaches the host's "Open a link" confirmation with the event'shtmlLink, that Disconnect leaves the connection without this app's delegation and keeps the rows, and that Month opens the app's table in the host.node integrations/tooling/certify.mjs --layer js: money, notion and pets passed. The calendar is not a certified package.The
localthoughtunit lane still passes withhtmlLinkadded to the shared Google Calendar fixture.oxfmt
--checkand oxlint onintegrations: clean.Visual check against
design/mockups.html: I rendered every state with a fake-store harness in Chromium and compared screenshots with the mockup sections:They match the mockups in layout, copy and colour, apart from the decisions above. Examples: header row with chip, pill and primary action; connection bar; sidebar with mini month, "My calendars" and "Not shown"; week grid with the all-day row, now line, dashed edited block and "!" conflict badge; agenda with day strip and "Not sent yet"/"Conflict" taglines. In the real host, the e2e screenshots show the same views under the host's own light and dark themes and font.
Closes nothing on its own: #89 covers five plugins.
🤖 Generated with Claude Code