fix(chatelet): root-relative routes so room deep links and refreshes work #159
No reviewers
Labels
No labels
app:activities
app:chat
app:chatelet
app:events
app:forum
app:libra
app:market
app:restaurant
app:tasks
app:wallet
app:webapp
bug
enhancement
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
aiolabs/webapp!159
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/chatelet-standalone-routing-base"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The chatelet module hardcoded
/chateletin its route paths while thestandalone also mounts under a Vite base path (
/chatelet/), which therouter applies too. The two stacked, so in-app URLs came out
double-prefixed (
/chatelet/chatelet/<id>) and the clean single-prefixURL (
/chatelet/<id>— what a person would type or share) stripped thebase to
/<id>, matched nothing, and fell back to the room list.Click-through and refresh already worked on the double-prefixed URL,
thanks to the standalone SPA fallback that keeps deep links under the
alias location (server-deploy
d5f5a19). This change is about the URLsthemselves: make the routes root-relative (
/list,/:iddetail,/my-bookings) so the base path supplies the single prefix. In-appnavigation now produces clean
/chatelet/<id>URLs, and that typeable,shareable form resolves to the room instead of the list.
Drops the now-redundant
/→/chateletredirect, points thelist/detail/browse links and the Rooms tab at the new paths, and keys the
tab's active state off the route name (a
/prefix test would matcheverything).
Verified on a production build served under
/chatelet/like nginx: thelist, a deep link to a room, a refresh on it, and in-app room clicks all
resolve to the detail page with a single-prefixed URL. vue-tsc build passes.
Note: the events standalone has the same double-prefix pattern. It is
functional today (click-through and refresh work), so cleaning up its URLs
the same way is low-priority polish, not a fix — left out of this PR.
The chatelet module hardcoded '/chatelet' in its route paths while the standalone also mounts under a Vite base path ('/chatelet/'), which the router applies too. The two stacked: in-app URLs came out double-prefixed ('/chatelet/chatelet/<id>'), and a direct load or refresh of a room URL stripped the base to '/<id>', matched nothing, and fell back to the room list — so room deep links and page refreshes were broken. Make the routes root-relative ('/' list, '/:id' detail, '/my-bookings') and let the base path supply the prefix. Drop the now-redundant '/' -> '/chatelet' redirect, point the list/detail/browse links and the Rooms tab at the new paths, and key the tab's active state off the route name (a '/' prefix test would match everything). Verified on a production build served under '/chatelet/' like nginx: deep link to a room, refresh on it, list, and in-app room clicks all resolve to the detail page with a single-prefixed URL. vue-tsc build passes. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>18aaff12e2to53327b3ef2