Files
vorotamoroz cf527fbf86 feat: show P2P diagnostics in the status pane and log
Show expandable relay, peer, and sync observations below Stats and route Diag
events to the existing Log Pane without notification or editor-status churn.
Retain departed-peer evidence and replay logs recorded before the pane opens.

Keep narrow panes usable with wrapping peer controls, readable device names,
and larger buttons. Add browser regressions for disclosure, control bounds,
button targets, and existing actions.
2026-11-06 12:17:31 +00:00

16 lines
843 B
TypeScript

import { mount, unmount } from "svelte";
import LogPane from "../../../src/modules/features/Log/LogPane.svelte";
import { logMessages } from "@vrtmrz/livesync-commonlib/compat/mock_and_interop/stores";
import { setGlobalLogFunction } from "octagonal-wheels/common/logger";
// Simulate ordinary INFO messages being hidden while a prior diagnostic is visible.
setGlobalLogFunction(() => undefined);
logMessages.value = ["[P2P Diag] Earlier connection failure"];
const component = mount(LogPane, { target: document.querySelector("#app")!, props: { close: () => undefined } });
document.querySelector<HTMLButtonElement>("#append")!.onclick = () => {
logMessages.value = [...logMessages.value, "[P2P Diag] Later connection recovery"];
};
document.querySelector<HTMLButtonElement>("#unmount")!.onclick = () => {
void unmount(component);
};