feat: workspace fetch optimization + parent tasks fetching#1207
feat: workspace fetch optimization + parent tasks fetching#1207priosshrsth wants to merge 3 commits intofeature/c1-optimizationfrom
Conversation
Add a layout-level WorkspaceFetcher that uses SWR to populate authDetails.workspace from /api/workspace on the client. SSR pages ((home), detail, client, manage-templates, manage-templates/[id]) no longer block on copilot.getWorkspace() per request — they let the Redux store hydrate from the cached client fetch (60s deduping). Server-side route uses React cache() via getMemoizedWorkspace for per-request memoization. Workspace consumers (Sidebar, AppBridges, HeaderBreadcrumbs, TaskBoard) now read portalUrl from the store via selectAuthDetails instead of taking it as a prop. Add tsc script (tsc --noEmit) to package.json for type-only checks. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThis PR delivers two optimizations targeting the
Confidence Score: 5/5Safe to merge — all changed paths are well-guarded and the optimizations are straightforward. The parent-task query consolidation is logically correct: order is explicitly re-applied from No files require special attention beyond the unused variable in Important Files Changed
Reviews (2): Last reviewed commit: "fix traversal" | Re-trigger Greptile |
|
Deployment failed with the following error: Learn More: https://vercel.link/multiple-function-regions |
| ) as Promise<AncestorTaskResponse>[], | ||
| ) | ||
| const parentIds = getIdsFromLtreePath(taskWithPath.path) | ||
| const parentTasksStartedAt = performance.now() |
There was a problem hiding this comment.
is this necessary to be in prod?
| .nullable(), | ||
| // customFields: z | ||
| // .record(z.string(), z.union([z.string().nullable(), z.array(z.string()).nullable(), z.object({}).nullable()])) | ||
| // .nullable(), |
There was a problem hiding this comment.
lets remove the commented code or add an extra comment on why we commented this out.
|
Lets consider testing in the platform itself in a custom app. That way we can ensure everything works including the app bridge. |
Summary
resolves OUT-3705 OUT-3705: Optimize workspace to be fetched once per session
Test plan
portalUrl-dependent CTAsportalUrl-dependent UI is not visually disruptive2026-05-07.15-11-44.mov
🤖 Generated with Claude Code