Repository navigation
Closed
Labels
Description
What
Establish a faithful, backend-connected dev loop for the FiberPath GUI so the UI can be developed and QA'd against real compute (toolpath previews, plan/validate), not a backendless browser shell.
Why
Today there is no good dev loop for current code:
npm run dev(Vite browser build,:5173) has no backend. The FastAPI sidecar binds a random127.0.0.1port and reports it to the Rust shell; the frontend learns it viainvoke("api_base_url")(src/lib/apiClient.ts), which doesn't exist in a plain browser. Result: "CLI Backend Unavailable", no previews,Failed to list ports.- The prebuilt
src-tauri/target/release/fiberpath_guibinary embeds a staledist— it shows a different, older UI ("Main/Stream") than current source ("Prepare/Machine"), so it's misleading for QA (cf. the stale-installer gotcha, Release packaging attaches stale prior-version installers to new releases #120). npm run tauri devdoes give the real backend ("Backend: Ready", real previews) but isn't documented as the canonical loop, and its native window needsscrot/xdotoolto screenshot in headless/agent contexts.
Where
fiberpath_gui/src/lib/apiClient.ts,src/lib/commands.ts,src/api/client.tsfiberpath_gui/src-tauri/src/api_sidecar.rs,api_path.rs,main.rsfiberpath_gui/vite.config.ts,package.json,README.md
Approach (negotiable)
Pick the minimal path that yields a backed dev loop:
- Primary: make
npm run tauri devthe documented canonical dev loop (real shell + sidecar + HMR); README + AGENTS note. - Optional (nicer inner loop): a dev-only browser shim so
npm run devcan reach a standalone sidecar — start the sidecar on a known port and providewindow.__TAURI__invoke("api_base_url"/"check_cli_health")stubs in dev, so the browser build gets real previews and is Chrome-drivable. Keep it dev-only; do not ship. - Make the "backendless" state obviously a dev condition, not a scary error.
Acceptance criteria
- A single documented command brings up the GUI with a working backend (real preview renders; health shows ready).
- README/AGENTS document the dev workflow and explicitly warn that the prebuilt
releasebinary may be stale. - (If shim chosen)
npm run devin a browser can generate a real preview against a local sidecar. - No silent "looks broken" backendless preview without an explanatory dev hint.
Activity
feat(gui): make backend-less browser dev a clear preview state