Repository navigation
feat(target-config): add adaptive game shell composition - #135
Conversation
|
Warning Review limit reached
Next review available in: 3 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughAdds safe-area-aware adaptive viewport composition. The resolver supports side rails, bottom controls, and compact portrait layouts. It validates game aspect ratios and includes documentation and smoke tests. The AIT host test types the IAP verifier input and validates a bounded timeout. ChangesAdaptive viewport composition
AIT host test adjustment
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Caller
participant resolveTargetViewportComposition
participant ViewportGeometry
Caller->>resolveTargetViewportComposition: Provide viewport and layout input
resolveTargetViewportComposition->>ViewportGeometry: Evaluate safe area, aspect ratio, and rail constraints
ViewportGeometry-->>resolveTargetViewportComposition: Return composed bounds
resolveTargetViewportComposition-->>Caller: Return game, rail, and control bounds
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/GAME_DEVELOPMENT.md`:
- Around line 202-211: Update the example around
resolveTargetViewportComposition and the mountLeftRail/mountRightRail calls to
branch on composition.mode === 'side-rails'. Mount both rails only in side-rails
mode; otherwise hide or unmount both rails, while always mounting
composition.gameBounds.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 1a6a008c-15c3-4f92-a21e-d2cf50d34643
📒 Files selected for processing (4)
.sampo/changesets/add-adaptive-game-shell.mddocs/GAME_DEVELOPMENT.mdpackages/target-config/src/viewport.tspackages/target-config/test/target-config-smoke.ts
|
@coderabbitai review |
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b63512cb2f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
@coderabbitai review |
|
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
CI follow-up in d1c2c85: the AIT verifier deadline assertion now checks the production contract ( |
|
@codex review |
|
@coderabbitai review |
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d1c2c85b8f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Review follow-up in 78f0e08: composition results are now a discriminated union, so |
|
@codex review |
|
@coderabbitai review |
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 78f0e0894c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Review follow-up in 48d9309: side rails are now limited to expanded viewport classifications, and fractional |
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@coderabbitai review |
✅ Action performedReview finished.
|
48d9309 to
056107b
Compare
|
@codex review Please re-review exact rebased head |
|
|
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
What changed
resolveTargetViewportComposition()to compute concrete safe-area-aware game and rail boundsside-rails,bottom-controls, andcompact-portraitcomposition modes@mpgd/target-configchangesetWhy
Games such as Revolving Cards need a stable 3:4 playfield on wide desktop surfaces while remaining full portrait on phones. Keeping this geometry in
target-configprevents each game from duplicating viewport breakpoints and preserves the existing container-measurement and safe-area model.Impact
Consumers can opt into side rails on sufficiently wide landscape viewports. Narrow landscape and portrait layouts retain the full safe content bounds, and gameplay logic can remain independent of the selected shell mode.
Validation
pnpm --dir packages/target-config testpnpm --dir packages/target-config checkpnpm graph:target-configpnpm smoke:target-config:distgit diff --checkSummary by CodeRabbit
New Features
Documentation
Bug Fixes