Skip to content

feat(desktop): add chat components for Superset MCP tools#1973

Merged
Kitenite merged 12 commits into
superset-sh:mainfrom
Kitenite:kitenite/please-look-at-the-new-superse
Mar 3, 2026
Merged

feat(desktop): add chat components for Superset MCP tools#1973
Kitenite merged 12 commits into
superset-sh:mainfrom
Kitenite:kitenite/please-look-at-the-new-superse

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented Mar 3, 2026

Summary

  • add dedicated chat tool-call components for the new Superset MCP tools in desktop chat
  • wire explicit tool rendering in MastraToolCallBlock for device/workspace/session tools
  • extend tool-name normalization to support superset_* namespaced tools and legacy aliases

Testing

  • bun run --cwd apps/desktop typecheck

Summary by cubic

Adds dedicated chat cards for Superset MCP tools using a shared SupersetToolCall with clear pending/error states. Unifies task cards with the Tasks view, adds deep links to /tasks/$taskId, and simplifies metadata with fewer icons for a cleaner look.

  • New Features

    • Task tools: create_task, update_task, list_tasks, get_task, delete_task, list_task_statuses with count summaries and clickable previews to /tasks/$taskId.
    • Workspace/session tools: list_devices, list_workspaces, list_projects, list_members, get_app_context, get_workspace_details, create_workspace, switch_workspace, update_workspace, delete_workspace, start_agent_session.
  • Refactors

    • Route known tools through SupersetToolCall with shimmer, collapsible details, and status/error indicators; AskUserQuestion and task_write/check/request_sandbox_access/mastra_workspace_* / submit_plan also use it; GenericToolCall is fallback-only.
    • Reuse TaskItemDisplay and shared task helpers (format date, record/label parsing) across task results for a consistent look; simplified task card metadata and reduced icon noise.
    • Hardened tool-name normalization: strips superset_ prefix; maps create_worktree → create_workspace and start_claude_session → start_agent_session. Hides raw params/results on Superset cards.

Written for commit 51a9433. Summary will update on new commits.

Summary by CodeRabbit

  • New Features

    • Rich, dedicated UI for many tool results (workspaces, tasks, members, devices, projects, statuses) with interactive summaries and navigation.
    • New unified "Superset" tool result component for clearer status, details and error display.
    • Added agent session start and workspace switch flows surfaced in chat tool results.
  • Chores

    • Expanded tool name alias resolution to recognize additional legacy/variant names.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 3, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a Superset-focused tool-call UI: a new SupersetToolCall component, 18 Superset/MCP-specific tool-call components (workspace, task, members, devices, projects, agent/context), MastraToolCallBlock routing updates, and tool-name normalization aliases. All changes are UI/component-level; no public function signatures were changed.

Changes

