From 4c430fddffe4b28c4269c097d8b2e0d3bc86e057 Mon Sep 17 00:00:00 2001 From: archipelago Date: Sun, 9 Aug 2026 07:59:33 -0400 Subject: [PATCH] =?UTF-8?q?fix(types):=20tor-running=20is=20optional=20?= =?UTF-8?q?=E2=80=94=20older=20daemons=20don't=20send=20it?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The full project build (vue-tsc -b, which also checks test files) caught two default-ServerInfo constructors the scoped typecheck missed. Rather than adding the field to both, the type now tells the truth for a mixed-version fleet: daemons older than 2026-08-09 omit the field, so consumers must treat absent as "unknown" and only === true as connected — which is exactly how Home.vue already reads it. Co-Authored-By: Claude Fable 5 --- neode-ui/src/types/api.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/neode-ui/src/types/api.ts b/neode-ui/src/types/api.ts index 0d5db132..57c0ff3f 100644 --- a/neode-ui/src/types/api.ts +++ b/neode-ui/src/types/api.ts @@ -26,8 +26,10 @@ export interface ServerInfo { 'lan-address': string | null 'tor-address': string | null /** Live probe of the Tor daemon. NOT the same as `tor-address`, which is read - * from the hidden-service hostname file and outlives a dead daemon. */ - 'tor-running': boolean + * from the hidden-service hostname file and outlives a dead daemon. + * Optional because daemons older than 2026-08-09 do not send it — consumers + * must treat absent as "unknown", and only `=== true` as connected. */ + 'tor-running'?: boolean 'node-address'?: string unread: number 'wifi-ssids': string[]