Skip to content

Retire the ui kit, forms and form-records; frontends are ordinary builds over declared JSON routes (#841 order 4) #883

Closed

Description

@jimhoyd

Problem

#841 order 4 says to stop owning a general template and component ecosystem, and to keep only declarative metadata that adds value. Today the repository owns a private presentation stack:

  • a logic-free template language, 16 shadcn-shaped partials and a Tailwind-compiled kit stylesheet;
  • an EN/FR copy catalogue and a theme grammar;
  • transformView and transformPage hooks;
  • a urlcode-ui CLI (list, eject, preview, doctor, copy);
  • a CRUD screen runtime;
  • server-rendered form flows with their own CSRF and notifications;
  • a forms-to-store composition.

The reference application (#843, proofs/private-requests) uses none of it. Its whole frontend is 113 lines: esbuild, better-auth/client, and fetch to store mounts. The owner is the only user, so no compatibility is required.

Measured baseline (main 846105ea, physical lines)

Package src tests package docs and descriptor total files / lines
packages/ui 2,578 2,327 ~1,900 69 / 7,246
packages/forms 590 1,237 ~1,350 23 / 3,455
packages/form-records 444 820 ~840 21 / 2,390
store screens (in packages/store) ~96 455 ~75 in STORE.md —
abuse / mail (no consumer once forms goes) 589 / 715 654 / 694 297 / 312 1,856 / 2,068
core seams used only by the above ~130–200 (est.) ~100 (est.) EXTENSIONS/READINESS, RIM-EXT-ASSETS-001 —
  • Production dependencies: none of these packages has one.
  • Dev and CI footprint: Tailwind accounts for 66 of 287 lockfile entries, @aws-sdk/client-sesv2 for 24, plus a Chrome browser CI step.

Disposition

Feature Decision Replacement What URLCode still owns
Template language, kit partials, createKit, kit stylesheet, Tailwind build, vendored shadcn Delete App-chosen components and CSS. For shadcn, urlcode artifacts stage (#878) into the app's source artifacts stage provenance
Theme grammar, copy catalogue, languages, transformView/transformPage, template overrides, urlcode-ui CLI Delete App CSS variables and app-owned strings or an i18n library nothing
renderDocument, nonce CSP helper, postForm, crudScreen primitives Delete App frontend Core oshp CSP profile (unchanged)
CRUD screen runtime (list, edit, delete, sort/filter, transition buttons, If-Match/412), store.screens, contributes.ui.screens Delete App frontend over the store's JSON mounts, as the proof does Store collection, transition, readers and ETag declarations (the API contract)
forms flows, field vocabulary, requiredWhen, 422 page, confirmation Delete A frontend POSTing JSON to a function route validated by request.body.POST.schema (2020-12 profile and formats, #880), or to a store mount Body schema, 422 diagnostics, OpenAPI export (#879)
forms CSRF (double-submit cookie and token) Delete JSON-only endpoints plus core same-origin admission (a cross-site HTML form can't send application/json) isSameOriginRequest (core)
forms onSubmit / notify / abuse budgets Delete Trusted function route; provider SDK or nodemailer used directly (#841 direct library use); policies.throttle Function routes, throttle (core)
form-records Delete App frontend over store ownership: owner mounts Store ownership and transitions
abuse, mail Delete (see question 1) As above nothing
Core immutableAssets / assetMounts / immutableAssetResponse, readiness extensionAssetRouteMethods, contributes, extension-http form body kind / readCookie / readFields / wantsJson Delete once unused static: routes with a cache policy static handler, JSON readBody, jsonResponse
JSON Forms Not now Possible once store collections emit JSON Schema (#861 item 1, #881 item 1). URLCode would own the schema, never a renderer —

Server-rendered forms, CSRF and notifications

There is no concrete SSR or no-JS requirement. The reference app is a JavaScript frontend, and Better Auth sign-in is client-side JavaScript. Retire forms and form-records completely.

If a no-JS requirement is ever confirmed, the minimal piece is a core request.body.<METHOD>.format: form that decodes urlencoded bodies through the same 2020-12 schema, with same-origin admission. That is not a rendering or token system.

PR slices (each deletes code and keeps npm run verify green)

  1. Delete packages/form-records (a leaf). Update the lockfile, ci-plan, package-audit, release tests, test/addons.integration.ts (/todo-form), docs-search fixtures, generated references and docs (FRAMEWORK counts, EXTENSIONS, STORE, LOCAL-DEVELOPMENT, CI, RIM-EXT-HANDOFF-001, the contact-form recipe, llms, AGENTS package list). Risk: low.
  2. Delete packages/forms. Also update the feature-plan forms branch, create-extension --from forms, docs-search fixtures, the EXTENSION-REFERENCE rows, and the contact-form recipe (point it at a function route plus a provider library). Risk: low; this orphans abuse and mail.
  3. Delete packages/abuse and packages/mail. Update the POLICIES throttle row, EXTENSIONS, VERSION-ALIGNMENT and the SES dev dependency. Risk: low.
  4. Remove store screens: screens.ts, screens config, contributes.ui, the /todos example route, the ui peer dependency, the screen tests and fake-dom.ts. Also update the store-schema artifact, STORE.md screen sections, the CI --with ui,store job and the starter README. Risk: low–medium; this deletes recent Transition controls on store screens (#863) #872/Store screens: If-Match on edits and deletes, stale-page message, browser coverage (#873) #877 screen work.
  5. Delete packages/ui. Remove the workspace, the Tailwind dev dependencies, the Chrome CI step, the publish count and create-extension --from ui. Update AI-AUTHORING (keep the pointer to the shadcn skill plus artifacts stage), PROJECT-DIRECTION, the starter AGENTS, --with ui examples and llms. Risk: low.
  6. Remove the core seams left without users (the table above), with their cards, READINESS/EXTENSIONS sections and the audit JSON shape. Run the sandbox and target checks. Risk: medium.
  7. Close order 4: re-measure from the actual diffs, update FRAMEWORK, llms and the packed starter, and point docs at the proof's client as the reference frontend pattern.

Ownership before and after (estimate; recompute in slice 7)

  • Source: about 5,000 lines of extension source go (ui, forms and form-records drop from 3,612 lines to 0; abuse, mail and store screens add about 1,400), plus about 130–200 lines of core.
  • Tests: about 6,000 lines go.
  • Docs and descriptors: about 5,000 lines of package docs and descriptors go, plus about 400–600 lines of docs/.
  • Packages: workspace packages go from 10 to 5 (core, audit, auth, store, mcp).
  • Dependencies: no runtime dependency changes. Tailwind, SES and the Chrome CI step leave the dev/CI footprint.

Related: #841, #843, #844 / #878, #845 / #879 / #880, #861, #881.

Activity

  1. jimhoyd commented on Sep 29, 2026

    @jimhoyd
    CollaboratorAuthor

    Owner decisions (2026-09-29):

    1. Store screens: delete them, including the Transition controls on store screens (#863) #872/Store screens: If-Match on edits and deletes, stale-page message, browser coverage (#873) #877 screen work. The store keeps its API contract: transitions, readers, ETags and per-record may.
    2. abuse and mail: delete them once forms is gone.
    3. Examples: API only. --example writes JSON routes only, and the docs point to the proof's client as the frontend pattern.
    4. No JavaScript-disabled form requirement: retire server-rendered forms completely. No format: form body is needed.

    Slices will land in order: 1, then 2+3, then 4+5, then 6 and 7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions