TEHAS

The front end

This page is the contract for the pages a factory serves: the business page, the factory floor, the dashboard, the manual and the Protolab's pages. It says what a page may use, how its parts are named and split, and how big it may grow. Existing pages follow the rules as they are touched; a page moved to them looks the same before and after.

What is true today: the pages are static HTML and Caddy templates in host/fun/ and host/docs/, with plain scripts and ES modules, no build step. The Protolab's pages are written by tehasbot protolab and hold no script. The kit in host/fun/kit/ holds Solid 2 and the island base. The plain dashboard is on it: its sections are the islands of host/fun/factory/ (The plain dashboard). The business page and the factory floor still draw with plain scripts and move in 1.2. The byte ratchet in Budgets holds every page at its size today.

The split

Owned by What
The platform The page's structure as custom elements in the light DOM; <dialog>, popover, <details>, forms, :has(), container queries, Intl, SVG; the themes as global CSS
Solid 2 Drawing each island, async data (feeds read with isPending, <Loading> and <Errored>), interface state (signals and stores, and the page stores the islands of a page share), actions
Pure modules Each island's model, (data, props, nowMs) -> model: no DOM, no Solid, tested with node --test

A custom element is the place a Solid root lives. It mounts the root when its hydrate trigger fires and disposes it when it leaves the page. Solid draws inside it and nowhere else.

The platform

Need Use Not
Modal <dialog> with showModal(), <form method="dialog">, ::backdrop A div overlay, a focus-trap script
Menu, tooltip, pop-over The popover attribute with popovertarget A positioning script
Disclosure <details> and <summary>; <details name> for a group with one open A toggle script
Actions <form>, button[name][value], constraint validation A click handler that calls fetch
Filter chips Links with the choice in the URL and aria-current; with no server, radio inputs and :has(:checked) A tab script
Layout by a panel's width Container queries A resize observer
Styling by state :has(), [open], :popover-open, :user-invalid Classes set by script
Modules Native ES modules A bundler
Drawing an island, its async data and state Solid 2 through the kit Hand-written DOM diffing, an observer or a pub-sub of its own
Time and numbers Intl.RelativeTimeFormat, Intl.NumberFormat where the wording allows A hand-written formatter
Charts SVG A chart library

Not used, because one of the four engines lacks it: customized built-ins (is=), CSS module scripts, interestfor and ::scroll-button. A review checks each new platform feature against the baseline.

Three tiers

A part of a page takes the cheapest tier that does the job, and moves up only when the tier below cannot:

  1. Native markup with shared CSS. No element and no script.
  2. A plain element. A custom element that adds one behaviour to the HTML inside it: a clock, a follow toggle, a pager. No adapter and no feed.
  3. An island. A custom element that owns a region of the page, takes data and draws it in Solid. A page with no island loads no Solid.

Names

Prefix For
tehas-<name> The shared kit: its elements, classes, data attributes and custom properties
tehas-factory-<name> The factory's own dashboard parts, which know the shape of the files under /live/

A component's CSS classes, data attributes (data-tehas-…) and custom properties (--tehas-…) take the same prefix as its element. The theme's tokens keep their names. A name, once in a release, is not used for something else. Another program that builds pages on the kit uses a prefix of its own and never these two.

A page names no product and no host: an integration is named by its role, such as "a program that reads the factory API".

The island contract

An island is a custom element in the light DOM, made with the kit's island() (kit/island.js).

An island kind is three files:

File Holds
<name>.js The element: island(name, { props, load }), its attributes and the import of its render module. No drawing and no library
<name>.model.js Pure: (data, props, nowMs) -> model. No DOM and no Solid. Node tests call it
<name>.render.js The Solid component: the only island file that draws and the only one that imports Solid

The render module's interface, whole:

export function mount(host, ctx) // -> { update(props), unmount() }
// host  the custom element; the render module owns its children and nothing outside it
// ctx   { props, data, first, emit(verb, detail), signal }
//       props  the attributes, typed by the element's `props`
//       data   the child JSON, or null
//       first  the server HTML's nodes, as they stood before the mount
//       emit   sends <element>:<verb>
//       signal an AbortSignal that aborts when the element disconnects

