In development. It changes without notice.
Topic
Login Detail View Model
What the detail of a login shows and where each key leads, the sentences about a record, and what a refused one-time code offers.
The detail is a list, a page, a revealed value and a confirmation before a deletion, with no screen behind it. Where a one-time code is refused (One-Time Codes), the one thing that would fix it is offered: a sync over a saved network, adding a network, or setting the clock.
- See also
- One-Time Codes, Home Screen
Files | |
| file | src/ |
| A credential record's brand mark on its detail screens, keyed like its list row. | |
| file | src/ |
| Headless finite-state machine for the credential-detail overlay. | |
| file | src/ |
| The credential detail's two sentences about a record: its state and what else it stores. | |
| file | src/ |
| What a 2FA surface says, and offers, while the TOTP gate refuses a code. | |
| file | src/ |
| The vault's surfaces that are only words: the narrow pager's empty page, and the 2FA gate's refusal on every surface that shows one. | |
Classes | |
| struct | kleidos:: |
| Resolved stop list for one opened credential, in display order. More about kleidos:: | |
| struct | kleidos:: |
| Resolved action bar for one opened credential. More about kleidos:: | |
| struct | kleidos:: |
| One row of the second level. More about kleidos:: | |
| struct | kleidos:: |
| Resolved second level for one opened credential. More about kleidos:: | |
| struct | kleidos:: |
| Where the dial is within the credential detail. More about kleidos:: | |
| class | kleidos:: |
| Headless credential-detail router; tracks the active id and reveal timer. More about kleidos:: | |
| struct | kleidos:: |
| What a surface draws for a refused verdict. More about kleidos:: | |
| struct | kleidos:: |
| The words that name an offered fix on each kind of control. More about kleidos:: | |
Typedefs | |
| using | kleidos:: |
| One sentence of the credential detail. | |
Functions | |
| constexpr BrandMarkProps | kleidos:: |
| The props a credential's detail mark is drawn with. | |
| bool | kleidos:: |
| Draw a credential's brand mark from its decrypted URL and name. | |
| MoreRowList | kleidos:: |
| Build the second level from the record's field presence. Pure. | |
| CredCardActions | kleidos:: |
| Build the identity card's action bar. Pure (host-testable). | |
| CredCardActions | kleidos:: |
| Build the dial card's action band. Pure (host-testable). | |
| const char * | kleidos:: |
| The host part of a URL: the text after its scheme. Pure. | |
| EpaperCardCommand | kleidos:: |
| Step the dial's cursor through the credential detail. Pure. | |
| CredStopList | kleidos:: |
| Build the carousel stop list from the opened credential's field presence. Pure (host-testable). | |
| void | kleidos:: |
| Compose what is true of the record: favorite · archived · the expiry date · the sign-in provider. | |
| void | kleidos:: |
| Compose what else the record stores: "2 fields · +1 URLs · Codes · Notes". | |
| constexpr ClockFix | kleidos:: |
| The action to offer for the TOTP gate's verdict. | |
| constexpr ClockFix | kleidos:: |
| The fix a surface names before it has read whether a network is saved. | |
| constexpr GateCopy | kleidos:: |
| The words for the TOTP gate's verdict. | |
| constexpr FixCopy | kleidos:: |
| The words that name an offered fix on each kind of footer and hint. | |
| void | kleidos:: |
| Raise the warning that no code can be typed now, and why. | |
| notice_ | kleidos:: |
| The column of a page that has no entries. | |
| notice_ | kleidos:: |
| The column of the 2FA page while the gate refuses a code. | |
| void | kleidos:: |
| Draw the page that has no entries, as layoutEmpty sets it. | |
| void | kleidos:: |
| Draw the refused 2FA page, as layoutTotpRefusal sets it. | |
| notice_ | kleidos:: |
| The column of the full-screen 2FA view while the gate refuses a code. | |
| void | kleidos:: |
| Draw the full-screen view's refusal, as layoutCodeRefusal sets it. | |
| notice_ | kleidos:: |
| The column a 2FA list shows in place of its rows while the gate refuses a code. | |
| void | kleidos:: |
| Draw a 2FA list's refusal, as layoutListRefusal sets it. | |
| notice_ | kleidos:: |
| The refusal a credential's 2FA stop shows under its caption: the headline alone. | |
| void | kleidos:: |
| Draw a 2FA stop's refusal, as layoutStopRefusal sets it. | |
Variables | |
| constexpr uint8_t | kleidos:: |
| Maximum number of carousel stops (all six present). | |
| constexpr uint8_t | kleidos:: |
| Every card action there can be. | |
| constexpr uint8_t | kleidos:: |
| constexpr uint32_t | kleidos:: |
| How long the refusal warning stays up, ms: two lines to read. | |
Enumeration Type Documentation
ClockFix #
The action a 2FA surface offers in place of a code.
CredCardAction #
One action of the fixed identity card's bar.
The card itself never changes as the bar moves: the username, the masked password and the live one-time code stay on screen, because that is the errand almost every open is. Only these three actions cycle under them.
CredDetailResult #
CredDetailStep #
CredStop #
One stop of the credential-detail action carousel. Stops mix actions (Type, Delete) and data fields (username, URL, related TOTP, notes); short A steps forward through them, hold A executes the stop's action.
EpaperCardCommand #
What the caller must do after a key.
EpaperCardKey #
EpaperCardLevel #
MoreRowKind #
What one second-level row is.
Function Documentation
buildCardActions() #
Build the identity card's action bar. Pure (host-testable).
Type, Reveal and Delete are always there. Reveal sits second because reading the password IS the fallback errand when the host is not paired, which makes it the most relevant thing after typing. More appears only when the record actually carries something under it — an empty second level is a promise the card cannot keep, and on a two-button panel every action costs a press to skip past.
- Parameters
-
Name Direction Meaning hasMore in Whether any second-level row exists (URL, custom field, recovery codes or notes).
- Returns
- The resolved bar, in card order Type -> Reveal -> More -> Delete.
buildCredStops() #
Build the carousel stop list from the opened credential's field presence. Pure (host-testable).
Type and Delete are always present (first and last); the username, URL, TOTP, and notes stops appear only when the credential carries that data, in the order Type -> user -> URL -> TOTP -> notes -> Delete.
- Parameters
-
Name Direction Meaning hasUser in Credential has a non-empty username. hasUrl in Credential has a non-empty origin URL. hasTotp in Credential embeds a related TOTP secret. hasNotes in Credential has non-empty notes.
- Returns
- The resolved stop list (count in [2, kCredStopMax]).
buildEpaperCardActions() #
Build the dial card's action band. Pure (host-testable).
The dial's card names each errand instead of routing through a chooser, in the chooser's order: Type (the username, TAB and the password; the password alone when there is no username), the one-time code when the record carries one, the username and the password each alone when there is a username, Reveal, and More. More is always last and always present: the second level holds Delete and the rest of the record there.
- Parameters
-
Name Direction Meaning hasUser in Non-empty username. hasTotp in The record carries a related one-time code.
- Returns
- The resolved band, in card order.
buildMoreRows() #
Build the second level from the record's field presence. Pure.
Order is by how often a row gets typed: the site first, then the custom fields in the order the owner stored them, then the recovery codes (rare, but an action), and the notes last because they are read, never typed.
- Parameters
-
Name Direction Meaning hasUrl in Non-empty primary URL. customCount in Custom fields present (clamped to twelve). recoveryLines in Lines in the recovery-codes block; 0 = no row. hasNotes in Non-empty notes. withDelete in Append Delete as the last row: the dial's card has no room for it, so the second level carries it.
- Returns
- The rows, in that order.
clockFixBeforeRead() #
The fix a surface names before it has read whether a network is saved.
A surface reads the answer when it is entered under a refusal, never from a frame or a tick. A refusal that arrives later in the visit (the precise sync behind the codes runs out while they show) is named without that read: the sync, the fix wherever a network is saved. The press that runs it reads the answer first and runs the fix the answer calls for.
- Parameters
-
Name Direction Meaning gate in The TOTP gate's verdict. hasRtc in The board keeps the time in a battery-backed RTC.
- Returns
- ClockFix::
None for a passing gate or codes turned off, else the sync.
clockFixFor() #
The action to offer for the TOTP gate's verdict.
A sync wins wherever a network is saved. Without one, a board whose RTC keeps the time through every sleep gets the Set clock editor, which makes its clock trusted; a board without an RTC chip gets the Wi-Fi networks list instead, because no time set by hand ever makes a code there.
- Parameters
-
Name Direction Meaning gate in The TOTP gate's verdict. hasRtc in The board keeps the time in a battery-backed RTC. networkSaved in The vault holds at least one Wi-Fi network.
- Returns
- ClockFix::
None for a passing gate or codes turned off, else the fix.
composeCredAlsoStored() #
Compose what else the record stores: "2 fields · +1 URLs · Codes · Notes".
- Parameters
-
Name Direction Meaning detail in The record's detail projection. out out The list, empty when the record stores nothing more.
composeCredStateLine() #
Compose what is true of the record: favorite · archived · the expiry date · the sign-in provider.
"Expired" only when a trusted clock can say so; an unset clock cannot tell, and a wrong "Expired" is worse than a date.
- Parameters
-
Name Direction Meaning detail in The record's detail projection. out out The line, empty when nothing applies.
credBrandMarkProps() #
The props a credential's detail mark is drawn with.
The brand token (ui::listDomain and name, the name as the letter, and url for the logo lookup only when listDomain is non-empty. A URL that names no host would otherwise key the logo by its raw text, which names no brand, while the list row keys it by the name.
- Parameters
-
Name Direction Meaning listDomain in The record's list domain (kleidos:: vault:: listDomain of url); null or empty when the URL names no host.name in The record's display name. url in The record's URL (null or empty allowed).
- Returns
- The props; they point into the three arguments.
credUrlHost() #
The host part of a URL: the text after its scheme. Pure.
A credential row shows "github.com", not "https://github.com": the scheme is the same on nearly every record and costs the width the host needs.
- Parameters
-
Name Direction Meaning url in The stored URL (may be null or empty).
- Returns
- A pointer into
urlpast the first "://", orurlitself when it carries no scheme; never null for a non-nullurl.
drawCodeRefusal() #
Draw the full-screen view's refusal, as layoutCodeRefusal sets it.
- Parameters
-
Name Direction Meaning canvas in, out Surface to draw on (inside the caller's frame). layout in The panel. band in The view's band under its identity row. headline in What the gate refuses with. hint in What makes a code readable, as this board offers it.
drawCredBrandMark() #
Draw a credential's brand mark from its decrypted URL and name.
- Parameters
-
Name Direction Meaning canvas in, out Drawing surface. layout in Responsive context (carries the device profile). box in Square-ish target rectangle for the badge. url in The record's URL (null or empty allowed). name in The record's display name: the letter, and the brand token when the URL names no host. background in The surface the mark sits on, which a logo's transparent pixels are blended into (color panels; BrandMarkProps:: background).
- Return values
-
Value Meaning true A badge (logo or letter) was drawn. false Nothing was drawn (empty box).
- Warning
- SECURITY: the derived domain is record metadata; it is held in a local buffer that is wiped before return.
drawEmpty() #
Draw the page that has no entries, as layoutEmpty sets it.
- Parameters
-
Name Direction Meaning canvas in, out Surface to draw on (inside the caller's frame). layout in The panel. body in The page's body band. totpPage in True on the 2FA page, false on the credentials page.
drawListRefusal() #
Draw a 2FA list's refusal, as layoutListRefusal sets it.
- Parameters
-
Name Direction Meaning canvas in, out Surface to draw on (inside the caller's frame). layout in The panel. body in The list's body band. copy in The words for the refused verdict.
drawStopRefusal() #
Draw a 2FA stop's refusal, as layoutStopRefusal sets it.
- Parameters
-
Name Direction Meaning canvas in, out Surface to draw on (inside the caller's frame). layout in The panel. box in The room the stop has for it. copy in The words for the refused verdict.
drawTotpRefusal() #
Draw the refused 2FA page, as layoutTotpRefusal sets it.
- Parameters
-
Name Direction Meaning canvas in, out Surface to draw on (inside the caller's frame). layout in The panel. body in The page's body band. copy in The words for the refused verdict. fix in The fix the page offers on a hold, if any.
epaperCardStep() #
Step the dial's cursor through the credential detail. Pure.
The binding is one table for all three levels: ▲ / ▼ move with wrap, a held OK acts, and the side key goes back one level and then leaves. An OK tap acts only where a hold would be a promise the screen cannot keep: opening a level (More, Notes) is a tap, and typing or revealing is a hold, so a mis-read tap never sends a password to a host. While the password is revealed every key but the side key just ends the reveal.
- Parameters
-
Name Direction Meaning cursor in, out The dial's position; updated in place. key in The key pressed. actions in The card's action band. rows in The second level's rows. revealed in Whether the password is unmasked right now.
- Returns
- What the caller must do.
fixCopyFor() #
The words that name an offered fix on each kind of footer and hint.
- Parameters
-
Name Direction Meaning fix in The offered fix. ClockFix:: None offers nothing; it gets the Set words, which no surface draws.
- Returns
- The footer, e-paper footer, key-hint and hold-hint words.
gateCopyFor() #
The words for the TOTP gate's verdict.
A board without an RTC chip is never told to set the clock: its codes need a sync, so the line under the headline and the Settings path name the sync (and, where a GPS receiver is fitted, the GPS time sync too). A passing gate has nothing to say; it gets the clock-unset words, which no surface draws.
- Parameters
-
Name Direction Meaning gate in The TOTP gate's verdict. hasRtc in The board keeps the time in a battery-backed RTC. hasGps in The board can set its clock from a GPS fix.
- Returns
- The headline, the detail line and the Settings path.
layoutCodeRefusal() #
The column of the full-screen 2FA view while the gate refuses a code.
The headline stands where the code would, over the line that says what fixes it. A band too short for both keeps the headline alone: the view's footer or key-hint shelf still names the fix.
- Parameters
-
Name Direction Meaning canvas in Surface used only to measure text. layout in The panel. band in The view's band under its identity row. headline in What the gate refuses with. hint in What makes a code readable, as this board offers it.
- Returns
- Where the refusal's rows land in
band; one block when the hint gave way.
layoutEmpty() #
The column of a page that has no entries.
- Parameters
-
Name Direction Meaning canvas in Surface used only to measure text. layout in The panel. body in The page's body band. totpPage in True on the 2FA page, false on the credentials page.
- Returns
- Where the rows land in
body:what is missing, and where it is added.
layoutListRefusal() #
The column a 2FA list shows in place of its rows while the gate refuses a code.
The headline over what makes a code readable, as the keyboard, touch and e-paper lists say it. On the 1-bit panel both are body size in the one ink.
- Parameters
-
Name Direction Meaning canvas in Surface used only to measure text. layout in The panel. body in The list's body band. copy in The words for the refused verdict.
- Returns
- Where the refusal's rows land in
body.
layoutStopRefusal() #
The refusal a credential's 2FA stop shows under its caption: the headline alone.
- Parameters
-
Name Direction Meaning canvas in Surface used only to measure text. layout in The panel. box in The room the stop has for it. Its height may be the whole stop's: the caller reads heightto place the caption.copy in The words for the refused verdict.
- Returns
- Where the headline's rows land in
box.
layoutTotpRefusal() #
The column of the 2FA page while the gate refuses a code.
The headline names the refusal, the line under it what makes a code readable, and the last line the way there: the hold that runs fix on this page, or the Settings path when the page offers no fix.
- Parameters
-
Name Direction Meaning canvas in Surface used only to measure text. layout in The panel. body in The page's body band. copy in The words for the refused verdict. fix in The fix the page offers on a hold, if any.
- Returns
- Where the refusal's rows land in
body.
toastGateRefusal() #
Raise the warning that no code can be typed now, and why.
For a code asked for where the fix cannot run: the code offered after a typed login pair (a sync would tear down the Bluetooth session that typed it), and the credential detail's or the keyboard card's 2FA action while codes are off. Where HOME offers the code (the detail's 2FA action, the keyboard card's 2FA button) a refusal runs the fix instead. The title is the verdict's headline; the body is where the fix lives in Settings. It reads no vault, so it never holds the frame.
- Parameters
-
Name Direction Meaning gate in The TOTP gate's verdict; a passing gate raises nothing.
Variable Documentation
kMoreRowMax #
Most rows a second level can hold: URL + every custom field + codes + notes
- delete.