Repository navigation
feat: combined web improvements (PRs #7, #8, #11, #12) - #14
Merged
Merged
Conversation
hintChanges was Set<string> — board couldn't tell whether a hint cell would become a queen or a cross, so all hint cells looked identical. Changed to Map<string, number> (cellKey → target state). Cross hints (state 2) get a diagonal stripe overlay. Queen hints (state 1) get no overlay. Uninvolved cells now use a dark semi-transparent overlay instead of opacity: 0.35, keeping colours visible while clearly muted. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The button cluttered the action row while playing. It now appears below the SolvedBanner immediately after solving, which is when the player naturally wants a new challenge. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Generated puzzles had no metadata, so the Play page showed no name
or source. Now Play↗ and Edit↗ inject name ("Generated N×N from seed
S"), source, and today's date into the puzzle JSON before navigating.
Also adds name/source/date as optional fields to PuzzleJson in Rust
and documents them in formats.md.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Each Rust rule now carries a stable code_name (&'static str). WasmHint gains a name() method that returns it. The web introduces web/src/data/rules.ts as the single source for rule metadata (name, difficulty, description). RulesPage renders from RULES instead of hardcoded JSX. SolvePage matches active hints by codeName instead of description string patterns, so rule display survives description text changes on the Rust side. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
generate.test.ts: 'New puzzle' is now gated behind solved state — tests updated to solve via hints first, and a new test asserts the button is hidden until solving. solve.test.ts: rule categories changed from Basic/Easy/Medium/Hard to Easy/Medium/Hard — remove stale 'Basic' assertion. helpers.ts: add solveViaHints helper for Play-mode integration tests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Region border segments now track their two adjacent cells. When both adjacent cells are dimmed (not involved in the hint), the border is also dimmed (0.18 opacity vs 0.5). Involved cells get a subtle 10% darkening so the focused area reads as intentionally highlighted. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Board: reduce dim opacity for cells with existing content (queen/cross) from 0.42 to 0.18 so placed marks remain readable when outside the hint focus area. Remove the involved-cell overlay — it made the whole board look slightly grey when the hint's involved set is broad. EditorPage: add align-items: center to boardCol so the board and controls are centred rather than stretching to the column width. PlayPage/utils: PuzzleMeta now includes date; handleShare injects name/source/date back into the puzzle JSON before base64-encoding, since WasmPuzzle.to_json() always strips those fields. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Row 1: Undo · Redo · Clear board Row 2: Size picker · Generate · Shuffle queens Row 3: Share/Export · Open in Play Buttons in each row use flex: 1 for equal widths. Removed the vertical dividers that were grouping disparate actions within a row. Co-Authored-By: Claude Sonnet 4.6 <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.
Summary
Combines four previously-open PRs into a single reviewable branch:
rules.tsas single source of truth for rule metadata; rule categories simplified to Easy/Medium/HardAlso includes the shared
AboveBoardcomponent, min-width for controls, and solver improvements from the merged PR #9.Test plan
npm run dev)npx playwright test— all tests pass (57 tests)name,source,datefields🤖 Generated with Claude Code