Skip to content

calendar: hand errors and sync outcomes to a user-testing log hook - #183

Merged
michielbdejong merged 1 commit into
mainfrom
claude/calendar-usertest-logging
Sep 28, 2026
Merged

michielbdejong merged 1 commit into
mainfrom
claude/calendar-usertest-logging

Conversation

@michielbdejong

Copy link
Copy Markdown
Contributor

In remote user testing (see #182), a drive app's errors are invisible to anyone but the tester. They stay inside the app's sandboxed frame: the host (AppFrame.tsx at the pin) shows them and reports nothing. The data-browser's own errors do reach the test collector, through atomic-server's SENTRY_DSN_BROWSER, but an app's errors do not. The first session hit exactly this: "Something went wrong while syncing", visible only on the tester's screen (fixed in #181).

Change

integrations/calendar/app/report.ts hands entries to globalThis.__USERTEST_REPORT__ when it exists:

  • every failure that reaches the error banner: the message, the stack, the problem kind and HTTP status;
  • every finished sync: counts, plus the ids and reasons of unreadable events (warn when there are any);
  • uncaught errors and unhandled rejections in the frame.

No event titles, descriptions or other row content are handed over.

The app still has no network access of its own

build.test.ts checks that the bundle contains no fetch(, and it still passes. The hook is defined by a prelude that only the user-testing catalog build prepends (usertest/catalog.mjs, follow-up on #182). A published build has no prelude, so report is a no-op there.

The longer-term fix is in the host: forward __atomic_plugin_error (and a log channel) to the host's own Sentry. That would cover every app without per-app code. That is an atomic-server change and is not proposed here yet.

Checks

  • node integrations/tooling/run-lane.mjs calendar --tier typecheck: passed
  • node integrations/tooling/run-lane.mjs calendar --tier unit: 97 passed, including report.test.ts (no hook: nothing; hook: one entry; a throwing hook never throws) and the unchanged build.test.ts bundle checks
  • oxlint and oxfmt --check over integrations: clean

🤖 Generated with Claude Code

A drive app's errors stay inside its sandboxed frame: the host shows them
there and reports nothing, so in remote user testing nobody but the tester
sees them. report.ts hands each failure (message, stack, the banner's
problem kind and status), each finished sync (counts, and ids and reasons
of unreadable events) and anything uncaught to globalThis.__USERTEST_REPORT__
when it exists. No titles or other row content are handed over.

The app still makes no network request of its own; build.test.ts keeps
checking the bundle for fetch(. The hook comes from a prelude that only the
user-testing catalog build (usertest/catalog.mjs) prepends, so a published
build reports nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@michielbdejong
michielbdejong merged commit 7769d37 into main Sep 28, 2026
18 checks passed
michielbdejong pushed a commit that referenced this pull request Sep 29, 2026
main gained calendar changes after this branch generated
apps/calendar/0.1.0/ui.js (#181 unreadable Google events, #183 the
user-testing log hook, #184 all-day events with end == start, #187
"Jump to latest event"). 0.1.0 is not on main yet, so its bytes and
catalog integrity are regenerated with `apps.mjs write calendar`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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