feat(check-in): a portrait for the desk, and both pictures save and adjust with their forms - #284
Merged
Merged
Conversation
…djust with their forms The avatar moves into Profile Information and the portrait into Check-in details and About you; each is a pending edit sent after PATCH /user. The picked file goes as picked with its crop, Adjust re-crops from the stored original, and the check-in page shows the portrait in the picture column instead of the avatar. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
The check-in page shows the diver's portrait, 7:9 like a passport photo, in the picture column beside their name. The avatar and initials never stand in for it. With no portrait nothing prints there, and the screen offers an empty frame that opens About you. Each picture is a field of the form it saves with: the avatar in Profile Information, the portrait in Check-in details and About you. The form holds one pending edit and sends it after
PATCH /user. The edit is a replace, an adjust, a remove, or for the portrait "Use profile picture". A failed picture leaves the saved fields saved and names itself in a toast. A pick is uploaded as the file itself with its crop, and "Adjust" re-crops the original the API holds, starting from the stored crop. The picker takes JPEG and PNG only, read from the bytes. It refuses up front what the API would refuse by size: over 10 MB, over 50 MP, or over 4032 × 3024 once decoded, which mirrors Pillow's JPEG draft. The export card, README, privacy page andDECISIONS.mdname the portrait and the kept originals.Verified with
npm run ci(224 files, 7200 tests),tsc --strictandformat:check, including new render tests for request order, cancel, Adjust, the copy and the pick-time refusals.🤖 Generated with Claude Code