GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||
GeezerVison is showing github.com — mcpx: a web frontend served by the daemon, without a second build system · Issue #1882 · developing-today/code Closed Labels DescriptionRelocated from dezren39/darwin-nix#86 on 2026-10-28 (placement audit): mcpx's single source lives in developing-today/code (pkgs/mcpx); re-home tracked at #309. Original body below; issue references inside it are historical (dezren39/nix numbering). Parent: #174 SummaryA browser view of a running daemon. The daemon is already a web server — HTTP over a unix socket and Original notes
Current state (what mcpx does today, with file refs)
|
| decision | choice | why |
|---|---|---|
| where | the daemon's existing listener, at /ui/ |
a second listener is a second lifetime, a second address and a second thing to leak; the daemon's idle-exit and reload already work |
| enabling | one setting, daemon.ui (bool, scope daemon, default off) |
matches how every other capability is exposed (internal/settings/); off by default so a daemon on daemon.address=0.0.0.0 does not silently gain a UI |
| overriding | daemon.uiDir (string, default empty) serves a directory instead of the embedded assets |
the escape hatch that makes A unnecessary: anyone who wants a React SPA builds it wherever they like and points the daemon at dist/. Also the dev loop — edit, reload, no rebuild |
| data | /v1 + /v1/events only, no UI-specific endpoints |
the parity rule (docs/parity.md) is CLI = /v1 = MCP = plugin; a /ui/api prefix would be a fifth surface that drifts |
| scope v1 | the TUI's six views, read-only, plus answering elicitations | elicitation is the one thing a browser is better at than the terminal — a form with a schema beats a prompt — and /v1/elicit/{id}/{action} already exists |
| idle | apply #87's lifetime rule (#181 collision 9): activity on any surface renews the daemon's idle deadline, and nothing else does | today an open /v1/events stream counts only when it connects, so daemon.idleExit can kill the daemon under an open tab. Whether a delivering stream counts as activity is decided once, in #87, for this surface and ssh (#85) together -- not here |
Why this beats A: the cost that kills A is the toolchain, not the UI, and a no-build frontend has no
toolchain. Why it beats B: B's contract work is a prerequisite of C, not an alternative — building the
embedded UI against /v1 is the thing that proves the OpenAPI document is usable, and C ends with B's
deliverable plus a working dashboard.
The real risk of C is scope creep: without a framework, view number seven is where hand-written DOM code
starts hurting. Mitigate by fixing the scope at "the TUI's views, plus elicitation forms" and treating
anything beyond that as a reason to reach for daemon.uiDir and an external project. If the UI outgrows
no-build, daemon.uiDir means moving it out is a configuration change rather than a rewrite.
One more reason to prefer the embedded route: it makes the remote story work end to end. With the ssh
endpoint scheme in the sibling issue, ssh -L 7777:... plus http://127.0.0.1:7777/ui/ is a remote
dashboard with nothing installed locally — which is most of what the "ssh tui" want is actually asking for.
/ui/ or /? Serving at / risks a future /v1-adjacent path colliding and makes a 404 ambiguous/ui/ with a redirect from / is probably right.restart, shutdown, servers_remove) are marked Admin/Destructive in the ops tableinternal/api/ops.go:451-466, internal/api/ops_settings.go:111), and a browser is exactly where a.lootbox/ui deleted, kept as a reference, or given a CI build? build(deps): bump build/buck/preludes/buck2-prelude from d956689 to 3cfc766 #49 owns the decision; this issue's/v1/openapi.json currently generate clean with openapi-typescript? Cheap to check, informs bothEventSource are universal, but import maps and <template>-basedEase: S to serve a directory and add the settings; M for the embedded read-only frontend covering
the TUI's six views; L if a bundled SPA (A) is chosen. Impact: med — high for demos, remote
machines and anyone who will not open a terminal; low for the existing CLI-first user.
Depends on / related: #49 (.lootbox/ui has no build check and may be deleted; any new build stage
needs CI), #76 (CLI parity — a UI makes /v1-only operations visible to more people), #77 (protocol
follow-ups: inline answers and task status are what a live dashboard would want), #87 (owns the lifetime
rule this issue applies, collision 9; also touch-on-read for the elicitations the UI answers), #85 (a
forwarded port plus /ui/ is the remote dashboard), #88 (the forwarded port needs a knowable socket path),
#52 (closed, fixed in #182).
Security/auth deferred; see tracker.
History carried over from dezren39/darwin-nix#86 (verbatim, oldest first):
@dezren39 · 2026-09-30T07:21:34Z
Integration pass. Placed in the DAG rooted at #181.
d956689 to fd4ce63 #88@dezren39 · 2026-09-30T07:28:15Z
Integration pass -- cross-theme collision. Surfaced only when the themes were put side by side; the authors of these issues could not see each other's work. Recorded at the root in #181.
A browser tab versus daemon.idleExit (#86), leftover ssh ControlMaster processes (#85), and leaked e2e daemons (#52) are the same class of problem: who ends a session nobody explicitly closed. #86 says "decide deliberately" about its own case. Decide it once for all three.
Also on: #85 #52. Nobody currently owns this.
@dezren39 · 2026-09-30T11:05:52Z
Collision ownership (issues pass, 2026-09-30, at 05c78b2). #181 listed these cross-theme collisions with no owner. Each now has one:
| #181 row | Collision | Owner | What the owner decides |
|---|---|---|---|
| 9 | one lifetime question on three surfaces (browser tab vs daemon.idleExit, ssh ControlMaster, leaked e2e daemons) |
#87 | #87's touch-on-read convention is the lifetime rule: activity on any surface renews the daemon's idle deadline, and nothing else does. #85 and #86 apply it. The e2e case is closed: #182 fixed #52 (stop --all via info files, MCPX_AUTOSTART_IDLE_EXIT=60s). |
Where this issue is the owner, the decision is made here; where it is not, it adopts the owner's decision rather than making its own.
@dezren39 · 2026-09-30T12:12:16Z
Issues pass (2026-09-30, at 05c78b2).
Parent: #174. The "idle" row of the Approach C table now applies chore(deps): bump actions/setup-go from 4 to 5 #87's lifetime rule (Phase 3: sync, blob gate, and relays #181 collision 9) instead of deciding it here. Added the fact that an open /v1/events stream counts only when it connects (internal/daemon/server.go:344-353)./v1/events honours Last-Event-ID and sends an in-band event: gap (server.go:797-842).d956689 to e7457f6 #52 as the reason against a second listener, since chore(deps): bump build/buck/preludes/buck2-prelude from d956689 to e7457f6 #52 is closed (fixed in Phase 5: tag event bodies must travel with the event #182). The lifetime argument now points at chore(deps): bump actions/setup-go from 4 to 5 #87. Related adds chore(deps): bump openssl from 0.10.54 to 0.10.60 in /sources/pavex/examples/realworld #85, chore(deps): bump actions/setup-go from 4 to 5 #87 and chore(deps): bump build/buck/preludes/buck2-prelude from d956689 to fd4ce63 #88.registry.go:343-375, tui.go:41-51, data.go:19-28, package.nix:36-53, ops.go:451-466 + ops_settings.go:111. Added the design label.@dezren39 · 2026-10-28T21:09:48Z
Triage verdict — partially implemented in the new home; remainder confirmed, not closeable as done.
Verified against current main (2026-10-28):
dezren39/nix@8c42c2c, origin/main) has no mcpx Go source — pkgs/mcpx/ deleted 2026-10-19 (lab-ops-hub container crawler accepts inet_aton IPv4 spellings (127.1, 2130706433, 0x7f.1) — loopback SSRF bypass in validate_crawl_url #468, planning/plans/mcpx-extraction.md steps 4–5); mcpx lives solely in developing-today/code at pkgs/mcpx/.developing-today/code@528886e): the core of Approach C. A zero-build, dependency-free single-page frontend: pkgs/mcpx/internal/dashboard/dashboard.go embeds one 20 KB dashboard.html via //go:embed and the daemon serves it — mux.HandleFunc("GET /dashboard", …) and GET /v1/dashboard at pkgs/mcpx/internal/daemon/server.go:642-643, handler in routes_dashboard.go, an ops-table entry ("Live web dashboard HTML", internal/api/ops.go:594), a mcpx dashboard CLI command, and a handler test (routes_dashboard_test.go). Its data is /v1-only (/v1/status, /v1/metrics/tokens, /v1/metrics/tools, /v1/search, /v1/feedback, /v1/interactions), as Approach C requires. No second build system was added.git grep "daemon.ui|uiDir" pkgs/mcpx at code HEAD returns nothing — there is no daemon.ui default-off setting and no daemon.uiDir directory escape hatch (both are explicit Approach C decisions); the route is /dashboard, not the proposed /ui/; and the page's scope is pools + token/tool metrics telemetry, not the TUI's six views (browse/log/stats/servers/sessions/storage) read-only plus elicitation forms.Route: no small_fix packet in the nix queue, and do not close this issue as fixed — the shipped dashboard satisfies the "serve a zero-build embedded UI" headline but not the setting/gating, escape-hatch, or six-view scope decisions. Keep open here until code#309 re-files the remainder in developing-today/code, then close here with that link (crediting the dashboard that already shipped).
agent-note:v1 · agent: repo-queue-worker-shift-nix (lane A) · task 2084 · kind: triage · outcome: partially implemented in code (embedded dashboard at /dashboard), remainder (daemon.ui/uiDir, six views + elicitation) confirmed open; routed to #309; no nix follow-up packet
🤖 Agent note · picked up
🤖 Agent note · done
42796be5; rescope the restThe issue's Current State (written against the nix-era tree) says "nothing serves static content — there is no http.FileServer and no / handler", and Approach C recommends a zero-build frontend go:embeded into the binary. That mechanism now exists at HEAD:
pkgs/mcpx/internal/dashboard/dashboard.go — //go:embed dashboard.html, a "web dashboard UI" handler; the page is a ~20 KB single-file app titled "mcpx Dashboard" (metrics-centric: Tokens / Tools / Metrics, some servers/sessions).pkgs/mcpx/internal/daemon/routes_dashboard.go — serves it at /dashboard, alongside metrics handlers.pkgs/mcpx/internal/cli/dashboard.go — mcpx dashboard [--open] ensures the daemon and prints/opens the /dashboard URL.http.FileServer exists under pkgs/mcpx outside e2e tests — the embedded route is the only static serving, in the exact no-second-build-system shape the issue prescribes.What remains unbuilt (the rescoped scope):
internal/settings/registry.go daemon.* entries are reapInterval / saveInterval / port / endpoint / address / inline / autostart — daemon.ui has zero hits in repo code. The dashboard is always served; the issue's "off by default so a daemon bound beyond loopback does not silently gain a UI" decision was never taken.daemon.uiDir escape hatch — an external directory cannot replace the embedded assets (the dev loop / external-SPA path)./ui/ vs / question is settled by the existing /dashboard route — keep it.Dedupe — no duplicate issue. Searches for "web frontend", daemon.ui, uiDir return only #1882 itself and the surfaces tracker #1887 (ssh + browser surfaces parent). #1876 (docs runnable example) is a different surface — it consumes the daemon from the docs site and its stage-3 local mode will want the CORS/port decisions noted there, not this UI.
Follow-up enqueued: queue task 3115 (small_fix, dedupe repo-health:v1:fix:developing-today/code:issue:1882), rescoped to the three gaps above — daemon.ui gating (default to be settled deliberately on the PR, weighing the issue's loopback argument against today's always-on mcpx dashboard behaviour), daemon.uiDir override, and extending the embedded zero-build page to the six TUI views + elicitation, /v1-only. It explicitly excludes rebuilding the frontend or any bundled SPA.
🤖 Agent note · picked up
6450ea72); this shift resumes at the recorded checkpoint: extend the embedded dashboard.html to the TUI's six views (browse/log/stats/servers/sessions/storage, read-only) plus elicitation answering via the existing /v1/elicit endpoints, data strictly via /v1 + /v1/events.🤖 Agent note · parked
0af8d077 — embedded dashboard now carries the six TUI views (read-only, /v1 only) plus elicitation answering; laptop go test ./internal/daemon/ ./internal/dashboard/ PASS and the page script passes node --check. Detail comment is on PR feat(mcpx): daemon.ui gating and daemon.uiDir override for /dashboard (#1882) #2521.0af8d077 still QUEUED after ~5 minutes of polling (repo-wide runner backlog; the required basic: proxy port fallbacks check has not started).0af8d077 (with the 2 pre-existing main reds in internal/defaults/internal/settings discounted, as on PR docs(mcpx): level-1 pages — overview, install, quick start, now-what (#1878) #2502), read any new Codex findings on the new commit and disposition them, then merge PR feat(mcpx): daemon.ui gating and daemon.uiDir override for /dashboard (#1882) #2521, complete task 3115 as fixed_merged, and close mcpx: a web frontend served by the daemon, without a second build system #1882.Merge pull request #2521 from developing-today/queue/3115-1882-daemon-ui
🤖 Agent note · done — merged
awaiting_ci, completed fixed_mergedmain as 7d49db36a7715fa3334f52ac7ed152663f246720 at 2026-10-30T04:30:58Z (head 0af8d077); verified as an ancestor of origin/main (674c4c6a) at close time.internal/daemon/routes_dashboard.go (+97) serves the dashboard behind the daemon.ui setting with a daemon.uiDir override; internal/dashboard/dashboard.html (+345) is the embedded page (no second build system); internal/settings/registry.go (+26) declares the two settings; server.go wires the route; routes_dashboard_test.go (+158) covers the gating, the override and the TUI-view/elicitation coverage; docs/configuration.md documents both keys.gh pr merge put it through the main merge queue and it landed; the PR-head rollup still showed the three basic jobs as QUEUED at the moment I read it, i.e. the queue accepted on its own merge-group validation rather than a completed PR-head run. No held / user/owned / do-not-merge labels.