Bug Description
When a user configures the Playground (selects a cipher, enters a plaintext, sets a key,
and sees the encrypted output), all state is completely lost on page refresh or when
sharing the URL. The page always reloads to its default empty state with no cipher selected.
This makes it impossible to:
- Share a specific cipher configuration with others via a URL link
- Bookmark a session to resume later
- Return to a previous encryption setup after accidental navigation
Steps to Reproduce
- Open the CryptoViz Playground in your browser
- Select any cipher (e.g., Caesar Cipher) from the cipher selector
- Enter a plaintext (e.g.,
Hello, World!) and a key (e.g., 3)
- Observe the encrypted output is correctly shown
- Press F5 (or Ctrl+R) to refresh the page — OR copy the URL and open it in a new tab
Expected Behavior
The URL should update with query parameters (or a hash) encoding the current cipher
selection, plaintext, and key — so that refreshing the page or sharing the URL
Actual Behavior
The URL never changes from the base /playground path. On refresh, the page resets
to a blank state — the selected cipher, plaintext, and key are all cleared.
There is no way to share or bookmark a specific encryption session.
Screenshots
No screenshot available — this is a stateless behavior bug reproducible in all browsers.
Environment
- OS: Windows 11 / macOS 14 / Ubuntu 22.04 (reproduced on all)
- Browser: Chrome 125, Firefox 127, Edge 125
- Version: Latest (
main branch as of 2026-07-19)
Additional Context
- This is a usability and shareability gap — no existing issue addresses URL-based
state persistence for the Playground.
- Suggested implementation: use
URLSearchParams to encode cipher, key, and
plaintext into the URL on every state change (debounced), and read them back
on component mount.
- Sensitive keys should be opt-in for URL inclusion (with a warning), or excluded
by default to avoid accidental credential leakage.
- This would also benefit the proposed Compare Mode (see future issues) and
complements #88 (Playground Layout & Responsiveness).
Bug Description
When a user configures the Playground (selects a cipher, enters a plaintext, sets a key,
and sees the encrypted output), all state is completely lost on page refresh or when
sharing the URL. The page always reloads to its default empty state with no cipher selected.
This makes it impossible to:
Steps to Reproduce
Hello, World!) and a key (e.g.,3)Expected Behavior
The URL should update with query parameters (or a hash) encoding the current cipher
selection, plaintext, and key — so that refreshing the page or sharing the URL
Actual Behavior
The URL never changes from the base
/playgroundpath. On refresh, the page resetsto a blank state — the selected cipher, plaintext, and key are all cleared.
There is no way to share or bookmark a specific encryption session.
Screenshots
Environment
mainbranch as of 2026-07-19)Additional Context
state persistence for the Playground.
URLSearchParamsto encodecipher,key, andplaintextinto the URL on every state change (debounced), and read them backon component mount.
by default to avoid accidental credential leakage.
complements
#88(Playground Layout & Responsiveness).