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.
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
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes the document links of #1059 (#1054), found while checking on stage.
The bug
On stage,
PORTAL_URLis 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, viaportal_origin.The ghost box "Zulieferer einladen" still links to
PORTAL_URLitself, the workspace's portal page, which is correct.Tests
portal_origin: a URL with a path, a trailing slash, a host with a port, and an empty URL.🤖 Generated with Claude Code
https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9