Enhance git metadata handling and improve change detection logic

- Introduced a new function `getGitMetadata` in `ApiContext` to fetch current git metadata, including new file IDs.
- Updated the `PatchTree.build` function to handle new file IDs, allowing for better differentiation between tracked and untracked files during patch processing.
- Modified the `git_changed_files` function to return both tracked and untracked files, improving accuracy in change detection.
- Enhanced the `App` component to debounce git metadata refreshes, ensuring the UI reflects the latest changes without unnecessary calls.

These changes aim to improve the integration with git and enhance the accuracy of change detection in the application.
This commit is contained in:
Joe 2026-03-01 07:10:14 -06:00
parent b8bd92d665
commit 640b2d3d97
7 changed files with 128 additions and 30 deletions

View file

@ -338,7 +338,3 @@ make sure this is applied to plugin-based syncback, too.
[git]
I notice we actually use the git cli in a lot of places. is there a git library we can use instead?
[auto select studio/atlas]
when things get added AFTER the fact because we send the git history hashes on connect rather than continiously, it auto-selects Studio for things that are being edited in real-time in the sync dialog
how should we handle new files? because it could have been that someone just deleted it in studio. we can actually check if its a truly new file in Studio, like A but not staged!