Repository navigation
feat(gui): clear browser-preview state + documented backed dev loop - #240
Merged
Merged
Conversation
The GUI bootstraps its backend through the Tauri bridge (api_base_url / check_cli_health), so a plain-browser `npm run dev` has no backend. Previously that surfaced as an alarming "CLI Backend Unavailable" error. Add an isTauri() helper and short-circuit the health check when no Tauri runtime is present: mark it a browser preview, skip the pointless 30s polling, and show a calm "Browser preview" info banner + status (pointing at `npm run tauri dev`). Document the canonical backed dev loop (`npm run tauri dev`) in the README and development.md, and warn that the prebuilt release binary can embed a stale frontend and shouldn't be used for QA. Refs #233
5 tasks
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.
Closes #233. Part of the GUI redesign + dev-workflow epic #238.
Problem
The GUI bootstraps its backend through the Tauri bridge (
invoke("api_base_url")/check_cli_health), so a plain-browsernpm run dev(:5173) has no backend — and it surfaced as an alarming "CLI Backend Unavailable" error, which made the dev preview look broken. There was also no documented, faithful backed dev loop, and the prebuiltreleasebinary embeds a stale frontend.Changes
isTauri()(src/lib/tauri.ts) and short-circuit the health check when there's no Tauri runtime: mark it a browser preview, skip the pointless 30s polling, and surface a calm info banner ("Browser preview — runnpm run tauri dev…") + status-bar text instead of an error.npm run tauri dev) inREADME.mdanddocs/development.md, and warn that the prebuiltreleasebinary can be stale and shouldn't be used for QA.Verification
lint:css,lint:css:vars,check:svelte(0 errors),tsc, 316/316 vitest (added a browser-preview test) all green.npm run devnow shows the calm "Browser preview" banner + status;npm run tauri devshows CLI: Ready with a working backend.Refs #233