docs/waves/form_handling_local_mode_testing.md
Form Handling Local Mode Testing
Status: active reference
Owner lane: engine-wasm + browser
Last reviewed: 2026-03-15
Purpose
Provide a manual test reference for the current form-handling baseline in Waves, with emphasis on local mode behavior.
This document is intended for quick regression checks now that A5-04, A5-05, and the active A5-06 hardening slice are landed for the current MVP lane.
Current Scope
Covered by the current implementation:
- text input focus/edit/commit/cancel
- password input masking in the viewport
- single-select
select/optionfocus/edit/cycle/commit/cancel - local-mode capture of external submit intents without network fetch
Still not covered in this local-mode reference:
- multi-select behavior
- broader submit hardening beyond the active MVP path and smoke-covered browser/host cases
- advanced mask validation semantics
- local-mode replay of captured form submits
Local Mode Behavior Summary
In Local mode:
- the deck is loaded directly into the engine
- text and select controls remain fully interactive
- engine-owned field state updates and render output should work exactly like network mode
- if a form submit or link produces an external navigation intent, Waves does not fetch it
- instead, Waves captures the external intent and shows a local-mode status message
Current expected local submit posture:
- form editing works
- submit intent is generated by the engine
- Waves surfaces the captured external intent
- no network request is issued in local mode
This is effectively a stubbed local-only submit path today.
Recommended Manual Test Fixture
Use this WML through Load Raw WML in the developer tools drawer while run mode is set to Local.
<wml>
<card id="home">
<p>User: <input name="username" value="AHMED" type="text"/></p>
<p>PIN: <input name="pin" value="" type="password"/></p>
<p>
Country:
<select name="Country" title="Country">
<option value="Jordan">Jordan</option>
<option value="France">France</option>
<option value="Germany">Germany</option>
</select>
</p>
<do type="accept">
<go method="post" href="/login">
<postfield name="username" value="$(username)"/>
<postfield name="pin" value="$(pin)"/>
<postfield name="Country" value="$(Country)"/>
</go>
</do>
</card>
</wml>
Test Cases
1. Text input edit commit
Steps:
- Switch Waves to
Localmode. - Load the fixture deck.
- Focus
username. - Press
Enterto begin edit. - Type
BOB. - Press
Enterto commit.
Expected:
- the viewport shows
[username: BOB] - focus remains deterministic
- no fetch occurs
2. Text input cancel
Steps:
- Focus
username. - Press
Enter. - Type one or more characters.
- Press
Escape.
Expected:
- the viewport reverts to the original committed value
- no partial draft remains visible
- no fetch occurs
3. Password masking
Steps:
- Focus
pin. - Press
Enter. - Type
1234. - Press
Enterto commit.
Expected:
- the viewport renders masked characters, not the raw PIN
- focus returns to normal non-edit mode after commit
- no fetch occurs
4. Select default render
Steps:
- Load the fixture deck in
Localmode. - Observe the
Countrycontrol before any interaction.
Expected:
- the select renders as a focusable control
- the first option is shown by default unless the markup explicitly selects another option
- no fetch occurs
5. Select cycle and commit
Steps:
- Focus
Country. - Press
Enterto begin select edit. - Press
ArrowDownonce or more. - Press
Enterto commit.
Expected:
- the rendered select value changes while editing
- the committed value remains visible after edit mode ends
- cycling wraps deterministically through the available options
- no fetch occurs
6. Select cancel
Steps:
- Focus
Country. - Press
Enterto begin select edit. - Press
ArrowDownto change the draft selection. - Press
Escape.
Expected:
- the rendered value returns to the original committed option
- no partial draft select state remains active
- no fetch occurs
7. Local-mode form submit capture
Steps:
- Edit
username,pin, andCountry. - Ensure no control is in edit mode.
- Press
Enteron the card accept action path to submit.
Expected:
- the engine emits an external navigation intent for
/login - Waves does not perform a fetch because run mode is
Local - status text reports that local mode captured the external intent
- this is expected current behavior, not a failure
What To Inspect During Testing
Useful places to look during manual verification:
- viewport render output
- runtime snapshot panel
- event timeline panel
- status line after local-mode submit capture
For local submit capture, the most important signals are:
- edited values remain visible in the viewport before submit
- no network load starts
- the captured external intent is surfaced to the operator
Expected Limitations Right Now
These are not regressions for the current baseline:
- local mode does not complete the remote submit roundtrip
- local mode only proves engine-owned edit state and intent generation
- submit payload hardening beyond the active MVP path remains future follow-on work, but the current browser/host/native lane is already covered by the landed
A5-06slice
Related Files
browser/frontend/src/app/browser-controller.tsbrowser/frontend/src/app/waves-copy.tsengine-wasm/engine/src/engine_tests/navigation_metadata.rsbrowser/src-tauri/src/tests/tauri_commands.rs