2.9 KiB
2.9 KiB
Title
sprimo-tauri settings window invoke errors for sprite-pack switch and always-on-top toggle.
Severity
P1
Environment
- OS: Windows
- App version/build:
sprimo-tauriworkspace runtime - Renderer/backend details: Tauri UI settings pop-out window
- Evidence screenshots:
issues/screenshots/issue3.pngissues/screenshots/issue3-b.png
Summary
When using the settings pop-out window, changing character or toggling always-on-top shows invoke argument validation errors and the action fails to apply.
Reproduction Steps
- Start
sprimo-tauriand open tray menuSettings. - Change
Characterselection. - Toggle
Always on top. - Observe red error banner in settings window.
Expected Result
- Character change applies successfully and updates active sprite pack.
- Always-on-top toggle applies successfully and updates main window z-order state.
- No invoke argument error appears.
Actual Result
- Character change fails with:
invalid args 'packIdOrPath' for command 'set_sprite_pack'
- Always-on-top toggle fails with:
invalid args 'alwaysOnTop' for command 'set_always_on_top'
Root Cause Analysis
- Frontend invoke payload keys were sent in snake_case (
pack_id_or_path,always_on_top). - Tauri JS invoke argument mapping for these Rust command parameter names expects camelCase
keys (
packIdOrPath,alwaysOnTop). - Because the required keys were missing from Tauri's perspective, command handlers were not run.
Fix Plan
- Update settings invoke payload keys to Tauri-compatible camelCase names.
- Add typed helper wrappers for settings invokes to centralize argument naming.
- Rebuild UI and run Rust compile checks.
- Perform runtime manual validation and capture after screenshot evidence.
Implementation Notes
Implemented in frontend/tauri-ui/src/main.tsx:
- Added typed invoke wrappers:
invokeSetSpritePack(packIdOrPath)invokeSetScale(scale)invokeSetVisibility(visible)invokeSetAlwaysOnTop(alwaysOnTop)
- Updated failing settings call sites to use wrappers and camelCase payload keys.
Verification
Commands Run
npm --prefix frontend/tauri-ui run buildcargo check -p sprimo-tauri
Visual Checklist
- Before screenshot(s):
issues/screenshots/issue3.png - Before screenshot(s):
issues/screenshots/issue3-b.png - After screenshot(s):
issues/screenshots/issue3-after-YYYYMMDD-HHMMSS.png
Result
- Status:
Fix Implemented - Notes: compile/build checks pass; runtime visual verification still required.
Status History
2026-02-14 00:00- reporter -Reported- settings errors captured inissue3.pngandissue3-b.png.2026-02-14 00:00- codex -Triaged- localized to invoke argument key mismatch.2026-02-14 00:00- codex -Fix Implemented- updated settings invoke keys to camelCase via typed wrappers.
Closure
- Current Status:
Fix Implemented - Close Date:
- Owner:
- Linked PR/commit: