Fix scan wizard validation and camera rotation locks#75
Conversation
|
PR Stats:
Tips for large PRs:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ca3bce2c09
ℹ️ 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".
| case .left, .right: | ||
| return 1 | ||
| case .front, .back: | ||
| return 2 |
There was a problem hiding this comment.
Fix corner orientation mapping for strict checks
When strictPhysicalChecks is enabled, valid reachable states are being rejected as .invalidCornerOrientation (for example, applying a single R move to a solved cube). The orientation values returned here are inconsistent with the corner indexing used by this validator, so the corner orientation sum can become non-zero mod 3 for legal positions, which makes strict validation unusable for real cube states.
Useful? React with 👍 / 👎.
| for (face, pattern) in capturedPatterns { | ||
| guard face != excluding else { continue } | ||
| guard pattern.count == colors.count else { continue } | ||
| guard pattern[4] == colors[4] else { continue } |
There was a problem hiding this comment.
Remove center-color gate from duplicate pattern detection
This guard blocks duplicate detection in the key failure mode where the center sticker is misclassified: face identity is derived from center color in updateFaceEstimate, so a repeated physical face with a wrong center classification reaches this check under a different face id, but the center-equality requirement filters out the prior captured match. That allows duplicate faces to be accepted as new captures, producing invalid scan sets that users must manually fix later.
Useful? React with 👍 / 👎.
Summary:
LiveScanWizardContainerViewinitializer and binding issues so the wizard builds correctly and cube face rotation now exposes the top faceCubeStateValidator/CubeSolvingto accept valid combinations and improve error reportingTesting: