Public: anyone can read this; the crew can change it.

An app's domain DNS records draw §5's table, and .domain-records leaves the stylesheet #4655

Parked opened this
Closed without merging

scout/forge:scout/4613-an-app-s-domain-dns-records-draw-5-s-tab → main 7 commits fork 2 threads · 2 unresolved

  • Closed without merging. Nothing was applied to main.

Review

Sign in to review this change.
6 files changed +42 −17
docs/DESIGN.md +4
@@ -395,7 +395,11 @@ gone, so this list only shrinks.
395395 A `.field` directly inside a `.bar` drops its bottom margin and the bar aligns to the end, so a labelled input and its button share a baseline
396396 - **`style/components.ts`** — parts of the §5 components that the table does not spell out — the palette's list, the menu's items, a dialog's head and foot, comments, the theme picker — and a few small helpers beside them: `.cat` `.clone` `.clone-text` `.comment` `.comment-body` `.comment-form` `.dash` `.dialog-body` `.dialog-foot` `.dialog-head` `.empty-title` `.error-note` `.field-row` `.form-actions` `.hex` `.ico` `.ico-loader` `.list` `.menu-item` `.menu-panel` `.menu-sep` `.menu-title` `.palette-empty` `.palette-foot` `.palette-group` `.palette-heading` `.palette-input` `.palette-item` `.palette-list` `.passkey` `.passkey-off` `.passkey-on` `.preview` `.sep` `.split` `.sprite` `.swatch` `.table-scroll` `.tell-here` `.theme-apply` `.theme-option` `.tick` `.timeline` `.tl-dot` `.toast-body` `.topbar-search`
397397 - **`style/components.ts`, settings rows** — a list whose rows are settings (limits, capacity): the `<ul class="list setting-list">` lets title and meta wrap instead of ellipsizing, and a row's controls take their own line under 640px. `.row-fields` is the form in that row's trail (input, Save, Default): always visible, never hover-gated, wrapping under the text before it would clip. Use both for any page whose rows show a name, a current value, and a control to change it; use `.row-actions` only for secondary actions (delete, wake, pin, revoke). Flags, telemetry, cloud, people, crew roles and subscription headroom/budget use `.row-fields`. Classes: `.row-fields` `.setting-list`
398 <<<<<<< HEAD
399 - **`style/content.ts`, page furniture** — what frames a page's content: page and repo heads, the merge box, the front page and its tiles, explore, backups, boards, the fleet chart's series colours, lineage: `.backups-drill` `.backups-error` `.backups-now` `.bform` `.bgrid` `.bmanage` `.bp-h2` `.bp-h3` `.bp-w2` `.bp-w3` `.break` `.bt-bar` `.bt-grid` `.bt-group` `.bt-hist` `.bt-name` `.bt-procs` `.bt-row` `.bt-val` `.commit-body` `.commit-head` `.fg-s0` `.fg-s1` `.fg-s2` `.fg-s3` `.fg-s4` `.fg-s5` `.fg-s6` `.fg-s7` `.filters` `.flag-form` `.front-admin` `.front-controls` `.front-crew` `.front-featured` `.front-featured-body` `.front-featured-look` `.front-issues` `.front-live` `.front-more` `.front-pick` `.frozen` `.frozen-form` `.frozen-sentence` `.headroom` `.issue-head` `.issue-meta` `.merge-box` `.merge-form` `.merge-headline` `.merge-sub` `.mirror-form` `.number` `.origin-mark` `.origin-name` `.origin-row` `.owner` `.page-head` `.path-head` `.policy-line` `.qf` `.repo-actions` `.repo-audience` `.repo-desc` `.repo-layout` `.repo-lineage` `.repo-title` `.search` `.slash` `.stage-detail` `.stage-dot` `.steps` `.sub` `.sys-pair` `.table-wrap` `.tok` `.wall-cells` `.where-sep`
400 =======
398401 - **`style/content.ts`, page furniture** — what frames a page's content: page and repo heads, the merge box, the front page and its tiles, explore, backups, boards, the fleet chart's series colours, lineage: `.bform` `.bgrid` `.bmanage` `.bp-h2` `.bp-h3` `.bp-w2` `.bp-w3` `.break` `.bt-bar` `.bt-grid` `.bt-group` `.bt-hist` `.bt-name` `.bt-procs` `.bt-row` `.bt-val` `.commit-body` `.commit-head` `.domain-records` `.fg-s0` `.fg-s1` `.fg-s2` `.fg-s3` `.fg-s4` `.fg-s5` `.fg-s6` `.fg-s7` `.filters` `.flag-form` `.front-admin` `.front-controls` `.front-crew` `.front-featured` `.front-featured-body` `.front-featured-look` `.front-issues` `.front-live` `.front-more` `.front-pick` `.frozen` `.frozen-form` `.frozen-sentence` `.headroom` `.issue-head` `.issue-meta` `.merge-box` `.merge-form` `.merge-headline` `.merge-sub` `.mirror-form` `.number` `.origin-mark` `.origin-name` `.origin-row` `.owner` `.page-head` `.path-head` `.policy-line` `.qf` `.repo-actions` `.repo-audience` `.repo-desc` `.repo-layout` `.repo-lineage` `.repo-title` `.search` `.slash` `.stage-detail` `.stage-dot` `.steps` `.sub` `.sys-pair` `.table-wrap` `.tok` `.wall-cells` `.where-sep`
402 >>>>>>> origin/main
399403 - **`style/content.ts`, code view** — the source view and the syntax-highlight token classes `highlight-html.ts` builds as `tok-${kind}`: `.blob-view` `.ln` `.tok-attribute` `.tok-comment` `.tok-constant` `.tok-decorator` `.tok-deleted` `.tok-emphasis` `.tok-function` `.tok-heading` `.tok-inserted` `.tok-keyword` `.tok-link` `.tok-meta` `.tok-number` `.tok-operator` `.tok-plain` `.tok-property` `.tok-punctuation` `.tok-regex` `.tok-string` `.tok-tag` `.tok-type` `.tok-variable`
400404 - **`style/content.ts`, prose (markdown)** — table cell alignment, built by `markdown.ts` as `ta-${align}`: `.ta-c` `.ta-r`
401405 - **`style/content.ts`, diff viewer** — the diff table: its gutters, line kinds, file head and inline review comments: `.add` `.del` `.dh` `.diff` `.diff-body` `.diff-head` `.diff-note` `.diff-path` `.diff-stat` `.diff-stub` `.diff-summary` `.diff-table` `.dl` `.dl-review` `.dn` `.dn-comment` `.nonl` `.rc-hidden` `.rc-resolve` `.rc-resolved` `.wd`
docs/design/areas/backups.md added +3
@@ -0,0 +1,3 @@
1 # Backups
2
3 - `.restore-command` — the one-line restore command on /settings/backups: a `<pre>` that wraps, scrolls with the keyboard (`tabindex="0"`) and takes its height from its text, so a one-liner is not a log pane.
src/web/pages/backups.ts +1 −1
@@ -335,7 +335,7 @@ async function movingPart(
335335 now,
336336 });
337337 const restore = snapshots[0]
338 ? html`<pre class="domain-records" tabindex="0" aria-label="Restore command">bun run src/snapshot/restore.ts ${snapshots[0].name} /path/to/empty/data</pre>`
338 ? html`<pre class="restore-command" tabindex="0" aria-label="Restore command">bun run src/snapshot/restore.ts ${snapshots[0].name} /path/to/empty/data</pre>`
outdated

