Admin UI

Use the Calendarpit admin UI in the browser to inspect events written through the Calendar API, trace requests and webhook deliveries, revoke OAuth connections, and edit test data.

The admin UI is a browser interface for the local Calendarpit workspace. Keep it open while your app runs to inspect events your app creates or updates through the Calendar API, examine every request and webhook delivery, and edit test data between runs.

It is served at the root of the same origin as the API (http://127.0.0.1:4173/ by default) and requires no sign-in.

The admin UI showing the Work calendar of test user Alex Morgan in week view.

Layout

The left rail controls the context for every screen:

  • Live: The admin UI subscribes to GET /__calendarpit/changes and reloads the state and request history as soon as the server saves a change. Changes your app makes through the Calendar API appear immediately, without a page reload. It also polls every 30 seconds as a fallback. The indicator switches to Disconnected if the server stops responding, and the UI reconnects on its own.
  • Test user and Calendars: Select which test user and calendar the screens display. The selection is stored in the URL (?user=<id>&calendar=<id>), so you can bookmark or share it.
  • Sections: Schedule is at the top. Activity groups what your app did: API history, Watch, and Connections. Workspace groups the test data your app runs against: Users, Calendars, and Settings. The badge counts show recorded history entries, active watch channels, and active OAuth connections.
  • Storage: The footer shows the storage mode (SQLite or In-memory) and the server address. See Storage and restarts.

Each screen header has a Refresh button that reloads the workspace state immediately.

RouteScreenUse it to
/ScheduleView, create, edit, and delete events in the selected calendar.
/historyAPI historyInspect and clear recent Calendar API and OAuth requests and responses.
/watchWatchInspect active watch channels and webhook deliveries (read-only).
/connectionsConnectionsInspect and revoke OAuth authorizations (grants).
/usersUsersCreate, edit, and delete test users.
/calendarsCalendarsCreate and configure the selected user's calendars.
/settingsSettingsTheme, language, Calendar API rate limits, storage mode, fixtures, workspace reset, state JSON, and OAuth clients.

The admin UI has no authentication. Calendarpit binds to 127.0.0.1 by default. Binding to another address exposes the admin UI to other machines. See Loopback binding.

Command palette and keyboard shortcuts

Press ⌘ K on macOS or Ctrl K elsewhere, or select Commands in the section header, to open the command palette. Type to filter, use the arrow keys to move, and press Enter to run a command. ? also opens the palette, which shows each command's shortcut.

  • Go to any section, create an event, or change the theme.
  • The palette is in English whatever the interface language. Section names also match their Japanese labels, such as ユーザー.
  • Type a test user's name or email, or a calendar's name, to switch to it. Switch user… and Switch calendar… list them all.
  • Go to date… accepts 2026-10-21, today, tomorrow, yesterday, or an offset from the shown date such as +3, -1, or +1w.

On a palette page such as Go to date…, press Backspace in the empty field to return to every command.

ShortcutAction
⌘ K / Ctrl KOpen or close the command palette
?Open the command palette
⌘ , / Ctrl ,Open Settings
CCreate an event in the selected calendar
TShow today
P / NShow the previous or next day, or week in week view
D / WSwitch to the day or week view
GGo to a date

T, P, N, D, W, and G work on Schedule. The others work on every screen.

Single-key shortcuts do nothing while you type in a field or while the event editor or a dialog has focus, so typing an event title never triggers them.

Check the events your app writes

Schedule shows the events in the selected calendar, including events your app creates or updates in Calendarpit through the Calendar API. To create or configure the calendars themselves, use Calendars.

The default date is 2026-10-19, the date of the built-in fixture's planning event.

  • Day shows a 24-hour timeline and the event list for that day. Week shows a 7-day time grid from Sunday to Saturday.
  • Use the arrows, the date picker, and Today to move between dates. The URL keeps both the date and the view (?date=2026-10-19&view=week).
  • Times are displayed in the selected calendar's time zone. End times are exclusive. Busy events are solid; free (transparent) events are hatched or outlined and do not block availability in freeBusy queries.
  • A recurring series appears once, at its first occurrence, and is not expanded in the schedule view. Stored exception instances appear on their own dates.
Day view: the 24-hour timeline with the current time indicator, alongside the event list.

Create and edit events

Select an existing event to open it in the editor, or select New event. In week view, select an empty time slot to start a new event at that time.

The editor edits the summary, all-day toggle, start and end times, availability (busy or free), location, description, and extended properties (JSON).

The event editor opens next to the schedule. The URL tracks the open event (?event=planning).

Saving an event in the editor overwrites it with only the fields shown in the form:

  • Attendees, colors, and other fields set through the Calendar API are removed.
  • A recurring event loses its recurrence rule and becomes a single event.
  • Custom reminders reset to the default (reminders: { useDefault: true }).

Use the Calendar API to edit events that rely on those fields. See Scope and limitations.

Manage test users and calendars

Test users are local identities with no password. When your app starts the OAuth flow, you pick a test user on the local consent page to sign in as that user.

Users lists every test user with their email address and calendar count. Select a user to edit their display name and email address.

  • Deleting a user also deletes all of their calendars and events.
  • Deleting a user also revokes their OAuth connections, invalidating their tokens and stopping their watch channels.

Calendars manages the calendars owned by the selected user (not the events inside them). Create, rename, and delete calendars, set each calendar's IANA time zone (Asia/Tokyo by default), and choose which calendar is primary.

  • The primary calendar is the calendar that the special primary calendar ID resolves to in the Calendar API.
  • Changing a calendar's time zone invalidates incremental sync tokens that were issued without an explicit timeZone parameter. See Incremental sync.
Calendars: edit the name, IANA time zone, and primary setting of the selected user's calendars.

Trace your app's requests

API history records the latest 200 Calendar API and OAuth requests your app sent to Calendarpit, newest first. Use it to inspect the exact request your SDK or HTTP client sent and the response Calendarpit returned.

  • Each row shows the HTTP status, method, path, area (such as calendar or oauth), and timestamp.
  • Select a row to inspect the request and response headers and bodies. Select Copy to copy a payload as JSON.
  • Credentials, such as the Authorization header, access and refresh tokens, client secrets, and authorization codes, are masked as [REDACTED].
  • Filter by method, path, or status, or select Errors to show only responses with status 400 or higher.
  • Clear history deletes all recorded entries.
An expanded GET request for a missing event, showing the request headers and the 404 Google API error response.

See Troubleshooting for common error responses and how to fix them.

Inspect watch notifications

Watch is a read-only view of push notifications across all calendars.

  • Watch channels lists active channels with their target calendar (or CalendarList), your app's callback URL, and the channel expiration time.
  • Delivery log lists the latest 200 webhook deliveries with the channel ID and message number, the resource state (sync or exists), the attempt count, the timestamp, and the delivery status (queued, delivered, failed, or cancelled) along with the last HTTP status your endpoint returned.
The Watch screen showing active channels and a webhook delivery that failed after 3 attempts with HTTP 503.

In automated tests, call POST /__calendarpit/deliveries/drain to wait for in-flight deliveries to finish instead of polling this screen. See Watch notifications.

Test reconnection

In Connections, each connection is an OAuth authorization (grant), created when a test user approves your app on the consent page. The screen shows which test user authorized which OAuth client, the granted scopes, and when. Access and refresh tokens are issued against this grant.

Select Revoke on an active connection to test how your app handles token revocation. Revoking a connection deletes its access tokens, refresh tokens, and authorization codes, and stops any watch channels created under that grant:

  • Subsequent Calendar API requests with the old access token fail with 401 authError.
  • Token refresh requests at POST /oauth/token with the old refresh token fail with 400 invalid_grant.

Because both tokens stop working, your app must send the user through the OAuth flow again to obtain a new grant.

Connections: one active OAuth authorization and one revoked authorization for sample-app.

Prepare test data

Settings has four tabs.

Appearance

  • Theme: choose Light, Dark, or System. System follows your device's color scheme and uses Dark when the device does not report one.
  • Language: choose English, 日本語 (Japanese), or System. System follows your browser's preferred languages and falls back to English.

Both settings start as System, and nothing is stored until you choose. Your choice is stored in a cookie in your browser for a year, so the next page load renders in the chosen theme and language.

The language applies to interface text only: navigation, headings, buttons, form labels, messages, and dates. Protocol data stays as Calendarpit sends and receives it: paths, HTTP methods and statuses, JSON, scopes, resource states, and IDs. The local consent page is always in English.

Developer

Calendar API rate limits sets how /calendar/v3 requests are limited:

  • Off (off) does not limit requests. This is the default.
  • Production (production) uses limits that roughly match Google's published quotas (approximate, not identical). The per-calendar write limit is Calendarpit's estimate, because Google does not publish one.
  • Error testing (error-test) uses very low limits so 403 and 429 quota errors happen quickly. Use it to check retry and backoff handling.

The mode is saved with the workspace and persists across SQLite restarts. Reset and fixture load keep the mode and clear the current counters. Quota values, error bodies, and the --rate-limit / CALENDARPIT_RATE_LIMIT startup options are in Run and configure.

Test data

  • Storage shows the active storage mode and the SQLite file path (or :memory:).
  • Fixtures & reset loads a fixture. Paste JSON or select Open JSON file…, then select Load fixture. Loading a fixture replaces all users, calendars, events, and OAuth clients, and clears all OAuth connections, request history, and watch channels, without changing the startup reset baseline.
  • Reset workspace restores the startup fixture and clears all OAuth connections, request history, and watch channels.
  • Current state displays the current workspace data as JSON, with credentials omitted.

Both Load fixture and Reset workspace ask for confirmation before running. Automated tests can perform the same operations through the Test control API.

Settings → Test data: storage mode, fixture loader, and workspace reset.

OAuth clients

Add, edit, or delete OAuth clients without reloading the fixture—for example, to add a redirect URI or change a client secret. Adding or editing a client keeps users, calendars, events, and existing OAuth connections intact; deleting a client revokes its connections. See Connect your app.

Settings → OAuth clients lists each registered client and its allowed redirect URIs.

Fonts and network access

The admin UI loads the Roboto Mono font from Google Fonts (fonts.googleapis.com and fonts.gstatic.com). It falls back to system fonts when offline. Calendar API and OAuth operations never contact Google and need no internet access.

On this page