feat: render orphaned files in shared reviews#91
Merged
tomasz-tomczyk merged 4 commits intomainfrom Apr 18, 2026
Merged
Conversation
Add status and orphaned columns to review_round_snapshots table. When the CLI shares files with orphaned: true, crit-web now persists and surfaces this through the API and frontend: - Migration adds status (string) and orphaned (boolean) columns - Schema relaxes content validation for orphaned files (empty content) - Document API and LiveView init include orphaned/status for flagged files - Frontend renders "Removed" badge, italic placeholder, no add-comment button, and all comments as file-level for orphaned files - CSS styles match crit local (badge-removed variables already existed)
5 tasks
Replace the separate `status` (string) + `orphaned` (boolean) fields with a single `status` Ecto.Enum field with values: :added, :modified, :deleted, :renamed, :removed. The :removed status replaces the orphaned boolean. - Migration only adds the status column (no orphaned column) - Schema uses Ecto.Enum with default :modified - Reviews context maps legacy orphaned:true payloads to status:"removed" - API and LiveView always include status per file - JS checks file.status === 'removed' instead of file.orphaned
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
Ports orphaned file rendering from crit local to crit-web shared reviews.
statuscolumn (Ecto enum:added|modified|deleted|renamed|removed, defaultmodified) toreview_round_snapshots. No separateorphanedboolean —removedstatus indicates orphaned files.orphaned: truein old payloads and maps it tostatus: "removed"POST /api/reviewspersists status per file;GET /api/reviews/:token/documentreturns itstatus === "removed".file-header-badge.removedand.orphaned-placeholderstyles with theme variables in all 4 blocksTest plan
mix test— 387 tests passmix compile --warnings-as-errors— cleanorphaned: truepayloadsSee also: tomasz-tomczyk/crit#305 — companion PR for share payload