feat: sync virtual user files to a project's Git repo - #9756
Draft
nishantmonu51 wants to merge 1 commit into
Draft
feat: sync virtual user files to a project's Git repo#9756nishantmonu51 wants to merge 1 commit into
nishantmonu51 wants to merge 1 commit into
Conversation
Virtual files (alerts, reports, personal dashboards) previously lived only in the admin database and never made it into a project's Git repo. This adds a sync path that promotes them into Git under `user_files/`. - Track per-file sync state (`dirty`/`synced`) plus a `base_data` snapshot so a sync can detect and report edits made directly in Git that it overwrote. - Add `GitWriter` for committing user files to a project's repo, plus the `SyncUserFilesToGit` river job and a periodic sweep that syncs projects whose configured interval has elapsed. - Add `SyncProjectFilesToGit`, `GetProjectFileSyncStatus` and `UpdateProjectFileSyncSchedule` APIs, and expose `synced` on `VirtualFile` so runtimes drop their staged overlay copy and serve the Git copy instead. - Surface sync status, manual sync and the auto-sync schedule in the project status page. Claude-Session: https://claude.ai/code/session_0171HV6KomTrLmi2CbrQwsxV
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.
Virtual files (alerts, reports, personal dashboards) previously lived only in the admin database and never made it into a project's Git repo. This adds a sync path that promotes them into Git under
user_files/<segment>/<kind>/<name>.yaml.sync_state(dirty/synced) and abase_datasnapshot, so a sync can detect and report edits made directly in Git that it overwrote.GitWriterfor committing user files to a project's repo, theSyncUserFilesToGitriver job, and a periodic sweep that syncs projects whose configured interval has elapsed.SyncProjectFilesToGit,GetProjectFileSyncStatusandUpdateProjectFileSyncScheduleAPIs, and exposessyncedonVirtualFileso runtimes drop their staged overlay copy and serve the Git copy instead.Checklist:
https://claude.ai/code/session_0171HV6KomTrLmi2CbrQwsxV