Repository navigation
fix(relay): offer the account service's sign-in providers on every sign-in screen - #4335
Conversation
…gn-in screen The hosted shell build names no providers, so its sign-in screen offered GitHub alone; the service's /v1/providers list was read only on the sign-in-first failure screen. Every sign-in screen now reads it once and draws it, keeping the build's list when the service does not answer.
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
… lands A provider answer that arrived while a revoked PC's failure was still being read (the app unmounted, the shell root not yet made again) created a new root and drew the stale Connecting screen. It now only redraws a shell that is up; the failure screen draws the list itself.
|
Merged through Reviews at head 1473630 (lead's brief + dori OVIS-RULES): omo review (dori review) CLEAR; omo gate reviewer (GPT-6.2 Astra) CLEAR after its reproduced MEDIUM (late provider answer redrawing Connecting during a revoked PC's cleanup) was fixed with a failing-first test; omo code-review addendum on test quality CLEAR, its MEDIUM (V-071 superseded) recorded in the PR body. CodeRabbit reviewed the PR with no actionable comments but not this head. No Codex review (owner 2026-11-20). |
…n red) (#4349) ## Summary main is red since CI run 44778206654 (40b79ff): `src/components/ChatView.scrollInput.test.tsx` passed all 14 tests but bun reported **1 unhandled error between tests**: ``` ReferenceError: window is not defined at save (src/lib/chatScrollMemory.ts:71:29) ``` `rememberChatPosition` schedules a 250 ms save with `window.setTimeout`. When the save came due after the test's `afterEach` had removed its `window` stub, `save()` called `window.clearTimeout` and threw. This was a timing flake in place since 7e0ee08 (2026-11-09), not a regression from #4335; the previous 14 main CI runs were green. ## Fix `save()` clears the timer with the global `clearTimeout` (the same function the window exposes), so a save that runs after the window is gone writes nothing and does not throw. ## Test `src/lib/chatScrollMemory.test.ts` gets one test that does not depend on timing: it captures the scheduled save, removes `window`, then runs the save. On origin/main it fails with the same `ReferenceError`; with the fix it passes. ## Validation - `bun test src/lib/chatScrollMemory.test.ts src/components/ChatView.scrollInput.test.tsx`: 25 pass, 0 fail (and the new test fails on origin/main without the fix). - `bun run check fast` (local, P620): all steps ok, unit 20814 pass, 0 fail. - No changelog fragment: users won't notice the change.
What
app.ovis.sh (and the phone/desktop apps, which load it) showed only Continue with GitHub on the sign-in screen, although the account service offers GitHub, Google and Apple (
GET https://account.ovis.sh/v1/providersanswers{"providers":["github","google","apple"],...}).Why
The hosted shell build carries no
ovis-account-providersmeta (OVIS_ACCOUNT_PROVIDERSunset; live app.ovis.sh has onlyovis-account-service), so the build list falls back to GitHub alone (accountProvidersOf,src/lib/account/service.ts). The shell already reads the service's own list (account.offered(), cached once per page), but used it only on thesign-in-firstfailure screen; the plain signed-out front page got the constant build list.Change
src/lib/relay/shell.tsx: the first time any sign-in screen is drawn (the signed-out front page, or thesign-in-firstfailure screen), the shell reads the service's list once and draws it on every screen from then on; the build's list stays until the answer lands and whenever the service does not answer (offeredProvidersfalls back on a non-OK answer, network error or unreadable body). The late re-render only redraws a shell root that is still up: never after the app took over, the page left for a PC, or while the app's root is gone and a failure is still being read (it would draw the stale Connecting screen).scripts/relay-dashboard-browser-qa.ts: feat(relay): open the hosted relay app on sign-in and a PC dashboard #3284 pinned "the sign-in asks the service for no provider list". That contract is what left app.ovis.sh on GitHub alone, so the check now asserts the opposite: the stack is the service's three providers and the list is read exactly once (the stack is still measured only after it settled)./v1/providerswith a 404 (build list).Design reference: the Codex and Claude apps' sign-in screens list every identity provider their auth backend offers; this follows them, taking the list from our service.
Note: app.ovis.sh only picks this up on the next release.
Validation
offers the providers the account service names on the signed-out front page(src/lib/relay/accountController.test.ts): fails on main (gave up waiting for the service's providers), passes here.bun testonsrc/lib/relay/{accountController,accountController.enrollment,accountController.delete}.test.ts src/lib/relay/{shell,shellInlineSignIn,shellSignInEntry,shellFingerprint}.test.tsx: 160 pass, 0 fail.draws no stale screen when the provider list lands while a revoked PC's failure is still being read(src/lib/relay/shell.test.tsx): fails without theshell !== nullguard (a new root and a redraw), passes here. Relay files: 161 pass, 0 fail.bun run check fast(remote heavy host) at 1473630: exit 0; typecheck, build, unit 20826 pass / 0 fail / 45 skip.ci-browser-parallel.ts,BROWSER_RETRY=0):scripts/relay-dashboard-browser-qa.tsPASS (104.9s),scripts/relay-shell-browser-qa.tsPASS (121.8s).check full, Mac/iOS simulator and Windows runs (no native code changed; the apps load app.ovis.sh).Reviews
dori review): CLEAR at e85418f and at 1473630.!leftbranch has no dedicated test; the list reaches every screen's props, harmlessly) left as is.