fix(workspace): add granular error boundaries to 7 more workspace segments#5207
Conversation
…ments Adds error.tsx (reusing the shared ErrorState) to home, integrations, knowledge/[id], skills, settings, scheduled-tasks, and chat/[chatId] so a crash in any of these panels stays scoped to the panel and offers a retry, instead of bubbling to the generic workspace-level boundary.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Each file is the same thin wrapper as existing segment boundaries (e.g. tables): it passes Reviewed by Cursor Bugbot for commit c7d04a7. Configure here. |
|
@greptile review |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit c7d04a7. Configure here.
Greptile SummaryAdds
Confidence Score: 5/5Purely additive — seven new error boundary files with no modifications to existing code. Safe to merge. Every file is a verbatim copy of the established workspace-level error boundary pattern. Imports, 'use client' directives, default exports, and the shared ErrorState component are all correct. No existing behaviour is altered. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Runtime Error] --> B{Which segment threw?}
B -->|home| C[home/error.tsx\nHomeError]
B -->|integrations| D[integrations/error.tsx\nIntegrationsError]
B -->|knowledge id| E[knowledge/id/error.tsx\nKnowledgeBaseError]
B -->|skills| F[skills/error.tsx\nSkillsError]
B -->|settings| G[settings/error.tsx\nSettingsError]
B -->|scheduled-tasks| H[scheduled-tasks/error.tsx\nScheduledTasksError]
B -->|chat chatId| I[chat/chatId/error.tsx\nChatError]
B -->|other segment| J[workspaceId/error.tsx\nWorkspaceError fallback]
C & D & E & F & G & H & I --> K[ErrorState component\nLogs error · Renders Refresh button]
J --> K
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[Runtime Error] --> B{Which segment threw?}
B -->|home| C[home/error.tsx\nHomeError]
B -->|integrations| D[integrations/error.tsx\nIntegrationsError]
B -->|knowledge id| E[knowledge/id/error.tsx\nKnowledgeBaseError]
B -->|skills| F[skills/error.tsx\nSkillsError]
B -->|settings| G[settings/error.tsx\nSettingsError]
B -->|scheduled-tasks| H[scheduled-tasks/error.tsx\nScheduledTasksError]
B -->|chat chatId| I[chat/chatId/error.tsx\nChatError]
B -->|other segment| J[workspaceId/error.tsx\nWorkspaceError fallback]
C & D & E & F & G & H & I --> K[ErrorState component\nLogs error · Renders Refresh button]
J --> K
Reviews (1): Last reviewed commit: "fix(workspace): add granular error bound..." | Re-trigger Greptile |
Greptile SummaryThis PR adds granular Next.js error boundaries (
Confidence Score: 5/5Purely additive change that narrows error propagation — no existing behaviour is modified and the workspace-level fallback remains intact. Every new file is a verbatim application of the established tables/error.tsx pattern: correct 'use client' directive, valid path-alias import, proper Next.js default export shape, and unique logger names. The shared ErrorState component and its exports are already in place and stable. There are no logic changes, no new dependencies, and no state mutations involved. No files require special attention — all 7 additions are structurally identical to the existing error boundaries already in production. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Workspace Layout] --> B[Workspace-level error boundary\nexisting fallback]
A --> C[home/error.tsx NEW]
A --> D[integrations/error.tsx NEW]
A --> E[skills/error.tsx NEW]
A --> F[settings/error.tsx NEW]
A --> G[scheduled-tasks/error.tsx NEW]
A --> H[knowledge-id/error.tsx NEW]
A --> I[chat-chatId/error.tsx NEW]
A --> J[tables/error.tsx existing]
A --> K[logs/error.tsx existing]
A --> L[files/error.tsx existing]
C & D & E & F & G & H & I & J & K & L --> M[ErrorState component\nLogs error + Shows retry UI]
B --> N[Workspace-level fallback UI]
style C fill:#d4edda,stroke:#28a745
style D fill:#d4edda,stroke:#28a745
style E fill:#d4edda,stroke:#28a745
style F fill:#d4edda,stroke:#28a745
style G fill:#d4edda,stroke:#28a745
style H fill:#d4edda,stroke:#28a745
style I fill:#d4edda,stroke:#28a745
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[Workspace Layout] --> B[Workspace-level error boundary\nexisting fallback]
A --> C[home/error.tsx NEW]
A --> D[integrations/error.tsx NEW]
A --> E[skills/error.tsx NEW]
A --> F[settings/error.tsx NEW]
A --> G[scheduled-tasks/error.tsx NEW]
A --> H[knowledge-id/error.tsx NEW]
A --> I[chat-chatId/error.tsx NEW]
A --> J[tables/error.tsx existing]
A --> K[logs/error.tsx existing]
A --> L[files/error.tsx existing]
C & D & E & F & G & H & I & J & K & L --> M[ErrorState component\nLogs error + Shows retry UI]
B --> N[Workspace-level fallback UI]
style C fill:#d4edda,stroke:#28a745
style D fill:#d4edda,stroke:#28a745
style E fill:#d4edda,stroke:#28a745
style F fill:#d4edda,stroke:#28a745
style G fill:#d4edda,stroke:#28a745
style H fill:#d4edda,stroke:#28a745
style I fill:#d4edda,stroke:#28a745
Reviews (2): Last reviewed commit: "fix(workspace): add granular error bound..." | Re-trigger Greptile |
Summary
Adds
error.tsxto 7 more high-traffic workspace segments — home, integrations, knowledge/[id], skills, settings, scheduled-tasks, chat/[chatId] — so a crash in any of these panels stays scoped to the panel (with a retry) instead of bubbling to the generic workspace-level boundary.Each reuses the shared
ErrorStatecomponent, so they are structurally identical to the existing boundaries (tables/logs/files/knowledge) — same icon + description + "Refresh" button layout — differing only in title/description/loggerName. Purely additive: only narrows where errors are caught; the workspace-level fallback stays intact.Type of Change
Testing
tables/error.tsxpattern.Checklist