Skip to content

Fix Data Vault autofill and keep identities active across multi-step signups - #15

Merged
softglazee merged 1 commit into
mainfrom
fix/data-vault-autofill
Oct 8, 2026
Merged

softglazee merged 1 commit into
mainfrom
fix/data-vault-autofill

Conversation

@softglazee

Copy link
Copy Markdown
Owner

What was broken

Smart Autofill (Data Vault) left forms empty or garbled.

  1. Nothing filled with "Minimize CDP footprint" on. rebrowser's enableDisable mode resolves the main world to a blank about:blank context on fingerprint-chromium, so page.$ returned null for every tagged field and the fill failed in ~10 ms ("Could not fill this form - nothing was entered").
  2. Garbled text with the stock engine. The trusted focus click hit whatever covered the field - usually the open autofill panel - which clicked another identity row and started a second fill. Keystrokes from both interleaved in every field.
  3. No feedback. The result toast rendered underneath the panel, squeezed to the 48 px host width.

Multi-step signups lost the identity after step 1, because it was marked used immediately; it disappeared from the list and later steps had nothing to fill with.

What changed

  • browserEngine.js: the fill loop does all DOM work in the widget's isolated world (personaPrepareTarget / personaFocusTarget / personaIsFocused / personaCommitTarget / personaSetSelect). A click is used only when elementFromPoint hits the field; otherwise DOM focus. Focus is re-checked before every keystroke. Fill plans are serialized per tab.
  • Active identity per site (registrable domain, 30 min idle, per browser session): new __sgPersonaActive handler; mark-used uses the URL recorded when the identity became active and then releases it.
  • personaAutofill.js: picking an identity closes the panel and blocks a second pick while filling; a fill makes the identity active instead of marking it used; later steps (same page, SPA route change, or a new page) auto-fill empty fields - never the password; the final submit (Sign up / Register / Submit / Create account / Finish ...) marks it used while Next / Continue keep it; panel pins it as "In progress" with Mark as used / Release; toast fixed.
  • pageBridge.js: keepalive on the fetch transport so a mark-used sent during the final navigation still lands.
  • Firefox: sg-bridge.js / sg-background.js keep the active identity per tab + site; sg-widget.js regenerated. The signed .xpi still needs re-signing to ship these to Firefox profiles.

Testing

  • npm test: 648/648 on this tree (test/autofillFillEngine.test.js is new).
  • Reproduced and verified in fingerprint-chromium 148 on both the stock and rebrowser engines: a live Marketo demo form, a local signup with select / date / password + confirm, and a 3-step signup (in-page Next, route change, full page load, password step, Create account).
  • Verified in the installed app (Minimize CDP footprint on): identity fields fill correctly; on the 3-step signup the identity stayed unused through every step and was marked used only on Create account.

Stacked on #14.

…signups

Autofill left forms empty or garbled:
- With "Minimize CDP footprint" on, rebrowser's enableDisable mode resolves
  the main world to a blank about:blank context on fingerprint-chromium, so
  page.$ returned null for every field and the fill failed instantly. All
  field work now runs in the widget's isolated world (works on both engines).
- The trusted focus click landed on whatever covered the field, often the
  autofill panel itself, which clicked another identity row and started a
  parallel fill. Click points are now hit-tested (DOM focus otherwise),
  focus is re-checked every keystroke, fills are serialized per tab, and the
  panel closes when an identity is picked.
- The result toast rendered under the panel at 48px wide; it now sits on top
  at a readable width and stays up longer for longer messages.

Multi-step signups lost the identity after step 1 because it was marked used
immediately. It now stays active per site (registrable domain, 30 min idle)
across in-page steps, route changes and page loads, fills each new step's
empty fields (never the password, which still needs a click), and is marked
used only on the final submit. The panel pins it as "In progress" with
Mark as used / Release. Firefox gets the same via the extension background.
@softglazee
softglazee changed the base branch from redesign-and-security-fixes to main October 8, 2026 18:06
@softglazee
softglazee merged commit d041b15 into main Oct 8, 2026
4 checks passed
@softglazee
softglazee deleted the fix/data-vault-autofill branch October 8, 2026 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant