refactor(tabs): live Zero-synced tabs with workspace limits and UI polish#1609
refactor(tabs): live Zero-synced tabs with workspace limits and UI polish#1609AnishSarkar22 wants to merge 28 commits into
Conversation
… date display and adjust button styles
…roved alignment and consistency
…keleton loading components for better user experience
…ubmission eligibility
…n and improve layout consistency
…tton functionality in CitationPanelContent
… component for improved UI consistency
…r better UI consistency
…mproved user understanding
…egration and UI updates
…ssageCircleMore for improved visual consistency
…ted tests for codebase cleanup
|
@AnishSarkar22 is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…der and useResolvedTabs
…y logic in ChatViewport
…tate and update footer logic
Description
Motivation and Context
FIX #
Screenshots
API Changes
Change Type
Testing Performed
Checklist
High-level PR Summary
This PR refactors the tab management system to rely on real-time Zero synchronization for chat thread metadata instead of persisting full metadata in local storage. The tabs now store only lightweight pointers (
entityIdandworkspaceId) that are resolved against Zero queries at runtime. Additionally, backend workspace creation limits are enforced with a new configurableMAX_WORKSPACES_PER_USERsetting, and various UI improvements include better loading states, refined panel headers, improved date formatting, and visual polish across chat and sidebar components.⏱️ Estimated Review Time: 1-3 hours
💡 Review Order Suggestion
surfsense_web/atoms/tabs/migrate-tabs.test.tssurfsense_web/atoms/tabs/migrate-tabs.tssurfsense_web/atoms/tabs/tabs.atom.tssurfsense_web/hooks/use-resolved-tabs.test.tssurfsense_web/hooks/use-resolved-tabs.tssurfsense_web/zero/schema/chat.tssurfsense_web/zero/queries/chat.tssurfsense_web/zero/queries/documents.tssurfsense_web/zero/queries/index.tssurfsense_backend/app/zero_publication.pysurfsense_backend/alembic/versions/175_publish_thread_metadata_to_zero.pysurfsense_web/components/layout/ui/tabs/TabBar.tsxsurfsense_web/components/layout/ui/shell/LayoutShell.tsxsurfsense_web/app/dashboard/[workspace_id]/new-chat/[[...chat_id]]/page.tsxsurfsense_web/hooks/use-activate-chat-thread.tssurfsense_web/components/layout/providers/LayoutDataProvider.tsxsurfsense_web/components/layout/ui/sidebar/AllChatsSidebar.tsxsurfsense_web/components/assistant-ui/thread.tsxsurfsense_web/lib/chat/can-submit-chat.tssurfsense_backend/app/config/__init__.pysurfsense_backend/app/routes/workspaces_routes.pysurfsense_backend/tests/unit/routes/test_workspaces_limits.pysurfsense_web/contracts/types/workspace.types.tssurfsense_web/lib/apis/workspaces-api.service.tssurfsense_web/atoms/workspaces/workspace-query.atoms.tssurfsense_web/lib/query-client/cache-keys.tssurfsense_web/components/layout/providers/FreeLayoutDataProvider.tsxsurfsense_web/components/layout/ui/icon-rail/IconRail.tsxsurfsense_web/components/layout/ui/dialogs/CreateWorkspaceDialog.tsxsurfsense_web/components/layout/ui/sidebar/MobileSidebar.tsxsurfsense_web/components/layout/ui/sidebar/Sidebar.tsxsurfsense_web/lib/format-date.tssurfsense_web/components/citation-panel/citation-panel.tsxsurfsense_web/components/report-panel/report-panel.tsxsurfsense_web/features/chat-artifacts/ui/artifacts-panel.tsxsurfsense_web/components/assistant-ui/inline-citation.tsxsurfsense_web/components/new-chat/chat-header.tsxsurfsense_web/components/new-chat/document-mention-picker.tsxsurfsense_web/components/mcp/connect-agent-dialog.tsxsurfsense_web/app/dashboard/[workspace_id]/automations/components/automations-loading.tsx