Repository navigation
fix(extension): fill cards on airline, split-frame, single-page and saved-card checkouts - #364
Merged
Merged
Conversation
kitlangton
force-pushed
the
gauntlet-checkout-cards
branch
4 times, most recently
from
December 2, 2026 22:28
d16e525 to
fafde53
Compare
Detection (content/forms.ts):
- A select of card brands, by name or by the two-letter codes booking
engines use, is the card's type; alone, it's a filter and nothing.
- A birth date's Month, Day and Year inside a card's form are the
birthday's; a bare Month or Year is an expiry only with its other part.
- A guessed security code needs three or four digits of room, and
"Verification code" alone no longer reads as one.
- A code the bank sent (3-D Secure by name, or "we texted a code") is
never the card's; a saved card's brand ("Visa ending in 4242") keeps a
lone security code a card's.
- Fields under sibling headings take the heading just before them, so
shipping and billing in one wrapper are two sections.
Filling (content/formfill.ts, transform.ts, fill.ts):
- The card's type is chosen first; a number and code the page keeps
disabled until then are approved to wait, and written once enabled.
- A card type select takes the brand by name, alias or code, from the
number's first digits when the card was saved with no brand.
Frames and popup (bg/forms.ts, content/inline.ts, popup.ts):
- A card menu opened for a provider's frame field closes when the user
types, clicks away or presses Esc in that frame, and follows the field
when it moves; the frame hears when the top page closes it.
- An open popup re-lists a tab's cards when its fields change, and a
card with none of what the fields take isn't asked for.
airline-card-checkout (type-gated number and code, bare Month/Year twice), braintree-split-frames (one hosted field per frame, a look-alike on another site), spa-radio-checkout (no <form>, card fields drawn on a radio, shipping and billing under sibling headings) and saved-card-cvv (a lone security code among short decoys, then a bank's texted code). The harness gains a second, provider-named origin and a popup handle. Also waits for the last-written field in the formsFrames popup check, which read the frame a beat before the code landed.
…ses, and review cleanups - A birth date's typed Month, Day and Year under its legend (or a group so labelled) inside a card's form are the birthday's: they were taken for a second expiry. A named group also bounds the birthday, so its parts no longer pull the expiry beside it in. - Date-part resolution is one pass over each select's options, read once; a field's scope is its cluster throughout. - A frame hears its menu went only when that was its open menu: not for a pill, nor when the top page closes an older menu while a newer one for the same frame is open. A click on a frame's field whose menu is already open doesn't ask for it again. - The wait for fields a page enables later reads the value after the wait instead of assigning it in the loop's condition. - The airline trap's card type select is bare GDS codes, so the e2e covers matching a brand by code alone.
…y, and tell a frame its menu went after a failed pick or a lock - Every field in a group that names a birth date is the group's, the ones the page names itself (autocomplete, name) too: a "dob_day" under the legend no longer makes the card's Month and Year beside the group a birthday's. - A frame hears its menu went unless the pick's values reached it: a pick Touch ID turned down, or one whose fields stopped showing, left the frame watching its field for a menu that had gone. Locking tells it as well.
A cross-site frame can be scanned before the page above has given it its size. Its fields aren't drawn yet, nothing in it changes when they are, and so it never reported them: a hosted card field in such a frame was left out of a fill picked from another frame, until the user focused it. The split-frames trap now waits for all four of its frames to report (the other site's could stand in for a hosted field's still to come) and fails when one doesn't, which is what showed this: the fourth stayed silent on about half of the page's second loads.
…ed date part isn't taken twice - A select of card brands with no name of its own no longer makes its cluster a card's: a statement's filter (All / Visa / Mastercard, with a Month and a Year) had made its own Month and Year an expiry, and they it a card's type. - A month or year goes to a birthday beside it only when that birthday still has no month, and stays the card's beside an expiry part still without its other: a birth date right before the expiry no longer takes the expiry's month, nor one right after a typed expiry its year. - A frame's field whose menu the top page already has open is turned away once, before the page is scanned, for logins and forms alike.
…t lacks it - A bare Month or Year goes to a birthday only when it's right beside the birthday's day or year and that birthday still lacks the part it would be, its month or its year: a typed expiry before a birth date that starts with its day keeps its Year, an expiry with its year first keeps its Month, and a typed Year after a birth date's month and day is never a second expiry's. - A disabled field is unloaded like a select with nothing to choose, in one place, instead of the same two checks at each use.
kitlangton
force-pushed
the
gauntlet-checkout-cards
branch
from
December 2, 2026 22:31
fafde53 to
51ce4d6
Compare
…e birthday's year A bare month or year beside a birthday now takes the part it is, instead of only being kept out of the expiry: a typed Year after a birth date's month and day had no role at all, and after its day and month (the month beside it, not the day) was still read as a second expiry year. A birthday's month counts as a neighbour when it has its day beside it, and a box is read by its words only when its options say nothing.
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.
Deadbolt now fills cards correctly on four kinds of real checkout it used to get wrong: airline payment steps, split provider frames, form-less single-page checkouts, and saved-card "enter your security code" prompts.
Each is a new page in the extension's end-to-end gauntlet that fails on
devand passes here. Logins and passkeys aren't touched, and nothing outsideextension/changes.❌ Before
8//).✅ After
VI/MC/AX/DScodes booking engines use), then the number and code are written once the page enables them. Birth-date selects and typed boxes under a "Date of birth" legend are the birthday's.📊 Proof: the four new gauntlet pages, headless Chromium, against
dev's source and this branchairline-card-checkoutbraintree-split-framesspa-radio-checkoutsaved-card-cvvbelow-fold-checkout,masked-card,formsFrames(existing)The four new pages fail 15 checks on
dev's source and none here. 26 new unit tests (1060 → 1086); the frozen detection corpus stays at 163/163.👀 Read:
resolvePartsinextension/src/content/forms.ts, which decides whether a bare Month/Year/brand select is a card's, a birthday's or nothing. The order matters: future-year selects resolve first so a month beside one knows it's an expiry. Three choices go past the written plan, on purpose: bare "visa" and "discover" do not count as payment words (they'd turn "Discover what's new" newsletters and travel-visa forms into card forms), only forms like "Visa ending in 4242" do; 3-D Secure program names ("Visa Secure", "Identity Check", "SafeKey") mark a code as the bank's; and a brand select with no other card field near it is ignored as a filter. The rest is routine.🔍 From a checkout hardening pass over the gauntlet · no user reports · one existing
formsFramescheck also fails ondev(it read the frame a beat before the last field was written); its wait is fixed hereChecks run
In
extension/:bun run typecheck: cleanbun test: 1086 pass, 0 fail (38 files)bun run test:corpus(bun corpus/score.ts --gate): 163/163 pages exact, 0.0% decoy false-trigger, gate passbun run build: built 5 entriesGAUNTLET_PAGES=airline-card-checkout,braintree-split-frames,spa-radio-checkout,saved-card-cvv,below-fold-checkout,masked-card bun e2e/run.ts --only gauntletTraps,gauntletFlows,formsFrames: all passed, 97 checks; all six pages PASS,formsFramespasses (gauntletFlowshas no page in that list, so it ran nothing)dev'sextension/src: all four FAIL, 15 failed checksFrom the repo root:
bash scripts/file-size.sh: 0 errors; no new file over the warning line (content/forms.ts562,content/formfill.ts477,bg/forms.ts658)