Skip to content

fix(workspace): add granular error boundaries to 7 more workspace segments#5207

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/workspace-error-boundaries
Jun 25, 2026
Merged

fix(workspace): add granular error boundaries to 7 more workspace segments#5207
waleedlatif1 merged 1 commit into
stagingfrom
fix/workspace-error-boundaries

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

Adds error.tsx to 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 ErrorState component, 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

  • Improvement (resilience / UX)

Testing

  • tsc 0 errors; Biome clean. Each file is a verbatim copy of the canonical tables/error.tsx pattern.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

…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.
@vercel

vercel Bot commented Jun 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Jun 25, 2026 3:30am

Request Review

@cursor

cursor Bot commented Jun 25, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Purely additive UI error-handling; no auth, data, or business-logic changes.

Overview
Adds Next.js error.tsx boundaries for seven workspace routes—home, integrations, knowledge/[id], skills, settings, scheduled-tasks, and chat/[chatId]—so render failures in those panels show a localized Failed to load … message with retry instead of only the generic workspace-level fallback.

Each file is the same thin wrapper as existing segment boundaries (e.g. tables): it passes error / reset into shared ErrorState with route-specific title, description, and loggerName. No changes to ErrorState or the parent workspace/[workspaceId]/error.tsx; errors that aren’t caught in a segment still bubble to the workspace boundary.

Reviewed by Cursor Bugbot for commit c7d04a7. Configure here.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile review

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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-apps

greptile-apps Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds error.tsx Next.js error boundary files to 7 additional workspace segments (home, integrations, knowledge/[id], skills, settings, scheduled-tasks, chat/[chatId]), scoping any render-time crash to the affected panel rather than the workspace-level fallback.

  • All 7 files are structurally identical to the existing WorkspaceError at the [workspaceId] level — same 'use client' directive, same ErrorBoundaryProps interface, same ErrorState component with a "Refresh" retry button — differing only in title, description, and loggerName.
  • The change is purely additive: no existing files are modified, and the workspace-level boundary continues to serve as the outermost fallback for any segments not yet covered.

Confidence Score: 5/5

Purely 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

Filename Overview
apps/sim/app/workspace/[workspaceId]/chat/[chatId]/error.tsx Adds a Next.js error boundary for the chat/[chatId] segment; follows the established workspace error pattern exactly.
apps/sim/app/workspace/[workspaceId]/home/error.tsx Adds a granular error boundary for the home segment; structurally identical to the workspace-level error.tsx.
apps/sim/app/workspace/[workspaceId]/integrations/error.tsx Adds an error boundary for integrations and its sub-routes ([block], connected/[credentialId]); correct scope.
apps/sim/app/workspace/[workspaceId]/knowledge/[id]/error.tsx Adds an error boundary scoped to a single knowledge base entry; correct placement and pattern.
apps/sim/app/workspace/[workspaceId]/scheduled-tasks/error.tsx Adds an error boundary for scheduled-tasks; consistent with the rest of the new boundaries.
apps/sim/app/workspace/[workspaceId]/settings/error.tsx Adds an error boundary for the settings panel; clean, no issues.
apps/sim/app/workspace/[workspaceId]/skills/error.tsx Adds an error boundary for the skills segment; clean, no issues.

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
Loading
%%{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
Loading

Reviews (1): Last reviewed commit: "fix(workspace): add granular error bound..." | Re-trigger Greptile

@greptile-apps

greptile-apps Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds granular Next.js error boundaries (error.tsx) to 7 workspace route segments — home, integrations, knowledge/[id], skills, settings, scheduled-tasks, and chat/[chatId] — so crashes in any of those panels are caught and displayed locally rather than propagating to the workspace-level boundary.

  • All 7 files are direct replicas of the existing canonical tables/error.tsx pattern, using the shared ErrorState component from @/app/workspace/[workspaceId]/components with contextual titles, descriptions, and unique loggerName values.
  • Each file correctly carries the 'use client' directive required by Next.js for error boundary files, and uses the established path alias rather than a relative import.

Confidence Score: 5/5

Purely 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

Filename Overview
apps/sim/app/workspace/[workspaceId]/chat/[chatId]/error.tsx New error boundary for the chat route — structurally identical to the canonical tables/error.tsx pattern; correct 'use client' directive, valid import alias, unique loggerName.
apps/sim/app/workspace/[workspaceId]/home/error.tsx New error boundary for the home route — follows the established pattern exactly, no issues found.
apps/sim/app/workspace/[workspaceId]/integrations/error.tsx New error boundary for the integrations route — follows the established pattern exactly, no issues found.
apps/sim/app/workspace/[workspaceId]/knowledge/[id]/error.tsx New error boundary for the knowledge base dynamic route — follows the established pattern exactly, no issues found.
apps/sim/app/workspace/[workspaceId]/scheduled-tasks/error.tsx New error boundary for the scheduled-tasks route — follows the established pattern exactly, no issues found.
apps/sim/app/workspace/[workspaceId]/settings/error.tsx New error boundary for the settings route — follows the established pattern exactly, no issues found.
apps/sim/app/workspace/[workspaceId]/skills/error.tsx New error boundary for the skills route — follows the established pattern exactly, no issues found.

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
Loading
%%{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
Loading

Reviews (2): Last reviewed commit: "fix(workspace): add granular error bound..." | Re-trigger Greptile

@waleedlatif1 waleedlatif1 merged commit 9bd8f14 into staging Jun 25, 2026
16 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/workspace-error-boundaries branch June 25, 2026 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant