import { Modal } from "./Modal"; export function HelpDialog({ open, onClose, }: { open: boolean; onClose: () => void; }) { return (

Five complementary workspaces

Play keeps values, two kinds of notes, colours, branches, replay, guided hints and elapsed time.{" "} Set edits registry-backed clues and runs bounded setter-quality checks. Generate constructs and ranks bounded, seedable single or batch variants.{" "} Solve explains logical steps and can verify uniqueness. Helpers answers focused sum, candidate and relation questions without changing the board.

Keyboard

Arrow keys
Move the active cell
Shift + arrows
Extend the selection
Home / End
Move to the first or last cell in the row
Ctrl/⌘ + Home/End
Move to the first or last cell in the grid
Page Up / Down
Move to the first or last row in the same column
1–9 / A–G
Enter the selected symbol
Z / X / C / V
Value, corner, centre or colour mode
Backspace
Erase in the current mode
Ctrl/⌘ + Z/Y
Undo or redo
Ctrl/⌘ + click
Highlight every placed copy of that digit
M
Toggle tap-by-tap multi-selection
Ctrl/⌘ + + / −
Zoom the board while focus is in the board area
Ctrl/⌘ + 0
Fit the board at its default scale

Touch, zoom and selection

Board zoom is stored in this browser. Use Pan board before dragging a zoomed board; its strong border and status message indicate that cell taps are temporarily paused. Stop panning to edit again. Tap multi-select toggles individual cells without a drag gesture and keeps one active cell for keyboard entry. On narrow screens the entry pad stays close to the bottom edge and respects the device safe area.

Hints and solutions

A guided hint reveals where to look, the technique, its reasoning and an effects preview in separate stages; the board changes only after Apply this step. Candidate legality is computed independently from handwritten notes. Controls can fill legal centre candidates, prune invalid centre/corner notes and optionally maintain peer notes after placements. Erasing a value never invents candidates.

Logical deductions report premises, affected houses, placements and eliminations for singles, subsets, intersections, fish, wings, colouring, chains and Killer cages. Unique Rectangle is disabled unless a completed exact search has already proved uniqueness. Exact search is separately labelled and is not presented as a human explanation; reaching a limit remains unknown.

Setter-quality checks

Quick analysis checks for zero, one or two solutions and can show the cells where two completions differ. Full analysis uses bounded deletion searches to classify givens and constraints as critical, redundant or unknown, build a cell heatmap, or localise a contradictory core. Optional minimality is claimed only when the unique baseline and every required removal check complete. Per-check and aggregate budgets are visible, and analysis can be cancelled without turning a capped search into proof.

Branches, savepoints and replay

Open History & branches while playing to name a checkpoint, isolate a hypothesis, or inspect an earlier grid. Discarding a hypothesis restores its exact starting state but keeps the abandoned path available in replay. Replayed grids are read-only until you return live or deliberately branch from that step. Validated history is included in local autosaves and explicit Library saves, so restoring that progress also restores its savepoints and branches.

Sum and Candidate Labs

Sum Lab enumerates bounded combinations and, when selected board cells are enabled, candidate-compatible assignments per position. Required, excluded and manually eliminated combinations remain local helper state. Candidate Lab inspects selected cells and houses, filters one or more digits, and can overlay strong and weak links without changing handwritten notes.

Aid-mémoire scratch cells

Enable the optional aid-mémoire in Play for a non-constraining row or compact grid of scratch cells. Each cell has its own label and accepts values, corner marks, centre marks and colours through the regular keypad or keyboard. Arrow keys stay within the configured grid; Home/End move within a row, Ctrl/⌘ + Home/End reach the first or last cell, and Page Up/Down move to the first or last row. The layout and entries are preserved with local Library progress.

Variant and false clues

The shared registry covers classic/irregular/extra regions; diagonal, anti, disjoint and non-consecutive rules; cages, parity, extrema and quadruples; thermo, arrow, renban, palindrome, between, whisper, region-sum, modular, entropic, zipper and double-arrow lines; Kropki, 5/10 and inequality pairs; X-sum, skyscraper, little-killer and sandwich clues; clone regions and row/column/box indexers.

Enable Wrogn mode to make a supported local clue false, or switch existing clues individually or as a batch. Red dashed artwork and a ≠ mark identify false clues; global house rules, extra regions and fog are not given a misleading false mode. Fog is display-only and can be set only with a complete solution which validates against the current puzzle. Wrong entries reveal nothing and the trusted solution remains in the local puzzle document.

Generation and ratings

Generation runs in a worker with explicit time and search limits. It supports single or deterministic batch generation, compatible mixed families, sparse/balanced/dense local constraints and several rotational, reflection and diagonal clue symmetries. Minimal-givens mode reports proof or the exact unknown reason; individual minimisation can break the requested visual symmetry and reports that fact.

Technique profiles can require, forbid or count techniques and set an exact hardest technique. A result is accepted only when an independent complete logical path matches the whole profile and an independent exact search proves uniqueness. Requested difficulty guides clue removal; the reported 0–100 rating is then calculated from logical techniques, clue load and exact-search evidence. A cancelled or bounded-out candidate remains a failure or unknown, never a uniqueness/minimality claim.

Import and privacy

Files, text, solving and generation stay in this browser. Compact grids, project JSON, share fragments, supported f-puzzles, SudokuPad/CTC inline data and supported Penpa+ long links are decoded locally. Server short IDs are intentionally rejected. The compatibility check separates mapped Sudoku semantics, preserved inert drawings, retained metadata and warnings before import. Source identity and allowlisted drawings survive local edits and saves but never become rules by appearance alone.

Export includes Sudoku Tools JSON/share data, f-puzzles, SudokuPad JSON or self-contained SCL where representable, plus local SVG, PNG and PDF rendering. Unsupported false/global semantics and visual geometry are rejected rather than silently weakened. Review an export before sharing: titles, authors, rules, solutions, progress, source metadata, drawings and aid-mémoire entries may be included.

Recovery, Library and offline use

A separate debounced local autosave can restore or discard an interrupted session, including validated bounded history, branches and savepoints. Explicit Library projects offer title/tag search, completion filters, safe previews and selected export, duplication or deletion. Browser storage can be cleared independently, so export important projects.

On a production HTTPS host, the first successful load can install a relative-scope offline application shell. Service-worker support is progressive enhancement: puzzle work stays local and remains usable when registration is unavailable.

Screen-reader detail

Each visible Sudoku cell reports its row, column, region, value, colour-and-pattern mark, conflict state and touching variant clues. Candidate detail can be set to Off, concise counts, or detailed digits without changing what is drawn. The board and aid-mémoire use real row and gridcell roles; their keyboard instructions are attached to the grids. Fogged cells report only that they are obscured: hidden values, notes, clues, candidate overlays and guided-hint steps are not exposed through board labels.

); }