view(Component) from kit/parts.js makes that mount from a component: it keeps the attributes in a store, so update is a store write, and unmount is the disposer render returns.

Rules that keep the drawing swappable:

  1. The element and the model never import a library. The byte ratchet's test fails on a library import, a bare address or one through a vendor/ directory, in any file but a .render.js and the kit files that draw. It also fails on an element or model file whose relative imports reach the library or a kit file that draws (feed.js, parts.js, state.js, stream.js), other than through a .render.js file: an element would load the library before its hydrate trigger fires. stream.js holds Solid state and so counts as a kit file that draws; press.js and request.js hold no library, and an element or a model may import them.
  2. The model is plain data. No Solid type crosses into it.
  3. The render module reads server data only through kit/feed.js and kit/stream.js, sends it only through kit/press.js, and reads its attributes only through props.
  4. Replacing how an island draws changes its .render.js file only. Element names, attributes, events and feeds stay.

Page state

Signals are the state model. An island holds its interface state in Solid signals and stores: no module-level variable as state, and no observer or pub-sub written by hand.

Islands of one page share state through named page stores. A page store has a fixed shape and named actions. The first island that asks for it makes it, and every later one gets the same object. Islands read it reactively and write it only through its actions: the setter is not handed out. One module defines each store and every island that uses it imports that module.

// board.state.js
import { pageStore } from "../kit/state.js";

export const useBoard = pageStore("board", {
  state: () => ({ picked: null }),
  actions: (set) => ({
    pick(number) {
      set((d) => {
        d.picked = number;
      });
    },
  }),
});
// in a component of either island
const board = useBoard();
board.state.picked;        // a reactive read
board.actions.pick(42);    // a write; it lands on the next microtask

The stores live under one owner per page, made when kit/state.js is first evaluated, so they outlive the island that made them.

Feeds

Server data comes from /live/ through feed(src, { every }) of kit/feed.js. There is one source per address per page: every island that names the address reads the same async memo, and one poller asks for it.

Since kit 1 the rule is one source per address and request options (below). A reader that gives other options gets a source and a poller of its own for the same address. This is a change to the rule, not only an addition to it, and it is kept only so a port can send another program's session header: islands that share an address give the same options. Objects count by their content, whatever the order of their keys. A function counts by its identity, so a headers function is defined once per page, at the top of a module (see Request headers); an arrow written inside an island makes a source per island and per mount.

A feed of another program's API takes these options, each added in kit 1 with no change to a feed that gives none:

Option Does
headers Request headers: an object, or a function read on each poll, so a session header can change
credentials The fetch credentials mode, such as "same-origin" or "include"
parse "json", the default, or "text": data() is then the body as text
accept A status that is data, not an error: { 404: { releases: [] } } makes a deliberate 404 an empty value. The value may be a function of the body's text. A status not listed and not 2xx is an error, as before
expose The answer's headers that meta() gives, by name
const plan = feed("/api/plan", {
  every: 30000,
  headers: sessionHeaders,          // defined once per page, see below
  accept: { 404: { releases: [] } },
  expose: ["X-Session"],
});
plan.meta(); // null before the first answer, then
             // { status: 404, headers: { "x-session": "…" }, date: <ms>, at: <ms> }

Two more, added in kit 1 with no change for a caller that does not use them:

// a press's answer, or a live event, into the feed: no second request
const view = feed(`/api/t/${n}/view`, ASK);
const pressed = await press(`/api/t/${n}/act`, { body });
view.put(pressed.data);

// wait for the answer a refresh asked for, the same as before or not
const r = await tickets.refresh();
if (!r.ok) say(r.status ? `The server answered ${r.status}.` : "No answer.");

Request headers

A header that changes, such as a session, lives in a page store, and one module of the page exports the function that reads it. Every feed, stream and press of that address passes that same function, so they share one source. The function is read untracked on each poll or connect: a change of the session is sent with the next one and starts no request of its own.

