Repository navigation
fix: repair the failing frontend and backend CI gates on master - #20
superman2003 wants to merge 7 commits into
Conversation
- zh-CN `hubCanvas.importDays` only defined the non-plural key, so i18next resolved `importDays_other` for Chinese and fell back to the English "N days" label. Define both plural forms. - `agents.presetAcp*` were referenced by AgentRegistryView but missing from both locales, rendering raw key strings in the ACP presets list. - zh-CN `skillsRegionAria` left "Skill" untranslated while every sibling string already uses 技能; this one is an aria-label, where it matters most. - RemoteDesktopTransport held the bearer token in a TypeScript `private` field, which is compile-time only and still serializes. Any log or crash report that stringified a transport leaked the token. Use a `#` field. - Legacy `skill:` slash tokens whose path carried no extra `:` fell through to using the whole absolute path as the command label, exposing on-disk paths in the composer. - A feedback_check result carrying only a bare `summary` produced no entries, so the card returned null and the completed tool call vanished from the timeline. Fall back to the summary and surface the checked item. - Two native <select> controls in AgentModelProviderManager were missing the shared `raised-control` material. - Bring hard-coded radii onto `var(--radius)` and paint the installed plugin list as the white settings surface, per the design-system contract.
…es from tsc `tsconfig.json` includes the `src` directory, and TypeScript resolves one file per path stem per directory listing. On a case-insensitive filesystem (Windows and macOS, the primary dev platforms here) `SettingsSearch.tsx` and `settingsSearch.ts` share the stem `settingssearch`, as do `SubagentCard.test.tsx` and `subagentCard.test.ts`. The `.ts` file wins, so the `.tsx` file was silently excluded from the program: `SettingsSearch.tsx`, a real product component, was never type-checked, and `pnpm run lint` failed outright with "TSConfig does not include this file". - Delete `settingsSearch.ts`. It was a six-line re-export barrel with no importers anywhere in the tree, so removing it resolves the collision and drops dead code rather than inventing a name to avoid it. - Rename `subagentCard.test.ts` to `subagentCardModel.test.ts`, matching the `subagentCardModel.ts` module it actually exercises. Also clear the remaining lint failures so `--max-warnings 0` passes: - Rename `HostGlass.tsx` to `host-glass.tsx`; `src/components/ui/**` is held to KEBAB_CASE by check-file/filename-naming-convention. - Allow NiceModal in `AgentUpdateConfirmDialog.tsx`. It is a defineModal dialog that still lives beside its settings page rather than under `src/components/dialogs/`, which is what the rule's allowlist assumes. - Use the already-hoisted `refreshManagement` in the AgentSettings effect instead of `management.refresh`, satisfying react-hooks/exhaustive-deps.
…ations The suite failed 19 tests at HEAD. The rest were product defects, fixed separately; these are the cases where the test, not the code, was wrong. Stale contracts: - releaseWorkflow expected `bundles: app,dmg`, but macOS now builds the .app and produces the DMG in the dedicated notarize step. Assert the current shape, including the notarize script, so DMG coverage is kept rather than dropped. - dialog.styles listed `src/App.tsx` as a custom modal that must carry `modal-surface`. Its crash dialog moved to the shared Dialog primitive, so App.tsx no longer hand-rolls a modal at all. The three real custom modals stay covered. - UseSessionComposerQueue asserted a `pluginActions` field on the submit payload; the transport layer sends `workflowRefs`. - The web fetch card test claimed the Tauri shell plugin is unavailable in jsdom, but vitest.setup.ts stubs it for every suite, so the window.open fallback was never reached. Make the shell open reject to exercise it. - AgentRegistryView matched the preset name across every text node, which now also matches the agent icon's SVG <title>. Match the visible row label. Contradictory contracts, resolved toward the module's own unit test: - UseSessionComposerPreviewElementInsertion expected element chips labelled without `@`, while sessionComposerStructuredTokens and UserMessage expect `@Name`. Element tokens are `@` references and render no icon, so the `@` is their only sigil; align the three outliers. - ProductPlugins.styles asserted the installed plugin list is transparent while SettingsContent.styles asserts it is a white settings surface. Keep the settings-surface contract; only the market list stays uncontained. Flakiness: - DevicePairingPanel hard-coded an `expires_at` that has since passed, so the panel reported the challenge failed and the waiting status disappeared. Derive it from the current time. - Three heavy settings suites run 2-4s alone but overran the 5s default once the full suite ran in parallel, failing CI on scheduling luck. Raise testTimeout and paste the plugin CLI command instead of typing it character by character.
`cargo test --workspace` failed 57 tests across 10 crates and
`cargo clippy --features qa-mode -D warnings` failed outright, neither of
which had ever passed on this platform. Working through them surfaced real
defects alongside tests whose premises only held on POSIX. Both are in this
commit because several files carry each kind; the split is described below.
Plugin workers could not start at all on Windows
------------------------------------------------
`confined_path` canonicalizes the Worker entrypoint, which yields a `\?\`
verbatim path on Windows. Node cannot resolve that as a module specifier: it
exits non-zero without writing a byte, which the host reports as the opaque
"Worker closed stdout". Every Node-backed plugin Worker was dead on Windows.
Normalize the prefix through the existing `utils::path` helper.
The same verbatim prefix also leaked into the resolved-resource prompt the
agent reads, so a Skill path arrived as `\?\C:\...\SKILL.md`.
Merging failed for anyone without a global Git identity
-------------------------------------------------------
`merge_changes` resolved its signature through `configured_signature`, which
treats a missing identity as a hard error. Only the bootstrap commit had the
VibeX fallback, so a squash merge failed outright for a user who had never
run `git config --global user.name` — a normal state for a GUI-first user.
`git_workflow.rs` already specified the fallback down to the exact identity
(`VibeX <noreply@vibex.com>`); it just was not wired into the merge path.
Renamed the helper to say what it is for and used it in both places.
Other user-visible fixes
------------------------
- `strip_readme_frontmatter` matched LF delimiters only, so a Windows
checkout rendered the raw YAML block into the plugin's product page.
- `save_provider`/`delete_provider` returned a view built by re-reading the
files, but the caller persists the mutations *after* the call, so the DSH
provider list stayed stale until something else forced a reload.
- `opencode_provider_paths` honoured the saved agent environment for the
cache directory but read auth and config from the real user directory, so
VibeX inspected a file the agent never writes.
- `file_search` returned native separators while diff and git paths in the
same UI are forward-slashed; likewise the plugin native-resource DTO,
whose own `id` field is already `/`-joined.
- Portable automation specs rejected absolute workflow sources via
`Path::is_absolute`, which is host-dependent — a macOS-authored `/tmp/...`
passed validation on Windows. Reject rooted paths the same way everywhere.
- `tool-runtime` imported `std::os::windows::process::CommandExt` although
the command is tokio's, which has its own inherent `creation_flags`;
`utils::process` left its non-Windows fallbacks ungated.
Tests
-----
Most failures were POSIX-only premises: `Path::new("/tmp/x").is_absolute()`
is false on Windows, so fixtures using `/managed-tools`, `/verified/...` or
`/opt/codex` were rejected before reaching the behaviour under test. Those
now build a host-absolute path, or are `#[cfg(unix)]` where the premise is
inherently POSIX. Beyond that:
- `services` and `local-deployment` created temp repos and committed without
setting an identity, so they silently depended on the developer's global
gitconfig. They now configure the repo, like the `git` crate's own tests.
- `commit_without_user_config_succeeds` claimed to cover the no-identity
path but only skipped the *repo-local* config, so on any machine with a
global identity it exercised the configured path instead. It is now
hermetic and asserts the documented actionable error.
- The `worker_sandbox` loopback listener never read the request before
closing, which makes Windows send an RST and abort the response.
- `sqlite_registry` removed a snapshot directory while `kill_on_drop` was
still tearing the Worker down; Windows holds the handle.
- The container env probe emitted cmd syntax whenever the target was
Windows, but the spawn helper prefers bash when it is on PATH, so `%VAR%`
arrived at bash as a literal. It now follows the same shell choice.
- The Node version stubs printed the right version but exited 1, because
`set /p` reports failure when it cannot read stdin.
- `web_domains` expected the bundled Office plugin in the control catalog
after bootstrap, which contradicts `official_host_catalog.rs` asserting
that catalog stays empty until something is installed. The test now
installs it first, keeping every downstream assertion.
Clippy is mostly mechanical, plus three worth naming: the `isolated` module
marked its Linux half live on Windows and so reported the whole seccomp
layer as dead code; `HostedChild` now boxes its 272-byte variant; and
`windows_isolated_command` is unreachable because `isolated_launch` has
macOS and Linux branches but no Windows one, despite the module documenting
Windows AppContainer support — left in place and annotated, since wiring it
up is a product decision rather than a lint fix.
|
Extended to the backend. After installing the pinned Two of the backend findings are worth reading on their own:
Also filed #35 (umbrella, plus a suggestion to add a Windows CI job — nothing Two backend contradictions joined the two frontend ones in needing a judgement |
master advanced 51 commits (0.2.0 release) while this branch was open and independently landed much of the same repair work, so the resolution keeps master's version wherever it already covers this branch's fix: - FeedbackCheckResultCard, remoteDesktopTransport, AgentModelProviderManager, HostGlass.test.tsx: master's rewrites subsume this branch's changes (the transport now keeps the bearer token out of the WebView class entirely, which is stronger than the `#token` field this branch added). - bundled_office / web_domains: master's expectations track the updated office submodule (office-docx -> word, 10 skills); this branch's Windows path normalization is kept on top. - projection.rs / events.rs: master's new ConversationError fields and global_host_events() emit path win; this branch's clippy-driven pattern flattening is reapplied over them. - delegation/broker.rs: master deleted the orphaned fail_setup, so it goes. Two of master's own refactors were left half-finished and are completed here because the merged tree does not compile otherwise: - host_application_core: this branch replaced 13 positional arguments with HostApplicationCoreDeps; master added a new call site in commands/conversations.rs still using the old form. - capability_probe_result: master moved it to crates/conversations and left its two tests behind in src-tauri, referencing a now-private function in another crate. The tests move with the function.
`cargo clippy --workspace --all-targets --features qa-mode -- -D warnings` reported 19 findings in code the 0.2.0 release moved into `crates/server` and never linted. Nothing here changes behaviour: - collapsible_if: 5 nested `if let`s folded into let chains. - extract_binary_archive was imported unconditionally by the test module but only used by `#[cfg(unix)]` symlink tests, so on Windows it resolved to nothing. It now carries the same cfg as its callers. - Three unused imports (HashSet, BTreeMap, PathBuf). - The rest are mechanical: two needless borrows, a redundant closure, a useless `String` conversion, `&PathBuf` -> `&Path`, `map` -> `inspect`, `assert_eq!(x, true)` -> `assert!(x)`, a `Default::default()` field assignment turned into a struct literal, a dead `agent_id` clone kept alive only by a `.map()` that discarded it, and one `to_string()` hoisted out of a comparison so it allocates once instead of per candidate. - The nested `walk` helper takes the `#[allow(clippy::too_many_arguments)]` this codebase already uses for accumulator-threading helpers.
`bundled()` gained a fourteenth profile in 0.2.0 but local_data_reset_restores_the_built_in_agent_catalog still pinned 13, so `cargo test -p vibex --lib` failed. The count stays hard-coded on purpose -- it is the tripwire for an agent silently entering or leaving the catalog -- so this notes what to update it alongside.
What this fixes
Every CI gate — frontend and backend — failed on
master. On a clean checkoutat
8ba6efc:pnpm test(frontend)pnpm run lint(eslint)pnpm run check(tsc)cargo test --workspacecargo clippy --features qa-mode -D warningsEach failure was traced to a root cause before anything changed, and the
commits are split along the line between "the code is wrong" and "the test is
wrong" so the product changes can be reviewed independently.
Verified on Windows with the pinned
nightly-2025-12-04. The Linux/macOSpaths of the platform-specific fixes are reasoned about, not executed — see
Verification.
1. Frontend user-visible defects (
6f37ab8)importDays, but the call site passescount, so i18next resolvedimportDays_other, missed, and fell back to en.agents.presetAcp*existed inneither locale.
skillsRegionAriauntranslated in zh-CN while every sibling alreadyuses 技能. It is an aria-label.
RemoteDesktopTransportheld the token in a TypeScript
privatefield, which is compile-time onlyand still enumerates, so
JSON.stringify(transport)emitted it. The repo'sown test asserts this must not happen.
skill:tokens exposed absolute on-disk paths in the composer.feedback_checkresults with only asummaryrendered nothing — thecard returned
nulland the completed tool call vanished from the timeline.<select>controls missing the shared raised material, 15hard-coded radii, and a plugin list off the settings surface — all pinned by
existing design-system guard tests.
2. Frontend build integrity (
ec36fd4)tsconfig.jsonincludes thesrcdirectory, and TypeScript keeps one fileper path stem, preferring
.tsover.tsx. On a case-insensitive filesystem —Windows and macOS, and this repo is Windows-primary —
SettingsSearch.tsxlostto
settingsSearch.tsandSubagentCard.test.tsxtosubagentCard.test.ts.SettingsSearch.tsxis a real product component and was nevertype-checked.
pnpm run checkpassed partly because it was not looking atthe file, and lint failed with "TSConfig does not include this file".
settingsSearch.tswas a six-line re-export barrel with no importers, so it isdeleted rather than renamed.
3. Frontend test contracts (
2abf0a6)Kept separate because these change expectations, not behaviour: five stale
contracts (two of which had quietly stopped testing what they describe — the
web-fetch test's
window.openfallback was never reached becausevitest.setup.tsstubs the Tauri shell globally), two pairs of mutuallycontradictory assertions, and three flaky tests including a fixture that
expires by wall-clock date.
4. Backend (
1fb563b)Plugin workers could not start at all on Windows.
confined_pathcanonicalizes the Worker entrypoint into a
\?\verbatim path, which Nodecannot resolve as a module specifier — it exits non-zero without writing a
byte, surfacing as the opaque "Worker closed stdout". The same prefix also
leaked into the resolved-resource prompt the agent reads.
Squash merge failed for anyone without a global Git identity.
merge_changesused the hard-erroring signature resolver; only the bootstrapcommit had the VibeX fallback.
git_workflow.rsalready specified thatfallback down to the exact identity — it just was not wired into the merge
path. A GUI-first user who never ran
git config --global user.namecould notmerge.
Also: LF-only frontmatter stripping leaked raw YAML into the plugin product
page on Windows checkouts;
save_providerreturned a view read from diskbefore the caller persisted the mutations, so the DSH provider list stayed
stale;
opencode_provider_pathsignored the saved agent environment for authand config;
file_searchand the plugin resource DTO returned nativeseparators where the rest of the UI is forward-slashed; and portable
automation specs validated absoluteness host-dependently, so a
macOS-authored
/tmp/...passed on Windows.The test side was mostly POSIX-only premises —
Path::new("/tmp/x").is_absolute()is false on Windows — plus tests thatsilently depended on the developer's global gitconfig, a listener that never
drained its request (Windows sends an RST), and cmd stubs that printed the
right output but exited 1.
Contradictions worth a second opinion
Four places where two tests asserted opposite things and could not both pass.
I picked a direction for each and recorded the reasoning in the commit
messages, but any of them could reasonably go the other way:
SaveButtonvs@SaveButton.product-plugin-listbackground —transparentvsvar(--surface-card-strong)See #26 for the frontend pair. Say the word and I will flip any of them.
Verification
pnpm test,pnpm run lint,pnpm run check,cargo test --workspace,cargo clippy --workspace --all-targets --features qa-mode -- -D warningsand
cargo fmt --checkall pass from a clean tree on Windows.Not run: the Linux and macOS branches of the platform-specific changes,
and
prepare-db:check/generate-types:check(no schema or#[derive(TS)]type is touched).