feat(ui): expose full overlay IP on Status page
The /api/v1/admin endpoint only returns the /64 subnet. Users were
copy-pasting the subnet straight into Compose Message and getting
HTTP 422 from the daemon (\"invalid IP address syntax\"). The full
host part (lower 64 bits) is logged once at boot:
INFO mycelium: Node overlay IP: 43d:956e:7877:d933:eecc:b305:21ff:77f9
Capture it from stdout, surface as a new daemonStatus.overlayIp
field, and render it on Status above the subnet card with the hint
\"use this when sending messages\".
The line carries ANSI colour escapes from tracing's compact format,
so push_log strips SGR sequences before scanning. Hand-rolled to
avoid pulling a regex crate.
Also rebuilds the .deb release artifact.
This commit is contained in:
@@ -7,6 +7,8 @@ export interface DaemonStatus {
|
||||
apiUrl: string | null;
|
||||
keyPath: string | null;
|
||||
configPath: string | null;
|
||||
/** Full overlay IPv6 (e.g. `43d:956e:7877:d933:eecc:b305:21ff:77f9`). */
|
||||
overlayIp: string | null;
|
||||
}
|
||||
|
||||
export interface NodeInfo {
|
||||
|
||||
@@ -19,7 +19,13 @@ export const useNodeStore = defineStore("node", () => {
|
||||
exitedUnlisten = await on<number>(Events.SidecarExited, (e) => {
|
||||
error.value = `daemon exited (code ${e.payload})`;
|
||||
phase.value = "error";
|
||||
status.value = { running: false, apiUrl: null, keyPath: null, configPath: null };
|
||||
status.value = {
|
||||
running: false,
|
||||
apiUrl: null,
|
||||
keyPath: null,
|
||||
configPath: null,
|
||||
overlayIp: null,
|
||||
};
|
||||
info.value = null;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -23,6 +23,13 @@ async function copy(field: string, value: string) {
|
||||
|
||||
<template>
|
||||
<div v-if="info" class="max-w-3xl space-y-4">
|
||||
<InfoCard
|
||||
v-if="status?.overlayIp"
|
||||
label="Overlay IP — use this when sending messages"
|
||||
:value="status.overlayIp"
|
||||
:copied="copiedField === 'ip'"
|
||||
@copy="copy('ip', status.overlayIp!)"
|
||||
/>
|
||||
<InfoCard
|
||||
label="Overlay subnet"
|
||||
:value="info.nodeSubnet"
|
||||
|
||||
Reference in New Issue
Block a user