Skip to content

feat: include orphaned file metadata in share payload#305

Merged
tomasz-tomczyk merged 6 commits intomainfrom
feat/291-orphaned-file-share
Apr 18, 2026
Merged

feat: include orphaned file metadata in share payload#305
tomasz-tomczyk merged 6 commits intomainfrom
feat/291-orphaned-file-share

Conversation

@tomasz-tomczyk
Copy link
Copy Markdown
Owner

@tomasz-tomczyk tomasz-tomczyk commented Apr 18, 2026

Summary

Adds file status metadata to the share payload so crit-web can render orphaned files properly.

  • shareFile struct gets a Status field (added, modified, deleted, renamed, removed)
  • removed status means the file is orphaned — no longer in the review but has unresolved comments
  • Orphaned files with all comments resolved are excluded from the payload (no empty noise)
  • LoadShareFilesFromDisk includes orphaned files with empty content and status: "removed"
  • computeShareHash includes status in change detection

No separate orphaned boolean — status alone is sufficient.

Test plan

  • go test ./... — all pass
  • go vet ./... — clean
  • New unit tests: TestBuildSharePayload_WithStatusAndOrphaned, TestLoadShareFilesFromDisk_OrphanedFiles (including resolved-orphan exclusion), TestHandleShare_OrphanedFileIncluded
  • New integration test: TestShareSyncOrphanedFile
  • make e2e-share — all 19 tests pass

Closes #291 (crit side)

See also: tomasz-tomczyk/crit-web#91 — companion PR for rendering

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)
@tomasz-tomczyk
Copy link
Copy Markdown
Owner Author

Companion PR: tomasz-tomczyk/crit-web#91

@tomasz-tomczyk tomasz-tomczyk merged commit 2479324 into main Apr 18, 2026
4 checks passed
@tomasz-tomczyk tomasz-tomczyk deleted the feat/291-orphaned-file-share branch April 18, 2026 10:19
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.

Parity: port orphaned file support to crit-web

1 participant