Skip to content

fix(relay): offer the account service's sign-in providers on every sign-in screen - #4335

Merged
devswha merged 2 commits into
mainfrom
fix/hosted-signin-providers
Nov 20, 2026
Merged

devswha merged 2 commits into
mainfrom
fix/hosted-signin-providers

Conversation

@devswha

@devswha devswha commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

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/providers answers {"providers":["github","google","apple"],...}).

Why

The hosted shell build carries no ovis-account-providers meta (OVIS_ACCOUNT_PROVIDERS unset; live app.ovis.sh has only ovis-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 the sign-in-first failure 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 the sign-in-first failure 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 (offeredProviders falls 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).
  • Test fixtures that counted every account request now answer /v1/providers with a 404 (build list).
  • This supersedes feat(relay): open the hosted relay app on sign-in and a PC dashboard #3284's design finding V-071 (no provider button appears after first paint): on a hosted build that rule is what kept Google and Apple off the screen. Trade-off: the GitHub button can paint first and Google/Apple join when the answer lands (one GET, read once). Waiting for the answer before the first paint would put the account service on the shell's critical path; not done here.

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

  • New unit test 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 test on src/lib/relay/{accountController,accountController.enrollment,accountController.delete}.test.ts src/lib/relay/{shell,shellInlineSignIn,shellSignInEntry,shellFingerprint}.test.tsx: 160 pass, 0 fail.
  • New unit test 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 the shell !== null guard (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.
  • Browser regressions covering the sign-in screen, in the CI runner image (ci-browser-parallel.ts, BROWSER_RETRY=0): scripts/relay-dashboard-browser-qa.ts PASS (104.9s), scripts/relay-shell-browser-qa.ts PASS (121.8s).
  • Skipped: check full, Mac/iOS simulator and Windows runs (no native code changed; the apps load app.ovis.sh).

Reviews

  • omo review (dori review): CLEAR at e85418f and at 1473630.
  • omo gate reviewer (GPT-6.2 Astra): BLOCK at e85418f (reproduced MEDIUM: a late provider answer during a revoked PC's cleanup created a new root and redrew Connecting; fixed in 1473630 with a test that fails without the fix), CLEAR at 1473630.
  • omo code-review addendum (tests/slop criteria) at 1473630: CLEAR. Its MEDIUM (V-071 superseded without saying so) is recorded above; lows (the !left branch has no dedicated test; the list reaches every screen's props, harmlessly) left as is.

…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.
@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • New Features
    • The sign-in screen on the website and in the phone and desktop apps now offers Google and Apple sign-in alongside GitHub.

The hosted shell now fetches sign-in providers from the account service for signed-out screens. It updates the displayed list when the response arrives. Tests and browser QA cover the provider list and request.

Changes: Hosted sign-in provider lookup

Layer / File(s) Summary
Fetch and display account-service providers
src/lib/relay/shell.tsx, src/lib/relay/accountController.test.ts, src/lib/relay/shell.test.tsx, scripts/relay-dashboard-browser-qa.ts, changelog.d/hosted-signin-providers.md
The shell requests providers for signed-out screens and redraws with the response if it remains mounted. Tests cover provider names, unavailable endpoints, and the browser request. The changelog lists Google and Apple alongside GitHub.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related PRs

  • devswha/ovis#4256: Implements the same provider-list endpoint and fallback behavior for the app and web sign-in page.
  • devswha/ovis#4266: Changes the hosted signed-out front page sign-in options, overlapping with this PR’s provider list.
Merge Risk: Minimal · up to e8541

The hosted sign-in screens now offer the providers the account service names, so Google and Apple appear alongside GitHub. If the service does not answer, the build list is used. No merge-blocking risk was found. On a slow service, GitHub may appear first, with the other providers joining when the response arrives.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the sign-in screens now offer the account service's providers. It matches the summary of changes in shell.tsx, the QA script, and the tests. It is specific and follows…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description follows the repository template. It has the Change section and the Validation section. The Change section explains the problem (only GitHub shown on app.ovis.sh), the cause (the hosted…
Full details: Title check

Explanation

The title names the main change: the sign-in screens now offer the account service's providers. It matches the summary of changes in shell.tsx, the QA script, and the tests. It is specific and follows the conventional-commit form. The title is 81 characters, which is long but acceptable.

Full details: Description check

Explanation

The description follows the repository template. It has the Change section and the Validation section. The Change section explains the problem (only GitHub shown on app.ovis.sh), the cause (the hosted build has no provider meta, so the list falls back to GitHub), and the resulting behavior. It links PR #3284 but does not link an issue where a maintainer agreed to the feature. The template asks for that link on features. This is a minor gap. The Validation section lists the commands run, their results, and the skipped checks. It also covers browser QA. It does not explicitly state contract-test coverage for the HTTP change, which the template asks for on HTTP changes. The description is detailed and mostly complete.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between acab768 and e85418f.

Files selected for processing: 5

  • changelog.d/hosted-signin-providers.md
  • scripts/relay-dashboard-browser-qa.ts
  • src/lib/relay/accountController.test.ts
  • src/lib/relay/shell.test.tsx
  • src/lib/relay/shell.tsx

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

… 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.
@devswha
devswha merged commit 40b79ff into main Nov 20, 2026
16 checks passed
@devswha

devswha commented Nov 20, 2026

Copy link
Copy Markdown
Owner Author

Merged through pr-merge at head 1473630c9. Seen before the merge was asked for: required checks green, no unresolved thread, no conflict, no hold, main not red, no release in progress. CodeRabbit finished, with no review that names this head.

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).

@devswha
devswha deleted the fix/hosted-signin-providers branch November 20, 2026 16:55
devswha added a commit that referenced this pull request Nov 20, 2026
…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.
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