fix(code): excluding cc plans from the cloud diff#1842
Merged
VojtechBartos merged 1 commit intomainfrom Apr 22, 2026
Merged
Conversation
Prompt To Fix All With AIThis is a comment left during a code review.
Path: apps/code/src/renderer/features/task-detail/utils/cloudToolChanges.ts
Line: 255
Comment:
**Filter too broad — misses the dot prefix**
`"claude/plans/"` also matches legitimate user paths such as `src/claude/plans/app.ts`. The intent is to exclude only the `.claude/plans/` subdirectory (note the leading dot). Using `".claude/plans/"` makes the check precise and won't inadvertently drop real changed files from a project that happens to have a `claude/plans/` directory.
```suggestion
if (path.includes(".claude/plans/")) continue;
```
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: apps/code/src/renderer/features/task-detail/utils/cloudToolChanges.test.ts
Line: 36-65
Comment:
**Prefer parameterised tests**
The test only exercises a single plan-path pattern. Per the project's convention, parameterised tests are preferred. Adding cases such as a relative `.claude/plans/` path, a `delete`-kind plan file, and a `claude/plans/` path *without* the leading dot (which should NOT be excluded) would give much stronger confidence in the filter's correctness.
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "fix(code): excluding cc plans from the c..." | Re-trigger Greptile |
Comment on lines
36
to
+65
| } | ||
|
|
||
| describe("extractCloudToolChangedFiles", () => { | ||
| it("excludes plan files from changed files", () => { | ||
| const calls = makeToolCalls( | ||
| toolCall({ | ||
| toolCallId: "tc-plan", | ||
| kind: "write", | ||
| locations: [ | ||
| { | ||
| path: "/home/user/.claude/plans/breezy-squishing-twilight.md", | ||
| }, | ||
| ], | ||
| content: diffContent( | ||
| "/home/user/.claude/plans/breezy-squishing-twilight.md", | ||
| "# Plan\n\nDo stuff", | ||
| ), | ||
| }), | ||
| toolCall({ | ||
| toolCallId: "tc-real", | ||
| kind: "edit", | ||
| locations: [{ path: "src/app.ts" }], | ||
| content: diffContent("src/app.ts", "new code", "old code"), | ||
| }), | ||
| ); | ||
| const result = extractCloudToolChangedFiles(calls); | ||
| expect(result).toHaveLength(1); | ||
| expect(result[0].path).toBe("src/app.ts"); | ||
| }); | ||
| }); |
There was a problem hiding this comment.
The test only exercises a single plan-path pattern. Per the project's convention, parameterised tests are preferred. Adding cases such as a relative .claude/plans/ path, a delete-kind plan file, and a claude/plans/ path without the leading dot (which should NOT be excluded) would give much stronger confidence in the filter's correctness.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/code/src/renderer/features/task-detail/utils/cloudToolChanges.test.ts
Line: 36-65
Comment:
**Prefer parameterised tests**
The test only exercises a single plan-path pattern. Per the project's convention, parameterised tests are preferred. Adding cases such as a relative `.claude/plans/` path, a `delete`-kind plan file, and a `claude/plans/` path *without* the leading dot (which should NOT be excluded) would give much stronger confidence in the filter's correctness.
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
521aaf2 to
b177772
Compare
adboio
approved these changes
Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.claude/plans/) from the cloud diff file list so they don't show up as changed files in the task detail view