Fix Timer MAX View moon/sun ratio scaling#8
Merged
Conversation
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.
Motivation
MAX Viewon the Timer hero used a much smaller stage but moon sizes were effectively fixed for the full preview scale, producing wrong proportions in the timer UI.Description
apps/mobile/src/utils/previewGeometry.tsso both are computed relative to the suppliedsunRadiusinstead of hard-coded numbers, and added ratio constants for annular/total/partial/none sizing and margins.apps/mobile/src/screens/TimerScreen.tsxfrom the canonical preview scale usingPREVIEW_STAGE_SIZE/PREVIEW_SUN_RADIUSso the TimerMAX Viewstage uses a proportional sun radius.apps/mobile/tests/preview-geometry.test.tsthat verify (1) moon/sun size ratio consistency between full preview and compact stage and (2) preservation of C1/C4 tangency distance in the compact stage.apps/mobileversion to1.1.19and documented the bugfix inCHANGELOG.md.Testing
pnpm -C apps/mobile test tests/preview-geometry.test.ts, which executed the preview-geometry suite and resulted in all tests passing (1 file, 9 testspassed).pnpm -C apps/mobile typecheck, which completed successfully with no TypeScript errors.Codex Task