← All archived runs
Run: fix-console-url-bare-host
run.md
Run: fix-console-url-bare-host
- lane: bug
- branch: claude/console-app-url-invitation-bug-w17ok6
- pr: #899
lane/output/notes.md
Bug: fix-console-url-bare-host
- observed: inviting a Sustentus staff member from the console's Access page is refused with
"CONSOLE_APP_URL is not configured for this deployment", although
CONSOLE_APP_URL is set on
both the production and preview environments to console.sustentus.com ·
expected: the invitation is created with a link to https://console.sustentus.com/accept
- cause:
resolveConsoleOrigin (packages/services/src/shared/console-access.ts) parsed the
value with new URL(raw), which throws on a host carrying no scheme. The origin resolved to
null, grantAccess returned the no-origin notice, and the message reported a configured
variable as unset. The same null silently disabled the platform's other use of it —
consoleRedirectFor in apps/web/lib/console-redirect.ts sent marked org-less staff to
/no-role instead of the console.
- fix:
packages/services/src/shared/console-access.ts: complete a scheme-less host to https
(http for loopback) before parsing, leaving every other refusal intact — a real non-http
scheme is never reread as a host:port. apps/console/app/(console)/access/page.tsx: the notice
now says missing or unreadable and names the shape to set. turbo.json: the env catalogue
records that a bare host is accepted.
- changelog: not user-visible — the console is staff-and-partner-only and invitation-only, and
nothing on the tenant-facing platform changes.