A KenKen puzzle designer built with Tauri and Leptos.
npm install # install Tailwind CSS build toolingtrunk serve # builds and hot-reloads at http://localhost:1420Trunk runs npm run tw:build automatically before each build. For incremental Tailwind rebuilds while editing styles, run this in a second terminal:
npm run tw:watchThe grid has two top-level modes once the cursor lands on a committed cage
cell: Mode 1 (the cage is outlined, candidates render as usual) and
Mode 2 (tuple exploration — values of the selected tuple are bolded and
candidates the tuple would remove are dimmed). Enter lifts Mode 1 → Mode 2;
in Mode 2 it steps to the next tuple.
| Action | Shortcut |
|---|---|
| Move cursor (uncaged cells only) | Arrow keys |
| Extend / merge cage / start polyomino draft | Shift+Arrow |
| Open operator entry (draft or existing cage) | +, -, * / x, / |
| Singleton with chosen value (uncaged cell only) | 1–9 |
| Make singleton (no value) | Space (also C) |
| Mode 1 → Mode 2 / next tuple in Mode 2 | Enter |
| Previous tuple in Mode 2 | Shift+Enter |
| Commit selected tuple | Cmd/Ctrl+Enter |
| Mode 2 → Mode 1 / cancel operator entry | Esc |
| Cycle cages | Tab / Shift+Tab |
| Delete polyomino or cage | Del |
| Move cell | M |
| Clear all cages | Cmd/Ctrl+Shift+Del |
| Undo / Redo | Cmd/Ctrl+Z / Cmd/Ctrl+Shift+Z |
| Save / Save As | Cmd/Ctrl+S / Cmd/Ctrl+Shift+S |
| Open | Cmd/Ctrl+O |
Arrow keys are inert while the cursor is on a committed cage cell — use Tab
/ Shift+Tab (or the mouse) to leave the cage.
Uncage and Set operation… are reachable only through the right-click
context menu now (their old Esc / Enter shortcuts moved to the cage-mode
state machine). The same menu offers Next tuple / Previous tuple as
mouse-driven counterparts to Enter / Shift+Enter.
Changing a singleton (Given) cage's value has no keyboard shortcut — the
1–9 digit shortcut only applies to uncovered cells, and Given has no
operator key. Right-click the singleton and pick Set operation… to edit
its value.
On macOS the regular Delete key reports as Backspace, so
Cmd+Shift+Backspace also clears all cages.
Rust tests live alongside the source and run via cargo test. End-to-end UI
behavior is exercised by Playwright; the suite is in tests/.
npx playwright install chromium # one-time browser download
npx playwright test # runs the suite, auto-starting trunk if neededplaywright.config.ts declares a webServer block that boots trunk serve on
its own if port 1420 isn't already listening. The first run can take a minute
or two while trunk performs the initial wasm build.
If you have a pre-installed chromium binary you'd rather use (offline runs, a
different revision, etc.) set PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH to the
binary's path before invoking npx playwright test.
VS Code + Tauri + rust-analyzer.