Skip to content

feat(auth): add canonical accountUrl helper - #22

Merged
coopbri merged 1 commit into
masterfrom
feat/account-url-helper
Aug 30, 2026
Merged

feat(auth): add canonical accountUrl helper#22
coopbri merged 1 commit into
masterfrom
feat/account-url-helper

Conversation

@coopbri

@coopbri coopbri commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

What

Adds accountUrl(accountBaseUrl) to @omnidotdev/providers/react, the canonical "manage account" URL helper. It trims trailing slashes and returns the account base URL; the caller passes a full base URL.

Why

Apps today inline ${AUTH_BASE_URL}/dashboard or a CONSOLE_URL for "manage account", inconsistently (herald-app alone uses both). This is step one of consolidating all account management onto a single host (future account.omni.dev). With one canonical helper plus a per-app VITE_ACCOUNT_URL env, the account host can move with a one-line env change per app instead of edits across the fleet. accountUrl sits beside the existing gatekeeperDashboardUrl, whose doc now steers account links to accountUrl (org-management deep links keep using gatekeeperDashboardUrl for now).

Design

  • Trivial by design: only trims trailing slashes, no path params, no env reading (providers never reads env, callers pass the base URL in). Distinct from gatekeeperDashboardUrl, which appends /dashboard.
  • Interim value is https://identity.omni.dev/dashboard (passes through unchanged) and flips to https://account.omni.dev later.

Tests

  • New colocated src/react/ManageTeamLink.test.ts: base URL unchanged, trailing-slash trim, interim identity-dashboard value preserved.
  • Full suite 325 pass; typecheck, Biome, and knip clean. build/ is regenerated by the pre-commit hook; the small build/index.js / build/flags diffs are the hook syncing a previously-stale committed build, not behavioral changes.

Rollout

After merge, repin @omnidotdev/providers to the merged SHA in apps as they adopt accountUrl (starting with herald-app), with no per-app change beyond the link repoint plus VITE_ACCOUNT_URL.

@coopbri
coopbri merged commit a6c0856 into master Aug 30, 2026
4 checks passed
@coopbri
coopbri deleted the feat/account-url-helper branch August 30, 2026 19:52
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant