Skip to content

fix(code): excluding cc plans from the cloud diff#1842

Merged
VojtechBartos merged 1 commit intomainfrom
vojta/fix-git-diff
Apr 22, 2026
Merged

fix(code): excluding cc plans from the cloud diff#1842
VojtechBartos merged 1 commit intomainfrom
vojta/fix-git-diff

Conversation

@VojtechBartos
Copy link
Copy Markdown
Member

Summary

  • Exclude Claude Code plan files (.claude/plans/) from the cloud diff file list so they don't show up as changed files in the task detail view

@VojtechBartos VojtechBartos requested a review from adboio April 22, 2026 15:01
@VojtechBartos VojtechBartos enabled auto-merge (squash) April 22, 2026 15:02
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 22, 2026

Prompt To Fix All With AI
This 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 thread apps/code/src/renderer/features/task-detail/utils/cloudToolChanges.ts Outdated
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");
});
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 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.

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!

@VojtechBartos VojtechBartos merged commit 2b1eb2b into main Apr 22, 2026
15 checks passed
@VojtechBartos VojtechBartos deleted the vojta/fix-git-diff branch April 22, 2026 15:14
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.

2 participants