test(e2e): onboarding simple vs advanced mode spec#1989
Conversation
Adds `onboarding-modes.spec.ts` covering:
- Cloud (simple) path: welcome → runtime choice → /home, asserts
`onboarding_completed = true` lands in `${OPENHUMAN_WORKSPACE}/config.toml`.
- Custom (advanced) path with Default on every wizard step: asserts the
Inference, Voice, and OAuth wizard panels all render via their
`data-testid`s and onboarding completes.
- Custom (advanced) Configure path on Voice: toggles `auto_start` via the
embedded `VoicePanel`, clicks Save, and asserts `voice_server.auto_start`
updates immediately on disk.
Adds `helpers/config-toml.ts` — a tiny regex reader for the workspace
config.toml so specs can assert persisted state without parsing the full
TOML grammar. Adds `data-testid`s for the voice auto-start toggle and the
voice save button so the spec can drive them.
tonic 0.14.6 declares `edition = "2024"` but ships code with
`Self::Item` ambiguity, missing `#[pin]` proc-macro scopes, and
`E0463` crate-not-found errors that break the build under any
currently-shipping Rust toolchain.
The root cause: opentelemetry-otlp 0.31's `http-proto` feature
activates `opentelemetry-proto/gen-tonic-messages`, which in
proto 0.31 unconditionally pulls in `tonic` (optional dep with
`features = ["codegen"]`), dragging in tonic 0.14.6. We use only
the HTTP-proto transport — gRPC/tonic is never needed.
In opentelemetry-proto 0.32, `gen-tonic-messages` was refactored
to require only `prost`; tonic is now gated behind `gen-tonic`.
Upgrading opentelemetry/{sdk,otlp} 0.31 → 0.32 removes tonic
from the dependency graph entirely, fixing the build with no
source changes required.
Verified: `cargo check` on the root crate and the Tauri shell both
finish cleanly after the update.
…ethod name
All controller methods are registered under the openhuman.{namespace}_{function}
naming scheme (see core/all.rs rpc_method_name). The spec was calling
config.set_onboarding_completed (bare namespace.function), which the dispatcher
does not recognise, producing "unknown method" and aborting Phase B and C.
cef-dll-sys (the CEF bindings build script) writes the downloaded CEF binary to ~/Library/Caches/tauri-cef/ inside the container. Without a named volume this path is ephemeral — each new container re-downloads the ~400 MB CEF archive, which fails when the CDN is unreachable or DNS is broken in the container. Add e2e-cef-cache mapped to /root/Library/Caches/tauri-cef so the download persists across container runs, matching how e2e-tauri-target already caches the Rust build artifacts.
…nfigure phase The auto-start checkbox + Save button in VoicePanel sit inside a `!disabled && settings` block, where `disabled = !sttReady`. In the linux CI container we never download Whisper assets, so sttReady is false and that block never renders — the spec was failing on the `voice-auto-start-toggle` testid lookup at 290:67. Switch Phase C to drive the always-visible `stt-provider-select` dropdown. Flipping it fires `voice_set_providers` which writes `config.local_ai.stt_provider` to config.toml via `config.save()` — same end-to-end claim, but on the path that does render in CI. The synthetic change-event uses the native value setter so React sees the new value even though the alternate `<option>` is rendered disabled. Add `readSectionString` helper to config-toml for quoted-string keys.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR adds E2E onboarding tests and config.toml helpers, instruments VoicePanel with test IDs, bumps OpenTelemetry crates to 0.32, and adds a Docker Compose named volume to cache CEF binaries for E2E runs. ChangesE2E Onboarding Testing
Infrastructure and Dependency Updates
🎯 3 (Moderate) | ⏱️ ~25 minutes
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@app/test/e2e/specs/onboarding-modes.spec.ts`:
- Around line 16-20: Update the Phase C description to match what the test
actually asserts: change references to toggling "voice_server.auto_start" and
saving to instead mention changing the "local_ai.stt_provider" via the provider
selector and saving, so failure triage points to the real assertion target;
specifically edit the Phase C wording in onboarding-modes.spec.ts (the block
that currently references `voice_server.auto_start`) and any other occurrence
around line 267 to mention `local_ai.stt_provider` and the provider selector
interaction.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 887f5cda-b0b5-4c3d-a880-babcddf67140
⛔ Files ignored due to path filters (2)
Cargo.lockis excluded by!**/*.lockapp/src-tauri/Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (5)
Cargo.tomlapp/src/components/settings/panels/VoicePanel.tsxapp/test/e2e/helpers/config-toml.tsapp/test/e2e/specs/onboarding-modes.spec.tse2e/docker-compose.yml
Summary
onboarding-modes.spec.ts— a Docker/Linux E2E that walks the post-login onboarding wizard in both Simple (Cloud) and Advanced (Custom) modes and asserts the resulting state lands in the core's${OPENHUMAN_WORKSPACE}/config.toml.opentelemetry{,_sdk,-otlp}0.31 → 0.32 to drop the unbuildabletonic 0.14.6from the workspace graph (E0463/E0223 cascade on the standing toolchain).data-testidpair toVoicePanelso the spec can drive the Voice-Configure path deterministically.Problem
config.tomlimmediately. The wizard has been refactored multiple times this quarter and silent regressions on the Custom path have shipped twice.mainbefore this branch:opentelemetry-proto 0.31'sgen-tonic-messagesfeature pullstonic 0.14.6even when the workspace only enables HTTP-proto transport. The build dies with cascadingE0463: can't find crate for http/http_body/bytes/...errors insidetonic.Solution
opentelemetry 0.31 → 0.32— in 0.32gen-tonic-messagesrequires onlyprost;tonicis gated behindgen-tonic. The crate disappears from the graph andcargo checkis clean on both the root crate and the Tauri shell. Zero source changes required.onboarding-modes.spec.ts— drives the wizard via stabledata-testidselectors:/home, assertsonboarding_completed = trueinconfig.toml.stt-provider-selectand asserts[local_ai] stt_providerupdates inconfig.tomlvia the samevoice_set_providersRPC the panel uses. Originally targetedauto_start, but that section is gated bydisabled = !sttReadywhich is always true in CI (no Whisper assets) — switched to the always-visible provider selector.app/test/e2e/helpers/config-toml.ts— a regex reader for the workspace config.toml (no TOML parser dep).e2e-cef-cache:/root/Library/Caches/tauri-cefvolume.Verified locally inside
ghcr.io/tinyhumansai/openhuman_ci:latest:Submission Checklist
Cargo.tomlis one-line config with no executable surface; the twodata-testidadditions inVoicePanelare JSX attributes only.diff-coverwill treat the spec source as covered by its own run.Impact
data-testidadditions toVoicePanelare inert JSX attributes. The opentelemetry minor bump (0.31 → 0.32) is a pure dep refresh — no API surface used by the app changed, andcargo checkis clean on both crates.Cargo.lock(tonic,tonic-prost,tonic-prost-build,prost-types, and friends) along the way.Related
AI Authored PR Metadata (required for Codex/Linear PRs)
Linear Issue
Commit & Branch
test/onboarding-flowValidation Run
pnpm --filter openhuman-app format:check(pre-push hook auto-formatted spec/helper; re-committed asa615e099)pnpm typecheck— spec is@ts-nocheckper existing convention inapp/test/e2e/specs/*.bash app/scripts/e2e-run-session.sh test/e2e/specs/onboarding-modes.spec.ts onboarding-modes(inside docker compose) — 4/4 passing.cargo checkclean on root + Tauri shell after the opentelemetry 0.32 bump.Validation Blocked
command:N/Aerror:N/Aimpact:N/ABehavior Changes
Parity Contract
data-testidattributes.Duplicate / Superseded PR Handling
Summary by CodeRabbit
Chores
Tests