fix(dashboard): the Lieferkette's document links go to the portal's origin (#1054) #1061

Merged
sharang merged 1 commits from fix/chain-doc-links into main 2026-11-19 11:32:21 +00:00
Owner

Fixes the document links of #1059 (#1054), found while checking on stage.

The bug

On stage, PORTAL_URL is the workspace's portal dashboard (https://app-stage.breakpilot.com/<slug>/dashboard), not the portal's root. A document's link appended the path to it and read …/<slug>/dashboard/<slug>/dokumente/<doc>/original. The same went for the "In der Dokumentenablage hinzufügen" link.

The fix

The portal's own paths (/{slug}/dokumente/…) now go after the portal's origin, its scheme and host, via portal_origin.

The ghost box "Zulieferer einladen" still links to PORTAL_URL itself, the workspace's portal page, which is correct.

Tests

  • A unit test for portal_origin: a URL with a path, a trailing slash, a host with a port, and an empty URL.
  • All 213 dashboard tests pass, and clippy is clean on both builds.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9

Fixes the document links of #1059 (#1054), found while checking on stage. ## The bug On stage, `PORTAL_URL` is the workspace's portal dashboard (`https://app-stage.breakpilot.com/<slug>/dashboard`), not the portal's root. A document's link appended the path to it and read `…/<slug>/dashboard/<slug>/dokumente/<doc>/original`. The same went for the "In der Dokumentenablage hinzufügen" link. ## The fix The portal's own paths (`/{slug}/dokumente/…`) now go after the portal's origin, its scheme and host, via `portal_origin`. The ghost box "Zulieferer einladen" still links to `PORTAL_URL` itself, the workspace's portal page, which is correct. ## Tests - A unit test for `portal_origin`: a URL with a path, a trailing slash, a host with a port, and an empty URL. - All 213 dashboard tests pass, and clippy is clean on both builds. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
sharang added 1 commit 2026-11-19 11:10:19 +00:00
fix(dashboard): the Lieferkette's document links go to the portal's origin (#1054)
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Agent integration (pull_request) Successful in 4m46s
CI / Check (pull_request) Successful in 21m36s
f889a0fa98
On stage `PORTAL_URL` is the workspace's portal dashboard
(`https://app-stage.breakpilot.com/<slug>/dashboard`), not the portal's
root, so a document's link read `…/<slug>/dashboard/<slug>/dokumente/…`.
The portal's own paths now go after its origin (scheme and host) only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
sharang merged commit 835bc3fc98 into main 2026-11-19 11:32:21 +00:00
sharang deleted branch fix/chain-doc-links 2026-11-19 11:32:21 +00:00
Sign in to join this conversation.