~ knotless Search/
↑↓ move↵ open⇧↵ all results

zat.dev/zds

atproto pds · mirror of https://tangled.org/zat.dev/zds

0
0
144 lines · 8.7 KB Raw History
# resident UI

> History: how the resident UI direction and the Doodl drawing slots were
> implemented, slice by slice, with the validation done at each step. The
> current direction is [resident UI direction](https://tangled.org/zat.dev/zds/blob/main/docs/ui-direction.md) and the
> drawing workflow is [Doodl drawings](https://tangled.org/zat.dev/zds/blob/main/docs/iconography-proposal.md).

## planned slices (2026-09-06)

1. **Shared foundation.** Consolidate presentation tokens and control states
   inside the web layer. Improve section hierarchy, target sizing, readable
   secondary text, and focus styling across existing pages. Compare a real
   account fixture with generic and instance artwork in both themes.
2. **Navigation and feedback.** Give view changes appropriate page titles and
   focus behavior. Narrow live announcements. Add local pending/error/success
   handling without losing input or rebuilding focused controls unnecessarily.
   Current `account.html` marks the whole resident section live, and `showView`
   changes classes/current navigation without updating focus or title.
3. **Account actions.** Polish field groups and credential rows. Replace ad hoc
   prompts/confirmations only where a well-tested inline form or native dialog
   improves the task. Test cancellation, failures, retries, and duplicate clicks.
4. **Additional artwork slots.** Add a few useful section/empty-state slots after
   the surrounding layout and semantic contract are stable. Expand fixtures for
   asset failure and unusual drawings before broadening configurability.

Keep each runtime slice separately reviewable and deployable. Use browser
request/response evidence for reported failures, existing required tests/smokes,
and a small consistent manual flow matrix. Before/after startup benchmarks and
asset-size checks should show whether presentation work adds cost; deploy once
per verified slice, avoiding restarts for research documents alone. This review
does not add account-management surfaces or alter the planned lifetime work.

The original research changed no runtime files or sibling projects. Live inspection covered public desktop surfaces and
limited keyboard interactions, not a full mobile or assistive-technology audit.

## implementation: first resident UI slice (2026-09-07)

The first release implements distinct account-section surfaces, a consolidated
identity summary, a larger type hierarchy, 44px controls, 48px fields, and mobile
navigation that wraps into two columns. Existing drawing slots retain their
labels and reserved sizes. Layout and palette changes stay in the web assets;
there are no additional fonts, packages, remote requests, or account surfaces.

View navigation now updates the document title and focuses its heading. Modified
link clicks retain browser behavior. The whole resident region is no longer a
live announcement; the existing status element is an atomic polite status region.
Hover/press feedback respects pointer and motion preferences. Session lifetimes
and endpoint behavior are unchanged. Remaining action feedback/dialog work is
still a subsequent slice.

Validation: existing test suite, endpoint smoke, permissioned smoke, diff check,
and Zig Zen completed successfully. Browser checks covered sign-in, reload
persistence, active navigation/focus, custom artwork, desktop, 390px and 320px
reflow, and the light palette through a local preview proxy. This is not a full
assistive-technology audit. Startup probe: five warm-cache samples per scenario,
ReleaseSafe, 10,000 history entries. Before/after median readiness was 16.19/20.96ms
fresh, 9.02/8.79ms restart, and 9.68/9.57ms with history. Fresh database creation
varied; restart results show no observed regression. These exclude VM boot and
proxy routing.

## implementation: homepage continuity (2026-09-07)

Account now sits inside the homepage navigation with the same glass control
material and icon scale. Resident pages carry the homepage's ambient light,
monospace headings, inset highlights, and layered surfaces into the existing
account views. Identity metrics take a compact desktop row; empty states use
quiet rules instead of additional boxes. Fields retain opaque, readable interiors.

The replaceable `account-appearance.css` and `account-appearance.js` assets are
embedded at compile time. They share the homepage's saved theme and decorative
accent hue without adding account preferences, remote requests, fonts, animation,
or startup I/O. Authentication and protocol modules are unchanged.

Validation: test suite, endpoint smoke, permissioned smoke, JavaScript syntax,
diff check, and Zig Zen passed. In-app browser inspection covered homepage,
account management, app access, dark/light themes, cross-tab theme changes, and
signed-in reload persistence. The browser's viewport override did not actually
change its 1280px layout width in this run, so new mobile visual verification
remains incomplete; responsive rules were reviewed in code.

## implementation: action feedback and dialogs (2026-10-24)

This finishes slice 2's action feedback and covers slice 3. Every account
action button on the manage view shows a pending label, marks itself
`aria-disabled` and `aria-busy`, and ignores repeat clicks until its request
settles. `aria-disabled` rather than `disabled` keeps keyboard focus on the
button while it waits. Results and failures go to a polite status region inside
the section that ran the action; the page-level status is left to sign-in and
loading. A change reloads only the affected list, then focuses the changed row,
the next row, or the section heading.

`prompt()` and `confirm()` are gone. One native `<dialog>` opened with
`showModal()` carries the title, body, an optional rename field, and Cancel and
confirm buttons. Destructive confirmations use danger styling and open with
focus on Cancel; rename opens with its field selected. Esc and Cancel close it
and focus returns to the opening button. Its result comes from submit and
cancel, not the close event: Chrome delivered a cancelled dialog's close event
after the dialog reopened, which resolved the stale request as confirmed in
testing. Credential rows separate name from dates, keep actions aligned on the
right, and stack them full width at narrow widths. Only the applicable
account-status action (deactivate or reactivate) is shown.

The same release removes `'unsafe-inline'` from every page's `style-src`.
Inline `<style>` elements are allowed by hash, and the remaining `style`
attributes became classes or, on the homepage, one generated per-request
`<style>` element. No dependencies, fonts, or remote requests were added.

Validation: test suite, endpoint smoke, permissioned smoke, formatting, diff
check, and Zig Zen passed. A Playwright Chromium script against a local
signed-in instance built with the production drawings covered 74 checks: no
CSP violations on `/`, `/account`, `/account/spaces`, `/signup`, `/api`, and
`/stats` signed out, or on the account views signed in; every dialog's open,
Esc, Cancel, and confirm paths, including keyboard-only create, revoke,
rename, and deactivate flows; forced server failures for revoke and rename;
blank-rename validation; a triple click sending one request; passkey add,
rename, and delete through a virtual authenticator; focus after each list
change; no horizontal overflow and 44px dialog targets at 1280, 390, and 320
CSS pixels in both color schemes; the saved light/dark theme; and reduced
motion. Forced colors, touch, other browsers, and a screen reader were not
tested.

## anti-slop skill (2026-09-06)

The exact named anti-slop skill is pending identification. No matching installed
skill was found in the local skill locations searched, and web discovery found
several unrelated implementations. Do not claim one is installed or applied
until its source and linked guidance have been reviewed. The recommendation is
to use it as a critique discipline alongside the existing frontend-design skill,
not to introduce another runtime design system or replace the accessibility
acceptance baseline.

## Doodl drawings validation (2026-09-05)

The four configured drawings passed record/blob hash verification and rendered
at 44 pixels on desktop and a 390-pixel viewport, with no horizontal page
overflow. Forced image 404s retained all four SVG defaults. GET returned the
embedded PNG bytes, HEAD returned no body, and unknown asset CIDs returned 404.
Missing configuration, unknown slots and unavailable revisions left the manifest
unchanged; an empty selection built successfully.

Five ReleaseSafe startup samples on macOS/arm64 measured median readiness of
22.11 ms fresh, 9.59 ms on restart and 9.85 ms with the history fixture. The
preceding local baseline was 22.13 / 9.16 / 9.22 ms. These warm-filesystem samples
include polling overhead and do not measure VM replacement or production routing.