feat(frontend): post collected samples to /api/v1/reports (closes #53)
check / check (push) Successful in 9s
check / check (push) Successful in 9s
A Reporter beside AppState POSTs a JSON delta report of each host's unreported, non-paused samples to the same-origin /api/v1/reports every reportInterval (default 60s). buildReport is an exported pure function of host state; init() runs only when #app exists, so a test can import it. Per-host marks advance only on a delivered POST and never move backwards; only one POST is in flight, abandoned after half the interval, so a slow backend cannot cause re-sent samples. Failure is quiet and never blocks probing. The client id falls back to crypto.getRandomValues where crypto.randomUUID is missing (plain HTTP to a non-localhost host). vite.config.js proxies /api to 127.0.0.1:8080 for yarn dev. Model: opus-5-5
This commit is contained in:
@@ -7,6 +7,13 @@ const commitFull = execSync("git rev-parse HEAD").toString().trim();
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [tailwindcss()],
|
||||
server: {
|
||||
// Proxy /api to a locally running netwatch-server so `yarn dev`
|
||||
// exercises the real report-posting path.
|
||||
proxy: {
|
||||
"/api": "http://127.0.0.1:8080",
|
||||
},
|
||||
},
|
||||
define: {
|
||||
__COMMIT_HASH__: JSON.stringify(commitHash),
|
||||
__COMMIT_FULL__: JSON.stringify(commitFull),
|
||||
|
||||
Reference in New Issue
Block a user