When the URL contains a :companyPrefix segment that doesn't match any fetched company, Layout previously rendered a dead-end NotFoundPage with no recovery link. The sidebar's company switcher depends on selectedCompany being non-null, so users landing on a bogus prefix had no way back without hand-typing a new URL. Replace the NotFoundPage branch with a redirect to the same path under the first available company (selectedCompany ?? companies[0]). If the rest of the path is empty, fall back to /dashboard so the target is guaranteed to exist. The hasUnknownCompanyPrefix condition is already gated on companies.length > 0, so the fallback is reachable; the old NotFoundPage remains as a theoretical safety net if somehow both selectedCompany and companies[0] are null. Triggered by a user session after the embedded-postgres wipe: the browser had a stale localStorage selectedCompanyId and the user hand-typed URLs with guessed prefixes like /ASSISTANT/company/settings. Hitting any invalid prefix stranded them on the 404 with no UI to pick a different company. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| public | ||
| src | ||
| components.json | ||
| index.html | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| vite.config.ts | ||
| vitest.config.ts | ||
@paperclipai/ui
Published static assets for the Paperclip board UI.
What gets published
The npm package contains the production build under dist/. It does not ship the UI source tree or workspace-only dependencies.
Typical use
Install the package, then serve or copy the built files from node_modules/@paperclipai/ui/dist.