[extension] Redesign: the popup in layout C with the custos room, Custos's theme, a new password on sign-up and change-password forms, Save or Update
This commit is contained in:
+28
-6
@@ -54,11 +54,12 @@ answer carries it back. The host adds `app`, `browser` (`firefox` from its argum
|
||||
|
||||
| Extension → host | Answer |
|
||||
|:--|:--|
|
||||
| `{"op":"browser_status"}` | `{"ok":true,"code":"123456"}`: the session's match code |
|
||||
| `{"op":"browser_match","origin","top"}` | `{"ok":true,"logins":[{"id","title","username","totp"}]}` (`totp`: it has a 2FA code); never a secret |
|
||||
| `{"op":"browser_status"}` | `{"ok":true,"code":"123456","theme"}`: the session's match code; Custos's theme, `auto`/`light`/`dark` |
|
||||
| `{"op":"browser_match","origin","top"}` | `{"ok":true,"logins":[{"id","title","username","totp"}],"theme"}` (`totp`: it has a 2FA code); never a secret |
|
||||
| `{"op":"browser_fill","id","origin","top"}` | `{"ok":true,"username","password","totp"}` only if that login may go into that frame of that page, else `no_match` |
|
||||
| `{"op":"browser_totp","id","origin","top"}` | `{"ok":true,"totp","remaining"}` (seconds left) under the same rule; `no_totp` without one |
|
||||
| `{"op":"browser_save","origin","top","username","password"[,"title"]}` | after Custos's card: `{"ok":true,"saved":"new"/"updated"/"unchanged"}`, or `refused` |
|
||||
| `{"op":"browser_generate","origin","top"}` | `{"ok":true,"password","bits"}`: a new password for a sign-up or change-password form, from `custos-gen` (20 characters, every kind required); stored nowhere |
|
||||
|
||||
Limits: `origin`, `top` ≤ 2 KiB, `id` ≤ 128 bytes, `username` ≤ 1 KiB, `password` 1 byte to 4 KiB, `title`
|
||||
≤ 200 bytes. Errors the extension turns into a sentence: `not_connected` (no host registered), `not_allowed`
|
||||
@@ -77,7 +78,27 @@ Limits: `origin`, `top` ≤ 2 KiB, `id` ≤ 128 bytes, `username` ≤ 1 KiB, `pa
|
||||
- `browser_save` always shows a card (*Save* / *Don't save*): a new *Web login* for the origin, or, when a login
|
||||
of that site has the same username, its new password. An identical login is `unchanged`, without a card.
|
||||
- Only items of type *Web login* are offered. A locked Custos waits for the unlock (up to a minute), then
|
||||
answers `locked`.
|
||||
answers `locked`, also to `browser_generate`.
|
||||
- `browser_generate` needs the same grant and a web page, stores nothing and writes no audit line: the password
|
||||
is kept only if the page's form is sent and the person says *Save* on the card.
|
||||
|
||||
## The popup and the page
|
||||
|
||||
- The popup (the 2026-12 redesign, layout C) shows the active tab's site, its logins first, each with **Fill** and
|
||||
its 2FA code inline (at most three codes at once; each is a `browser_totp`, so each is in the audit), then a
|
||||
pending save offer (*Save to Custos*, or *Update* when Custos has that username for the site), and on a page with
|
||||
a sign-up or change-password form **A new password for this site** with *Fill*. The new password is shown in
|
||||
the popup's own page only; *Fill* hands it to the tab's top frame, which takes it only if it is still on the
|
||||
origin it was made for. The popup's requests (`*-tab`) are answered only for the extension's own pages, never
|
||||
for a content script.
|
||||
- In the page, a new-password field (marked `new-password`, named new/confirm/repeat, or the two last password
|
||||
fields of a form) gets **Use a new password** first in Custos's menu. Custos makes it; it goes into that form's
|
||||
new-password fields (the password and its repeat). Sending the form offers to save it, like a password typed
|
||||
by hand; a change-password form saves the new password, not the current one, and with no username on the form
|
||||
a site with one login updates that login.
|
||||
- Colours are @domi/ui's custos room (dark; parchment in the light theme), copied into the CSS because the
|
||||
extension has no build step. The popup and the in-page menu follow Custos's theme (`theme` in the answers),
|
||||
and the system's until Custos has answered.
|
||||
|
||||
## Registration and the extension ids
|
||||
|
||||
@@ -123,8 +144,9 @@ node tools/extension-test.mjs
|
||||
|
||||
`custos-browser` covers origin parsing, look-alikes (punycode twins, extra labels, userinfo, encoded dots,
|
||||
backslashes, odd ports), public suffixes, frames and their pages, ports and schemes, bare names and IPs,
|
||||
best-of-several, the callers and the frames. `custos-native` covers that only the five ops pass, rebuilt from
|
||||
best-of-several, the callers and the frames. `custos-native` covers that only the six ops pass, rebuilt from
|
||||
known fields, and that another extension gets `not_allowed` without reaching Custos. `tools/extension-test.mjs`
|
||||
runs the background script against a fake browser: origins from the browser and never from the message, frames,
|
||||
sandboxed and blank frames, other extensions, a locked Custos, and a login offered for saving that never comes back
|
||||
out. The desktop repo has the pipe tests and the end-to-end runs in each browser.
|
||||
sandboxed and blank frames, other extensions, a locked Custos, a login offered for saving that never comes back
|
||||
out, a new password asked for by origin only, the popup's requests refused to content scripts, *Update* offers,
|
||||
and that nothing is ever written to the console. The desktop repo has the pipe tests and the end-to-end runs in each browser.
|
||||
|
||||
Reference in New Issue
Block a user