Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Python agentaianthropicclaude-codecompressioncontext-engineeringcontext-windowcursorfastapilangchainllmmcpopenaiprompt-engineeringproxypythonragtoken-optimizationtokenstypescript
fix(dashboard): derive per-project setup URL from live origin (#1511)
Rod Boeve035aefce23f
diff --git a/headroom/dashboard/templates/dashboard.html b/headroom/dashboard/templates/dashboard.htmlindex 168fa73e2..1aa01f8cb 100644--- a/headroom/dashboard/templates/dashboard.html+++ b/headroom/dashboard/templates/dashboard.html@@ -1180,7 +1180,7 @@<div class="text-xs text-gray-500 mb-3">No per-project data yet.</div><div class="text-xs text-gray-600 font-mono leading-relaxed">Add to each project's <span class="text-gray-400">.claude/settings.local.json</span>:<br>- <span class="text-accent">ANTHROPIC_BASE_URL: http://127.0.0.1:8787/p/<project-name></span>+ <span class="text-accent" x-text="'ANTHROPIC_BASE_URL: ' + window.location.origin + '/p/<project-name>'"></span></div></div></template>diff --git a/tests/test_dashboard_cache_ttl_playwright.py b/tests/test_dashboard_cache_ttl_playwright.pyindex 7144aa55b..a2ae2ad88 100644--- a/tests/test_dashboard_cache_ttl_playwright.py+++ b/tests/test_dashboard_cache_ttl_playwright.py@@ -187,6 +187,39 @@ def _install_dashboard_routes(page: Page) -> None:page.route("**/*", handler)+def test_dashboard_per_project_setup_url_uses_current_origin() -> None:+ with sync_playwright() as pw:+ browser = pw.chromium.launch()+ page = browser.new_page(viewport={"width": 1720, "height": 1400}, color_scheme="dark")+ _install_dashboard_routes(page)++ page.goto("http://127.0.0.1:8788/dashboard", wait_until="load")+ expect(+ page.get_by_text(+ "ANTHROPIC_BASE_URL: http://127.0.0.1:8788/p/<project-name>", exact=True+ )+ ).to_be_visible()+ expect(+ page.get_by_text(+ "ANTHROPIC_BASE_URL: http://127.0.0.1:8787/p/<project-name>", exact=True+ )+ ).to_have_count(0)++ page.goto("http://headroom.local:9393/dashboard", wait_until="load")+ expect(+ page.get_by_text(+ "ANTHROPIC_BASE_URL: http://headroom.local:9393/p/<project-name>", exact=True+ )+ ).to_be_visible()+ expect(+ page.get_by_text(+ "ANTHROPIC_BASE_URL: http://127.0.0.1:8787/p/<project-name>", exact=True+ )+ ).to_have_count(0)++ browser.close()++def test_dashboard_renders_observed_ttl_metrics_and_can_capture_screenshot() -> None:artifact_dir = os.environ.get("HEADROOM_PLAYWRIGHT_ARTIFACT_DIR")