Skip to content

fix: delete sidecar file when all annotations are removed - #16

Merged
sam-phinizy merged 1 commit into
mainfrom
fix-empty-annotation-cleanup
Mar 24, 2026
Merged

fix: delete sidecar file when all annotations are removed#16
sam-phinizy merged 1 commit into
mainfrom
fix-empty-annotation-cleanup

Conversation

@sam-phinizy

Copy link
Copy Markdown
Contributor

Summary

  • When all annotations are deleted from a file (via delete_annotation or clear_annotations), the empty .redpen.json sidecar file is now removed instead of being saved with an empty annotations array
  • This prevents the GUI from showing files as annotated when they have no annotations

Test plan

  • Delete all annotations from a file and verify the sidecar JSON file is removed
  • Verify the file no longer appears as annotated in the file tree
  • Verify adding new annotations after clearing still works correctly

🤖 Generated with Claude Code

Empty sidecar JSON files were left behind after deleting all annotations,
causing the GUI to show files as annotated when they had no annotations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sam-phinizy
sam-phinizy merged commit d8098a3 into main Mar 24, 2026
2 checks passed
@sam-phinizy
sam-phinizy deleted the fix-empty-annotation-cleanup branch March 24, 2026 10:38
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