feat(desktop): add chat components for Superset MCP tools#1973
Conversation
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds 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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 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
ToolPartimport to the configured alias style for consistency inapps/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 intsconfig.jsonwhen 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 forToolPartto 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 intsconfig.jsonwhen 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
📒 Files selected for processing (22)
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/MastraToolCallBlock.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/CreateWorkspaceToolCall/CreateWorkspaceToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/CreateWorkspaceToolCall/index.tsapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/DeleteWorkspaceToolCall/DeleteWorkspaceToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/DeleteWorkspaceToolCall/index.tsapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/GetAppContextToolCall/GetAppContextToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/GetAppContextToolCall/index.tsapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/GetWorkspaceDetailsToolCall/GetWorkspaceDetailsToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/GetWorkspaceDetailsToolCall/index.tsapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListDevicesToolCall/ListDevicesToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListDevicesToolCall/index.tsapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListProjectsToolCall/ListProjectsToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListProjectsToolCall/index.tsapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListWorkspacesToolCall/ListWorkspacesToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListWorkspacesToolCall/index.tsapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/StartAgentSessionToolCall/StartAgentSessionToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/StartAgentSessionToolCall/index.tsapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/SwitchWorkspaceToolCall/SwitchWorkspaceToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/SwitchWorkspaceToolCall/index.tsapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/UpdateWorkspaceToolCall/UpdateWorkspaceToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/UpdateWorkspaceToolCall/index.tsapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/utils/tool-helpers.ts
There was a problem hiding this comment.
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 aliasLine 2 uses a long relative path for
ToolPart; if atsconfigalias 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 importLine 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.jsonwhen 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-helperswhen thetsconfig.jsonalias pattern"*": ["src/*"]allows the cleaner importfrom "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
📒 Files selected for processing (15)
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/MastraToolCallBlock.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/CreateTaskToolCall/CreateTaskToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/CreateTaskToolCall/index.tsapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/DeleteTaskToolCall/DeleteTaskToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/DeleteTaskToolCall/index.tsapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/GetTaskToolCall/GetTaskToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/GetTaskToolCall/index.tsapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListMembersToolCall/ListMembersToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListMembersToolCall/index.tsapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListTaskStatusesToolCall/ListTaskStatusesToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListTaskStatusesToolCall/index.tsapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListTasksToolCall/ListTasksToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListTasksToolCall/index.tsapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/UpdateTaskToolCall/UpdateTaskToolCall.tsxapps/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"; | |||
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
🧹 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
idfield 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.idwould 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.idormember.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
📒 Files selected for processing (8)
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/CreateTaskToolCall/CreateTaskToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/DeleteTaskToolCall/DeleteTaskToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/GenericToolCall/GenericToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/GetTaskToolCall/GetTaskToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListMembersToolCall/ListMembersToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListTaskStatusesToolCall/ListTaskStatusesToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListTasksToolCall/ListTasksToolCall.tsxapps/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
There was a problem hiding this comment.
🧹 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 pathSame 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 pathSame 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 pathSame 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 consistencySame 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 pathSame 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 pathThe deep relative import
../../../../utils/tool-helperscould 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
📒 Files selected for processing (21)
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/MastraToolCallBlock.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/AskUserQuestionToolCall/AskUserQuestionToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/CreateTaskToolCall/CreateTaskToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/CreateWorkspaceToolCall/CreateWorkspaceToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/DeleteTaskToolCall/DeleteTaskToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/DeleteWorkspaceToolCall/DeleteWorkspaceToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/GetAppContextToolCall/GetAppContextToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/GetTaskToolCall/GetTaskToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/GetWorkspaceDetailsToolCall/GetWorkspaceDetailsToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListDevicesToolCall/ListDevicesToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListMembersToolCall/ListMembersToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListProjectsToolCall/ListProjectsToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListTaskStatusesToolCall/ListTaskStatusesToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListTasksToolCall/ListTasksToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListWorkspacesToolCall/ListWorkspacesToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/StartAgentSessionToolCall/StartAgentSessionToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/SupersetToolCall/SupersetToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/SupersetToolCall/index.tsapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/SwitchWorkspaceToolCall/SwitchWorkspaceToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/UpdateTaskToolCall/UpdateTaskToolCall.tsxapps/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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.jsonwhen 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 intsconfig.jsonwhen 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
📒 Files selected for processing (4)
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/CreateTaskToolCall/CreateTaskToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/GetTaskToolCall/GetTaskToolCall.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/ChatPane/ChatInterface/components/MastraToolCallBlock/components/ListTasksToolCall/ListTasksToolCall.tsxapps/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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
| (taskId ? updatesByTaskId.get(taskId) : undefined) ?? | ||
| (slug ? updatesBySlug.get(slug) : undefined) ?? | ||
| (updates.length === 1 ? updates[0] : null); |
There was a problem hiding this comment.
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>
| (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); |
Summary
MastraToolCallBlockfor device/workspace/session toolssuperset_*namespaced tools and legacy aliasesTesting
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
Refactors
Written for commit 51a9433. Summary will update on new commits.
Summary by CodeRabbit
New Features
Chores