Skip to content

Claude/monitoring dashboard worker tt4 x7#88

Merged
maximusunc merged 2 commits into
mainfrom
claude/monitoring-dashboard-worker-Tt4X7
May 18, 2026
Merged

Claude/monitoring dashboard worker tt4 x7#88
maximusunc merged 2 commits into
mainfrom
claude/monitoring-dashboard-worker-Tt4X7

Conversation

@maximusunc
Copy link
Copy Markdown
Collaborator

No description provided.

claude and others added 2 commits May 18, 2026 14:26
Adds path-prefix support so the dashboard can be served at
``/monitor/`` on the same host as the main API, with no separate TLS
cert. Local docker compose keeps working unchanged because the new
``MONITOR_ROOT_PATH`` env var defaults to empty.

Mechanics:

* ``MONITOR_ROOT_PATH=/monitor`` (set by the ingress deployment) is
  passed to ``FastAPI(root_path=...)`` and ``uvicorn.run(root_path=...)``
  so self-referential URLs (OpenAPI, redirects) point at the public
  prefix.
* The two HTML pages are now templated: ``index()`` and
  ``history_page()`` substitute ``{{BASE_HREF}}`` into a cached read,
  emitting ``<base href="/monitor/">`` in production or ``<base
  href="/">`` locally. All other URLs in the HTML and JS were
  switched from absolute (``/static/style.css``, ``/api/snapshot``,
  ``/ws``) to relative (``static/style.css``, ``api/snapshot``), so
  the browser resolves them against ``document.baseURI``.
* The websocket URL is built from ``document.baseURI`` -- protocol
  flipped to ``ws``/``wss``, path becomes ``${baseURI.pathname}ws`` --
  so ``/monitor/ws`` resolves correctly under a prefix.

The ingress must still strip the prefix before forwarding (e.g. nginx
``rewrite-target: /$2`` with a ``/monitor(/|$)(.*)`` path). The app
sees unprefixed routes; the browser uses ``<base>`` to construct
prefixed URLs for fetches, links, and the socket.
@maximusunc maximusunc merged commit c7f79f5 into main May 18, 2026
2 checks passed
@maximusunc maximusunc deleted the claude/monitoring-dashboard-worker-Tt4X7 branch May 18, 2026 14:46
@codecov
Copy link
Copy Markdown

codecov Bot commented May 18, 2026

Codecov Report

❌ Patch coverage is 0% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 43.18%. Comparing base (efb831b) to head (c7d6288).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
workers/monitor/worker.py 0.00% 25 Missing ⚠️
Files with missing lines Coverage Δ
workers/monitor/worker.py 0.00% <0.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update efb831b...c7d6288. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants