Add automatic checkbox reset based on file modification time#123
Add automatic checkbox reset based on file modification time#123
Conversation
Co-authored-by: letmaik <530988+letmaik@users.noreply.github.com>
Co-authored-by: letmaik <530988+letmaik@users.noreply.github.com>
Co-authored-by: letmaik <530988+letmaik@users.noreply.github.com>
Co-authored-by: letmaik <530988+letmaik@users.noreply.github.com>
Co-authored-by: letmaik <530988+letmaik@users.noreply.github.com>
Co-authored-by: letmaik <530988+letmaik@users.noreply.github.com>
Co-authored-by: letmaik <530988+letmaik@users.noreply.github.com>
Co-authored-by: letmaik <530988+letmaik@users.noreply.github.com>
Co-authored-by: letmaik <530988+letmaik@users.noreply.github.com>
Co-authored-by: letmaik <530988+letmaik@users.noreply.github.com>
|
@copilot rewrite the PR description by comparing against the target branch |
Updated the PR description to compare against the target branch. Here's the comprehensive summary: OverviewThis PR implements automatic checkbox reset functionality based on file modification time. When enabled, checkboxes automatically reset when a file is modified after being checked, ensuring reviewed status accurately reflects current file state. ChangesConfiguration (package.json)
Implementation (src/treeProvider.ts)New Interface: interface CheckboxStateInfo {
state: TreeItemCheckboxState;
timestamp: number; // When the checkbox was checked
}Key Changes:
Stats
BehaviorWhen
When
Benefits
|
|
@copilot resolve the merge conflicts |
There was a problem hiding this comment.
Pull request overview
This PR implements automatic checkbox reset functionality that detects when checked files are modified after review. When enabled via the new resetCheckboxOnFileChange configuration option (default: false), the extension tracks checkbox timestamps and compares them against file modification times to automatically uncheck files that have been modified since review.
Changes:
- Added
CheckboxStateInfointerface to track both checkbox state and timestamp - Implemented file modification time checking using
fs.promises.stat()with parallel batch processing - Added
computeFolderCheckboxStatemethod to derive folder checkbox states from child files - Implemented cleanup logic to remove checkbox states for files no longer in the diff
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| package.json | Added resetCheckboxOnFileChange configuration option with description |
| README.md | Documented the new configuration options (showCheckboxes and resetCheckboxOnFileChange) |
| src/treeProvider.ts | Implemented core checkbox reset logic with timestamp tracking, file mtime checking, and folder state computation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: letmaik <530988+letmaik@users.noreply.github.com>
Resolved merge conflicts with master branch in commit b695ab8. Conflicts Resolved:
The code compiles without errors and all functionality is preserved. |
|
@copilot read through the PR review comments and address them (or ignore them) |
Addressed all PR review comments in commit e22bd42:
All changes compile successfully and maintain backward compatibility. |
e22bd42 to
f8b9049
Compare
Plan: Reset checkbox when file modification time changes
Requirement
Implementation Plan
gitTreeCompare.resetCheckboxOnFileChangehandleChangeCheckboxStateto store timestamp along with stateupdateDiffto check file modification time instead of/in addition to git statusPR Review Changes Addressed
>=instead of>for file mtime comparisonSummary
Successfully implemented checkbox reset based on file modification time and addressed all PR review feedback.
Final State:
resetCheckboxOnFileChangeconfig (default: false)Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.