// session.state.js
import { pageStore } from "../kit/state.js";
export const useSession = pageStore("session", {
  state: () => ({ id: "" }),
  actions: (set) => ({ set(id) { set((d) => { d.id = id; }); } }),
});
export const sessionHeaders = () => ({ "X-Session": useSession().state.id });

Streams

A stream of events comes through stream(src, options) of kit/stream.js: text/event-stream or NDJSON read over fetch, so it can send headers, which an EventSource cannot. There is one connection per address and options per page.

// in a render module
import { stream } from "../kit/stream.js";
import { useTicket } from "./ticket.state.js";

const ticket = useTicket();
const live = stream("/api/tickets/41/events", {
  format: "sse",                                   // or "ndjson"
  headers: sessionHeaders,                         // one function per page
  on: ticket.actions.apply,                        // each event, { type, data, id }
});
live.state();      // "connecting", "open", "error" or "closed"
live.error();      // the last error, or null
live.status();     // the last answer's status, or 0
live.reconnect();  // drop the connection and connect now

A page moved from a client of its own can keep that client's ends and waits. These options were added in kit 1; without them a stream does what is said above. Each is part of the connection's key.

Option Does
end Ends the stream for good on an answer it names: a list of statuses, or a function (status, type) of the status and the content type, without its parameters, that returns true. The state is "closed", status() and error() stay, with the body on the error, until reconnect()
grow "double", the default, or "fixed": every wait after a failure is retry, up to max
ended The wait in ms after the server ends a stream cleanly, 0 or more. By default it is the first wait, retry or the server's retry: field. A max given caps it; with no max, an ended over 30000 is kept. A server's retry: field replaces it, as an EventSource waits that field after an end too. A failure after it waits the backoff's next step. 0 asks again at once, as some clients did. A second clean end in a row that brought no event waits retry, then the backoff grows as after a failure, so a server that ends every stream at once is not asked in a loop
broken "fail", the default, or "end": a stream that breaks after it opened waits as a clean end does, ended or the first wait, and an end or a break starts the backoff again, so only failed connects grow it. A server's retry: field replaces the wait after a break as after an end, and a break counts with the clean ends: a second end or break in a row that brought no event backs off as ended says. A client that read the stream with fetch often did both, and often waited the same after every end or break, with an event or not
hidden "live", above
// What an EventSource did: give up on any answer it cannot read, wait 3 s
// after a failure or an end, and keep asking while the tab is hidden.
const eventSource = (status, type) => status !== 200 || type !== "text/event-stream";
stream(src, { end: eventSource, retry: 3000, grow: "fixed", ended: 3000, hidden: "live", on });

// Give up on a refusal only, and show the server's sentence.
const live = stream(src, { end: [401, 403], on });
live.error()?.data?.error;   // "Sign in to see this ticket."

// 2 s after a failure, then 4 s, and so on; 1 s after a clean end or a
// break, and the next failure waits 2 s again.
stream(src, { retry: 2000, ended: 1000, broken: "end", on });

// Ask again at once after a clean end.
stream(src, { format: "ndjson", ended: 0, on });

Define an end function once per page, as a headers function is: it counts by its identity.

Presses

A request that changes something is a press: press(src, options) of kit/press.js, a POST by default. It has no library, so it runs inside Solid's own action(); the kit does not wrap action, createOptimistic or createOptimisticStore.

const answer = await press("/api/tickets", {
  headers: sessionHeaders,
  body: { title },               // a plain object: sent as JSON, with its content type
  accept: { 409: null },         // a status that resolves instead of rejecting
  expose: ["X-Session"],
});
// { status, ok, data, headers, date }

The pattern: an optimistic value shows at once, a failed press rolls it back, and a press that works holds it until the truth comes.

import { action, createOptimistic } from "../kit/vendor/solid.js";
import { feed } from "../kit/feed.js";
import { press } from "../kit/press.js";

