Resolve dashboard API requests under subpath #65

Closed
opened 2026-08-06 02:46:53 +00:00 by rockachopa · 0 comments
Member

Reproduction

The production dashboard is served at https://forge.alexanderwhitestone.com/dashboard/, but every frontend context/events request uses a root-absolute URL such as fetch('/api/v1/context'). The browser therefore requests https://forge.alexanderwhitestone.com/api/v1/context, which currently returns HTTP 404, while https://forge.alexanderwhitestone.com/dashboard/api/v1/context returns HTTP 200.

Expected behavior

Frontend API requests resolve relative to the deployed dashboard subpath so context, events, layout, and repo-mix data load on the production route. Add a behavioral regression test for URL resolution.

Acceptance criteria

  • Context and event API paths resolve beneath /dashboard/ when the page is hosted there.
  • Root deployment remains supported through ordinary relative URL resolution.
  • Focused and full test suites pass.
## Reproduction The production dashboard is served at `https://forge.alexanderwhitestone.com/dashboard/`, but every frontend context/events request uses a root-absolute URL such as `fetch('/api/v1/context')`. The browser therefore requests `https://forge.alexanderwhitestone.com/api/v1/context`, which currently returns HTTP 404, while `https://forge.alexanderwhitestone.com/dashboard/api/v1/context` returns HTTP 200. ## Expected behavior Frontend API requests resolve relative to the deployed dashboard subpath so context, events, layout, and repo-mix data load on the production route. Add a behavioral regression test for URL resolution. ## Acceptance criteria - Context and event API paths resolve beneath `/dashboard/` when the page is hosted there. - Root deployment remains supported through ordinary relative URL resolution. - Focused and full test suites pass.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: stackchain/stackchain-dashboard#65
No description provided.