fix(FR-2606): replace webpackIgnore with @vite-ignore in dynamic plugin imports#6879
Merged
graphite-app[bot] merged 1 commit intomainfrom Apr 30, 2026
Conversation
This was referenced Apr 22, 2026
This was referenced Apr 22, 2026
Contributor
Author
This was referenced Apr 22, 2026
Merged
ac2e78d to
4afa90d
Compare
2b59a1b to
4147197
Compare
This was referenced Apr 27, 2026
f3317ab to
91d8e0d
Compare
47b0844 to
71a5bf7
Compare
91d8e0d to
7223909
Compare
71a5bf7 to
fa7e95d
Compare
7223909 to
ac5909d
Compare
fa7e95d to
5f1405f
Compare
ac5909d to
0d2caed
Compare
5f1405f to
cdc4e8a
Compare
0d2caed to
a4205c8
Compare
This was referenced Apr 30, 2026
Merge activity
|
…in imports (#6879) Resolves #6809(FR-2606) ## Summary Dev-server warning spam noticed after the Vite cutover: ``` [vite] (client) warning: .../PluginLoader.tsx:75 await import(/* webpackIgnore: true */ pluginUrl); The above dynamic import cannot be analyzed by Vite. ``` Two dynamic-import call sites loaded a runtime-computed URL and tagged it with `/* webpackIgnore: true */`, the CRA/Webpack magic comment that opted out of static analysis. Vite doesn't recognise it, so it defaults to "can't analyse" and warns on every dev rebuild (plus wastes cycles trying to pre-bundle a spec it can't resolve). **Fix**: replace `/* webpackIgnore: true */` with `/* @vite-ignore */` (Vite's equivalent). Runtime behaviour is unchanged — plugins still load fine. **Sites fixed**: - `react/src/components/PluginLoader.tsx`: page-plugin loader for paths under `/dist/plugins/*.js` - `react/src/components/LoginView.tsx`: login-plugin loader that pulls from `../../../src/plugins/<name>` ## Verification - [x] `grep -r 'webpackIgnore' react/src` → zero value-level hits; only comments that explain the rename - [x] `vite:dev` no longer warns about un-analysable dynamic imports from these files - [x] Plugin loading still works at runtime ## Stack Top of the stack. This is the final fix bundled from end-to-end verification; reviewing this PR gives a good summary of the whole Vite migration series (the "Stack" section above in the PR lists all 11 PRs in order).
cdc4e8a to
6683df9
Compare
a4205c8 to
c303197
Compare
graphite-app Bot
pushed a commit
that referenced
this pull request
Apr 30, 2026
Resolves #7064(FR-2744) ## Summary FR-2611 dropped `ArtiomTr/jest-coverage-report-action` (Jest-only) when CI moved to Vitest, so PRs lost the coverage diff comment and inline test-failure annotations. This restores the equivalent surface using `davelosert/vitest-coverage-report-action@v2`. ### Local setup - Add `@vitest/coverage-v8@^4.1.4` as devDependency in `react/`, `packages/backend.ai-ui/`, root. - Coverage block in each `vitest.config.ts`: - `provider: 'v8'` — uses Node's V8 inspector, no Babel transform needed (fastest provider). - `reporter: ['text', 'json', 'json-summary', 'html']` — `json-summary` is what the GitHub Action consumes; `text` keeps a console summary; `html` lets devs open `coverage/index.html` locally. - `exclude` patterns trim test files, stories, generated Relay artifacts, and zero-logic entries (`src/index.tsx`, `reportWebVitals`, BUI locale catalog, `wsproxy`, bundled `backend.ai-client-node.*`). - `/coverage` added to `packages/backend.ai-ui/.gitignore` (root and react/ already had it). ### CI setup - `.github/workflows/vitest.yml` gains `pull-requests: write` permission so the action can post / update its PR comment. - Each of the three jobs (`react-vitest`, `backend-ai-ui-vitest`, `root-vitest`) runs `pnpm exec vitest run --coverage` and follows it with a `davelosert/vitest-coverage-report-action@v2` step keyed by a unique `name:` so the three PR comments don't collide. - The action runs with `if: always()` so a coverage comment posts even when tests fail (matches the prior Jest behaviour, which surfaced failed-test annotations). ## Verification ``` === react/ === Lines 7.23% (1645/22722) === BUI === Lines 7.91% (317/4006) === root === Lines 3.66% (282/7703) ``` - [x] All three workspaces produce `coverage/coverage-summary.json` in the shape the action expects - [x] Test pass counts unchanged (react 856/856, BUI 315 + 5 skip, root 90 + 1 skip) - [x] No regression in lint / format ## Out of scope - **No coverage threshold gates** — baseline %s above are intentionally low (mostly UI code without unit tests). Gating now would block normal PRs. A separate decision on thresholds belongs to a follow-up after the team agrees on a target. - README coverage badge. - Backfilling the 6 `TODO(FR-2609)` skipped tests. ## Stack Top of the Vite migration stack (now 12 PRs). Builds on PR #6879 (`fix(FR-2606)` webpackIgnore → @vite-ignore).
Base automatically changed from
04-21-fix_fr-2606_replace_global.packageversion_with_globalthis.packageversion_in_webuisider
to
main
April 30, 2026 12:33
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.

Resolves #6809(FR-2606)
Summary
Dev-server warning spam noticed after the Vite cutover:
Two dynamic-import call sites loaded a runtime-computed URL and tagged it with
/* webpackIgnore: true */, the CRA/Webpack magic comment that opted out of static analysis. Vite doesn't recognise it, so it defaults to "can't analyse" and warns on every dev rebuild (plus wastes cycles trying to pre-bundle a spec it can't resolve).Fix: replace
/* webpackIgnore: true */with/* @vite-ignore */(Vite's equivalent). Runtime behaviour is unchanged — plugins still load fine.Sites fixed:
react/src/components/PluginLoader.tsx: page-plugin loader for paths under/dist/plugins/*.jsreact/src/components/LoginView.tsx: login-plugin loader that pulls from../../../src/plugins/<name>Verification
grep -r 'webpackIgnore' react/src→ zero value-level hits; only comments that explain the renamevite:devno longer warns about un-analysable dynamic imports from these filesStack
Top of the stack. This is the final fix bundled from end-to-end verification; reviewing this PR gives a good summary of the whole Vite migration series (the "Stack" section above in the PR lists all 11 PRs in order).