Repository navigation
fix(hex): build dashboard source URLs that resolve in the Hex UI (2.0) - #36420
Conversation
Hex app URLs are scoped by the workspace UUID, which no project endpoint returns. Resolve it once per run from /users/me and link published projects to /app (viewable by everyone) and unpublished ones to the notebook (/hex). If the workspace can't be resolved, ingest the dashboard without a link instead of a broken one. (cherry picked from commit 065de47)
(cherry picked from commit ed3f6ec)
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
Code Review ✅ Approved🟡 Medium risk · Changing Hex dashboard links to workspace-scoped routes could produce inaccessible links if workspace lookup or publication status is misread. Fixes Hex dashboard source URLs by resolving the workspace UUID once per run from VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
| self.client.client.get = MagicMock(return_value={"org": {"id": "ws-uuid"}}) | ||
| project = Project(id="proj_789", title="Test", last_published_at="2026-10-01T00:00:00Z") | ||
|
|
||
| self.assertEqual(self.client.get_project_url(project), "https://app.hex.tech/ws-uuid/app/proj_789") |
There was a problem hiding this comment.
New tests violate required style
The added cases use self.assertEqual and self.assertIsNone, including the new missing-link test in test_hex.py. The repository’s Python guide requires pytest-style tests with plain assert statements and fixtures. Write the new cases in that style before merging; the existing unittest tests do not exempt new cases.
Context Used: CLAUDE.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|



Describe your changes:
Backport of #36335 to
2.0.Hex dashboard
sourceUrls were built as{hostPort}/app/projects/{id}, which isn't a route Hex serves, so every "View in Hex" link was dead. Hex project URLs are scoped by the workspace UUID, which is now resolved once per run fromGET /users/me:{hostPort}/{workspaceId}/app/{projectId}; unpublished ones to the notebook (/hex/{projectId}).sourceUrlinstead of a broken one.Both commits of #36335 cherry-picked with
-x. One trivial conflict inhex/client.py's imports (2.0 still importstyping.List); kept both imports.Type of change:
Tests:
Unit tests
PYTHONPATH=src python -m pytest tests/unit/topology/dashboard/test_hex.py tests/unit/topology/dashboard/test_hex_client.pyon this branch → 46 passed.ruff check/ruff format --checkclean on the changed files.Backend integration tests
UI screen recording:
Not applicable: ingestion-only fix.
Checklist:
🤖 Generated with Claude Code
The new tests must follow the repository’s required pytest style before merging; no behavioral defect was established.
Findings
Summary
Fixes Hex dashboard links by adding the workspace ID and choosing the app or notebook route.
Reviews (1) · Last reviewed commit: "fix(hex): guard /users/me response type ..." · Reviewed by Greptile