Skip to content

Full-screen two-step item form, with real fields for every type - #15

Merged
iamrraj merged 1 commit into
mainfrom
feat/item-types
Aug 25, 2026
Merged

iamrraj merged 1 commit into
mainfrom
feat/item-types

Conversation

@iamrraj

@iamrraj iamrraj commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

The form had been a 380px rail since it held four fields. It now holds seven types, three with a dozen fields each, and the save button had drifted permanently below the fold.

Full screen, two steps: what are you saving? then the form for that type. Each type gets the fields it needs rather than a login's fields with the wrong labels on them.

Cards carry the real logic. The issuer is read from the number's prefix, the Luhn checksum is verified as you type, and the number is grouped as printed — including Amex's 4-6-5, because regrouping into fours makes it harder to check against the card in your hand. A mistyped digit is otherwise found at a checkout months later. Expiry treats a card as valid through the end of its month, a fencepost that otherwise writes off up to thirty days of a good card.

Documents record what a document is and where it is kept, and say plainly that the file is not stored — a scan of a passport in a browser extension is a worse idea than it sounds.

The masked field is labelled for its type — "Key or token", "Private key", "Security code (CVV)" — because calling a CVV a password made every form read as a login in costume.

Three things this broke, all caught by tests: every e2e helper filled the form without choosing a type; the API key spec filled a field that type no longer has; and Save was offered on the chooser where it could only produce a validation error.

936 unit tests, 43 end-to-end.

…tities

and documents

The form had been a 380px rail since it held four fields. It now holds
seven types, three of which have a dozen fields each, and the save button
had drifted permanently below the fold.

It opens full screen and asks in two steps: what are you saving, then the
form for that. Each type gets the fields it actually needs rather than a
login's fields with the wrong labels on them.

Cards get the part with real logic. The issuer is read from the number's
prefix, the Luhn checksum is verified as you type, and the number is
grouped as it is printed — including Amex's 4-6-5, because regrouping it
into fours makes it harder to check against the card in your hand. A
mistyped digit is otherwise discovered at a checkout months later, with no
way to tell whether the card changed or the typing did. Expiry treats a
card as valid through the end of its month, which is a fencepost worth
getting right: the naive comparison writes off up to thirty days of a
perfectly good card.

Documents record what a document is and where it is kept, and say plainly
that the file itself is not stored. Keeping a scan of a passport in a
browser extension is a worse idea than it first sounds.

The masked field is now labelled for the type that owns it — "Key or
token", "Private key", "Security code (CVV)" — because calling a card's
CVV a password made every form read as a login wearing a costume.

Three things the change broke, all found by the tests rather than in use:

- Every end-to-end helper filled the form without choosing a type, so the
  title field no longer existed when they reached for it. They now make the
  same choice a person does.
- The API key spec filled a field called "Password", which that type no
  longer has.
- Save was offered on the chooser, where pressing it could only produce a
  validation error.

936 unit tests, 43 end-to-end.
@iamrraj
iamrraj merged commit 700b079 into main Aug 25, 2026
5 checks passed
@iamrraj
iamrraj deleted the feat/item-types branch August 25, 2026 13:25
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