const votes = feed("/api/votes");
const [shown, setShown] = createOptimistic(() => votes.data().count);
const vote = action(function* () {
  setShown((n) => n + 1);                 // shows at once
  yield press("/api/vote", { body: {} }); // a rejection ends the action: the guess reverts
  votes.refresh();                        // held with the action: no step back
});
// onClick=${(e) => vote().catch((err) => setFailed(message(err)))}
const [shown, setShown] = createOptimisticStore(() => ({ items: list.state.items }), { items: [] });
const add = action(function* (title) {
  setShown((d) => {
    d.items.push({ title, pending: true });
  });
  const saved = yield press("/api/items", { body: { title } });
  list.actions.add(saved.data);           // the page store: the truth
});

Moving a hand-written client onto the kit

For a page whose reads, streams and presses are a client of its own:

The client did On the kit
A fetch on a timer, or a poll loop feed(src, { every })
A request header, such as a session headers: sessionHeaders, one function per page that reads a page store (Request headers), on a feed, a stream or a press
A 404 or another status that means "nothing" accept: { 404: <empty value> }: data, not an error, and not "down"
Reading the answer's status, a header or the Date meta(), with expose for the headers
A text file, not JSON parse: "text"
EventSource, or a reader of SSE or NDJSON over fetch stream(src, { format, headers, on })
Its own reconnect and backoff stream connects again; state() says where it is
An event handler that writes state on: store.actions.<verb>, a page store's action
A post with its own pending and rollback action() with press() and createOptimistic or createOptimisticStore
An EventSource that gave up on a refusal or a wrong content type end: (status, type) => status !== 200 || type !== "text/event-stream", or a list such as end: [401]
The server's sentence of a refused stream error().data, the refused answer's body
Its own waits before asking again retry, grow: "fixed", max, ended for the wait after a clean end, and broken: "end" when a break after the open waited as an end and the backoff grew only on failed connects
Asking again while the tab is hidden hidden: "live"
A wait for the answer of a read it asked again await f.refresh(): { ok, status, data } or { ok: false, status, error }
Taking the answer of a press or a pushed event as the data, with no second read f.put(value)
// The page read the view again after a press: take the press's answer.
const done = action(function* () {
  const r = yield press(api(`/t/${n}/act`), { ...ASK, body });
  view(n).put(r.data);
});

// The page waited for a read it asked again, the same answer or not.
const r = await tickets().refresh();

// The page's EventSource gave up for good on a 401 or a 5xx, waited 3 s,
// and asked again while hidden.
const live = stream(src, { end: eventSource, retry: 3000, grow: "fixed", ended: 3000, hidden: "live", on });

// The page read the stream with fetch: 1 s after an end or a break, and
// after a failed connect 2 s, then 4 s, up to 30 s, from 2 s again after
// the next stream that opened.
stream(src, { retry: 2000, ended: 1000, broken: "end", on });

// The page asked again for the server's sentence after a refused stream.
const said = live.error()?.data?.error;

Styling

Light and dark

The mode is a toggle a person sets, not the system setting. A page is light unless the viewer picks dark, and the choice is kept in that browser where storage allows (fun/mode.js, the key tehas-mode). Only a theme whose --modes token names dark offers it: today beesknees26, on the business page's mode button. The kit has no mode element: a page that offers the toggle loads fun/mode.js.

The kit

The shared kit lives in host/fun/kit/ and ships with tehas, versioned by the release that ships it:

