Release/Installer api fixes#54
Merged
Merged
Conversation
All 8 service files used a module-level VITE_API_BASE_URL constant (build-time). In the installed Tauri app that env var is undefined, so every fetch fell back to http://localhost:5436 where no API runs. Tauri lib.rs already injected window.__BIKE_API_URL__ via window.eval() but nothing read it. Changes: - Add api-config.ts with lazy getApiBaseUrl() that checks window.__BIKE_API_URL__ first, then VITE_API_BASE_URL, then 5436 - Update all 8 service files to call getApiBaseUrl() per request (lazy evaluation also avoids any eval() timing races) - Widen CSP from localhost:5079 to localhost:* so any configured API port works Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
getByText(/total expenses/i) and getByText(/oil change savings/i)
matched both the label <span> and its parent <div> row, causing
'multiple elements found' errors.
Add { selector: 'span' } to target only the label spans.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
api-config.test.ts — 6 Vitest unit tests verifying: - window.__BIKE_API_URL__ wins over VITE_API_BASE_URL (Tauri injection) - trailing slash stripped - falls back to VITE_API_BASE_URL when Tauri not present - falls back to localhost:5436 as hard default - supports custom host from app.conf.json release.yml — new smoke-test-api job (parallel with package-*): - dotnet publish API self-contained - start on localhost:5436 - poll /health up to 30s - fail release if API doesn't start publish-release now requires smoke-test-api to pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
No description provided.