Skip to content

Fix scan wizard validation and camera rotation locks#75

Merged
markcoleman merged 4 commits intomainfrom
improve
Feb 22, 2026
Merged

Fix scan wizard validation and camera rotation locks#75
markcoleman merged 4 commits intomainfrom
improve

Conversation

@markcoleman
Copy link
Copy Markdown
Owner

Summary:

  • resolve the LiveScanWizardContainerView initializer and binding issues so the wizard builds correctly and cube face rotation now exposes the top face
  • tighten cube validation and solving logic in CubeStateValidator/CubeSolving to accept valid combinations and improve error reporting
  • refresh the scanning pipeline and UI helpers so the camera, pipeline, and guidance flows stay in sync with the updated validator and wizard behavior

Testing:

  • Not run (not requested)

@github-actions
Copy link
Copy Markdown
Contributor

⚠️ This PR is very large. Consider breaking it into smaller PRs for easier review.

PR Stats:

  • Lines added: 4043
  • Lines deleted: 67
  • Files changed: 37

Tips for large PRs:

  • Break into smaller, focused PRs
  • Ensure comprehensive test coverage
  • Add detailed descriptions for each change

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +437 to +440
case .left, .right:
return 1
case .front, .back:
return 2
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 }
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@markcoleman markcoleman merged commit 7732246 into main Feb 22, 2026
7 checks passed
@markcoleman markcoleman deleted the improve branch February 22, 2026 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant