fix(desktop): simplify task detail activity and comments#2953
Conversation
📝 WalkthroughWalkthroughDeleted the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 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.
Actionable comments posted: 1
🤖 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/routes/_authenticated/_dashboard/tasks/`$taskId/page.tsx:
- Line 126: The variable creatorName currently checks
task?.creator?.name?.trim() but returns the original untrimmed string; change
the assignment for creatorName to use the trimmed value (e.g., compute const
trimmed = task?.creator?.name?.trim(); and set creatorName = trimmed ? trimmed :
null) so downstream avatar/initial logic receives the trimmed name; update the
expression that defines creatorName accordingly (reference: creatorName and
task?.creator?.name).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 82a6bb6d-8b92-4493-9635-2357d780c9a7
📒 Files selected for processing (4)
apps/desktop/src/renderer/routes/_authenticated/_dashboard/tasks/$taskId/components/CommentInput/CommentInput.tsxapps/desktop/src/renderer/routes/_authenticated/_dashboard/tasks/$taskId/components/CommentInput/index.tsapps/desktop/src/renderer/routes/_authenticated/_dashboard/tasks/$taskId/page.test.tsxapps/desktop/src/renderer/routes/_authenticated/_dashboard/tasks/$taskId/page.tsx
💤 Files with no reviewable changes (3)
- apps/desktop/src/renderer/routes/_authenticated/_dashboard/tasks/$taskId/components/CommentInput/index.ts
- apps/desktop/src/renderer/routes/_authenticated/_dashboard/tasks/$taskId/components/CommentInput/CommentInput.tsx
- apps/desktop/src/renderer/routes/_authenticated/_dashboard/tasks/$taskId/page.test.tsx
| const handleDelete = () => { | ||
| navigate({ to: "/tasks", search: backSearch }); | ||
| }; | ||
| const creatorName = task?.creator?.name?.trim() ? task.creator.name : null; |
There was a problem hiding this comment.
Use the trimmed creator name value, not the raw one.
Line 126 validates trim() but still returns the untrimmed name. This can produce whitespace actor names and a blank avatar fallback initial downstream.
💡 Proposed fix
- const creatorName = task?.creator?.name?.trim() ? task.creator.name : null;
+ const creatorName = task?.creator?.name?.trim() || null;📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| const creatorName = task?.creator?.name?.trim() ? task.creator.name : null; | |
| const creatorName = task?.creator?.name?.trim() || null; |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@apps/desktop/src/renderer/routes/_authenticated/_dashboard/tasks/`$taskId/page.tsx
at line 126, The variable creatorName currently checks
task?.creator?.name?.trim() but returns the original untrimmed string; change
the assignment for creatorName to use the trimmed value (e.g., compute const
trimmed = task?.creator?.name?.trim(); and set creatorName = trimmed ? trimmed :
null) so downstream avatar/initial logic receives the trimmed name; update the
expression that defines creatorName accordingly (reference: creatorName and
task?.creator?.name).
Summary
Validation
bun run lint✅bun run typecheck✅bun testpackages/trpc/src/router/task/task.test.ts:Export nameddbWsnot foundapps/desktop/src/renderer/stores/editor-state/editorCoordinator.test.ts: missingelectronTRPCglobalapps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/Terminal/hooks/workspaceRun.test.ts: existing assertion failure inpreserves the stored run command when updating workspace-run stateExternal worktree detection and import > listExternalWorktrees detects external worktreealso fails repo-wideSummary by cubic
Only show the Activity section on the desktop task detail page when a real creator exists, and remove the comments UI. This avoids a fake actor, simplifies the UI, and removes unused code.
Bug Fixes
creator; no fallback to assignee or "Someone".ActivitySection.Refactors
creatorin the task query and update the task detail type.CommentInputand a brittle page source test.Written for commit 7a8bf8f. Summary will update on new commits.