Skip to content

Phase 6: end-to-end first-use onboarding, actionable errors and INITIAL_PASSWORD fix - #36

Merged
LMPrado-DZ23 merged 7 commits into
release/v3.8.54from
evolution/phase-6-onboarding
Sep 18, 2026
Merged

LMPrado-DZ23 merged 7 commits into
release/v3.8.54from
evolution/phase-6-onboarding

Conversation

@LMPrado-DZ23

Copy link
Copy Markdown
Owner

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)

  1. Start / 2. Open dashboard — wizard as before; /dashboard/onboarding?rerun=1 reopens it after setup.
  2. Authenticate — real /login; with an existing password the wizard offers "Keep current password" and hides "Skip password setup" (skipping would disable login).
  3. Add a provider — the wizard remembers the new connection id (also for the free-provider card).
  4. Validate the credential — tests the connection just added, not connections[0] (bug); 15 s limit and Retry kept.
  5. Choose a model — from GET /api/providers/{id}/models?chatOnly=true&excludeHidden=true, or type a model id.
  6. Run a test — POST /api/models/test through the real chat pipeline, with latency.
  7. Copy client configuration — base URL, API-key placeholder, provider/model, copy button, links to API Manager and Endpoints.
  8. See the first request — newest /api/usage/call-logs row (model and status only), "Check again", link to logs and to the first-10-minutes guide.

UX problems

Problem Status
Non-actionable errors Fixed — every wizard failure shows what happened, why, how to fix, whether retry helps, and a docs link (src/shared/utils/actionableError.ts, ActionableErrorCallout); HTTP error envelopes unchanged
Connection test without retry Fixed in the wizard; already present elsewhere
INITIAL_PASSWORD / 200 without effect (C-06) Fixed — the first-read bootstrap runs once (internal marker); a later PATCH /api/settings {setupComplete:false} takes effect. First boot unchanged; the three tests pinning it pass unmodified
Incomplete pt-BR Fixed — auth.nodeIncompatible* translated; en/vi no longer recommend unsupported Node 20
Translation placeholders Fixed — 22 first-use placeholders get real copy (baseline 162 → 140)
Storage paths guessed by the browser (C-07) Already fixed; verified
Overflow at intermediate widths Fixed — step indicator shrinks, footer wraps; no horizontal scroll at 375/768/900/1024
Uninstalled CLI models shown as available Not changed by decision: confirmed-missing CLIs are already hidden; only a probe timeout keeps a CLI listed (the diegosouzapw#10710 fix); the wizard never lists local CLIs

Tests

  • New: 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).
  • After merging the current release: node suites 63/63, vitest 26/26, governance, vi key parity, e2e shard seed, UI i18n coverage, typecheck:core, dashboard/API typecheck, check:docs-all, mutation-test-coverage --strict pass.

🤖 Generated with Claude Code

zodyprado-web and others added 6 commits September 18, 2026 14:19
…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>
@coderabbitai

coderabbitai Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: a34515e3-3f11-4149-9503-e7308c9e8942

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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

Comment @coderabbitai help to get the list of available commands.

…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>
@LMPrado-DZ23
LMPrado-DZ23 merged commit 0fdd34f into release/v3.8.54 Sep 18, 2026
15 checks passed
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.

2 participants