Skip to content

Fix three ways Try the app goes wrong - #1693

Closed
joepio wants to merge 7 commits into
developfrom
claude/project-thread-u8vgm0
Closed

joepio wants to merge 7 commits into
developfrom
claude/project-thread-u8vgm0

Conversation

@joepio

@joepio joepio commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

Requested by Joep · project thread

Before: a visitor who pressed Try the app, left the demo and created a drive from a template got "Sign in to check Cloud Server hosting." On a phone in an in-app browser, the demo could stay on "Setting up your demo…" forever, with no error and no way out. And someone already signed in who pressed Try the app got a scripted demo workspace built next to their own.

After: a demo guest's template drive is created in the browser. Demo setup that runs past 45 seconds says "This is taking longer than usual." and offers Try again. It also sends a warning to Sentry naming the step it stalled on. A signed-in person who opens /app/demo lands in the drive they had open, or their home.

How: prepareTemplateDrive treats a guest with no control-plane session as unenrolled. A real account without a session still has to sign in. DemoRoute kept its run in a bare in-flight promise, so a route remount during setup left the visible instance deaf to the outcome: a failure went to the unmounted one. The run now lives at module level and every mount reads it. startDemoWorkspace reports its step. Before starting a run, the route checks localAgentIsDisposable, the same test the reconcile gate uses. Only guests and identities without a workspace get the demo.

Related Issues

Fixes Sentry ATOMIC-BROWSER-1F and ATOMIC-BROWSER-1G.

Checklist

  • Add changelog entry linking to issue, describe API changes
  • Add or update tests if needed: unit tests for the guest case (7 of 7 pass), plus an e2e spec in template-recovery.spec.ts that has not run green yet
  • Update docs if needed

Checked in Chromium:

  • Phone: on a Pixel 7 viewport against a hosted-distribution build with no node, the demo completes in 17 s on three runs in a row. With the demo chunk held back, the stall notice appears after 45 s and not at 16 s.
  • Signed in: signed in through /app/dev-drive, /app/demo returns to the same drive and creates no demo workspace.
  • Guest: a fresh browser still lands on the demo's Welcome page.

A visitor who pressed Try the app, left the demo and created a drive from a
template got "Sign in to check Cloud Server hosting." prepareTemplateDrive
asked the control plane for enrollments, which needs a session a demo guest
never has. A guest has no account, so nothing can be hosted for it: treat its
home as unenrolled. A real account without a session still has to sign in.

Fixes ATOMIC-BROWSER-1F
On a phone in an in-app browser, Try the app sat on "Setting up your demo"
with nothing reported. The route kept its run in a bare in-flight promise, so
when the route remounted during setup the new instance never heard the
outcome: a failure went to the unmounted instance and the visible one spun on.
The run now lives outside the component and every mount reads it.

Setup takes 17 to 28 s on a phone-sized screen. Past 45 s the page says it is
taking longer than usual, offers Try again, and sends a warning to Sentry
naming the step it was on, so the next report says where it stopped.

Also narrows agent.subject before the guest check in prepareTemplateDrive.

Fixes ATOMIC-BROWSER-1G
@joepio joepio self-assigned this Sep 24, 2026
"Try the app" while signed in built a scripted demo workspace next to the
person's own. Someone with an account wants their own workspace, so the demo
route now opens the drive they had open, or their home, when the agent is a
real account. Guests and identities without a workspace still get the demo,
decided by the same localAgentIsDisposable test the reconcile gate uses.
@joepio joepio changed the title Fix two ways Try the app gets stuck for demo guests Fix three ways Try the app goes wrong Sep 24, 2026
A demo guest pressing Create drive on a template waited ten seconds and
then saw "RBSR_ITEMS timed out". Preparing a browser-only drive first
disconnects the home drive from the node after checking the local copy
against the node's inventory, but a guest's home was never on the node
(only a real signup puts one there), so the node never answers. A guest's
home is now registered as local-only directly.

The e2e test no longer clicks the demo bar's Back button, whose label
differs per branch, and answers the session lookup with 204 instead of
401 so the browser logs no errors for it.
joepio added a commit that referenced this pull request Sep 24, 2026

joepio commented Sep 24, 2026

Copy link
Copy Markdown
Member Author

The red Main check on 95c9486 is not a test result. The Mancave job was cancelled before it started (mancave=cancelled downstream-saas=cancelled), so that queue slot could go to combined batch PR #1699, which carries this PR at the same head. That batch run is the verdict for this commit. This PR stays a draft until a run on 95c9486 concludes green.


Generated by Claude Code

Signing in with an existing account on a browser that already held a
different identity with a drive showed "This email already has an
identity" and asked the user to choose. A demo guest who kept a template
got there every time. The account identity now always wins, and nothing
is lost:

- A demo guest's drives move into the account. Before switching, the
  guest grants the account write on its drives and exports its
  browser-only drives with the Cloud Vault export. After the switch they
  are imported into the account's own local database and listed in its
  home.
- Any other identity may belong to someone else on a shared browser, so
  nothing of it is copied or shared. Its key is kept on this device.
- The question only remains when that handover fails, and that is
  reported to Sentry.
…second home

A resource read back from the offline replay is now the store's own
instance, so saving it no longer fails with "Resource has no store".
Demo cleanup leaves the active agent alone, and the handover skips the
guest's own home so the drive switcher shows one "My drive".
The speaker property is not published on atomicdata.dev, so validating
it fetched a 404 for every demo message. A signed-in visitor is now sent
to their own drive, so the top bar test opens the demo as a guest.
joepio added a commit that referenced this pull request Sep 24, 2026
reconcile.ts: keep 1693's localAgentWorkspace split, with #1694's rule that a
failed read is not disposable.
joepio added a commit that referenced this pull request Sep 24, 2026
The #1549 merge kept develop's catalogs, so the Issues view rendered its
filter tabs without text in production builds. Re-extract the catalogs.

The ClientDb persistence spec now reads OPFS directly, since the store's
read path returns its live instance since #1693. The offline tables spec
passes its timeout as options rather than as the page argument. The Mac
account restore spec stubs the embedded server's socket, which its HTTP
proxy cannot carry.
joepio added a commit that referenced this pull request Sep 24, 2026
Combines #1549, #1654, #1682, #1684, #1689, #1690, #1691, #1692, #1693, #1694, #1695, #1696, #1697 and #1698, with the conflict resolutions and e2e fixes described in #1699. Tested green on Mancave in run 4576 at 25b124a.

joepio commented Sep 24, 2026

Copy link
Copy Markdown
Member Author

Landed on develop in c589fc6 via the combined batch #1699, which was tested green on Mancave at this PR's head. Closing, since the squash merge does not mark it merged.


Generated by Claude Code

@joepio joepio closed this Sep 24, 2026
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