Repository navigation
fix(extension): fill the whole mailing address when its second line says "Continued" and its states load late - #369
Merged
Merged
Conversation
kitlangton
force-pushed
the
gauntlet-identity-address
branch
from
December 2, 2026 20:48
10c35b2 to
cd61520
Compare
…"Continued" and its states load late
A payout form's mailing address (first and last name, "Current Address",
"Current Address Continued", city, country, state, ZIP) filled only the
names and the first street box. An identity that keeps its whole address
on one line put all of it in that box, past the box's 40 characters, and
left the city, country, state and ZIP empty.
"Current Address Continued" has no number and no autocomplete, so it read
as a second first line, and a first line seen twice starts a new section:
the address was cut off from its own city, state and postal code.
- A second street line is known by more of its wordings: "Address
continued", "Street address 2", "Address line two", "Second address
line", "Line 2", "Additional address", "Secondary address", "c/o".
- Street boxes one after the other are one address's lines: a box guessed
from text as a first line, right after a first or second line with no
other detected field between them, in the same form and block, is the
next line. Never one the site marked by autocomplete, and never one that
names another address ("Home address", then "Work address"). Two address
blocks with a city or postal code between them are still two sections.
- A state select beside a country that has no option for the region yet
(a placeholder with a value of its own, `<option value="0">Select`, or
another country's regions) waits for the country's change to load it,
as a disabled or empty one already did. Only when this fill chose the
country.
- A region is found in a select whose values are the site's own numbers
and whose text carries the code beside the name ("NY - New York",
"New York (NY)"), or holds the name as whole words; two options that
could be it give none.
Two Gauntlet traps cover it in a real browser: a mailing address revealed
by a radio button (filled from an identity with its address in parts and
from one with it on one line), and two street boxes with one label ahead
of a billing address in the same form. The fake host lists the one-line
identity only when asked (DEADBOLT_FAKE_ONE_LINE).
…eldsets' street boxes apart, and a late-loaded list chosen
Three corrections to the mailing-address change, from review.
- A region found by its name as whole words no longer takes an option
that holds a longer region's name around it: "WV - West Virginia" isn't
Virginia, alone or beside "State of Virginia". An option with no value
is a prompt ("Select (e.g. New York)") and is never the match.
- A street box is the next line of the one before only in the same
fieldset and the same cluster of the page, so "Address" under a "Home
address" legend and "Address" under a "Work address" legend stay two
addresses, as do two form-less sections. "Different" and "primary" join
the words that name another address. The whole-word helper takes its
flags, which drops the regex built only to be rebuilt.
- A select waiting for its options is read once more after the wait, so
one that loaded during the last sleep, or while an earlier select used
the wait up, is still chosen from.
… or not
Two more corrections from review.
- Street boxes are joined into one address's lines by looking at every
box of the form, not only the ones given a role: a box that's no field
of ours ("Monthly rent") between two "Address" boxes used to vanish
before the look, and the second address became the first one's second
line.
- "Years at address", "Months at address", "Time at address" and "How
long…" are no street line. They read as one for saying "address", and
between two addresses that made a second and a third line of what are
three different things.
The test for a list that loads while an earlier one waits now puts a
salutation ahead of the country: a country is moved ahead of its state,
so the state the test used was second in line, not first.
A box whose label marks it as no card or address field ("Years at
address", "Gift card number") was still given a role when its name or id
happened to hold a clue (name="address_years"): the label was skipped and
the name read on its own. The label's word now ends the reading. Login
words and an empty text still only pass to the next text.
kitlangton
force-pushed
the
gauntlet-identity-address
branch
from
December 2, 2026 21:51
875cded to
78625a5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Picking an address on a "mail me a check" form now fills the whole address, not just the name and a street box crammed with everything.
An address saved as one line ("123 Main St, San Francisco, CA, 94117, United States") went whole into the first street box, past its 40-character limit, and the city, country, state and ZIP stayed empty. Login filling isn't touched.
🔍 Origin: seen in real use, on a payout form whose mailing address appears after choosing "Paper check".
❌ Before
Select(with the value0) until Country was chosen, so nothing waited for it, and its options ("NY - New York", value32) matched neither a code nor a name.✅ After
📊 Proof
12 new unit tests: 8 fail without the first commit and 2 are guards that pass either way (blocks that must stay separate); the two review commits add 3 tests and extend a fourth, each red without its fix. "Years at address" and "How long…" boxes are no longer read as a street line. The two new browser pages weren't run against the old code.
👀 Read:
consecutiveAddressLinesinextension/src/content/forms.ts: it decides when a second "Address" box belongs to the address before it, and its list of words that mean "a different address" (home, work, billing…) is a judgement call. One cost to know: a State list that never gets the saved state now holds the fill for the full 2.5 s when the Country was just chosen, where it used to give up at once. The rest is routine.🔍 The red
cargo-denycheck isn't this change: a dependency withdrew the releaseCargo.locknames, on every branch; #370 fixes it · the whole browser suite passed in CI, both new pages included · all names and addresses in tests are made upChecks run
bun run typecheck: cleanbun test: 1,060 pass, 0 fail, on top of currentdev(which adds 12 tests of its own; 13 here are this change's)bun corpus/score.ts --gate: pass, 163/163 pages exact, address 30/30, decoy false-trigger 0.0%bun run build: built 5 entriesGAUNTLET_PAGES=mailing-address-continued,address-optional-line,below-fold-checkout bun e2e/run.ts --only gauntletTraps: all passed, 30 checks (mailing-address-continued14,address-optional-line7,below-fold-checkout8, plus the extension id). That local run was before the last edit (the one-line test identity is listed only for the unit that picks it); CI ran the final commit.mailing-address-continuedandaddress-optional-lineamong them. Rust, wasm, site and unused-dependency jobs pass.cargo-denyfails on a yankedpin-project-lite(see chore: move pin-project-lite off its yanked release so cargo-deny passes #370).bash scripts/file-size.sh: 0 errors