Notechondria
Version: 0.1.62 Build Date: 2026-04-22T23:55
What's Changed
Ping command in debug log terminal + backend ping endpoint
-
Added a
pingcommand to the sharedDebugLogCardterminal. Typingpingin the nchron-shell issues a GET to a new backend/api/v1/ping/endpoint and prints the round-trip latency plus the service identifier:$ / ping pinging backend... pong: 48ms — pong from notechondria-backend
Backend
-
New
notechondria.api_views.pingview —@require_GET, returns{pong: true, service: "notechondria-backend", timestamp: ISO}. Small payload by design; the frontend only needspongandtimestampto prove the path is live. -
URL wired at
/api/v1/ping/innotechondria/api_urls.py. -
New
notechondria/tests.pywithPingEndpointTests(200pong=true, GET-only) and a freshHandshakeEndpointTestscovering the existing/handshake/contract. Neither endpoint had test coverage before.
Frontend (shared)
-
PingResultvalue object (ok/latencyMs/detail) exported fromnotechondria_shared. -
DebugLogCard.onPingcallback (optionalFuture<PingResult> Function()); when null the command prints "no backend ping handler wired on this host". -
_handlePingstate method shows "pinging backend…" then renders the result line. -
New
pingBackend(String? apiBaseUrl)helper innotechondria_shared/lib/src/utils/ping_backend.dart— lightweighthttp.getwith a 10-second timeout, returnsPingResult(ok=falseon non-200, timeout, malformed JSON). -
Terminal welcome banner +
helptext updated to mention ping.
Per-app wiring
-
editor_app / planner_app / portal_app settings
DebugLogCardcallers all passonPing: () => pingBackend(widget.apiBaseUrl). No per-app divergence — the helper is shared.
Files Changed
backend/notechondria/api_views.py— newpingview.backend/notechondria/api_urls.py— wires/api/v1/ping/.backend/notechondria/tests.py(new) —PingEndpointTests+HandshakeEndpointTests.frontend/notechondria_shared/lib/src/components/debug_log.dart—PingResult,DebugLogCard.onPing,_handlePing,pingcase in_runCommand.frontend/notechondria_shared/lib/src/utils/ping_backend.dart(new).frontend/notechondria_shared/lib/notechondria_shared.dart— exports.frontend/editor_app/lib/modules/settings_build.dart—onPing: () => pingBackend(widget.apiBaseUrl).frontend/planner_app/lib/modules/settings.dart— same.frontend/portal_app/lib/modules/settings.dart— same.
Notes
- Backend tests not run locally during the round (no venv on the
dev machine). The view is a trivial mirror of the existing
handshakeview, so the test added in this round is review- level coverage; full validation happens in CI.