Skip to content

Ask to connect an account in a dialog, in plain words - #1944

Closed
joepio wants to merge 4 commits into
developfrom
claude/project-thread-8mkdrs
Closed

joepio wants to merge 4 commits into
developfrom
claude/project-thread-8mkdrs

Conversation

@joepio

@joepio joepio commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

Requested by Joep · project thread

Before: an app that calls store.proxy.connect got a bar above it: "This app wants to use your Pets account through http://127.0.0.1:19152. The proxy keeps the connection under your account; this app may use it until you revoke that." with "Use existing connection", "Connect" and "Cancel". "Use existing connection" picked the most recently used connection without showing which.

After: a dialog titled "Connect Pets": "Pets wants to use your Pets account." / "You approve this on the next page, at 127.0.0.1:19152." / "Pets never sees your password." with Cancel and Connect. When you already connected that platform, the dialog lists each connection ("Pets account", "Connected today.", "Used by Timesheets.") with "Use this account", and the footer offers "Use another account". A failure stays in the dialog ("Could not use this account." above the proxy's words) so you can try again.

How: ConnectDialog.tsx is built on the shared Dialog, which gains an optional labelledBy so the dialog is named by its title. AppFrame keeps the app's ask and answers it once the dialog has closed: connected after "Use this account", cancelled otherwise. The lookup of existing connections always settles (a failed lookup counts as none), so the dialog shows a placeholder line instead of swapping its buttons later. Closing the dialog while "Connect" is still preparing no longer navigates away afterwards.

Screenshots (desktop and phone, every state) are not committed, per AGENTS.md; they are in the project thread. They were taken with this branch's frontend on Vite against the atomic-plugins pets lane and its mock proxy.

Notes for review:

  • atomic-plugins' specs (pets, clockify, calendar, notion, issue-tracker) find the bar with getByRole('group', { name: 'Connect an account' }), and pets also clicks "Use existing connection". When they move their atomic-server pin past this they should use getByRole('dialog', { name: 'Connect <Platform>' }) and "Use this account". The "Connect" button keeps its name.
  • In a Vite dev build the full round trip still ends on "This connection return is not one this browser started." until Redeem a proxy connect return once under StrictMode #1884 lands (StrictMode runs the return effect twice). Production builds are not affected.

Related Issues

None.

Checklist

  • Add changelog entry linking to issue, describe API changes
  • Add or update tests if needed: none added. atomic-server's e2e has no integration proxy; checked by hand against the pets lane: Connect reached the mock proxy and redeemed, "Use this account" with and without a failing delegation, Cancel, Escape and the close button.
  • Update docs if needed: no docs describe the bar.

An app that calls store.proxy.connect used to get a bar above it that
read "This app wants to use your Pets account through <proxy origin>.
The proxy keeps the connection under your account; this app may use it
until you revoke that." It now gets a dialog titled "Connect <platform>"
that says which app wants which account, that you approve it on the next
page (naming the proxy's host, which is the address to expect there),
and that the app never sees your password.

When you already connected that platform, the dialog lists each such
connection with when it was connected and which apps use it, each with
"Use this account"; "Connect another account" still goes to the proxy.
The lookup settles either way, so the dialog shows a placeholder while
it runs instead of changing its buttons under your cursor.

A failure (no app identity, proxy unreachable) is shown in the dialog so
you can retry; the app hears `cancelled` if you close it. Closing the
dialog while "Connect" is still preparing no longer navigates away
afterwards. Dialog gains an optional `labelledBy`, so the dialog is
named by its title for screen readers and tests.
…its on

Seen in screenshots of the dialog against the Pets demo:

- On a 390 px phone "Cancel" broke into "Cance" / "l" next to "Connect
  another account". That button is now "Use another account", which sits
  beside "Use this account" and fits, and the footer wraps its buttons
  onto a second line instead of squeezing them.
- The placeholder shown while looking for existing connections was 0 px
  high, so the dialog just had a gap. It is now a line-sized pulse.
- A proxy error ran out of its box, because it names the request path.
  It now wraps, and leads with what failed ("Could not use this
  account." or "Could not start connecting.") above the proxy's words.
The dialog's content already pads its bottom, so the list's own margin
left an empty band above the buttons.

joepio commented Sep 30, 2026 •

Copy link
Copy Markdown
Member Author

Main (Mancave) / CI failed in run 4870 on head 100b53c, in e2e shard 4 only.

What failed: tests/search.spec.ts:130 › search › scoped search. The first attempt timed out in openSubject (main[about=…] not visible after 20 s); both retries ran out the 60 s test budget in waitForSearchIndex (search.spec.ts:211). Everything else passed: 1099 unit tests, shards 1 to 3, the downstream atomic-saas build and the rest of shard 4. Two tests in shard 4 passed on retry: right-panel-lifecycle.spec.ts:25 (a 405 from mcp.exa.ai) and website.spec.ts:10.

Why it is not this PR's: the diff changes the connect prompt inside an app page (AppFrame and the new ConnectDialog), adds an optional aria-labelledby to the shared Dialog (unset for every other dialog), and updates the changelog and translation catalogs. Nothing in it touches search, the client or server index, the server, or how a resource page opens. The same test went red on develop in run 4621 on 25 September, and no fix for it has landed on develop since this branch's base, so there is nothing to port.

Re-running the failed job once on the same head.

Update: that re-run was cancelled on purpose before it got a runner, so the red Main check on attempt 2 is the cancellation, not a test. This PR is now tested together with #1935, #1936, #1945 and #1856 in batch #1946 (run 4880), which lands them all once it is green.


Generated by Claude Code

joepio added a commit that referenced this pull request Oct 1, 2026
…nt, Google sign-in (#1946)

Lands #1935 (server clock skew), #1936 (vault restore over 64 objects), #1944 (connect dialog), #1945 (twin agent resource) and #1856 (sign in to open the identity, pairs with atomic-saas #164), tested together on Mancave.

joepio commented Oct 1, 2026

Copy link
Copy Markdown
Member Author

Landed on develop through the batch #1946 (squash f2a07aa), tested together on Mancave. Closing this PR since its commits are in that batch.


Generated by Claude Code

@joepio joepio closed this Oct 1, 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