fix(organizations): align sidebar loading and chat actions - #7691
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Greptile SummaryThe PR hydrates organization sidebar data before rendering, adds workspace-style chat actions and pagination, and prevents an exiting context menu from taking focus away from inline rename.
Confidence Score: 5/5The PR appears safe to merge; the two previous sidebar-pagination findings are resolved and no new actionable defect remains. The active route now determines the minimum visible chat range, and keying OrganizationChats by organization resets pagination and interaction state across organization navigation. Hydration preserves existing query keys and leaves failed or empty optional prefetches available to client recovery.
|
| Filename | Overview |
|---|---|
| apps/sim/app/o/[organizationId]/layout.tsx | Waits for authorized organization-sidebar data before serializing the hydration state. |
| apps/sim/app/o/[organizationId]/prefetch.ts | Prefetches organization chats, workspaces, and profile data using existing client cache keys. |
| apps/sim/app/o/[organizationId]/components/organization-sidebar/components/chats-section/chats-section.tsx | Adds paginated chat rendering, keeps the routed chat visible, and integrates inline actions. |
| apps/sim/app/o/[organizationId]/components/organization-sidebar/hooks/use-organization-chat-actions.ts | Coordinates organization chat menus, optimistic mutations, inline rename, and link actions. |
| apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/components/context-menu/context-menu.tsx | Supports copy-link actions and makes closed menu content inert during its exit animation. |
| apps/sim/lib/workspaces/seed-workspace-list.ts | Extracts reusable workspace-list seeding while preserving client recovery for empty or failed reads. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Authorized organization layout] --> B[Prefetch organization chats]
A --> C[Seed non-empty workspace list]
A --> D[Prefetch viewer profile]
B --> E[React Query dehydration]
C --> E
D --> E
E --> F[Hydrated organization sidebar]
F --> G[Chat pagination and route visibility]
F --> H[Rename, pin, and read actions]
Reviews (2): Last reviewed commit: "fix(organizations): preserve chat contex..." | Re-trigger Greptile
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Summary
Type of Change
Testing
Checklist