Repository navigation
Conversation
The workspace pages fetched their workspace at the top of setup and let the API's 404 escape, so Nuxt reported it as a 500. They now load it with loadWorkspace, which turns that 404 (no such workspace, or one outside the user's project groups) and a non-numeric id into a fatal 404. The new error.vue shows it inside the app's layout, with a link back to the dashboard that clears the error, so the dashboard loads the workspaces again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Summary
Opening a page for a workspace that doesn't exist, or that the user can't access, showed Nuxt's "500 Internal Server Error" page. Those pages now show "Workspace not found" inside the app's layout, with a link back to the dashboard.
Cause
Pages under
/workspace/[id]awaitedworkspacesClient.getWorkspace(id)at the top of setup. The API answers 404 both for a missing workspace and for one in a project group the user isn't in (WorkspaceRepository.getByIdfilters by the user's groups). That error escaped setup, and Nuxt reports any uncaught setup error as a 500.Changes
composables/loadWorkspace.tsloads the workspace and turns the API's 404, or a non-numeric id like/workspace/abc/..., into a fatal Nuxt 404 "Workspace not found". Other failures pass through unchanged.projects/indexloads after mount, so it callsshowErroritself instead of offering a retry that can't succeed.error.vueis new; the app had none. It renders errors inside the default layout, so the navbar stays:error.vuereplaces Nuxt's default error page for every error, not only this one.Not changed:
edit,rapid) don't fetch the workspace.teams/[teamId]keeps its own "Team not found" state.Testing
test/unit/composables/loadWorkspace.test.ts.test/e2e/error.spec.ts, written to the@testoutline inerror.vue. It covers:fixmes).error.spectests and 1export-tdeitest timed out on a cold dev server. Run serially, both specs pass.signinandsmokefailed only because the run used port 3124, since 3000 was taken locally, and they expect aredirect_urion port 3000.🤖 Generated with Claude Code
Summary
loadWorkspaceto validate workspace IDs and convert API 404 responses into fatal Nuxt 404 errors. Other API errors pass through unchanged.showError.error.vuepage with error-specific text and a link that clears the error and returns to/dashboard.Validation