File Holds
vendor/solid.js Solid 2, one minified ES module made by tools/vendor-solid. Do not edit it
vendor/LICENSES The licences of the bundled packages
vendor/solid.d.ts Types for vendor/solid.js, written by hand from the packages' own .d.ts files, for each name it exports and no other, an async createMemo among them, whose accessor gives what its promise resolves to. A checker such as tsc --checkJs reads it in place of the bundle. An install never stages it or copies it into a home, and it counts in no page. A pull request's preview copies host/fun whole, so the preview serves it
island.js The island base: attributes, the hydrate trigger, the mount and the disposal, the events. No library
feed.js The feed store (Feeds)
stream.js The stream source (Streams)
press.js Presses (Presses). No library
request.js What the kit's modules that make requests share about a request and its answer. No library
state.js Page stores (Page state), and shared(key, make), one value per key per page under the page's owner
parts.js view, and shared pieces drawn in Solid: TimeAgo, Empty, Busy, Failed (an error with a retry) and Guard (<Loading> inside <Errored> with a retry)
kit.css The kit's rules in @layer kit: [data-tehas-island] is display: block, [data-tehas-island="contents"] is display: contents
MANIFEST kit <n>, the contract number, then file <sha256> <bytes> <name> for every other file

The kit is kit 1, first shipped with tehas v1.1.0. A module imports the library by a relative address, ./kit/vendor/solid.js from a file in fun/: the pages use no inline script, so they work under a CSP without 'unsafe-inline', and there is no import map. Only a .render.js file and the kit files that draw (feed.js, state.js, parts.js, stream.js) import it.

Within one kit <n>, element names, attributes, events, the class names of the kit's patterns and the exports of its modules are only added, never renamed or removed. A break raises n, and the changelog says so under "Adopter action". A program that builds on the kit copies host/fun/kit/ whole at a pinned tehas tag, checks each file against the manifest, and does not edit it.

A .d.ts file under host/fun is for a type checker. An install does not copy it into the home, and the sweep removes one there. An address of one in a JSDoc comment, such as import("./vendor/solid.d.ts"), is no import: the asset checks and pages.max do not read it. An address of one in code is an import of a file no home has, and the checks refuse it.

The kit's modules carry their types as JSDoc comments: what each export takes and returns, and the types a caller names. request.js has Headers, Accept and Parse; island.js has Ctx, Handle, RenderModule and IslandSpec; feed.js has FeedOptions, FeedAnswer and Feed; press.js has PressOptions and PressAnswer; stream.js has StreamOptions, StreamEvent and Stream. A file names one with /** @import { Feed } from "../kit/feed.js" */. The comments are served and counted like any other bytes; they change no code. tsc --checkJs --strict reads the kit with no error. A program that copies the kit and checks its own code with tsc --checkJs gets the kit's types from the modules and vendor/solid.d.ts, and needs no copy of its own.

The kit holds generic parts only. The tehas-factory-* islands that read the files under /live/ are not in it.

Solid 2 in tehas

The kit carries solid-js 2.0.3, @solidjs/signals 2.0.3, @solidjs/web 2.0.3 and @solidjs/html 2.0.1. The documentation is at docs.solidjs.com, which is 2.0; the 1.x pages at v1.solidjs.com do not apply. Most examples a reader or a model has seen are 1.x.

The library exports exactly these names, and the ratchet fails on an import of any other:

createSignal, createMemo, createStore, createRoot, createEffect, createRenderEffect, onCleanup, onSettled, untrack, flush, isPending, latest, refresh, action, createOptimistic, createOptimisticStore, snapshot, getOwner, runWithOwner, For, Show, Switch, Match, Loading, Errored, render and html.

What differs from 1.x:

The ratchet's test fails on these 1.x names in any file of host/fun: createResource, startTransition, useTransition, batch(, onMount, Suspense, ErrorBoundary, createMutable, produce(, mergeProps, splitProps, solid-js/web, solid-js/store and solid-js/html.

Templates are constant text. Text from a data file is bound as an expression, so it lands as text, and is never pasted into the template. In a file that imports the library the test fails on an html template joined with +, on a call of html(…), on an untagged template literal inside an html template (a nested html template is fine) and on a style= attribute in one. Space or a comment between html and its backtick does not hide a template, and html is imported under its own name: import { html as h } fails, since the checks read the name html. export … from the library takes only the names it exports, as an import does.

