Read-only zones prototype against knot-rest #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "spec/zones-readonly-prototype"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
First vertical slice of the Nordaaker DNS console: lists zones and shows
each zone's status + records, served by Go from knot-rest, swapped in the
browser by htmx 4.
What's in here
(live), `fixtureTransport` (offline), three `GET` methods (`ListZones`,
`ZoneStatus`, `ZoneRecords`), and JSON fixtures for three zones.
`zones.html`, `zone.html`, three fragments (`zones-table`,
`zone-records`, `zones-error`), `/design` retrofitted onto the layout.
plus matching `/refresh` fragment endpoints. Error fragment shared
between full-page and refresh paths via htmx 4's swap-on-error.
Spec: `docs/superpowers/specs/2026-05-01-knot-rest-prototype-design.md`
Plan: `docs/superpowers/plans/2026-05-01-knot-rest-prototype.md`
Out of scope (deferred to later slices)
Mutations, transaction subtree, signature page, DNSSEC, server status,
config, pagination, real-time, multi-tenant, auth UI.
Test plan
`/zones` lists three zones; click into one for status + records;
Refresh updates only the table; `/zones/nope.test.` shows error
fragment with Try again, console shell intact.
real knot-rest, confirm zones list and record data render.
`knot: live mode requires both KNOT_REST_URL and KNOT_REST_TOKEN`.
Relax Assets.{Templates,Static} from embed.FS to fs.FS so tests can supply os.DirFS without the embed path restriction. Implements the two zone-list handlers with real knot.ListZones calls and error-path rendering; updates zones.html to branch on .Error. Tests use os.DirFS rooted at the repo root (../../ from internal/server/) to match the production embed layout. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>Reworks the prototype's chrome and content surfaces to use the shared design-system vocabulary, and updates /design itself with the missing pieces this surfaced. Layout & prototype templates: - Replace top-bar shell with a left rail (logo lockup, vertical nav, theme toggle pinned to the bottom) — pattern from bundle/console/index.html. - Drop placeholder .button / .data-table / .data-error / .page-section for design-system equivalents: .btn, .np-table, .alert, .np-card, with a new .np-card--flush variant for table-bearing cards (header padded, body flush so the table sits border-to-border). - Page headers use .ds-page-head (eyebrow + serif h1 + lede). Records table uses .np-table records-table with .chip on type cells and .mono on data cells. - Clickable-row pattern: .np-table.is-clickable + data-row-href on each <tr>; click delegation in helpers.js follows the href, keeping the inner <a> for keyboard / right-click / middle-click. Applied to the zones list; records table stays non-clickable (it's data to copy). - Move click delegation + theme toggle from inline <script> in layout.html to web/static/js/helpers.js. /design updates: - Drop internal ds-rail; replace section anchor list with a sticky <select> dropdown so the page can use the full content width now that the global rail provides primary nav. - Add section "12 / Sidebar — Console shell" with a static specimen. - Add section "13 / Spacing — Step rhythm" with a visual bar per --space-N token. - Tables section blurb describes the new is-clickable variant. - Hoist .ds-page-head / .eyebrow / .lede / .theme-toggle / .records-table column widths from design.html's page-private <style> into components.css so they're real reusable components. - Move {{define "mark"}} from design.html to layout.html so every page can render the SVG mark. - Fix swatch specificity: .swatch .chip had background: transparent, which beat .sw-glacier-NN on specificity and rendered every swatch hollow. Drop the transparent override. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>arne referenced this pull request2026-05-01 21:37:24 +02:00