Skip to content

fix(e2e): repair settings-scroll script (url assets + dev-surface gating) - #1335

Closed
muzimu217 wants to merge 78 commits into
vastsa:mainfrom
muzimu217:fix/e2e-settings-scroll-url
Closed

muzimu217 wants to merge 78 commits into
vastsa:mainfrom
muzimu217:fix/e2e-settings-scroll-url

Conversation

@muzimu217

Copy link
Copy Markdown
Contributor

Summary

The settings-scroll E2E has been unrunnable on main since 2026-09-28, due to two independent breakages stacked on top of each other (invisible to CI because E2E scripts are not in the gate set):

  1. Build failure since ef9aae83a (live voice sessions): live-call-controller.ts imports ./pcm-worklet.js?url, which the script's bare-esbuild bundle cannot resolve — No matching export in "…/pcm-worklet.js?url" for import "default". This adds the same local-url-assets plugin that e2e-composer-paste.mjs, e2e-transcript-render.mjs and friends already use.

  2. Assertion failure since 07bc80261 (expose Live Voice to regular users): the developmentOnly nav gating (settings-search.ts) hides the sync (Cloud sync) destination even with developer mode on, because the fixture defines import.meta.env.DEV: "false" (packaged semantics) — so includeDevelopmentOnly=false (SettingsPage.tsx:94) and the "Cloud sync must appear in settings search with developer mode" check can never pass. The fixture now runs with DEV semantics, matching how those surfaces are gated in a dev build; the developerOnly gate (absent without developer mode) is unchanged and still asserted.

Verification

  • Before: build fails with the ?url error (exit 1).
  • Plugin only: build passes, then the Cloud-sync assertion fails.
  • Both fixes: SETTINGS_SCROLL {"ok":true, …} — light/dark themes, update preference, and pt-BR locale checks all pass, against a real host binary (PI_DESKTOP_HOST_BIN injected release build).

FTS5 store under <data>/index/index.db with fixed file-count and byte
budgets, quarantine-and-recreate self-healing, and lifecycle RPCs
(index.status / index.rebuild / index.clear) that report metadata only.
A single indexGrepBoost switch (default off) owns the whole lifecycle:
turned on, it indexes newly opened workspaces in the background so the
Index page under the Workspace settings group can report status; the
build's join handle is registered on the app state so tests await the
build instead of polling a wall clock. Opening the store never blocks
host startup - a failed open degrades to a disabled store.

Grep is untouched: tools execute exactly as before whether or not an
index exists. How the index may ever accelerate a search is a separate,
independently reviewed change.
# Conflicts:
#	apps/desktop/src/styles/settings.css
#	docs/spec/06-delivery/04-e2e-test-plan.md
#	package.json
# Conflicts:
#	packages/shared/src/errors.ts
# Conflicts:
#	apps/desktop/src/features/settings/SettingsPage.tsx
#	apps/desktop/src/lib/settings-search.ts
#	crates/host-core/src/rpc/mod.rs
#	docs/spec/03-runtime/04-data-storage.md
#	docs/spec/04-ux/06-settings-ia.md
#	packages/i18n/src/locales/de/index.ts
#	packages/i18n/src/locales/en/index.ts
#	packages/i18n/src/locales/es/index.ts
#	packages/i18n/src/locales/fr/index.ts
#	packages/i18n/src/locales/ko/index.ts
#	packages/i18n/src/locales/tr/index.ts
#	packages/i18n/src/locales/zh-CN/index.ts
#	packages/i18n/src/locales/zh-TW/index.ts
#	packages/shared/src/types/settings.ts
# Conflicts:
#	apps/desktop/src/styles/settings.css
#	crates/host-core/src/rpc/mod.rs
# Conflicts:
#	apps/desktop/src/features/settings/SettingsPage.tsx
#	docs/spec/04-ux/06-settings-ia.md
#	docs/zh-CN/spec/04-ux/06-settings-ia.md
# Conflicts:
#	docs/spec/06-delivery/04-e2e-test-plan.md
# Conflicts:
#	crates/host-core/src/rpc/mod.rs
# Conflicts:
#	docs/spec/06-delivery/04-e2e-test-plan.md
# Conflicts:
#	docs/spec/03-runtime/01-ipc-protocol.md
#	docs/zh-CN/spec/03-runtime/01-ipc-protocol.md
#	packages/shared/src/errors.ts
# Conflicts:
#	crates/host-core/src/rpc/mod.rs
#	docs/spec/04-ux/06-settings-ia.md
#	docs/spec/06-delivery/04-e2e-test-plan.md
…ing)

The settings-scroll E2E has been unrunnable since the live-voice worklet
landed: its bare-esbuild bundle chokes on the ?url import in
live-call-controller.ts. Add the same local-url-assets plugin the other
E2E bundles (composer-paste, transcript-render) already use.

After unblocking the build, the fixture's import.meta.env.DEV=false
define hides developmentOnly settings surfaces (Cloud sync) even with
developer mode on, failing the must-appear assertion. Run the fixture
with DEV semantics, matching how those surfaces are gated; the
developer-only gate (absent without developer mode) is unchanged and
still asserted.

Verified locally: SETTINGS_SCROLL ok:true with light/dark themes,
update preference, and pt-BR locale checks passing.
@muzimu217
muzimu217 force-pushed the fix/e2e-settings-scroll-url branch from 558e295 to c46f54f Compare October 3, 2026 07:46
@vastsa

vastsa commented Oct 3, 2026

Copy link
Copy Markdown
Owner

Thanks for repairing the settings-scroll harness. The ?url asset plugin and DEV fixture change are directly related to that fix. However, this PR also includes a separate feat(host): workspace index infrastructure behind an opt-in switch, with new host index storage/RPC, Settings Index UI, and supporting i18n/spec/tests (47 files and about 3,300 additions). The current outside-contribution intake rule in AGENTS.md §15 and delivery workflow R6.1 permits outside PRs of perf and fix type only; a contributor PR containing this feat work is not a landing candidate and must be closed. I’m closing it under that rule. The focused settings-scroll repair can be submitted separately without the index feature for review. Thanks for the work on both pieces.

@vastsa vastsa closed this Oct 3, 2026
@muzimu217

Copy link
Copy Markdown
Contributor Author

Apologies for the packaging mistake on my side — this PR should never have carried the index infrastructure. The two pieces are unrelated, and bundling them was exactly the wrong shape for the intake rule; I've taken note to keep every submission a single, focused change based on the current main.

The settings-scroll repair has been resubmitted on its own as #1353 (1 file, +13/-1, no other changes), per your pointer. If anything there still doesn't fit the workflow, I'm happy to adjust.

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