8.0 KiB
8.0 KiB
Tauri Runtime Behavior Testing Workflow
Date: 2026-02-13
Purpose and Scope
This document defines strict testing and evidence requirements for sprimo-tauri runtime
behaviors. It complements docs/QA_WORKFLOW.md and applies to all Tauri runtime behavior issues.
Prerequisites
- Windows environment for primary runtime validation.
- Workspace up to date.
- UI dependencies installed:
just install-tauri-ui
Execution Modes
1. Workspace Mode (Required Now)
Run and validate from the repository workspace:
just build-tauri-ui
just check-tauri
just check-runtime-core
just run-tauri
2. Packaged Mode (Required Once Packaging Exists)
When sprimo-tauri packaging automation is implemented, repeat the runtime checklist against the
packaged artifact and attach equivalent evidence in the issue.
Strict Verification Gate
An issue touching Tauri runtime behaviors must satisfy all requirements before Closed:
- Command evidence recorded:
cargo check -p sprimo-tauricargo check -p sprimo-runtime-corejust build-tauri-uijust run-taurismoke resultjust qa-validate
- Visual evidence recorded:
- before screenshot(s)
- after screenshot(s)
- Runtime contract evidence recorded:
current_stateinvoke command returns valid structured payload.load_active_sprite_packinvoke command returns manifest/atlas payload.runtime:snapshotevent is observed after command application.
- API behavior evidence recorded:
/v1/healthand/v1/statebehavior validated against tauri runtime./v1/commandand/v1/commandsvalidated with auth behavior.
- Docs synchronized:
- issue lifecycle updated
- relevant docs updated when behavior or expectations changed
Runtime Behavior Checklist
- Launch tauri runtime via
just run-tauri. - Verify sprite renders in the tauri window.
- Verify animation advances over time.
- Send
PlayAnimationcommand and verify clip switch is reflected. - Send
SetTransform.scaleand verify rendered sprite scale changes without clipping:
- at
scale >= 1.0, full sprite remains visible (no missing upper region) - runtime auto-fits window size to sprite frame size and keeps bottom-center visually stable
- Verify missing animation fallback:
- unknown animation name falls back to
idleor first available clip.
- Verify sprite-pack loading:
- valid selected pack loads correctly
- invalid pack path failure is surfaced and runtime remains alive
- Verify frameless window drag behavior:
- left-mouse drag moves the window
- window remains non-resizable
- moved position is reflected in runtime snapshot state (
x,y) and persists after restart
- Verify debug-overlay visibility control:
- default startup behavior follows
frontend.debug_overlay_visibleconfig debug_overlay_visible/set_debug_overlay_visibleinvoke commands toggle panel at runtime- toggle state persists after restart
- Verify Windows tray/menu controls:
- tray left-click opens menu without directly toggling visibility
Show/Hidetoggles window visibility and persists stateAlways on toptoggles top-most behavior and persists stateDebug overlaytoggles panel visibility and persists stateQuitexits cleanly and preserves current persisted visibility/top-most/debug settings
API + Runtime Contract Checklist
- Validate health endpoint:
GET /v1/healthreturns version/build/capabilities.
- Validate authenticated state endpoint:
GET /v1/staterequires bearer token.
- Validate command endpoint:
POST /v1/commandaccepts valid command envelope.
- Validate batch endpoint:
POST /v1/commandsapplies commands in order.
- Validate malformed request resilience:
- malformed JSON returns
400without process crash.
- Validate Tauri invoke/event behavior:
current_stateoutput parsed successfully.load_active_sprite_packreturns expected fields.settings_snapshotreturns valid persisted settings payload.list_sprite_packsreturns valid manifest-backed pack options.set_sprite_packchanges active pack and persists.set_scaleupdates scale and persists.set_visibilityupdates main window visibility and persists.set_always_on_topupdates top-most behavior and persists.runtime:snapshotevent received on runtime command changes.debug_overlay_visibleandset_debug_overlay_visibleinvoke commands work and persist config.
- Stress runtime reload stability:
- perform at least 10 cycles of character switch (
default<->ferris) with scale adjustments - no frontend runtime exception (including
TypeError) is allowed - scaling behavior remains responsive after each pack switch
- Chroma-key quality check:
- verify no visible magenta background/fringe remains around sprite edges in normal runtime view,
including non-exact gradient magenta atlas backgrounds (for example
ferris/demogorgon)
- Animation tempo check for 8-frame rows:
- looping row animations should feel very slow/readable (1 fps profile)
- one-shot
celebrate/successshould run slightly faster than loops (2 fps profile) - tauri renderer applies an additional global slowdown factor (
x2) over clip fps; verify perceived playback matches this expectation
- Scale anchor and bounds check:
- repeated scale changes should keep window centered without directional drift
- window must remain within current monitor bounds during scale adjustments
- no runtime error is allowed from monitor lookup during scale operations (e.g.
currentMonitorAPI mismatch) - verify window resize uses consistent coordinate units (no accumulated drift over 20 scale changes)
- no runtime command/type error from position updates (e.g.
set_positionexpects integer coords) - at the same slider scale value, main window size is consistent across packs (
default,ferris,demogorgon) within 1px rounding tolerance - no white strip/background bleed is visible along any overlay window edge on dark desktop background
Settings Window Checklist
- Open settings from tray
Settingsitem. - Confirm repeated tray clicks focus existing settings window instead of creating duplicates.
- Change character in settings and verify:
- active pack changes immediately in main overlay
- selection persists after restart
- Change scale via slider and verify:
- runtime scale changes immediately
- main overlay auto-fits without clipping
- persisted/runtime scale value reflects the effective fitted scale after monitor/window bounds
- value persists after restart
- Change animation speed factor slider and verify:
- runtime animation pace updates immediately in main overlay
- value is clamped to
1..200 - value persists after restart via
frontend.tauri_animation_slowdown_factor
- Toggle
Visibleand verify:
- main overlay hide/show behavior
- persisted value survives restart
- Toggle
Always on topand verify:
- main window z-order behavior updates
- persisted value survives restart
Evidence Requirements
For each Tauri runtime issue, include:
- command output summaries for all strict gate commands
- screenshot references:
- before:
issues/screenshots/issueN-before-YYYYMMDD-HHMMSS.png - after:
issues/screenshots/issueN-after-YYYYMMDD-HHMMSS.png
- before:
- invoke/event verification notes
- API verification notes
Issue Lifecycle Integration
Use standard lifecycle in issues/issueN.md:
ReportedTriagedIn ProgressFix ImplementedVerification PassedClosed
Tauri runtime issues must remain at Fix Implemented if any strict-gate evidence is missing.
Failure Classification and Triage
P0: crash on startup, renderer not visible, auth bypass, or command pipeline broken.P1: animation/state mismatch, event/invoke contract failure, major UX regression.P2: non-blocking rendering/perf issues, minor UI mismatch, cosmetic defects.
Test Log Template (Tauri Runtime)
- Date:
- Issue:
- Frontend:
sprimo-tauri - Execution mode:
workspaceorpackaged - Commands run:
- API checks summary:
- Invoke/event checks summary:
- Before screenshots:
- After screenshots:
- Result:
- Notes: