Repository source: docs/plans/account_clear_identity_button_plan_v1.md
Clear Identity Button On Account Page
Goal
Add a clear identity control to /account/key/ so a user can remove the browser-local account identity from the visible account surface without opening advanced technical details.
Current State
templates/pages/account_key.phprenders the account page and simple account status surface.public/assets/browser_signing.jsowns browser-local identity storage behavior forforum_pki_username,forum_pki_public_key,forum_pki_private_key, andforum_pki_identity_id.The advanced account controls already include
data-action="clear-browser-key", which clears the saved keypair and related localStorage values.tests/BrowserSigningNormalizationTest.phpandtests/LocalAppSmokeTest.phpcover account-page browser signing behavior and account-page markup.
Implementation Plan
Add a simple-surface button on
templates/pages/account_key.phplabeledClear identity.Reuse the existing browser-signing clear action where possible so the new control clears the same identity state as the advanced control.
Update the account simple UI sync code so the button is visible only when a browser identity/keypair is present.
Ensure clearing identity updates the visible signed-in username, status badge, and saved identity field without a page reload.
Add or update tests covering the new button markup and the clear behavior from the simple account surface.
Verification
Run the focused PHP test suite that covers account page rendering and browser signing JavaScript.
Manually review the account page markup for progressive enhancement: without JavaScript, the advanced clear action remains available.