A complete island, alone on its page. For two islands that share a feed and a page store, copy the tested demo in test/browser/: index.html (the page), board.state.js (the store both import), and kit-demo-queue.* and kit-demo-picked.* (each island's element, model and render module). kit-check.mjs checks it in a browser (Tests).

// fun/tehas-factory-queue.js
import { island } from "./kit/island.js";

island("tehas-factory-queue", {
  props: { src: String, limit: Number },
  load: () => import("./tehas-factory-queue.render.js"),
});
// fun/tehas-factory-queue.model.js
export function queueModel(status, props) {
  const rows = (status?.queued ?? []).map((i) => ({ number: i.number, title: i.title }));
  return { rows: rows.slice(0, props.limit ?? rows.length) };
}
// fun/tehas-factory-queue.render.js
import { For, html } from "./kit/vendor/solid.js";
import { feed } from "./kit/feed.js";
import { Empty, Guard, view } from "./kit/parts.js";
import { queueModel } from "./tehas-factory-queue.model.js";

export const mount = view((props, ctx) => {
  const live = feed(props.src, { every: 10000 });
  const model = () => queueModel(live.data(), props);
  return html`<${Guard} retry=${(e) => live.refresh()}>
    <ul>
      <${For} each=${() => model().rows} keyed=${(r) => r.number} fallback=${html`<${Empty} text="Nothing in line" />`}>${(row) =>
        html`<li><button type="button" onClick=${() => ctx.emit("pick", { number: row().number })}>
          ${() => row().title}
        </button></li>`}<//>
    </ul>
  <//>`;
});
<tehas-factory-queue data-tehas-island src="/live/status.json" limit="10">
  <p class="tehas-empty">Nothing in line</p>
</tehas-factory-queue>
<script type="module" src="/fun/tehas-factory-queue.js"></script>

Upgrading Solid

The kit's Solid is pinned in PINS in tools/vendor-solid/src/main.rs: each package's version, its npm tarball and its sha512 integrity. It stays on 2.x for now.

The release moves it within 2.x. scripts/tag-release.sh runs scripts/pins.sh move, which takes each package to the newest 2.x on npm, with the tarball and integrity the registry gives, and runs tools/vendor-solid to rebuild vendor/solid.js, vendor/LICENSES and the kit's MANIFEST. A release that needs a version of another of the four packages that the move does not take stays out, and so does one that a package which stays does not accept. Such a package stays at the version it has, even when an older 2.x would do. A 3.x is held back (Pinned tools move with the release). The move changes nothing else. When the new bundle breaks the gate, the gate that scripts/tag-release.sh runs before it pushes fails: the release stops with exit 1 and opens no pins pull request. A person then makes the move by hand, with the steps below, or tags with --no-pins.

By hand, edit the entry of PINS: the version, the dist.tarball and the dist.integrity of https://registry.npmjs.org/<package> for that version. Then run cargo run --release --locked --manifest-path tools/vendor-solid/Cargo.toml from the root. After a move, either way:

  1. Make the names in vendor/solid.d.ts match what the new release exports, from the packages' own .d.ts files. The ratchet fails when the type file does not name exactly the library's exports.
  2. Check the library solid line of host/fun/pages.max. A bundle that grows needs a raise, and a raise is a person's call.
  3. Run the browser checks by hand, outside the gate: node test/browser/kit-check.mjs and node test/browser/dashboard-check.mjs (Tests).
  4. Write the new versions in Solid 2 in tehas and in the Solid 2 kit row of Features.

A program that builds on the kit, an industry among them, gets the new Solid when it pins host/fun/kit/ to the tehas tag that carries it.

A move to Solid 3.x is a person's decision. It can change the names the kit exports, and with them kit <n>.

The plain dashboard

host/docs/dashboard.frag is the first page on the kit. Each section is an island of host/fun/factory/, laid out as its children (data-tehas-island="contents"), so the page's grid and rules are as before. The fragment holds the server HTML each one replaces on mount: the state row reads "loading", the lists are empty and the optional sections are hidden.

Element Reads Draws
tehas-factory-state status.json, running.json The state, the all-hands and read-only marks, how old the queue is, the link to all issues
tehas-factory-console running.json, status.json The tabs of the cycles, the shown cycle's title and step, and the console
tehas-factory-issues status.json One list, named by list: queued, awaiting, stopped or completed
tehas-factory-readonly status.json What a read-only factory's starts left
tehas-factory-days analytics.json Last 10 days
tehas-factory-previews previews.json The previews
tehas-factory-host top.json The host and its units, the snapshot's age by the server's clock
tehas-factory-wikilink wiki.json The link "wiki" to the current build of the product wiki, hidden with no build

The wiki page, /wiki (host/docs/wiki.frag), is one island, tehas-factory-wiki, on wiki.json, read every 30 seconds: the current build, when and at which commit it was built, how far it is behind main and its link.

The live files and the pages

The files under /live/ are for the dashboard, not for a program (Files under live/); a program reads tehas status --json and the host bridge. For the pages, within one kit <n> a field of a file that a page reads is only added, never renamed or removed.

A page reads these files add-only: it reads the fields it knows and leaves the rest, and a field it reads may be missing, so a writer can add a field without a page change. test/fixtures/live/ holds one sample of each file a page in host/fun/ fetches, with the fields the pages read. A page that starts to read a new file adds its sample in the same change. A writer that would drop or rename a field of a sample breaks a page, which this rule does not allow.

Budgets

Sizes are counted in raw bytes, as served before compression, so a figure does not move with the compressor.

host/fun/pages.max holds a ceiling for each page and each island:

page <name> <script bytes> <markup and style bytes>
island <name> <bytes>
library solid <bytes>
Page Made of
business fun/business.html
floor fun/index.html
dashboard docs/_layout.html and docs/dashboard.frag, with the islands its tags load
manual docs/_layout.html
wiki docs/_layout.html and docs/wiki.frag, with the island its tag loads

A page's script bytes are the files its <script src="/fun/…"> tags name and the modules those import by a relative address, at any depth, each file once, but the library. kit/vendor/solid.js is counted once, on the library solid line, and in no page: a page that loads an island pays for it once. Its markup and style bytes are its own files and the stylesheets its <link href="/fun/…"> tags name. The theme file is left out: its name comes from a template. An island's bytes are its three files together, the island named by the path of its .render.js under fun/ without the ending.

The workspace test update::pages in console/ops/src/update/pages.rs checks the pages against the file with the rest of the workspace's tests. It fails when a page, an island or the library is over its line, when one has no line, when a line names nothing, when an island's line is over the island budget, on a library import outside a .render.js file and the kit files that draw, when the kit's MANIFEST does not match its files, when vendor/solid.d.ts is missing, does not type exactly the names the library exports or exports in a form the check does not read, on a .d.ts address in code, and on the Solid rules of Solid 2 in tehas. A change may lower a line. A change that grows a page raises its line in the same change, and that raise is a person's call, said in the pull request, as with the bash ceiling.

The owner approved these lines on 2026-11-20: library solid 123689, the kit's Solid as tools/vendor-solid bundles it, page dashboard 83939 53988, the dashboard's script at 83939 bytes on the kit, then page dashboard 88935 53988, the dashboard's script with the kit's JSDoc types, and under that approval of the types' growth page dashboard 88967 53988, with a page store's comparison untracked.

The budgets for new work:

Thing Budget Held by
An island's three files 12 KB (12288 bytes) The test
The library Its library solid line The test
An existing page Its line in pages.max The test
A plain element 2 KB Review
The kit's core modules 30 KB (30720 bytes) for island.js, feed.js, request.js, state.js and parts.js, which a page that polls loads: a review figure, not a gate. The owner set 24 KB on 2026-11-20 and raised it to 30 KB on 2026-11-21 for the kit's JSDoc types. At kit 1 with the types they are 29616 bytes, under it. stream.js and press.js, 19843 more, load only on a page that imports them Review
A new page 40 KB of script, 30 KB of CSS beside the theme and the kit Review, and its line in pages.max
A page with no island No script beyond fun/mode.js Review

Tests