mirror of
https://github.com/feder-cr/Jobs_Applier_AI_Agent.git
synced 2026-11-07 02:35:57 -10:00
S13, the Home setup checklist and S15, with the end-to-end tests of each. What: a Settings page in the rail (/settings) with the host checks (the doctor's report and the control plane's own answer, each failing row with its command and a button that copies it, checked again on request and when the person returns to the window while something is missing), the OpenRouter key (a write-only field over PUT /api/secrets/openrouter; whether a key is stored comes from the health answer; the answer says how many running Dots were given it), the theme, Sign out and About. Home with no Dot shows the same checklist under the invitation while the host is not ready, with the key field when no key is stored, and keeps it on the page turned green once the last thing is done. The login page is restyled as a card (no rail, no API calls, token field focused). The rail's missing-key line links to Settings. One owner each: useHostChecks is the one list that the Settings page, the Home checklist and the create form's preflight draw (CheckList and its Section replace the panel's own markup); the health answer moved into the shell's shared data, so a saved key reaches the rail at once instead of at its next 30 second poll; CopyButton is the one copy-to-clipboard button (the code block of the markdown renderer uses it too, same behavior and tests). The About card needed what no route told the web: GET /api/health now also answers database_kind, data_dir and logs_dir (HostFacts in packages/shared, read by startServer from the paths and the database it opened, a required buildServer option). No other host change; the design's 'logs directory' is that, and a Dot's own logs are read with 'invisible-dots logs <dot>', which the card shows. Nothing is faked: no data is shown that a route did not answer. The doctor's own key row stays out of the lists (the key is one fact, read from health). Gaps left open on purpose: none for W3. The check that setup commands were run is a re-check, not a launcher, because setup needs an elevated terminal and an image build runs for minutes (design S13). Tests: apps/web vitest +34 (host-settings 4, preflight 3, shell 3, settings 13, Home checklist 5, login form 6), playwright +8 (settings.spec.ts, a second harness without a key for the first-run host), API health test now pins the exact answer and start.test pins the real paths. Removed tests: none. Floors raised: vitest linux 1542 to 1576, win32 1545 to 1579; playwright 33 to 41 on both. No floor lowered. Suites: npm run typecheck, npx vitest run (117 files, 1579 passed), apps/web playwright (41 passed), next build, go test ./... in guest/dot-agentd. The engine suite and the smoke were not run: no engine, guest or image file changed.
9 lines
318 B
TypeScript
9 lines
318 B
TypeScript
import type { HostFacts } from "@invisible-dots/sdk/types";
|
|
|
|
/** Where a fake host keeps its state, as `GET /api/health` is to say it. */
|
|
export const hostFacts = (kind: HostFacts["database_kind"] = "pglite"): HostFacts => ({
|
|
database_kind: kind,
|
|
data_dir: "/srv/dots-home",
|
|
logs_dir: "/srv/dots-home/logs",
|
|
});
|