Phase 6: end-to-end first-use onboarding, actionable errors and INITIAL_PASSWORD fix - #36
Merged
Merged
Conversation
…e (C-06)
getSettings() re-forced setupComplete=true on every read while INITIAL_PASSWORD
was set, so PATCH /api/settings {setupComplete:false} answered 200 without
effect and the wizard could never be re-run on a headless deploy.
The headless contract is unchanged on first boot (setupComplete and
requireLogin are set on the first read; the pinned tests
db-settings-crud:87, management-password:101 and login-bootstrap-route:72 stay
green untouched). A marker row (_initialPasswordBootstrapped, underscore keys
never surface as settings) now records that the bootstrap ran, so a later
explicit setupComplete=false is honoured. Installs bootstrapped before the
marker existed only get the marker written. ensurePersistentManagementPasswordHash
needs no change: it only forces setupComplete while migrating a non-bcrypt
password, which happens once.
Regression: tests/unit/initial-password-bootstrap-once.test.ts (4 of 5 cases
fail on the previous code).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…rm placeholders - onboarding.*: new strings for the first-use flow (errorGuide why/fix per failure kind, model choice, test request, client configuration, first request, existing-password notice) in en, pt-BR and vi (vi keeps strict key parity, tests/unit/i18n-vi-completeness.test.ts). - auth.nodeIncompatible* (login page) translated to pt-BR; the en/vi description no longer recommends the unsupported Node.js 20.x — it now matches SUPPORTED_NODE_RANGE (22.x / 24.x LTS), as the hint already did. - Real copy for 22 humanized-key placeholders shown on the first-use path: providers.* fields of the add/edit connection modals (custom User-Agent, excluded models, routing tags, tag/group, extra API keys, search engine id, local-provider API-key hint) and the common.* onboarding duplicates. config/quality/i18n-placeholder-baseline.json pruned 162 -> 140 with scripts/i18n/check-ui-keys-coverage.mjs --update-placeholder-baseline. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The wizard's test step tested connections[0] instead of the provider the user
had just added, and the flow stopped at a bare endpoint string. It now covers
the whole first use:
- Validate (step 5): POST /api/providers/{id}/test on the connection created
in this run (from POST /api/providers or the free-provider card), with a
selector when several exist; 15 s bound and retry kept.
- Choose a model (6): GET /api/providers/{id}/models?chatOnly&excludeHidden;
when the provider lists none, a model id can be typed.
- Test request (7): POST /api/models/test with providerId/modelId/connectionId,
routed through the real chat pipeline so it lands in the call logs.
- Client configuration (8): Base URL / API-key placeholder / provider/model with
a copy button, links to API Manager and Endpoints.
- First request (9): newest row of /api/usage/call-logs (model + status only,
no bodies) with a link to /dashboard/logs; docs link to
docs/getting-started/FIRST_10_MINUTES.md (/docs/getting-started/first_10_minutes).
- A password configured before the wizard (INITIAL_PASSWORD) is detected via
GET /api/settings/require-login: "Keep current password" replaces the
skip-and-disable-login option. ?rerun=1 opens the wizard after setup.
Errors: src/shared/utils/actionableError.ts classifies failures from the
existing envelopes (HTTP status, diagnosis.type/code of the connection test,
/api/models/test status + upstream statusCode) into kinds; the new
ActionableErrorCallout renders what happened (role=alert headline), why, how
to fix, whether retrying can help, a retry action and a docs link. No HTTP
error envelope changed.
Layout: the step indicator uses shrinking connectors instead of fixed widths
and the footer wraps, so the wizard never scrolls horizontally at 320-1024 px.
The existing pinned jsdom suites (onboarding-error-visible, -public-endpoint,
-test-timeout, -test-valid-false, free-provider-onboarding) pass unchanged.
New: tests/unit/ui/onboarding-first-use-flow.test.tsx (8) and
tests/unit/actionable-error-guide.test.ts (5). Complexity-ratchet violations on
the touched files unchanged (8 before / 8 after; the new files add none).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…d re-run
Documents that the INITIAL_PASSWORD first-read bootstrap now runs once, that
/dashboard/onboarding?rerun=1 offers the guided setup after sign-in (keeping
the existing password), and that PATCH /api/settings {"setupComplete": false}
now takes effect. en + pt-BR.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…out widths
tests/e2e/onboarding-first-use.spec.ts drives the real app:
- sign in (real /login with the INITIAL_PASSWORD the Playwright server sets),
open /dashboard/onboarding?rerun=1, keep the existing password, add a
provider, validate the NEW connection (an older one is listed first), pick
a model, send a test request, copy the client configuration (clipboard
read back), see the first request, docs link resolves (HTTP 200), finish;
- a rejected credential renders what/why/fix/retry/docs and "Back to provider";
- C-06: PATCH /api/settings {setupComplete:false} is persisted and reopens the
wizard; "Skip wizard entirely" restores setupComplete=true;
- no horizontal overflow at 375/768/900/1024 px on welcome/test/model/done.
Provider-side routes (create/test/models/models-test/call-logs) are
intercepted with page.route — no real AI provider is contacted. Weight 268
(= line count) added to config/quality/e2e-timings.json.
Local run (webpack dev server, OMNIROUTE_USE_TURBOPACK=0, isolated DATA_DIR,
port 20955): 4 passed (11.1m).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Brings in Phases 4, 8 and 9 and the v3.8.54 cycle (PRs #31, #32, #34, #35). Merged cleanly; governance, vi key parity, e2e shard seed, UI i18n coverage, onboarding and settings suites (63/63 node, 26/26 vitest), typecheck:core and check:docs-all pass on the result. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
…r key hint
Phase 6 gave providers.localProviderApiKeyOptionalHint real copy with a
{provider} argument (the add/edit key modals pass it). The other locales still
held the humanized placeholder without {provider}, so
tests/unit/i18n-placeholder-parity.test.ts failed on PR #36. Those 39 locales
now fall back to the English copy (as other untranslated strings do) until
translated; en, pt-BR and vi keep their translations. Placeholder parity,
vi key parity and UI key coverage pass.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 6 — onboarding and first-use UX
The onboarding wizard now covers the whole first-use path, and the known first-use UX problems are fixed or verified.
First-use flow (9 steps)
/dashboard/onboarding?rerun=1reopens it after setup./login; with an existing password the wizard offers "Keep current password" and hides "Skip password setup" (skipping would disable login).connections[0](bug); 15 s limit and Retry kept.GET /api/providers/{id}/models?chatOnly=true&excludeHidden=true, or type a model id.POST /api/models/testthrough the real chat pipeline, with latency.provider/model, copy button, links to API Manager and Endpoints./api/usage/call-logsrow (model and status only), "Check again", link to logs and to the first-10-minutes guide.UX problems
src/shared/utils/actionableError.ts,ActionableErrorCallout); HTTP error envelopes unchangedPATCH /api/settings {setupComplete:false}takes effect. First boot unchanged; the three tests pinning it pass unmodifiedauth.nodeIncompatible*translated; en/vi no longer recommend unsupported Node 20Tests
initial-password-bootstrap-once(4/5 fail on the old code),actionable-error-guide,ui/onboarding-first-use-flow(8),tests/e2e/onboarding-first-use.spec.ts(4/4 locally on an isolated webpack dev server; provider routes mocked).typecheck:core, dashboard/API typecheck,check:docs-all, mutation-test-coverage--strictpass.🤖 Generated with Claude Code