Build packages / Version (push) Waiting to run
- Connections show up at once: the agent looks at the tunnels every second and, the moment a device connects or roams, writes it to the activity log, updates traffic and the map, and locates the new address - A device counts as gone when its WireGuard session expires (1-3 min after it leaves), so a phone asleep no longer flaps between disconnect and connect - The admin pages follow along within seconds: Overview, People, the person page and the device panel refresh when something happens, with a light check every 2 s instead of reloading everything every 10 s - The personal portal no longer refreshes itself in the background: every request costs the router a CGI process, so it loads once and after the visitor's own changes - Agent guidance and code standards (backend, frontend, shell, UI) now live in the repository: AGENTS.md and rules/
1.7 KiB
1.7 KiB
Frontend (TypeScript: admin UI and portal)
Read with code-standards.md and, for anything visible, ui-design.md.
Code
- Strict TS, no
anywithout a comment; types for RPC answers live inshared/types.ts/admin/api.tsand mirror the backend's shapes. - Layout of
web/src/admin:ui/generic components (button, menu, modal, drawer, tooltip, toast, controls),widgets/composite house widgets,state/polling and scoping,events/the activity vocabulary (model without DOM, render separate),updater/the Components data layer,cores/per-protocol bits,pages/<page>/one folder per page split by section,styles/*.cssone file per feature joined instyles/index.ts. Shared with the portal:src/shared/. - Pages build from
ui/andwidgets/; a page never defines a generic component. Logic that does not touch the DOM (formatting, models, CSV, sorting) lives outside the render code and gets tests.
Live data
- Admin pages use
createPoller(state/poller.ts): newest answer wins, no repaint of a region that holds focus, every RPC failure shows a toast or an inline error, never a blank section. - Changes reach open pages through the revision (
state/live.ts): one smallrevcall every 2 s while the page is visible; pollers that opt in (live: true) refresh when it moves. Their owneverystays as a slow fallback. - The portal does not poll (each request is a CGI process on the router, see
backend.md): it loads once, after the visitor's own changes, and while it waits for a new device's first connection.
Checks
- In
web/:npm run format:check,npm run typecheck,npm test,npm run build; the rebuilt bundles underpackage/are committed (CI fails otherwise).