From 75dd7df4f05bd76ec47d2d274d5c365236bdb50c Mon Sep 17 00:00:00 2001 From: Ivan Husev Date: Fri, 4 Dec 2026 13:43:09 +0200 Subject: [PATCH] feat: an eye in every password and token field shows the value DevFo-OSS/17 --- CLAUDE.md | 2 +- web/src/lib/components/SearchField.svelte | 4 +-- web/src/lib/components/TextField.svelte | 34 ++++++++++++++++--- web/src/lib/components/TextField.test.ts | 25 +++++++++++++- web/src/lib/components/field.ts | 5 +++ web/src/lib/design-system/DesignSystem.svelte | 1 + 6 files changed, 62 insertions(+), 9 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 6e18018..378c99c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -101,7 +101,7 @@ Where to look first: - Shell: the pages live in the `(app)` group, whose `+layout.ts` asks `get_session` unawaited (`depends('app:session')`, invalidated after every navigation but the first and shallow ones, for the unresolved count); `+layout.svelte` renders the sidebar and the page once it is known (pages and components read it as `session.current`, `#lib/session.svelte.ts`, never as page data) and sends a temporary password to `/account` (`goto`); `+layout.svelte` is `Sidebar` (groups and items from `#lib/nav.ts`; collapsed state in localStorage; `ThemeSwitch`; Log out through the plain `logout`) and `main`; `/` redirects to `/issues`. `/login` lives outside `(app)`, reads `login_state` and after a login does a full load of the server's `next`. Route parameters are matched by `src/params.ts` (`defineParams`: `projectId` a positive number, `connectionId` 8 characters of `store.NewID`). - Lists: the filters live in the address (`#lib/filters.ts`: `readChoices`, `readText`, `readDays` (UTC days, a reversed range swapped), `readPaging` (20/50/100), `dayRange` for the API's since/until, `changed` (a filter change starts from page 1), `cleared` (keeps the page size)), changed with `showChanged` (`#lib/navigate.svelte.ts`: the controls show a change at once through `shown(name, value)`, and the list loads once nothing changed for `editPause` (1 s), every change meanwhile in one `goto` with `reset: false`; only typing replaces the history entry, Enter in a search field loads at once, a page size at once; another navigation first drops the waiting changes); while changes wait or the list loads another address of its own, its Table is `busy` (`#lib/loading.svelte.ts` `reloading()`); the chips of what a list applies come from the builders of `chips.ts` (`listChip`, `textChip`, `daysChip`, `appliedChips`), the Projects and Levels filters are a `FilterPicker`; a page asks the count first, so a page past the end shows the last one, then the list with `offset`/`cursor`; level, project (and the audit log's every) pickers offer the values some row has and the chosen ones (`offered`). - Pages: `/logs` (`count_logs`, then `list_logs` only when it found some, for the rows it found and back to its `from_id` (`listPage`), so the list never searches further than the count; a count that ran out of time shows a warning Notice with how far back it searched (`stoppedSearch`) and "+" in the Pager; LogBody; for admins checkboxes with Delete in a sticky `BulkBar`, `logs.ts`); `/issues` (`issues.ts`: `readIssueFilters` reads the address with `#lib/filters.ts`' `readProjects` (names or ids) and `readChoice` (one known value); status default unresolved and sort default `last_seen` are not written and give no chip (`withStatus`, `sortedBy`); `count_issues` then `list_issues` (`pageWithin` of `#lib/filters.ts`), `list_issue_levels`, the sortable headings `columnSorts`, rows tinted by status (`statusRowTone`, `issueStatusTitle`), badges filtering the list, per row "Copy for agent" and Open; checked rows in a sticky `BulkBar` with `IssueActions`, then a toast and `invalidateAll`); `/issues/[id]` (one `get_issue_details` load, rules in `issue.ts`: Breadcrumbs, facts, IssueActions (delete goes to the list), Prompt and Copy for agent, the event (clock drift, thinned note, trace linked to `/logs` when it has logs), exceptions (`ExceptionCard`, `StackFrame`: unfolds only with source or variables, open where the app threw), the missing-event notice, the status history (`StatusHistory`, `changeAuthor`), the events (selected row, "Load more" through `list_issue_events`), then closed Details: related logs, breadcrumbs, request, tags and user, contexts, raw JSON); `/projects` (storage card split per project in its color plus other (`usageSegments`), columns unresolved, logs recorded, size, last received; under a project's name and id the logs and events dropped since its streak began (`list_projects` `dropped`, `droppedSince`, shown only when something was; `droppedLine`: else the 24 h `droppedSummary`, as for whole requests refused, which the totals leave out), a link to a Dialog of the last 24 h by kind and reason when it has rows; RowMenu: for admins Rename (name and color in one FormDialog); Show installation code; Settings for admins; Logs; Delete for admins), `/projects/new` (a hero `ProjectNameField` and Add project, then Advanced settings: `ColorField`, `LogLevelsField`, `DiskShareField`) and `/projects/[id=projectId]` (`ProjectForm`: the name renamed in place by `EditableTitle`, `ColorField`, `LogLevelsField`, `DiskShareField`); `ColorField`: swatches of the generated `projectPalette`, a custom color, a preview badge, `/projects/[id]/setup` (`get_project_setup`: "Connect" and the project's Badge, SDK code per platform in `Steps`, "Copy for agent", `ConnectStatus` (a `StatusCard`: waiting with Do it later, or connected with links to its issues and logs), asks again every 3 s until `connected`), `/projects/cleanups` (`list_cleanups`, a run's steps in a Dialog, its compaction afterwards in a column and the Dialog, `cleanups.ts`), `#lib/projects.ts` (delete confirmation, the form's input); `/notifications` (`list_connections` with `destination` and `delivery.failing`; RowMenu: Edit, Pause/Resume through `set_connection_active`, Delete; the Delivery column links to the connection's delivery log, the page heading to the whole log), `/notifications/new` and `/notifications/[id=connectionId]` (one `ConnectionForm`: the email address goes through `EmailStep`, its own form, with `start_email_verification`/`confirm_email`, its progress kept by the form so a type switch keeps it, and everything after it disabled until it is confirmed; saved tokens come masked from `get_connection` and an empty field keeps them, only typed fields are sent; chats are tested before saving with `test_chat`; after a save the form reads the stored connection again; "Include Open issue link" is not offered without PUBLIC_URL (`get_connection_defaults.issue_links_available`), so the stored value stays), `/notifications/log` (`count_deliveries`, `list_deliveries`, filters `connection`/`status`), rules in `#lib/notifications.ts`; `/users`, `/users/new`, `/users/[id]` (RowMenu: Edit, Reset password, Delete; a temporary password shown once in SecretReveal, held in `#lib/handoff.ts` (`handOver`/`takeOver`, module memory only) or component state); `/account` (`update_account_name`; under Profile and Security an `ActionRow` each opens a FormDialog: , `change_password`; with a temporary password only the password form, on the page); `/agents` (MCP: `McpSetup`, `ConnectedApps`, see `internal/oauth`); `/audit` ("Audit log" in Monitoring, every role: `count_audit`, then `list_audit`; filters records, actions, users (a Picker with `searchText`: the users of `list_users` with an entry, exact ids; every choice from `list_audit_choices`, `auditChoices`) and projects, search, dates (`audit.ts`); the action, the project badges (`ProjectsSummary` `limit` 1), the user and the record type filter the list; Message is a sentence (`entryMessage`: "Resolved" TypeError…, "Created" ops "→ ops@example.com"; a bulk entry's `before`/`after` are what all its records changed alike, `commonFields`); the eye opens a Dialog with Facts (the IP only there) and `AuditDiff`, or for "N issues" `AuditItems` from `get_audit_entry`; the record links to its page while `exists`, `#lib/audit.ts` `recordHref`); `/oauth/authorize` (the consent page, see `internal/oauth`). - - Components (`#lib/components`; every element that looks or acts the same is one of them, shown with its variants on `/design-system`): ActionList and ActionRow (rows on a card's surface that open a dialog: an icon in a square, the label, a line under it, a chevron; under a small uppercase heading), Button (variants default, primary, danger, info, accent (indigo, filled on hover: the issue list's Open), neutral (grey on the code background: a disabled session action; CopyButton `variant`, CodeBlock/CopyField/SecretReveal `copyVariant`), menu (the ⋯ of a RowMenu: no box until hovered or open), link, muted (a grey secondary link: a log's trace), title (the name of a table row that opens its record: text color, bold), ghost; `size="large"` the one main action of a page (Add project), `truncate` its text on one line cut with "…" (a link in the delivery log); `expanded` for a toggle, `popup` (aria-haspopup), `busy` (ignores clicks, keeps the focus), `form` for a submit button outside its form, `external` (a new tab, `rel=noopener noreferrer`), `unavailable` (the reason it does nothing now, its tooltip; aria-disabled, so it keeps the focus)), SubmitButton (a form's submit through its FormState: busy, and "Nothing changed" while an edit form's values are the saved ones), Card, UsageBar (`segments`: parts in project colors, `usage.ts`; widths through the `style:` directive), PageTitle (the tab title ` · `, also set by PageHeading), Badge (tones error, warning, success, info, debug, plain, project; an on/off state is a StatusText; a project's color from `get_session`'s `project_colors`, or `color` for one not saved yet; `size="heading"` beside a page's title), LevelBadge (tone from the generated `shownLevel`), StatusBadge (`issueStatus.ts`: tone, mark, meaning from the generated `issueStatuses`; `detail` after it, what ends an ignore, `ignoreBoundText`, the list's row title `issueStatusTitle`), RoleBadge and RoleChoices (`role.ts`), AuditActionBadge (an audit action: create success, edit info, delete error, others plain, `#lib/audit.ts`), AuditDiff (an audit entry's changed fields as a git-style diff: each field with its before line (red) over its after line (green), the words that changed marked (`changedParts`); a side no field has is left out), AuditValue (one side of a changed value, a line in its side's color, the changed parts marked; `sideClasses`), AuditItems (the records of an entry whose request changed several: what they all changed alike once as an AuditDiff, then a Table of Project, Record and a column per field that differs (`groupFields`, `itemValue`), rows tinted by the status before (`statusRowTone`), the records the search finds first with the match marked (`searchParts`), a record linked only while it has a page), IssueActions (`issueActions.ts`: the actions of a status or of checked issues, confirmation texts, `doneMessage`, `selectionProblem`; Ignore is a labeled RowMenu of `ignoreOptions`: forever, each `ignore_for`, until 10/100/1000 more events), BulkBar (sticky above a list with checkboxes: the count checked or its `problem`, and the actions), AgentCopyButton ("Copy for agent", `mcp_reference`), CopyButton, CopyField (`masked`: dots until Show), Toast (the one live region, toasts stacked in the corner of its `position` (`toast.ts`); `toasts` shows another `ToastStore` than the app's `toast`, as the design-system page's sample does: each slides in with a bar of its time left, paused on hover, a × to close, white with a round status mark and a time bar in the tone color (success by default, error, info: copies), the newest 5 kept; `toast.show(text, tone, duration)`), PageHeading (`leading` before the title, `actions`, `description`: the muted line under the title (what the page is for, an issue's location)), EmptyState (`variant="card"`: a card with text on the left, the MCP page's connected apps), Notice (info, success, warning, error; `alert` announces it as it appears), StatusPage (404, or 403 "You do not have access to this" with the server's reason), ErrorPage (StatusPage for 404/403, the message otherwise), Table (columns and a `cell` snippet; column options `number`, `wideOnly`, `actions`, `fill` (takes the width the others leave; several fill columns share it equally), `rowHeader` (th scope=row: key–value tables), `sort` (`columnSort`: the heading links to its first direction, then the reverse; aria-sort); table options `sort`, bindable `selected` (a checkbox per row, select-all mixed in between, emptied when the rows change), `rowTone` (error, success, faded; the `row-*` tokens of `layout.css`) with `rowTitle`, `selectedKey`, `headerless`, `compact`, `flat` (no box of its own inside a card or a dialog), `top` (cells at the top of their row, for rows of several lines such as logs; centred otherwise); every table is as tall as its rows and scrolls only sideways, `busy` (rows faded under a running bar, aria-busy)), NavLink (a link, an `onclick` button or a form's submit), Sidebar, ThemeSwitch ("Dark mode" above the account, a NavLink with a Switch: the user's theme from `get_session` (`saved`), so every browser they log in from shows it; without one, the theme shown now (the system's or this browser's) is saved at once through `set_theme`, and toggling saves light or dark there too; Switch, a toggle with role switch; `#lib/theme.ts` keeps a copy in localStorage `exceptic-theme` and sets `data-theme` on ``, which an inline script of `app.html` also does before the first paint (the login page uses only that copy); Go hashes it like SvelteKit's, `TestEmbeddedBuild`), Breadcrumbs (the path above a title, the last item the page; Esc follows the one before it, decided on keydown and followed on keyup as a click, unless a field has the focus, a `dialog` is open or a popup carries `data-popup` (`#lib/escape.ts`); a popup that closes itself on Esc prevents the event's default), Dialog (`size` wide or narrow, `actions` footer, `onopen`, `dismissible` false while its action runs; one that is not dismissible opens again if the browser closes it), FormActions (the end of every form: FormError, then the SubmitButton and an optional Cancel link in one row; `stretch` puts the submit across the form: the login, Add project), FormError (a FormState's `error`, an alert Notice), FormDialog (a short form in a narrow Dialog, e.g. a project's name and color, the account's email and password, through a FormState: Cancel and Save (`submitLabel`), a refused field keeps it open with its problem, it closes on success, the first text field selected), ConfirmDialog and ConfirmButton (every delete, reset and bulk action: the `Confirmation` of `confirm.ts`, Cancel focused first, Cancel/Esc/backdrop do nothing, busy and not dismissible while the action runs, an `ApiError` shown in the dialog, `disabled`; never `window.confirm`), RowMenu (the ⋯ of a table row, or with `text` a labeled menu button with a chevron (`variant`, `disabled`, `title`), items as data (`menu.ts`: links, actions, `danger`, `separatorBefore`, a `confirm` asked first, `disabled` with its reason under the label, reached by the arrows), fixed under its button so a table's scroll box does not cut it, arrows/Home/End, Esc back to the button, Tab, a click outside, scrolling close it), Details (`section` card with h2, count and a one-line detail; `form` card with Hint and the values under the title, opened when `invalid`; `disclosure` a card of optional settings (Advanced settings): a line on what is inside, the body under a line, parted by `FormGroup`; `nested` a flat bordered box with title and count inside another card (a stack trace in an exception); `inline` small disclosure), CodeBlock (`plain` wrapped, `command` one line after › with copy, `snippet` with copy), TextField (label, `note`, Hint, `description` under the field, server error, limits as props, `action` (a button beside the field: Verify, Find chat ID), `saved`: a stored secret's mask in the placeholder and an sr-only description, `variant="hero"` the one large centered field of a page, its label for screen readers only (Add project), `variant="code"` narrow and monospace for a confirmation code), ChoiceGroup and Choice (fieldset of radios or checkboxes, descriptions, disabled with a `reason`; the group `inline` (side by side), `compact`/`beside` (a small legend over or before a tight row of short options: levels), `card` (a card of its own), `hideLegend` (sr-only, when a heading names it), `lead` (an option above the others, such as All projects; the empty row of the others is hidden); Choice `hint`: a "?" outside the label that describes the option (`aria-describedby` to the Hint's `id`)), LevelChoices and LevelSummary (levels highest first, or "none"; LevelChoices `inline` by default, `hideLegend`), SecretReveal (a secret shown once: a warning Notice and a CopyField, plain or masked), Select (a listbox popup; `all` adds the no-choice option; `field`: a form field with its label above, full width), Facts (`boxed`, `columns`: two to a row, the issue page's facts and its event's), StatusText (a state as a pill with a dot in its tone, `status.ts`: success, warning, error, muted), Steps and Step (numbered steps, the number in a circle, the content indented), StatusCard (a state the page watches: waiting with a PulseDot (an amber dot with a growing ring, still under reduced motion) or done with a green check, title, line, actions; a live region), Hint (the "?" whose text is its tooltip and name; `id` for the `aria-describedby` of what it explains), Tabs (a segmented tablist, or `variant="underline"`: names over a line, the chosen one underlined (the MCP page's client); arrows/Home/End through `#lib/roving.ts`, shared with RowMenu; `param` names the tab in the address, written with a shallow `goto`), and for lists FilterBar, FilterPicker (the Projects or Levels filter: a Picker of badges), Picker (a dropdown of checkboxes, hidden with one option and nothing chosen; its All is checked and disabled while nothing else is), SearchField (reports every change, and Enter with `now`; a × inside clears it at once), DateRange (UTC days in one field with its own month calendar, `popup.ts`; × clears it), ActiveFilters (`chips.ts`: a × after each chip removes the whole filter; among several values each project or level badge is a link that removes it, with a × inside, Badge `remove`), Pager, LogBody (color codes removed, Expand, Full screen in a Dialog with JSON fields as lines, `#lib/format.ts`), Time; and BackButton (Back before a page's title: the app page the viewer came from, else `fallback`; the setup page), EditableTitle (a page title with a pencil that turns it into a field of the form around it, sent by the form's Save, Esc drops the edit; PageHeading `heading`; the project form), FormGroup (a part of a `disclosure` Details: small heading with its Hint), Slider (a range input with its label, marks, `least` (the lowest value it takes) and an `output` saying what the value means; the disk share), ProjectsChoice (All projects or some, as badges, in a form card; `allowAll` false disables All with its reason, `locked` the whole field), ProjectsSummary (All projects, the projects as badges, or a dash for none; `limit` keeps a list row on one line: 1 in the audit log, 5 on Users and Notifications, the rest behind a MoreButton), MoreButton ("+N more": an outlined Badge (`tone="outline"`, Badge `onclick` makes it a button) opening the rest in a popup under it), ColorField (a project's color: palette swatches, a custom color, a preview badge). Types a page imports from a component live in a `.ts` beside it (`table.ts`, `badge.ts`, `menu.ts`, `confirm.ts`), so eslint resolves them; form controls share `field.ts` (`fieldClasses`, `controlClasses`, and every form's layout `formClasses`/`narrowFormClasses`), a ProjectsChoice's value is sent as `projectsInput` (`projectsChoice.ts`), popups and cards `surface.ts` (`popupClasses`, `cardClasses`: Card, Details, a ChoiceGroup card, Table; `boxClasses`: a box inside a card, a scroll box, a nested Details, an exception), a page title `heading.ts` (`titleClasses`); a choice among known values is `#lib/selection.ts` (`toggled`). Page-specific pieces sit beside their route (`ProjectForm`, `ConnectionForm`, `EmailStep`, …). Tokens are Tailwind theme variables in `routes/layout.css` (`--color-*` etc. reset to the app's; dark values switch the variables in one `@variant dark` block, the custom variant `[data-theme='dark']` or the system's dark unless `[data-theme='light']`; no `dark:` variants); icons come only through `#lib/icons.ts` and `Icon`; a focus ring is the `focus-ring` utility. ESLint cannot infer the parameters of callbacks passed to components (`onchange={(value: string) => ...}`) or of snippets: type them. + - Components (`#lib/components`; every element that looks or acts the same is one of them, shown with its variants on `/design-system`): ActionList and ActionRow (rows on a card's surface that open a dialog: an icon in a square, the label, a line under it, a chevron; under a small uppercase heading), Button (variants default, primary, danger, info, accent (indigo, filled on hover: the issue list's Open), neutral (grey on the code background: a disabled session action; CopyButton `variant`, CodeBlock/CopyField/SecretReveal `copyVariant`), menu (the ⋯ of a RowMenu: no box until hovered or open), link, muted (a grey secondary link: a log's trace), title (the name of a table row that opens its record: text color, bold), ghost; `size="large"` the one main action of a page (Add project), `truncate` its text on one line cut with "…" (a link in the delivery log); `expanded` for a toggle, `popup` (aria-haspopup), `busy` (ignores clicks, keeps the focus), `form` for a submit button outside its form, `external` (a new tab, `rel=noopener noreferrer`), `unavailable` (the reason it does nothing now, its tooltip; aria-disabled, so it keeps the focus)), SubmitButton (a form's submit through its FormState: busy, and "Nothing changed" while an edit form's values are the saved ones), Card, UsageBar (`segments`: parts in project colors, `usage.ts`; widths through the `style:` directive), PageTitle (the tab title ` · `, also set by PageHeading), Badge (tones error, warning, success, info, debug, plain, project; an on/off state is a StatusText; a project's color from `get_session`'s `project_colors`, or `color` for one not saved yet; `size="heading"` beside a page's title), LevelBadge (tone from the generated `shownLevel`), StatusBadge (`issueStatus.ts`: tone, mark, meaning from the generated `issueStatuses`; `detail` after it, what ends an ignore, `ignoreBoundText`, the list's row title `issueStatusTitle`), RoleBadge and RoleChoices (`role.ts`), AuditActionBadge (an audit action: create success, edit info, delete error, others plain, `#lib/audit.ts`), AuditDiff (an audit entry's changed fields as a git-style diff: each field with its before line (red) over its after line (green), the words that changed marked (`changedParts`); a side no field has is left out), AuditValue (one side of a changed value, a line in its side's color, the changed parts marked; `sideClasses`), AuditItems (the records of an entry whose request changed several: what they all changed alike once as an AuditDiff, then a Table of Project, Record and a column per field that differs (`groupFields`, `itemValue`), rows tinted by the status before (`statusRowTone`), the records the search finds first with the match marked (`searchParts`), a record linked only while it has a page), IssueActions (`issueActions.ts`: the actions of a status or of checked issues, confirmation texts, `doneMessage`, `selectionProblem`; Ignore is a labeled RowMenu of `ignoreOptions`: forever, each `ignore_for`, until 10/100/1000 more events), BulkBar (sticky above a list with checkboxes: the count checked or its `problem`, and the actions), AgentCopyButton ("Copy for agent", `mcp_reference`), CopyButton, CopyField (`masked`: dots until Show), Toast (the one live region, toasts stacked in the corner of its `position` (`toast.ts`); `toasts` shows another `ToastStore` than the app's `toast`, as the design-system page's sample does: each slides in with a bar of its time left, paused on hover, a × to close, white with a round status mark and a time bar in the tone color (success by default, error, info: copies), the newest 5 kept; `toast.show(text, tone, duration)`), PageHeading (`leading` before the title, `actions`, `description`: the muted line under the title (what the page is for, an issue's location)), EmptyState (`variant="card"`: a card with text on the left, the MCP page's connected apps), Notice (info, success, warning, error; `alert` announces it as it appears), StatusPage (404, or 403 "You do not have access to this" with the server's reason), ErrorPage (StatusPage for 404/403, the message otherwise), Table (columns and a `cell` snippet; column options `number`, `wideOnly`, `actions`, `fill` (takes the width the others leave; several fill columns share it equally), `rowHeader` (th scope=row: key–value tables), `sort` (`columnSort`: the heading links to its first direction, then the reverse; aria-sort); table options `sort`, bindable `selected` (a checkbox per row, select-all mixed in between, emptied when the rows change), `rowTone` (error, success, faded; the `row-*` tokens of `layout.css`) with `rowTitle`, `selectedKey`, `headerless`, `compact`, `flat` (no box of its own inside a card or a dialog), `top` (cells at the top of their row, for rows of several lines such as logs; centred otherwise); every table is as tall as its rows and scrolls only sideways, `busy` (rows faded under a running bar, aria-busy)), NavLink (a link, an `onclick` button or a form's submit), Sidebar, ThemeSwitch ("Dark mode" above the account, a NavLink with a Switch: the user's theme from `get_session` (`saved`), so every browser they log in from shows it; without one, the theme shown now (the system's or this browser's) is saved at once through `set_theme`, and toggling saves light or dark there too; Switch, a toggle with role switch; `#lib/theme.ts` keeps a copy in localStorage `exceptic-theme` and sets `data-theme` on ``, which an inline script of `app.html` also does before the first paint (the login page uses only that copy); Go hashes it like SvelteKit's, `TestEmbeddedBuild`), Breadcrumbs (the path above a title, the last item the page; Esc follows the one before it, decided on keydown and followed on keyup as a click, unless a field has the focus, a `dialog` is open or a popup carries `data-popup` (`#lib/escape.ts`); a popup that closes itself on Esc prevents the event's default), Dialog (`size` wide or narrow, `actions` footer, `onopen`, `dismissible` false while its action runs; one that is not dismissible opens again if the browser closes it), FormActions (the end of every form: FormError, then the SubmitButton and an optional Cancel link in one row; `stretch` puts the submit across the form: the login, Add project), FormError (a FormState's `error`, an alert Notice), FormDialog (a short form in a narrow Dialog, e.g. a project's name and color, the account's email and password, through a FormState: Cancel and Save (`submitLabel`), a refused field keeps it open with its problem, it closes on success, the first text field selected), ConfirmDialog and ConfirmButton (every delete, reset and bulk action: the `Confirmation` of `confirm.ts`, Cancel focused first, Cancel/Esc/backdrop do nothing, busy and not dismissible while the action runs, an `ApiError` shown in the dialog, `disabled`; never `window.confirm`), RowMenu (the ⋯ of a table row, or with `text` a labeled menu button with a chevron (`variant`, `disabled`, `title`), items as data (`menu.ts`: links, actions, `danger`, `separatorBefore`, a `confirm` asked first, `disabled` with its reason under the label, reached by the arrows), fixed under its button so a table's scroll box does not cut it, arrows/Home/End, Esc back to the button, Tab, a click outside, scrolling close it), Details (`section` card with h2, count and a one-line detail; `form` card with Hint and the values under the title, opened when `invalid`; `disclosure` a card of optional settings (Advanced settings): a line on what is inside, the body under a line, parted by `FormGroup`; `nested` a flat bordered box with title and count inside another card (a stack trace in an exception); `inline` small disclosure), CodeBlock (`plain` wrapped, `command` one line after › with copy, `snippet` with copy), TextField (label, `note`, Hint, `description` under the field, server error, limits as props, `action` (a button beside the field: Verify, Find chat ID), `saved`: a stored secret's mask in the placeholder and an sr-only description, `variant="hero"` the one large centered field of a page, its label for screen readers only (Add project), `variant="code"` narrow and monospace for a confirmation code; `type="password"` has an eye inside the field that shows the value, every password and token field alike), ChoiceGroup and Choice (fieldset of radios or checkboxes, descriptions, disabled with a `reason`; the group `inline` (side by side), `compact`/`beside` (a small legend over or before a tight row of short options: levels), `card` (a card of its own), `hideLegend` (sr-only, when a heading names it), `lead` (an option above the others, such as All projects; the empty row of the others is hidden); Choice `hint`: a "?" outside the label that describes the option (`aria-describedby` to the Hint's `id`)), LevelChoices and LevelSummary (levels highest first, or "none"; LevelChoices `inline` by default, `hideLegend`), SecretReveal (a secret shown once: a warning Notice and a CopyField, plain or masked), Select (a listbox popup; `all` adds the no-choice option; `field`: a form field with its label above, full width), Facts (`boxed`, `columns`: two to a row, the issue page's facts and its event's), StatusText (a state as a pill with a dot in its tone, `status.ts`: success, warning, error, muted), Steps and Step (numbered steps, the number in a circle, the content indented), StatusCard (a state the page watches: waiting with a PulseDot (an amber dot with a growing ring, still under reduced motion) or done with a green check, title, line, actions; a live region), Hint (the "?" whose text is its tooltip and name; `id` for the `aria-describedby` of what it explains), Tabs (a segmented tablist, or `variant="underline"`: names over a line, the chosen one underlined (the MCP page's client); arrows/Home/End through `#lib/roving.ts`, shared with RowMenu; `param` names the tab in the address, written with a shallow `goto`), and for lists FilterBar, FilterPicker (the Projects or Levels filter: a Picker of badges), Picker (a dropdown of checkboxes, hidden with one option and nothing chosen; its All is checked and disabled while nothing else is), SearchField (reports every change, and Enter with `now`; a × inside clears it at once), DateRange (UTC days in one field with its own month calendar, `popup.ts`; × clears it), ActiveFilters (`chips.ts`: a × after each chip removes the whole filter; among several values each project or level badge is a link that removes it, with a × inside, Badge `remove`), Pager, LogBody (color codes removed, Expand, Full screen in a Dialog with JSON fields as lines, `#lib/format.ts`), Time; and BackButton (Back before a page's title: the app page the viewer came from, else `fallback`; the setup page), EditableTitle (a page title with a pencil that turns it into a field of the form around it, sent by the form's Save, Esc drops the edit; PageHeading `heading`; the project form), FormGroup (a part of a `disclosure` Details: small heading with its Hint), Slider (a range input with its label, marks, `least` (the lowest value it takes) and an `output` saying what the value means; the disk share), ProjectsChoice (All projects or some, as badges, in a form card; `allowAll` false disables All with its reason, `locked` the whole field), ProjectsSummary (All projects, the projects as badges, or a dash for none; `limit` keeps a list row on one line: 1 in the audit log, 5 on Users and Notifications, the rest behind a MoreButton), MoreButton ("+N more": an outlined Badge (`tone="outline"`, Badge `onclick` makes it a button) opening the rest in a popup under it), ColorField (a project's color: palette swatches, a custom color, a preview badge). Types a page imports from a component live in a `.ts` beside it (`table.ts`, `badge.ts`, `menu.ts`, `confirm.ts`), so eslint resolves them; form controls share `field.ts` (`fieldClasses`, `controlClasses`, `inFieldButtonClasses` (a button inside a field: SearchField's ×, the password eye), and every form's layout `formClasses`/`narrowFormClasses`), a ProjectsChoice's value is sent as `projectsInput` (`projectsChoice.ts`), popups and cards `surface.ts` (`popupClasses`, `cardClasses`: Card, Details, a ChoiceGroup card, Table; `boxClasses`: a box inside a card, a scroll box, a nested Details, an exception), a page title `heading.ts` (`titleClasses`); a choice among known values is `#lib/selection.ts` (`toggled`). Page-specific pieces sit beside their route (`ProjectForm`, `ConnectionForm`, `EmailStep`, …). Tokens are Tailwind theme variables in `routes/layout.css` (`--color-*` etc. reset to the app's; dark values switch the variables in one `@variant dark` block, the custom variant `[data-theme='dark']` or the system's dark unless `[data-theme='light']`; no `dark:` variants); icons come only through `#lib/icons.ts` and `Icon`; a focus ring is the `focus-ring` utility. ESLint cannot infer the parameters of callbacks passed to components (`onchange={(value: string) => ...}`) or of snippets: type them. - Field hints: a `?` next to a settings field shows the description from the table row of `docs/ui.md` (by `## section` and field label) or `docs/configuration.md`, generated into `catalog.gen.ts` as `help` (`help.fields.Projects.Color`, `help.settings.MAX_DATABASE_SIZE`); a field the app names that the docs lack fails its type check. Never write the text in a component. Obvious fields (names, passwords) get no hint. - Tests (`pnpm test`, vitest in jsdom with `@testing-library/svelte`): `*.test.ts` beside the code, the pure modules and the shared interactive components (Picker, Dialog, ConfirmButton/ConfirmDialog, RowMenu, Pager, Tabs, ActiveFilters, Breadcrumbs, Details, Table, IssueActions, FormDialog, RoleChoices, EmailStep, AuditDiff, AuditItems, the login page, the issue and audit pages); `src/test/setup.ts` adds the modal dialogs jsdom lacks, `src/test/` also holds test-only harness components; `$app/*` is mocked with `vi.mock` where a component uses it. `/design-system` (`#lib/design-system`) shows every component with its variants and exists only in the Vite dev server (`import.meta.env.DEV`; `TestEmbeddedBuild` fails if its marker reaches the build); new components also go into the design artifact (https://claude.ai/artifact/GuXpbC3LPKCjMTfdMZxn3t). - Rules: no `style` attribute (eslint; the `style:` directive is fine) and no `{@html}`; queries with `URLSearchParams` (`withQuery`), never by concatenation; no link takes its address from event data (event values go only into the app's own addresses, as `withQuery` parameters); a link to an address from event data would have to allow only http(s) or relative ones; secrets (temporary passwords, personal tokens) only in component or module memory, never in the address or storage; the page keeps `Referrer-Policy: same-origin` (`server.SecurityHeaders`), which the Origin check of `/api/ui` depends on. `src/error.html` is the page shown when the app cannot start (no `