Cohort / File(s) Summary
SupersetToolCall Base Component
.../MastraToolCallBlock/components/SupersetToolCall/SupersetToolCall.tsx, .../SupersetToolCall/index.ts
New collapsible UI component that renders tool call status, error/pending/success indicators, optional details, and formatted error output.
MastraToolCallBlock Router
.../MastraToolCallBlock/MastraToolCallBlock.tsx
Integrated Superset MCP tool branches for many toolNames, replaced several GenericToolCall usages with SupersetToolCall, and wired new component mappings (+93/-6 lines).
Workspace Tools
.../CreateWorkspaceToolCall/*, .../DeleteWorkspaceToolCall/*, .../UpdateWorkspaceToolCall/*, .../SwitchWorkspaceToolCall/*, .../ListWorkspacesToolCall/*, .../GetWorkspaceDetailsToolCall/*
Six small wrapper components that invoke SupersetToolCall with workspace-specific toolName and icons.
Task Tools
.../CreateTaskToolCall/*, .../UpdateTaskToolCall/*, .../DeleteTaskToolCall/*, .../GetTaskToolCall/*, .../ListTasksToolCall/*, .../ListTaskStatusesToolCall/*
Six components with logic to parse args/results, normalize arrays/objects, and render task lists/cards, counts, and status entries (clickable navigation where applicable).
Members / Devices / Projects
.../ListMembersToolCall/*, .../ListDevicesToolCall/*, .../ListProjectsToolCall/*
Three wrapper components (ListMembers includes normalization and member rendering with name/email/role).
Agent & App Context
.../StartAgentSessionToolCall/*, .../GetAppContextToolCall/*
Two small wrapper components rendering SupersetToolCall for agent session and app context.
AskUserQuestion Replacement
.../AskUserQuestionToolCall/AskUserQuestionToolCall.tsx
Replaced GenericToolCall with SupersetToolCall in three conditional code paths; no logic changes.
Tool Helpers
.../utils/tool-helpers.ts
Added legacy alias mappings (create_worktreecreate_workspace, start_claude_sessionstart_agent_session) and adjusted normalizeToolName to attempt direct alias lookup then strip a superset_ prefix and retry.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • Chat tools UI #1301: Introduces shared chat tool UI primitives and tool registry used by chat tool rendering; closely related to SupersetToolCall and tool-call surface changes.
  • Nice Chat UI #1265: Extends ChatInterface tool-call surface and integrates new tool-call UI components — likely overlapping the MastraToolCallBlock and component mappings.

Poem

🐰 I hopped through code with eager paws,

weaving tools and friendly claws.
Superset bells ring clear and bright,
eighteen helpers join the light.
Hooray — the chat now hums with jaws and applause!

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The PR description includes a summary, testing instructions, and mentions key changes but lacks some structured sections from the template. Add explicit sections matching the template: clarify 'Type of Change' category, provide detailed 'Related Issues' links, and expand 'Testing' with concrete test steps or verification commands.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding chat components for Superset MCP tools to the desktop application.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 22 files

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/StartAgentSessionToolCall/StartAgentSessionToolCall.tsx (1)

2-2: Prefer tsconfig alias import over deep relative path.

Please switch ToolPart import to the configured alias style for consistency in apps/desktop.

Suggested diff
-import type { ToolPart } from "../../../../utils/tool-helpers";
+import type { ToolPart } from "renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/utils/tool-helpers";

As per coding guidelines apps/desktop/**/*.{ts,tsx}: Use alias as defined in tsconfig.json when possible.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/StartAgentSessionToolCall/StartAgentSessionToolCall.tsx`
at line 2, The file StartAgentSessionToolCall.tsx imports ToolPart via a deep
relative path; replace that import with the configured tsconfig alias import
(use the project's alias that points to utils/tool-helpers) so the symbol
ToolPart is imported using the alias rather than
"../../../../utils/tool-helpers"; update the import statement in
StartAgentSessionToolCall (and any nearby imports if needed) and run
TypeScript/IDE to verify the alias resolves.
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/GetAppContextToolCall/GetAppContextToolCall.tsx (1)

2-2: Use alias import for ToolPart to match desktop conventions.

This avoids fragile deep-relative paths and keeps imports consistent with the rest of apps/desktop.

Suggested diff
-import type { ToolPart } from "../../../../utils/tool-helpers";
+import type { ToolPart } from "renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/utils/tool-helpers";

As per coding guidelines apps/desktop/**/*.{ts,tsx}: Use alias as defined in tsconfig.json when possible.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/GetAppContextToolCall/GetAppContextToolCall.tsx`
at line 2, Replace the deep-relative import of ToolPart in
GetAppContextToolCall.tsx with the project alias defined in tsconfig used across
apps/desktop; specifically change the import of ToolPart from
"../../../../utils/tool-helpers" to the corresponding tsconfig path alias (so
other desktop files import ToolPart the same way), ensuring the named type
ToolPart is imported via the alias and updating any import statements in
GetAppContextToolCall to match desktop conventions.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/GetAppContextToolCall/GetAppContextToolCall.tsx`:
- Line 2: Replace the deep-relative import of ToolPart in
GetAppContextToolCall.tsx with the project alias defined in tsconfig used across
apps/desktop; specifically change the import of ToolPart from
"../../../../utils/tool-helpers" to the corresponding tsconfig path alias (so
other desktop files import ToolPart the same way), ensuring the named type
ToolPart is imported via the alias and updating any import statements in
GetAppContextToolCall to match desktop conventions.

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/StartAgentSessionToolCall/StartAgentSessionToolCall.tsx`:
- Line 2: The file StartAgentSessionToolCall.tsx imports ToolPart via a deep
relative path; replace that import with the configured tsconfig alias import
(use the project's alias that points to utils/tool-helpers) so the symbol
ToolPart is imported using the alias rather than
"../../../../utils/tool-helpers"; update the import statement in
StartAgentSessionToolCall (and any nearby imports if needed) and run
TypeScript/IDE to verify the alias resolves.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 400e5dc and 8509fc8.

📒 Files selected for processing (22)
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/MastraToolCallBlock.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/CreateWorkspaceToolCall/CreateWorkspaceToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/CreateWorkspaceToolCall/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/DeleteWorkspaceToolCall/DeleteWorkspaceToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/DeleteWorkspaceToolCall/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/GetAppContextToolCall/GetAppContextToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/GetAppContextToolCall/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/GetWorkspaceDetailsToolCall/GetWorkspaceDetailsToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/GetWorkspaceDetailsToolCall/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListDevicesToolCall/ListDevicesToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListDevicesToolCall/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListProjectsToolCall/ListProjectsToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListProjectsToolCall/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListWorkspacesToolCall/ListWorkspacesToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListWorkspacesToolCall/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/StartAgentSessionToolCall/StartAgentSessionToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/StartAgentSessionToolCall/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/SwitchWorkspaceToolCall/SwitchWorkspaceToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/SwitchWorkspaceToolCall/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/UpdateWorkspaceToolCall/UpdateWorkspaceToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/UpdateWorkspaceToolCall/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/utils/tool-helpers.ts

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (3)
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListMembersToolCall/ListMembersToolCall.tsx (1)

2-2: Consider replacing deep relative import with configured alias

Line 2 uses a long relative path for ToolPart; if a tsconfig alias exists for this area, prefer it for maintainability and safer refactors.

As per coding guidelines, apps/desktop/**/*.{ts,tsx}: Use alias as defined in tsconfig.json when possible.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListMembersToolCall/ListMembersToolCall.tsx`
at line 2, The file imports the ToolPart type via a deep relative path; replace
that relative import with the configured tsconfig path alias (e.g., the alias
that maps to the utilities/tools area) to improve maintainability — update the
import in ListMembersToolCall.tsx to use the project's TS alias for the module
that exports ToolPart, ensure TypeScript resolves it (adjust tsconfig/webpack if
necessary), and run a type-check/build to confirm the alias is valid.
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/UpdateTaskToolCall/UpdateTaskToolCall.tsx (1)

2-2: Use a tsconfig alias instead of deep relative import

Line 2 uses a deep relative path (../../../../utils/tool-helpers), which is brittle and harder to maintain. Please switch to the configured alias import path for this module.

As per coding guidelines, "apps/desktop/**/*.{ts,tsx}: Use alias as defined in tsconfig.json when possible".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/UpdateTaskToolCall/UpdateTaskToolCall.tsx`
at line 2, The file UpdateTaskToolCall.tsx imports ToolPart via a brittle
deep-relative path; replace the import of the symbol ToolPart from
"../../../../utils/tool-helpers" with the project’s configured tsconfig alias
for that module (use the same alias used elsewhere in the app for
utils/tool-helpers), update the import statement in UpdateTaskToolCall.tsx to
use that alias, then run the TypeScript build/linter to verify the alias
resolves correctly and adjust any surrounding imports if necessary.
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/CreateTaskToolCall/CreateTaskToolCall.tsx (1)

2-2: Replace deep relative import with tsconfig alias.

The file uses ../../../../utils/tool-helpers when the tsconfig.json alias pattern "*": ["src/*"] allows the cleaner import from "utils/tool-helpers".

Change line 2 to:

import type { ToolPart } from "utils/tool-helpers";
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/CreateTaskToolCall/CreateTaskToolCall.tsx`
at line 2, The import uses a deep relative path; replace the relative import of
ToolPart in CreateTaskToolCall.tsx with the tsconfig alias form. Update the
import statement that currently references "../../../../utils/tool-helpers" to
use the alias "utils/tool-helpers" so ToolPart is imported via import type {
ToolPart } from "utils/tool-helpers"; — locate this in the CreateTaskToolCall
component within MastraToolCallBlock -> CreateTaskToolCall.tsx and update the
import only.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListTaskStatusesToolCall/ListTaskStatusesToolCall.tsx`:
- Line 2: Replace the deep relative import of the ToolPart type with the
project's tsconfig path alias: locate the import of ToolPart in
ListTaskStatusesToolCall.tsx and change `import type { ToolPart } from
"../../../../utils/tool-helpers";` to use the configured alias (the same alias
used elsewhere in the codebase for utils/types) — check tsconfig.json "paths"
for the alias and update the import to that alias so the file uses the project
alias instead of the long relative path.

---

Nitpick comments:
In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/CreateTaskToolCall/CreateTaskToolCall.tsx`:
- Line 2: The import uses a deep relative path; replace the relative import of
ToolPart in CreateTaskToolCall.tsx with the tsconfig alias form. Update the
import statement that currently references "../../../../utils/tool-helpers" to
use the alias "utils/tool-helpers" so ToolPart is imported via import type {
ToolPart } from "utils/tool-helpers"; — locate this in the CreateTaskToolCall
component within MastraToolCallBlock -> CreateTaskToolCall.tsx and update the
import only.

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListMembersToolCall/ListMembersToolCall.tsx`:
- Line 2: The file imports the ToolPart type via a deep relative path; replace
that relative import with the configured tsconfig path alias (e.g., the alias
that maps to the utilities/tools area) to improve maintainability — update the
import in ListMembersToolCall.tsx to use the project's TS alias for the module
that exports ToolPart, ensure TypeScript resolves it (adjust tsconfig/webpack if
necessary), and run a type-check/build to confirm the alias is valid.

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/UpdateTaskToolCall/UpdateTaskToolCall.tsx`:
- Line 2: The file UpdateTaskToolCall.tsx imports ToolPart via a brittle
deep-relative path; replace the import of the symbol ToolPart from
"../../../../utils/tool-helpers" with the project’s configured tsconfig alias
for that module (use the same alias used elsewhere in the app for
utils/tool-helpers), update the import statement in UpdateTaskToolCall.tsx to
use that alias, then run the TypeScript build/linter to verify the alias
resolves correctly and adjust any surrounding imports if necessary.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8509fc8 and 594a618.

📒 Files selected for processing (15)
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/MastraToolCallBlock.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/CreateTaskToolCall/CreateTaskToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/CreateTaskToolCall/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/DeleteTaskToolCall/DeleteTaskToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/DeleteTaskToolCall/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/GetTaskToolCall/GetTaskToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/GetTaskToolCall/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListMembersToolCall/ListMembersToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListMembersToolCall/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListTaskStatusesToolCall/ListTaskStatusesToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListTaskStatusesToolCall/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListTasksToolCall/ListTasksToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListTasksToolCall/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/UpdateTaskToolCall/UpdateTaskToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/UpdateTaskToolCall/index.ts
✅ Files skipped from review due to trivial changes (2)
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListMembersToolCall/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/UpdateTaskToolCall/index.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/MastraToolCallBlock.tsx

@@ -0,0 +1,19 @@
import { ListChecksIcon } from "lucide-react";
import type { ToolPart } from "../../../../utils/tool-helpers";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Use project alias instead of deep relative import

Line 2 uses a long relative path for ToolPart; please switch this to the configured tsconfig.json alias import used in this codebase for maintainability and safer refactors.

As per coding guidelines, apps/desktop/**/*.{ts,tsx}: Use alias as defined in tsconfig.json when possible.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListTaskStatusesToolCall/ListTaskStatusesToolCall.tsx`
at line 2, Replace the deep relative import of the ToolPart type with the
project's tsconfig path alias: locate the import of ToolPart in
ListTaskStatusesToolCall.tsx and change `import type { ToolPart } from
"../../../../utils/tool-helpers";` to use the configured alias (the same alias
used elsewhere in the codebase for utils/types) — check tsconfig.json "paths"
for the alias and update the import to that alias so the file uses the project
alias instead of the long relative path.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 8 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/GenericToolCall/GenericToolCall.tsx">

<violation number="1" location="apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/GenericToolCall/GenericToolCall.tsx:27">
P2: `hasDetails` doesn't account for `showRawJson`, so the collapsible section can be expanded to show an empty container when `showRawJson={false}` and no `expandedContent` is provided. Update `hasDetails` to reflect what's actually rendered:
```tsx
const hasDetails = expandedContent != null || (showRawJson && (part.input != null || output != null || isError));
```</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (3)
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListTasksToolCall/ListTasksToolCall.tsx (1)

69-88: Consider using task ID for more stable React keys.

The static analysis flags the array index in the key. While title+index works, tasks typically have an id field which would provide more stable keys for React reconciliation.

♻️ Suggested improvement
 {tasks.slice(0, 6).map((task, index) => {
 	const title =
 		typeof task.title === "string" ? task.title : "Untitled task";
+	const id = typeof task.id === "string" ? task.id : null;
 	const status =
 		typeof task.statusName === "string" ? task.statusName : null;
 	const priority =
 		typeof task.priority === "string" ? task.priority : null;
 	return (
 		<div
-			key={`${title}-${index}`}
+			key={id ?? `${title}-${index}`}
 			className="rounded border bg-background/70 px-2 py-1"
 		>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListTasksToolCall/ListTasksToolCall.tsx`
around lines 69 - 88, The React list in ListTasksToolCall uses unstable keys
built from title and index; change the key in the tasks.slice(0, 6).map callback
to use a stable identifier like task.id (e.g., key={task.id}) and only fall back
to a deterministic fallback (e.g., `${title}-${index}`) if task.id is missing,
ensuring consistent reconciliation in the ListTasksToolCall component rendering.
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListTaskStatusesToolCall/ListTaskStatusesToolCall.tsx (1)

37-58: Consider using status ID for more stable React keys.

Statuses typically have unique identifiers. Using status.id would provide more stable keys than name+index.

♻️ Suggested improvement
 {statuses.map((status, index) => {
+	const id = typeof status.id === "string" ? status.id : null;
 	const name =
 		typeof status.name === "string"
 			? status.name
 			: `Status ${index + 1}`;
 	const type =
 		typeof status.type === "string" ? status.type : null;
 	const color =
 		typeof status.color === "string" ? status.color : null;
 	return (
 		<div
-			key={`${name}-${index}`}
+			key={id ?? `${name}-${index}`}
 			className="rounded border bg-background/70 px-2 py-1"
 		>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListTaskStatusesToolCall/ListTaskStatusesToolCall.tsx`
around lines 37 - 58, The key for each rendered status in the statuses.map block
is currently built from name and index which is unstable; update the key to use
the status unique identifier (e.g., status.id) when present: inside the
statuses.map callback in ListTaskStatusesToolCall.tsx, change the key prop on
the top-level div to prefer status.id (falling back to a stable alternative only
if id is absent) so React can track items reliably; ensure you reference the
same status.id symbol and keep existing className/content unchanged.
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListMembersToolCall/ListMembersToolCall.tsx (1)

33-56: Consider using member ID or email for more stable React keys.

Members typically have unique identifiers. Using member.id or member.email (which is already extracted) would provide more stable keys than name+index.

♻️ Suggested improvement
 {members.map((member, index) => {
 	const name =
 		typeof member.name === "string"
 			? member.name
 			: typeof member.email === "string"
 				? member.email
 				: `Member ${index + 1}`;
+	const id = typeof member.id === "string" ? member.id : null;
 	const email =
 		typeof member.email === "string" ? member.email : null;
 	const role =
 		typeof member.role === "string" ? member.role : null;
 	return (
 		<div
-			key={`${name}-${index}`}
+			key={id ?? email ?? `member-${index}`}
 			className="rounded border bg-background/70 px-2 py-1"
 		>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListMembersToolCall/ListMembersToolCall.tsx`
around lines 33 - 56, Replace the unstable key pattern used inside the
members.map render (currently key={`${name}-${index}`} in the
ListMembersToolCall component) with a stable unique identifier like member.id if
available, or fall back to member.email; update the JSX to use that identifier
for the key so React can reliably track list items during re-renders.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListMembersToolCall/ListMembersToolCall.tsx`:
- Around line 33-56: Replace the unstable key pattern used inside the
members.map render (currently key={`${name}-${index}`} in the
ListMembersToolCall component) with a stable unique identifier like member.id if
available, or fall back to member.email; update the JSX to use that identifier
for the key so React can reliably track list items during re-renders.

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListTaskStatusesToolCall/ListTaskStatusesToolCall.tsx`:
- Around line 37-58: The key for each rendered status in the statuses.map block
is currently built from name and index which is unstable; update the key to use
the status unique identifier (e.g., status.id) when present: inside the
statuses.map callback in ListTaskStatusesToolCall.tsx, change the key prop on
the top-level div to prefer status.id (falling back to a stable alternative only
if id is absent) so React can track items reliably; ensure you reference the
same status.id symbol and keep existing className/content unchanged.

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListTasksToolCall/ListTasksToolCall.tsx`:
- Around line 69-88: The React list in ListTasksToolCall uses unstable keys
built from title and index; change the key in the tasks.slice(0, 6).map callback
to use a stable identifier like task.id (e.g., key={task.id}) and only fall back
to a deterministic fallback (e.g., `${title}-${index}`) if task.id is missing,
ensuring consistent reconciliation in the ListTasksToolCall component rendering.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 594a618 and 2359859.

📒 Files selected for processing (8)
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/CreateTaskToolCall/CreateTaskToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/DeleteTaskToolCall/DeleteTaskToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/GenericToolCall/GenericToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/GetTaskToolCall/GetTaskToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListMembersToolCall/ListMembersToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListTaskStatusesToolCall/ListTaskStatusesToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListTasksToolCall/ListTasksToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/UpdateTaskToolCall/UpdateTaskToolCall.tsx
🚧 Files skipped from review as they are similar to previous changes (2)
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/DeleteTaskToolCall/DeleteTaskToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/UpdateTaskToolCall/UpdateTaskToolCall.tsx

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (6)
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/GetWorkspaceDetailsToolCall/GetWorkspaceDetailsToolCall.tsx (1)

2-2: Consider using project alias for the import path

Same pattern as other files - the deep relative import could use a tsconfig alias.

As per coding guidelines, apps/desktop/**/*.{ts,tsx}: Use alias as defined in tsconfig.json when possible.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/GetWorkspaceDetailsToolCall/GetWorkspaceDetailsToolCall.tsx`
at line 2, Replace the deep relative import of the ToolPart type with the
project tsconfig path alias used across the app (so the file imports ToolPart
via the shared alias rather than "../../../../utils/tool-helpers"); update the
import statement in GetWorkspaceDetailsToolCall.tsx to use the project's
configured alias that points to the utils/tool-helpers module (referencing the
ToolPart type) so the file follows the apps/desktop alias guideline.
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/GetAppContextToolCall/GetAppContextToolCall.tsx (1)

2-2: Consider using project alias for the import path

Same pattern as other files - the deep relative import could use a tsconfig alias.

As per coding guidelines, apps/desktop/**/*.{ts,tsx}: Use alias as defined in tsconfig.json when possible.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/GetAppContextToolCall/GetAppContextToolCall.tsx`
at line 2, The import in GetAppContextToolCall.tsx currently uses a deep
relative path to pull ToolPart; update it to use the project TS config alias
(the same alias used elsewhere) instead of "../../../../utils/tool-helpers".
Locate the import of ToolPart in GetAppContextToolCall.tsx and replace the
relative path with the corresponding tsconfig alias (e.g., "@app/..." or the
alias used for utils/tool-helpers in the repo) so it matches other files and
adheres to the apps/desktop alias guideline.
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListMembersToolCall/ListMembersToolCall.tsx (1)

2-3: Consider using project alias for the import path

Same pattern as other files - the deep relative import could use a tsconfig alias.

As per coding guidelines, apps/desktop/**/*.{ts,tsx}: Use alias as defined in tsconfig.json when possible.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListMembersToolCall/ListMembersToolCall.tsx`
around lines 2 - 3, The file ListMembersToolCall.tsx imports ToolPart and
getResult via a deep relative path; update both imports to use the project's
tsconfig path alias instead of "../../../../utils/tool-helpers". Locate the
module that exports ToolPart and getResult (the utils/tool-helpers file
referenced) and replace the two import lines to the corresponding alias import
(the same alias pattern used elsewhere in the app) so ToolPart and getResult are
imported via the alias.
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/AskUserQuestionToolCall/AskUserQuestionToolCall.tsx (1)

5-6: Consider using project alias for consistency

Same pattern as other files - the relative import could use a tsconfig alias for maintainability.

As per coding guidelines, apps/desktop/**/*.{ts,tsx}: Use alias as defined in tsconfig.json when possible.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/AskUserQuestionToolCall/AskUserQuestionToolCall.tsx`
around lines 5 - 6, Replace the relative import with the project's tsconfig
alias to match other files: update the import of ToolPart and SupersetToolCall
(symbols: ToolPart, SupersetToolCall) to use the configured project alias (e.g.,
`@app/`... or the repo's alias) instead of "../../../../utils/tool-helpers" and
"../SupersetToolCall"; ensure the alias path resolves in tsconfig.json and the
import paths remain consistent with other components in apps/desktop.
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/SwitchWorkspaceToolCall/SwitchWorkspaceToolCall.tsx (1)

2-2: Consider using project alias for the import path

Same pattern as other files - the deep relative import could benefit from using a tsconfig alias.

As per coding guidelines, apps/desktop/**/*.{ts,tsx}: Use alias as defined in tsconfig.json when possible.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/SwitchWorkspaceToolCall/SwitchWorkspaceToolCall.tsx`
at line 2, Replace the deep relative import of ToolPart in
SwitchWorkspaceToolCall.tsx with the project TS config alias used elsewhere
(e.g., use the alias that maps to the utils folder), updating the import that
currently references "../../../../utils/tool-helpers" so it imports ToolPart via
the configured path alias; ensure the import specifier matches other files'
alias usage and that TypeScript resolves correctly.
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/DeleteWorkspaceToolCall/DeleteWorkspaceToolCall.tsx (1)

2-2: Consider using project alias for the import path

The deep relative import ../../../../utils/tool-helpers could be replaced with a tsconfig path alias for better maintainability and consistency with the codebase pattern.

As per coding guidelines, apps/desktop/**/*.{ts,tsx}: Use alias as defined in tsconfig.json when possible.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/DeleteWorkspaceToolCall/DeleteWorkspaceToolCall.tsx`
at line 2, The DeleteWorkspaceToolCall.tsx file imports ToolPart via a deep
relative path ("../../../../utils/tool-helpers"); replace that deep relative
import with the project's tsconfig path alias for the utils module (import
ToolPart from the configured alias for utils/tool-helpers) so the import uses
the project alias instead of "../../../../utils/tool-helpers" and keeps
consistency with other modules.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/AskUserQuestionToolCall/AskUserQuestionToolCall.tsx`:
- Around line 5-6: Replace the relative import with the project's tsconfig alias
to match other files: update the import of ToolPart and SupersetToolCall
(symbols: ToolPart, SupersetToolCall) to use the configured project alias (e.g.,
`@app/`... or the repo's alias) instead of "../../../../utils/tool-helpers" and
"../SupersetToolCall"; ensure the alias path resolves in tsconfig.json and the
import paths remain consistent with other components in apps/desktop.

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/DeleteWorkspaceToolCall/DeleteWorkspaceToolCall.tsx`:
- Line 2: The DeleteWorkspaceToolCall.tsx file imports ToolPart via a deep
relative path ("../../../../utils/tool-helpers"); replace that deep relative
import with the project's tsconfig path alias for the utils module (import
ToolPart from the configured alias for utils/tool-helpers) so the import uses
the project alias instead of "../../../../utils/tool-helpers" and keeps
consistency with other modules.

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/GetAppContextToolCall/GetAppContextToolCall.tsx`:
- Line 2: The import in GetAppContextToolCall.tsx currently uses a deep relative
path to pull ToolPart; update it to use the project TS config alias (the same
alias used elsewhere) instead of "../../../../utils/tool-helpers". Locate the
import of ToolPart in GetAppContextToolCall.tsx and replace the relative path
with the corresponding tsconfig alias (e.g., "@app/..." or the alias used for
utils/tool-helpers in the repo) so it matches other files and adheres to the
apps/desktop alias guideline.

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/GetWorkspaceDetailsToolCall/GetWorkspaceDetailsToolCall.tsx`:
- Line 2: Replace the deep relative import of the ToolPart type with the project
tsconfig path alias used across the app (so the file imports ToolPart via the
shared alias rather than "../../../../utils/tool-helpers"); update the import
statement in GetWorkspaceDetailsToolCall.tsx to use the project's configured
alias that points to the utils/tool-helpers module (referencing the ToolPart
type) so the file follows the apps/desktop alias guideline.

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListMembersToolCall/ListMembersToolCall.tsx`:
- Around line 2-3: The file ListMembersToolCall.tsx imports ToolPart and
getResult via a deep relative path; update both imports to use the project's
tsconfig path alias instead of "../../../../utils/tool-helpers". Locate the
module that exports ToolPart and getResult (the utils/tool-helpers file
referenced) and replace the two import lines to the corresponding alias import
(the same alias pattern used elsewhere in the app) so ToolPart and getResult are
imported via the alias.

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/SwitchWorkspaceToolCall/SwitchWorkspaceToolCall.tsx`:
- Line 2: Replace the deep relative import of ToolPart in
SwitchWorkspaceToolCall.tsx with the project TS config alias used elsewhere
(e.g., use the alias that maps to the utils folder), updating the import that
currently references "../../../../utils/tool-helpers" so it imports ToolPart via
the configured path alias; ensure the import specifier matches other files'
alias usage and that TypeScript resolves correctly.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2359859 and cb56cce.

📒 Files selected for processing (21)
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/MastraToolCallBlock.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/AskUserQuestionToolCall/AskUserQuestionToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/CreateTaskToolCall/CreateTaskToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/CreateWorkspaceToolCall/CreateWorkspaceToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/DeleteTaskToolCall/DeleteTaskToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/DeleteWorkspaceToolCall/DeleteWorkspaceToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/GetAppContextToolCall/GetAppContextToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/GetTaskToolCall/GetTaskToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/GetWorkspaceDetailsToolCall/GetWorkspaceDetailsToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListDevicesToolCall/ListDevicesToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListMembersToolCall/ListMembersToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListProjectsToolCall/ListProjectsToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListTaskStatusesToolCall/ListTaskStatusesToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListTasksToolCall/ListTasksToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListWorkspacesToolCall/ListWorkspacesToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/StartAgentSessionToolCall/StartAgentSessionToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/SupersetToolCall/SupersetToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/SupersetToolCall/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/SwitchWorkspaceToolCall/SwitchWorkspaceToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/UpdateTaskToolCall/UpdateTaskToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/UpdateWorkspaceToolCall/UpdateWorkspaceToolCall.tsx
🚧 Files skipped from review as they are similar to previous changes (7)
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/CreateWorkspaceToolCall/CreateWorkspaceToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListDevicesToolCall/ListDevicesToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/StartAgentSessionToolCall/StartAgentSessionToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListWorkspacesToolCall/ListWorkspacesToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/UpdateWorkspaceToolCall/UpdateWorkspaceToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListProjectsToolCall/ListProjectsToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/UpdateTaskToolCall/UpdateTaskToolCall.tsx

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

2 issues found across 4 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListTasksToolCall/ListTasksToolCall.tsx">

<violation number="1" location="apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListTasksToolCall/ListTasksToolCall.tsx:11">
P2: This introduces duplicated helper logic (`toStringArray`/`formatDate`) that already exists in sibling task tool-call components. Extract these helpers into a shared utility to avoid behavior drift and reduce maintenance overhead.

(Based on your team's feedback about avoiding duplicated business logic across components.) [FEEDBACK_USED]</violation>
</file>

<file name="apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/UpdateTaskToolCall/UpdateTaskToolCall.tsx">

<violation number="1" location="apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/UpdateTaskToolCall/UpdateTaskToolCall.tsx:61">
P2: This UI couples request and response items by array index, which can misattribute field changes when response ordering differs. Resolve the matching by `taskId` (or another stable identifier) instead of `index`.

(Based on your team's feedback about avoiding fragile ordering-based behavior.) [FEEDBACK_USED]</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 7

🧹 Nitpick comments (3)
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/UpdateTaskToolCall/UpdateTaskToolCall.tsx (1)

3-5: Prefer tsconfig alias imports over deep relative paths.

These long relative imports are harder to maintain in this folder depth. If an alias exists for this module path, please switch to it for consistency.

As per coding guidelines, "Use alias as defined in tsconfig.json when possible".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/UpdateTaskToolCall/UpdateTaskToolCall.tsx`
around lines 3 - 5, The imports use deep relative paths; replace them with the
project's tsconfig path aliases for consistency: update the import lines that
reference ToolPart, getArgs, getResult (currently from
"../../../../utils/tool-helpers") to use the alias for the utils/tool-helpers
module, and update the SupersetToolCall import (currently "../SupersetToolCall")
to use its tsconfig alias; ensure named symbols ToolPart, getArgs, getResult and
SupersetToolCall still resolve and run the TypeScript build to verify the alias
mapping is correct.
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/CreateTaskToolCall/CreateTaskToolCall.tsx (1)

3-5: Prefer tsconfig alias imports over deep relative paths.

These long relative imports are brittle during refactors; switch to project aliases where available.

As per coding guidelines, apps/desktop/**/*.{ts,tsx}: Use alias as defined in tsconfig.json when possible.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/CreateTaskToolCall/CreateTaskToolCall.tsx`
around lines 3 - 5, Replace the deep relative imports in CreateTaskToolCall by
using the project's tsconfig path aliases: import ToolPart, getArgs, and
getResult via the alias that maps to the utils folder (instead of
"../../../../utils/tool-helpers") and import SupersetToolCall via its tsconfig
alias (instead of "../SupersetToolCall"); update the import statements in the
CreateTaskToolCall component so they use the configured aliases matching your
tsconfig.json paths (referencing the symbols ToolPart, getArgs, getResult, and
SupersetToolCall to locate the lines to change).
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListTasksToolCall/ListTasksToolCall.tsx (1)

3-5: Prefer tsconfig alias imports over deep relative paths.

These imports are hard to maintain and fragile during folder moves.

As per coding guidelines, apps/desktop/**/*.{ts,tsx}: Use alias as defined in tsconfig.json when possible.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListTasksToolCall/ListTasksToolCall.tsx`
around lines 3 - 5, Replace the deep relative imports for ToolPart, getArgs,
getResult and SupersetToolCall with the project's tsconfig path alias (the alias
that maps to the desktop app's renderer/src folders) so imports use the
configured alias instead of "../../../../utils/tool-helpers" and
"../SupersetToolCall"; update the import statements in ListTasksToolCall.tsx to
import ToolPart, getArgs, getResult and SupersetToolCall via the tsconfig alias
(e.g., the alias that points at the renderer utilities and components).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/CreateTaskToolCall/CreateTaskToolCall.tsx`:
- Around line 46-48: The current logic builds requestedTasks only when
args.tasks is an array, so flat create_task calls (with
title/priority/description/labels on args) produce an empty requestedTasks and
lose fallback fields; update the creation in the CreateTaskToolCall component to
detect when args.tasks is not an array but args contains task fields and
construct a single task record via toRecord(args) (or a small wrapper object) so
requestedTasks contains that one record, and apply the same change to the
analogous logic around the 72-95 block; reference the requestedTasks variable,
args.tasks check, and the toRecord(...) helper when making the fix.
- Around line 112-117: In CreateTaskToolCall (JSX block rendering inside the
element with className "text-muted-foreground"), avoid concatenating fragments
with conditional leading separators; instead assemble an array of metadata parts
(e.g., push slug as `#${slug}` when present, push taskId, priority, `assignee
${assignee}`, `due ${dueDate}` only when truthy) and then render parts.join(' •
') so separators appear only between present parts and never leading; update the
render expression that currently uses `{slug ? ...}{taskId ? ...}` to use this
joined-parts approach.

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListTasksToolCall/ListTasksToolCall.tsx`:
- Around line 106-117: The button for each task in ListTasksToolCall is
currently interactive even when openTaskId is null, resulting in a no-op
control; update the rendering so when openTaskId is falsy you either render a
non-interactive element (e.g., span/div) or render the button with
disabled={true}, aria-disabled="true" and no onClick, and ensure styles reflect
the disabled state (cursor/not-allowed and muted background); change the
existing onClick that calls navigate(...) to only be attached when openTaskId is
present, and keep references to openTaskId, navigate, and the button element in
your edits so the behavior is clear and accessible.
- Around line 18-23: The formatDate function creates a Date from the input which
treats "YYYY-MM-DD" as UTC midnight and then toLocaleDateString() renders it in
the local timezone causing off-by-one-day in west-of-UTC zones; update
formatDate to detect date-only strings (e.g., /^\d{4}-\d{2}-\d{2}$/) and, for
those inputs, either format using toLocaleDateString with the timeZone: "UTC"
option or build the Date using UTC components (Date.UTC(year, month-1, day))
before calling toLocaleDateString, while preserving the existing behavior for
non-date-only strings and invalid values in the formatDate function.

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/UpdateTaskToolCall/UpdateTaskToolCall.tsx`:
- Around line 72-78: The UI shows labels twice because the changedFields array
includes the "labels" key while labels are also rendered separately; update the
filter that builds changedFields (in UpdateTaskToolCall where changedFields is
computed) to also exclude key === "labels" (i.e., add && key !== "labels" to the
predicate) so labels are not included in the chips, and apply the same change to
the other occurrence that computes changedFields later in this component; keep
using toStringArray(update?.labels) for the dedicated labels line.
- Around line 60-73: The code pairs each item in updated with updates[index],
which can misattribute changes; instead build a lookup from the response updates
by stable keys (e.g., map updates by taskId and/or slug) and for each item in
updated find its corresponding update via that map using task.id or task.slug
(fall back to update.taskId when task.id missing) before computing openTaskId
and changedFields; update references to use the foundUpdate variable rather than
updates[index] and ensure null handling when no matching update exists.
- Around line 80-91: The button currently remains clickable but does nothing
when openTaskId is null; update the element (the button with key
`${title}-${slug ?? index}` and onClick that calls navigate) so it is disabled
or replaced with non-interactive content when openTaskId is falsy: add a
disabled prop (or conditionally render a <span>) and adjust styling/className to
indicate disabled state and remove the onClick action when openTaskId is null to
avoid a clickable no-op and improve accessibility.

---

Nitpick comments:
In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/CreateTaskToolCall/CreateTaskToolCall.tsx`:
- Around line 3-5: Replace the deep relative imports in CreateTaskToolCall by
using the project's tsconfig path aliases: import ToolPart, getArgs, and
getResult via the alias that maps to the utils folder (instead of
"../../../../utils/tool-helpers") and import SupersetToolCall via its tsconfig
alias (instead of "../SupersetToolCall"); update the import statements in the
CreateTaskToolCall component so they use the configured aliases matching your
tsconfig.json paths (referencing the symbols ToolPart, getArgs, getResult, and
SupersetToolCall to locate the lines to change).

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListTasksToolCall/ListTasksToolCall.tsx`:
- Around line 3-5: Replace the deep relative imports for ToolPart, getArgs,
getResult and SupersetToolCall with the project's tsconfig path alias (the alias
that maps to the desktop app's renderer/src folders) so imports use the
configured alias instead of "../../../../utils/tool-helpers" and
"../SupersetToolCall"; update the import statements in ListTasksToolCall.tsx to
import ToolPart, getArgs, getResult and SupersetToolCall via the tsconfig alias
(e.g., the alias that points at the renderer utilities and components).

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/UpdateTaskToolCall/UpdateTaskToolCall.tsx`:
- Around line 3-5: The imports use deep relative paths; replace them with the
project's tsconfig path aliases for consistency: update the import lines that
reference ToolPart, getArgs, getResult (currently from
"../../../../utils/tool-helpers") to use the alias for the utils/tool-helpers
module, and update the SupersetToolCall import (currently "../SupersetToolCall")
to use its tsconfig alias; ensure named symbols ToolPart, getArgs, getResult and
SupersetToolCall still resolve and run the TypeScript build to verify the alias
mapping is correct.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cb56cce and 3a4284a.

📒 Files selected for processing (4)
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/CreateTaskToolCall/CreateTaskToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/GetTaskToolCall/GetTaskToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListTasksToolCall/ListTasksToolCall.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/UpdateTaskToolCall/UpdateTaskToolCall.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/GetTaskToolCall/GetTaskToolCall.tsx

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 7 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/UpdateTaskToolCall/UpdateTaskToolCall.tsx">

<violation number="1" location="apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/UpdateTaskToolCall/UpdateTaskToolCall.tsx:26">
P3: This introduces another copy of the existing formatDate helper that already lives in other tool-call components. Consider extracting a shared helper so date formatting changes stay consistent.

(Based on your team's feedback about avoiding duplicating business logic in multiple components.) [FEEDBACK_USED]</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@Kitenite Kitenite merged commit 16ae1d5 into superset-sh:main Mar 3, 2026
6 of 7 checks passed
@Kitenite Kitenite deleted the kitenite/please-look-at-the-new-superse branch March 3, 2026 07:05
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 10 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/UpdateTaskToolCall/UpdateTaskToolCall.tsx">

<violation number="1" location="apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/UpdateTaskToolCall/UpdateTaskToolCall.tsx:68">
P2: Slug-based `update_task` entries won’t match in multi-update results, so task update metadata can disappear from the card.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment on lines +68 to +70
(taskId ? updatesByTaskId.get(taskId) : undefined) ??
(slug ? updatesBySlug.get(slug) : undefined) ??
(updates.length === 1 ? updates[0] : null);
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot Mar 3, 2026

Choose a reason for hiding this comment

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

P2: Slug-based update_task entries won’t match in multi-update results, so task update metadata can disappear from the card.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/UpdateTaskToolCall/UpdateTaskToolCall.tsx, line 68:

<comment>Slug-based `update_task` entries won’t match in multi-update results, so task update metadata can disappear from the card.</comment>

<file context>
@@ -61,23 +57,26 @@ export function UpdateTaskToolCall({ part }: UpdateTaskToolCallProps) {
-									const openTaskId = taskId ?? slug;
+									const taskId = typeof task.id === "string" ? task.id : null;
+									const matchedUpdate =
+										(taskId ? updatesByTaskId.get(taskId) : undefined) ??
+										(slug ? updatesBySlug.get(slug) : undefined) ??
+										(updates.length === 1 ? updates[0] : null);
</file context>
Suggested change
(taskId ? updatesByTaskId.get(taskId) : undefined) ??
(slug ? updatesBySlug.get(slug) : undefined) ??
(updates.length === 1 ? updates[0] : null);
const matchedUpdate =
(taskId ? updatesByTaskId.get(taskId) : undefined) ??
(slug ? updatesBySlug.get(slug) : undefined) ??
(slug ? updatesByTaskId.get(slug) : undefined) ??
(updates.length === 1 ? updates[0] : null);
Fix with Cubic

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