docs: comprehensive TROUBLESHOOTING.md, fix deploy extension, add Databricks section to AGENTS.md#1
Merged
Merged
Conversation
…on, fix deploy.py unicode - Add always-visible ☰ grip handle icon to all 6 sortable live-grid panels - Grip icon appears in panel header with subtle opacity (0.3), highlights on hover - Sortable.js already wired to .ph.grab handle — grip is visual affordance only - Create .github/extensions/deploy-dgx with 4 deployment tools: - deploy-proxy-dgx: Build and restart proxy container on DGX Spark - validate-dgx-proxy: Health check /health, /v1/models, /api/models/running - validate-databricks-dashboard: Check Think refs, grip icons, container status - sync-dashboard-databricks: SCP + rebuild dashboard container on Databricks - Fix deploy.py UnicodeEncodeError on Windows cp1252 console (✓ -> [OK]) Co-authored-by: Copilot <[email protected]>
… 3002 - Remove sudo from docker commands (user in docker group) - Use DASHBOARD_PORT=3002 instead of 3000 (seismometer owns 3000) - Sync serving.py from Databricks to local repo - Update validation checks to use port 3002 Co-authored-by: Copilot <[email protected]>
… also fix DB red x badge The dashboard was rendering an empty page with a red X next to the DB badge in the top right when served through susmannet's nginx at /copilot/ path prefix. The root cause was twofold: 1. JavaScript fetch() calls hardcoded absolute paths (e.g., '/stats') but the browser is on origin 'https://susmannet.duckdns.org/copilot/' so they hit nginx as '/copilot/stats'. Added '__bp' base path variable to dynamically prefix all 11 fetch endpoints when serve.py injects window.__BASE_PATH='/copilot' 2. serve.py path normalization did not handle query strings (e.g., /api/stats/summary?days=1 failed to match API_PREFIX because .startswith checks 'self.path' which includes '?...'). Fixed by splitting on '?' first, then stripping prefix from clean path before comparing with API prefixes. Container also now correctly normalizes paths when served via nginx proxy_pass that strips '/copilot/' Validation: All 6 browser fetch endpoints return live data through /copilot/ path prefix on Databricks nginx (stats DB models history usage daily cost). Container logs all 200 OK responses with no errors. Co-authored-by: Copilot <[email protected]>
… checklist, fix deploy extension for reliable validation - TROUBLESHOOTING.md: comprehensive doc of nginx /copilot/ reverse proxy bug covering __bp fetch prefix, serve.py _norm_path normalization, deployment workflow, common mistakes table, and verification commands - AGENTS.md: added Databricks dashboard deployment section with architecture diagram, deploy checklist, critical gotchas, and extension references - deploy-dgx/extension.mjs: rewrote validate-databricks-dashboard to test container status, path normalization, __BASE_PATH injection, fetch(__bp) count, grip icons, live data via nginx /copilot/ endpoints, and container logs for errors. Fixed sync-dashboard-databricks to use --no-cache build, PROXY_BACKEND (not PROXY_URL), docucraft_docucraft-network, and PROXY_PATH_PREFIX=/copilot Co-authored-by: Copilot <[email protected]>
# Conflicts: # AGENTS.md # dashboard/index.html # dashboard/serve.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Comprehensive documentation, deployment automation fixes, and validation tools for Databricks dashboard behind nginx reverse proxy.
What Changed
TROUBLESHOOTING.md (new) — Complete troubleshooting guide covering:
/copilot/reverse proxy blank page bug (root cause analysis)AGENTS.md — Added Databricks dashboard deployment section with:
deploy-dgx/extension.mjs — Fixed two critical tools:
validate-databricks-dashboard: Now tests container status, path normalization,__BASE_PATHinjection, fetch__bpcount, grip icons, live data via both direct port AND nginx/copilot/endpoints, and container logs for errorssync-dashboard-databricks: Fixed to use--no-cachedocker build,PROXY_BACKEND(notPROXY_URL),docucraft_docucraft-network(not host network), and addedPROXY_PATH_PREFIX=/copilotenv varBug Summary
The Databricks dashboard showed empty data behind nginx because:
window.__BASE_PATH="/copilot"and prefixing all fetch calls with__bp_norm_path = self.path.split("?")[0]--no-cacheto build stepPROXY_URLinstead ofPROXY_BACKEND) caused 502 "not configured" errorsVerification
All nginx endpoints verified working:
/copilot/→ dashboard loads/copilot/copilot-dashboard/index.html→ 200/copilot/v1/models→ proxy models list/copilot/stats→ live token stats/copilot/api/stats/summary→ MongoDB summary