feat: include orphaned file metadata in share payload#305
Merged
tomasz-tomczyk merged 6 commits intomainfrom Apr 18, 2026
Merged
feat: include orphaned file metadata in share payload#305tomasz-tomczyk merged 6 commits intomainfrom
tomasz-tomczyk merged 6 commits intomainfrom
Conversation
Add Status and Orphaned fields to shareFile so crit-web can identify removed files and render them with the appropriate badge. Both buildSharePayload and upsertShareToWeb now include these fields in the file list map, and computeShareHash includes them for change detection. LoadShareFilesFromDisk includes orphaned files (with empty content and the orphaned flag set) instead of skipping them, so the browser share path delivers the full file list to crit-web. Closes #291 (crit side)
4 tasks
Owner
Author
|
Companion PR: tomasz-tomczyk/crit-web#91 |
1 task
This reverts commit 9a64213.
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.
Summary
Adds file status metadata to the share payload so crit-web can render orphaned files properly.
shareFilestruct gets aStatusfield (added,modified,deleted,renamed,removed)removedstatus means the file is orphaned — no longer in the review but has unresolved commentsLoadShareFilesFromDiskincludes orphaned files with empty content andstatus: "removed"computeShareHashincludes status in change detectionNo separate
orphanedboolean — status alone is sufficient.Test plan
go test ./...— all passgo vet ./...— cleanTestBuildSharePayload_WithStatusAndOrphaned,TestLoadShareFilesFromDisk_OrphanedFiles(including resolved-orphan exclusion),TestHandleShare_OrphanedFileIncludedTestShareSyncOrphanedFilemake e2e-share— all 19 tests passCloses #291 (crit side)
See also: tomasz-tomczyk/crit-web#91 — companion PR for rendering