feat(ui): path-based app-router routes with 404 and project auth preview
Resolve routes from pathname (and legacy hash), add a notFound route with a dedicated 404 page, and show a blurred workspace preview for unauthenticated project visits. Wire up Next.js app-router entry files and listen for popstate so history navigation updates the route. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -168,19 +168,17 @@ export const designGateway = {
|
||||
|
||||
agentSocket(projectId: string, payload: AgentChatPayload, handlers: ProjectEventHandlers) {
|
||||
let closed = false;
|
||||
let closeEvents: (() => void) | null = payload.threadId ? designGateway.projectEvents(projectId, handlers, { threadId: payload.threadId }) : null;
|
||||
let closeEvents: (() => void) | null = null;
|
||||
|
||||
void designGateway
|
||||
.agentChat(projectId, payload)
|
||||
.then((response) => {
|
||||
if (closed) return;
|
||||
handlers.onProject?.(response.project);
|
||||
if (!closeEvents) {
|
||||
closeEvents = designGateway.projectEvents(response.project.id, handlers, {
|
||||
threadId: response.threadId || payload.threadId,
|
||||
eventsUrl: response.eventsUrl
|
||||
});
|
||||
}
|
||||
closeEvents = designGateway.projectEvents(response.project.id, handlers, {
|
||||
threadId: response.threadId || payload.threadId,
|
||||
eventsUrl: response.eventsUrl
|
||||
});
|
||||
})
|
||||
.catch((error: Error) => {
|
||||
if (!closed) {
|
||||
|
||||
Reference in New Issue
Block a user