Skip to content

feat: show compilation errors in the Vite dev overlay - #806

Merged
samuelstroschein merged 2 commits into
opral:mainfrom
everton-dgn:feat/vite-dev-error-overlay
Oct 13, 2026
Merged

samuelstroschein merged 2 commits into
opral:mainfrom
everton-dgn:feat/vite-dev-error-overlay

Conversation

@everton-dgn

Copy link
Copy Markdown
Contributor

Start Vite with a valid Paraglide project, then replace project.inlang/settings.json with {. The compiler logs an error, but the browser keeps showing the last generated output without an overlay.

The Vite plugin now shows compilation and config errors in the development overlay and sends pending diagnostics to new tabs and reconnecting clients. It retains errors raised before any browser connects, so older Vite versions cannot replay an obsolete buffered error. The listener survives restarts that reuse an inline plugin.

Input edits retry an invalid config before recompiling, so generated HMR does not dismiss the pending config error. Once compilation and config loading recover, the plugin requests a page reload. Recovering from an invalid config may not write any generated files, so no file update triggers HMR. The reload drops client state and can occur alongside Vite's own file updates. Requests continue to be served during a failure, and production error handling stays unchanged.

Based on main. The source changes combine cleanly with #794 at e0cf6b9; the combined plugin and translation-check suites pass all 59 tests.

Validation:

  • pnpm run ci passed with Node 22.23.3 and pnpm 10.23.0 on macOS. It built the package, all four framework packages, the nine workspace examples and the website. Tests passed: 621 in the package, 18 in frameworks, 12 in examples and 21 in the website; five package tests were skipped.
  • The patch also applies cleanly to main at f0f4be8. All 32 plugin tests and the typecheck passed on that combination.
  • Typecheck and formatting checks for the changed files passed. Repository-wide formatting reports eight existing files, reproduced on main without this patch. Oxlint exits successfully with four warnings also present on main.

The overlay regressions failed before the fixes. The WebSocket tests use Node 22+, matching CI. Ubuntu execution and browser rendering were not tested locally.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T22:58:43.786960Z 32b54a8 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 32b54a8e9e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/bundler-plugins/unplugin.ts
@samuelstroschein
samuelstroschein merged commit cce784a into opral:main Oct 13, 2026
1 check 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