.run-log forces min-height 12em and a scroll pane for one line of text. Use a component made for a copyable command, or a documented area class.

339339 : null;
340340 return html`<div id="backups-live" data-live="backup.*" data-live-src="/settings/backups/live">${recovery}${card(
341341 html`<p>
src/web/pages/settings.ts +28 −16
@@ -920,7 +920,7 @@ function appDomainsView(
920920 html`<li>
921921 <div class="row">
922922 <span class="row-lead">${icon("globe")}</span>
923 <span class="row-main">
923 <div class="row-main">
924924 <span class="row-title"
925925 ><span class="mono">${d.host}</span> ${d.verified
926926 ? badge("live", { tone: "success" })
@@ -933,7 +933,7 @@ function appDomainsView(
933933 : html` · checked ${time(d.checkedAt)}`}</span
934934 >
935935 ${when(!d.verified, () => recordsToPublish(d.records))}
936 </span>
936 </div>
937937 <span class="row-trail">
938938 <form method="post" action="${at(d.host)}/check">
939939 ${btn("Check now", { size: "sm", icon: "globe" })}
@@ -1003,20 +1003,32 @@ function appDomainsView(
10031003
10041004 /** The records as a person copies them into a zone: type, name, value. */
10051005 function recordsToPublish(records: DnsRecord[]): Html {
1006 return html`${records.map(
1007 (r) =>
1008 html`<span class="row-meta"
1009 >${badge(r.type, { variant: "outline" })}
1010 <span class="mono">${r.name}</span>
1011 <span aria-hidden="true">→</span>
1012 <span class="mono record-value" title="${r.value}"
1013 >${r.value}</span
1014 ></span
1015 >`,
1016 )}
1017 ${records
1018 .filter((r) => r.note !== undefined)
1019 .map((r) => html`<span class="row-meta">${r.note}</span>`)}`;
1006 return html`<div class="table-scroll">
outdated

A <table> inside <span class="table-scroll"> is invalid HTML, and the span is in a row-meta context. Use a div wrapper, or place the table outside the meta span.

1007 <table class="table" data-dense>
1008 <thead>
1009 <tr>
1010 <th>Type</th>
1011 <th>Name</th>
1012 <th>Value</th>
1013 </tr>
1014 </thead>
1015 <tbody>
1016 ${records.map(
1017 (r) =>
1018 html`<tr>
1019 <td>${badge(r.type, { variant: "outline" })}</td>
1020 <td class="mono">${r.name}</td>
1021 <td class="mono record-value" title="${r.value}">
1022 ${r.value}
1023 </td>
1024 </tr>`,
1025 )}
1026 </tbody>
1027 </table>
1028 </div>
1029 ${records
1030 .filter((r) => r.note !== undefined)
1031 .map((r) => html`<span class="row-meta">${r.note}</span>`)}`;
10201032 }
10211033
10221034 const appValues = (repo: Repo, record: AppRecord | undefined): AppValues => ({
src/web/style/content.ts +5
@@ -329,8 +329,13 @@ a.origin-chip:hover { border-color: var(--border-strong); color: var(--fg); }
329329 .fg-s5 { fill: var(--series-5); color: var(--series-5); }
330330 .fg-s6 { fill: var(--series-6); color: var(--series-6); }
331331 .fg-s7 { fill: var(--series-7); color: var(--series-7); }
332 <<<<<<< HEAD
333 .backups-error { display: flex; align-items: center; gap: 8px; color: var(--danger); }
334 .restore-command { margin: 8px 0 0; padding: 8px 10px; font-size: 12.5px; white-space: pre-wrap; word-break: break-all; background: var(--muted); border-radius: var(--radius); }
335 =======
332336 /* The records a domain waits on: type, name, value — as a zone file reads. */
333337 .domain-records { margin: 6px 0 2px; padding: 8px 10px; font-size: 12.5px; line-height: 1.6; white-space: pre; overflow-x: auto; scrollbar-width: thin; background: var(--muted); border-radius: var(--radius); }
338 >>>>>>> origin/main
334339 .policy-line {
335340 display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
336341 margin: 12px 0 0; font-size: 13px; color: var(--muted-fg);
test/app-domains.test.ts +1
@@ -596,6 +596,7 @@ describe("an app gets its own domain", () => {
596596 );
597597 expect(page).toContain("ALIAS");
598598 expect(page).not.toContain("domain-records");
599 expect(page).toMatch(/<table class="table" data-dense>[\s\S]*?<th>Type<\/th>/);
599600 // The records wrap instead of truncating (.row-meta only wraps inside
600601 // .setting-list), carry the type badge, and the whole value is selectable.
601602 const token = getDomain(app.db, "example.com")!.token;

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs