Dawnline 0.4.2
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/
This commit is contained in:
Aemeath committed 2026-10-16 03:52:21 +03:00
1 parent 6444722d14
commit 29b1d7dfd7
26 files changed
+419 -104

No files matched your search

+11 -6
View File
@@ -20,6 +20,7 @@ import { eventBy } from './events/model';
import { spark } from './widgets/spark';
import { clearLogDialog, exportEvents, resetUsageDialog } from './logs';
import { coreFor, coreOf, type Core } from './cores';
import { onLiveChange } from './state/live';
/** What the page that opens a device hands over. */
export interface DeviceOpts {
@@ -347,13 +348,17 @@ export async function openDevice(person: Person, dev: Device, o: DeviceOpts) {
setUp ? [stats, connectSec, detailsSec, activitySec] : [stats, detailsSec, activitySec, connectSec],
);
void loadLog();
// Live status every 8 s. The log follows the page's events, or is fetched every 32 s on its own.
let ticks = 0;
const watch = window.setInterval(() => {
// Live status and log: at once when something happens (state/live.ts), and every 30 s anyway.
const live = () => {
void reload();
if (o.events || ++ticks % 4 === 0) void loadLog();
}, 8000);
const handle = drawer(titleEl, body, foot, () => clearInterval(watch));
void loadLog();
};
const off = onLiveChange(live);
const watch = window.setInterval(live, 30000);
const handle = drawer(titleEl, body, foot, () => {
clearInterval(watch);
off();
});
paint();
}