Go to file
yaroslav k 99ccb0cdc7 undo: snapshot history engine (state::undo)
- History: capped undo/redo stacks of whole Dashboard clones; a pending
  pre-burst snapshot becomes a real undo step when the tracking effect's
  settle timer fires (1 s of quiet) — one undo step per edit burst
- undo/redo consume the pending burst first, so a fresh edit is
  undoable before it settles; a new edit clears the redo branch
- suppress flag: wholesale replacements (Clear, import) flush the
  pending burst, push the current state, and mark their own write as
  non-capturable — Clear and import are undoable themselves
- HistoryHandle is Copy (RwSignal fields): context-friendly (Send+Sync)
  and safe to capture in view closures under edition-2024 rules
- no std::time::Instant: it panics on wasm32-unknown-unknown; the
  browser timer is the only clock
- 9 unit tests: burst coalescing, redo, cap, flush order, suppress
2026-08-16 12:31:17 +03:00
assets remove tyolka 2025-09-23 15:37:56 +03:00
data csr version imported 2025-09-11 10:27:57 +03:00
end2end e2e: ignore node_modules and playwright artifacts 2026-08-16 11:50:51 +03:00
src undo: snapshot history engine (state::undo) 2026-08-16 12:31:17 +03:00
style modal: in-app dialog for confirms and import errors 2026-08-16 11:28:19 +03:00
.gitignore replace lazy_static with std::sync::LazyLock; commit Cargo.lock 2026-08-15 14:56:54 +03:00
ARCHITECTURE.md roadmap: add Phase 1.5 — undo & redo (snapshot-based) 2026-08-16 11:57:31 +03:00
Cargo.lock add web-sys as a direct dependency 2026-08-16 11:28:19 +03:00
Cargo.toml add web-sys as a direct dependency 2026-08-16 11:28:19 +03:00
LICENSE initial commit: ssr 2025-09-11 08:43:59 +03:00
MODERNIZE.md docs: mark Phase 1 done; sync architecture, modernize, readme 2026-08-16 11:50:41 +03:00
README.md docs: mark Phase 1 done; sync architecture, modernize, readme 2026-08-16 11:50:41 +03:00
ROADMAP.md roadmap: add Phase 1.5 — undo & redo (snapshot-based) 2026-08-16 11:57:31 +03:00
rust-toolchain.toml initial commit: ssr 2025-09-11 08:43:59 +03:00

aex

A D&D 5e character sheet and campaign dashboard for a text-based play-by-post game. The UI is in Russian.

What works today

  • Campaign header: name, in-game date steppers, session counter, and Save / Load / Clear: download dashboard.json, import a file back, wipe to a blank campaign
  • Character sidebar: portrait, names, class, level, XP, hit points with temp HP bar, hit dice, death saves, spell slots
  • Inventories page (/inv): personal and party-common inventories, currency per denomination, item rows with quantity and weight steppers, move between inventories, remove
  • Bundled 5e.tools item data (~5k items) with fuzzy search components (search is not mounted on a page yet)

State autosaves to localStorage (debounced) and survives reloads; export/ import round-trips through a JSON file. The phased plan is in ROADMAP.md.

Tech stack

  • Rust, edition 2024, nightly toolchain (pinned in rust-toolchain.toml)
  • Leptos 0.8 SSR (actix-web) + client-side hydration
  • reactive_stores for the reactive state model
  • SCSS (style/main.scss), compiled by dart-sass
  • Playwright for end-to-end tests

Development

Prerequisites: cargo-leptos, dart-sass, and the wasm32-unknown-unknown target. The nightly toolchain installs itself via rust-toolchain.toml.

cargo install cargo-leptos
cargo leptos watch          # dev server with hot reload
# open http://127.0.0.1:3000

Other commands:

cargo leptos build --release            # production build
cargo leptos serve                      # dev server without the watcher
cargo check --no-default-features --features ssr --bin aex
cargo check --no-default-features --features hydrate --lib
cargo check --target wasm32-unknown-unknown --no-default-features --features hydrate --lib

Tests

End-to-end tests live in end2end/ (Playwright): a smoke spec and a persistence spec (reload keeps state; export/import round trip). With the dev server running:

cd end2end
npm install
npx playwright test --project=chromium

or let cargo-leptos manage the server: cargo leptos end2end.

Project docs

License

Public domain (Unlicense), see LICENSE.