Skip to content

ci: the app's controls are Kumo's, and a new one written by hand fails - #94

Merged
Madraka merged 3 commits into
mainfrom
ci/controls-check
Nov 18, 2026
Merged

Madraka merged 3 commits into
mainfrom
ci/controls-check

Conversation

@Madraka

@Madraka Madraka commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Issue #84: the check, the skill's rule, the template. It comes before #82 and #83, which move the controls.

The check. pnpm static controls (scripts/checks/controls.ts, in pnpm check). It reads every .tsx file in app/, each tag whole, across lines, braces and quotes.

Proof. test/unit/controls.test.ts, 21 tests:

  • each native element refused, and Kumo's passed;
  • a tag across lines, and names that only begin like an element;
  • a debt held, exceeded and needing to be lowered;
  • a native control kept on purpose with and without a reason, and a listed file that is gone;
  • each kind of hand size refused (on its own line, under a breakpoint, in cn()), and layout classes passed.

With the check emptied, 18 of the 21 fail. The repository passes with the debt as listed.

The skill (podbay-ui, rule 6):

  • a control is Kumo's, with the component named for each kind: Select/Combobox, Radio, Checkbox, Switch, Input, InputArea, SensitiveInput, TagInput, DatePicker, Button, Field with Label;
  • Kumo's own documentation is the registry shipped with the pinned version, node_modules/@cloudflare/kumo/ai/component-registry.md. That is where I read the components and their sizes: sm is 26 px, base 36 px;
  • a control's size is its size prop, and one form uses one size;
  • a wrapper, when Kumo's cannot do the job, lives in app/components/controls/.

The "before you finish" list asks for:

  • every changed screen opened at desktop and phone width, in both themes;
  • its edges and heights compared with the screen beside it;
  • the pictures in the pull request.

The template. A change under app/ carries those pictures, or says why there is nothing to see.

Screens. This pull request changes no screen: no file under app/ is touched. So there are no pictures.

Not in this pull request. The last item of #84, the auditor opening a changed screen in a browser before a pass, is the auditor's own practice.

Locally, on main at b200fd7: pnpm check passed, with 22 static checks and 974 unit tests.

🤖 Generated with Claude Code

Madraka and others added 2 commits November 19, 2026 01:40
`pnpm static controls` reads every .tsx file in app/, a tag whole across
lines, and refuses:
- a <select>, <textarea>, <input> or <button> written by hand, unless it
  is kept on purpose with its reason (ON_PURPOSE) or is a debt of the day
  the check came in (TO_MOVE: 62 places in 30 files);
- a height, size, corner or type size written by hand on a Kumo control
  (SIZED_BY_HAND: six pill buttons when it came in).
A debt only goes down: a count above it is refused, and one below it until
the number is lowered. #82 and #83 pay it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Madraka <8898640+Madraka@users.noreply.github.com>
The UI skill's rule 6 names Kumo's component for each kind of control,
where its documentation is, and where a wrapper lives when Kumo's cannot
do the job. Its "before you finish" list asks for every changed screen to
be opened at desktop and phone width in both themes, compared with the
screen beside it, and shown in the pull request. The pull-request template
asks for the pictures. The status document records the check and its debt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Madraka <8898640+Madraka@users.noreply.github.com>
@Madraka

Madraka commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Audit at ddece76: four additions to the check, then pass

Read: the check, its tests, the skill's rule 6, the template and the status row. Nothing was run.

What holds

  • A new native control is refused, and the debt only goes down. A count above the listed one fails, a count below it fails until the number is lowered, and a file that is not listed has none. I added up TO_MOVE: 62 places in 30 files, and by element it is the 9 selects, 3 text areas, 22 inputs and 28 buttons counted on The app builds its form controls by hand beside Kumo's #82.
  • A tag is read whole, across lines, braces and quotes, so an arrow function with > inside an attribute does not end it.
  • The skill's rule 6 now names Kumo's component for each kind of control and no longer allows a native one. The document it points to exists in the pinned version and says what the pull request says: sm is 26 px and base is 36 px.
  • The template and "Before you finish" ask for the pictures and the comparison of edges, and the status row says plainly that no check holds that part.

To add

I tried to write a control that looks wrong and passes. These four get through, and #82 and #83 are exactly where someone will reach for them:

1. Padding, an arbitrary size and the important mark. HAND_SIZE knows h-, size-, rounded and the named type sizes. A Kumo control with py-3 or px-5 changes its box just the same; text-[13px] is a type size that is not one of the named ones; and !h-9 or h-9! does not begin with h- after a space. Refuse p-, px-, py-, pt-, pb-, an arbitrary text-[…], leading-, and any of the list with the important mark.

2. style on a Kumo control. style={{ height: 36 }} sets what the classes may not. Refuse a style attribute on a Kumo control.

3. A control made of a role. <div role="button" onClick=…>, <span role="checkbox">, role="switch", role="combobox", role="textbox" on a plain element is a control written by hand without one of the four tags. One of these was in the app until #72. Refuse these roles on an element that is not Kumo's.

4. Kumo's own parts, and the project's wrappers. A tag such as <Select.Trigger className="h-9"> is not read, because the name is followed by a dot. And once app/components/controls/ has a wrapper, a size written by hand where the wrapper is used is not read either, because its name is not in the list. Read a Kumo control's dotted parts, and take the names of the wrappers from that folder.

Each with a test that fails without it.

To write down as what the check does not prove

  • An element made by createElement, or a tag held in a variable.
  • A Kumo control imported under another name.
  • Classes that come from a variable, or the part of a template string after a ${…}.

These are held by the audit opening the screen, which is the last item of #84 and is mine from here on: I open every changed screen on a local instance before a pull request under app/ passes.

The checks were still running when I read this.

The audit of #94 asked for four more refusals, each with a test:
- padding, an arbitrary text-[…], leading- and the important mark on a
  Kumo control;
- a style attribute on one;
- a plain element with the role of a control (button, checkbox, radio,
  switch, combobox, listbox, textbox, slider), with the one place that has
  one today, the address list's listbox, held as a debt;
- Kumo's dotted parts and the wrappers of app/components/controls/.
The file's header and the status document say what the check does not
prove: createElement or a tag in a variable, a Kumo control under another
name, and a class from a variable or after a ${…}.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Madraka <8898640+Madraka@users.noreply.github.com>
@Madraka

Madraka commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Answer to the audit at ddece76. One new commit, 0811b03.

  1. Padding, arbitrary type, line height, the important mark. On a Kumo control the check now also refuses:

    • p-, px-, py-, pt-, pb-, pl-, pr-, ps-, pe-;
    • text-[…] and leading-;
    • all of these and the earlier ones with ! before them (!h-9).

    A class with ! after it (h-9!) was already caught, because it starts with h-: its test passes with the old check too.

  2. A style attribute on a Kumo control, its part or a wrapper is refused, and counted with the hand sizes.

  3. A control made of a role. A plain element (any lowercase tag but the four native controls, which are counted already) with role set to button, checkbox, radio, switch, combobox, listbox, textbox or slider is refused, whether the role is written as a string or in braces. Other roles (alert, list, dialog) are not.

  4. Kumo's dotted parts and the wrappers.

    • The control names now take a dotted part (Select.Trigger, Combobox.Input).
    • Every component exported from a file under app/components/controls/ is held as Kumo's are. There is no such file yet; a test holds a wrapper.

What it does not prove is now in the file's header and in the status row:

  • a control made with createElement, or with a tag held in a variable;
  • a Kumo control imported under another name;
  • a class from a variable or after a ${…} in a template.

Debt. No new places came up under 1, 2 or 4: the six pill buttons are still all there is. Under 3, the one listbox above. No screen was changed.

Tests. test/unit/controls.test.ts now has 41. With the check at ddece76, 18 of them fail: every new case except h-9!, as said. Locally, pnpm check passed, with 22 static checks and 994 unit tests.

@Madraka

Madraka commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

audit: pass, once the required checks are green

Read at 0811b03, the one new commit. The four additions are in, each with its test:

  1. Padding in every direction, an arbitrary text-[…], leading- and the important mark are refused on a Kumo control. I looked for class names the new pattern would take by mistake (peer-, placeholder-, pointer-events-, prose-) and it takes none of them.
  2. A style attribute on a Kumo control is refused.
  3. A plain element with a control's role is refused, written as a string or in braces. The one that exists today, the list of addresses in AddressField.tsx, is a debt of one that only goes down.
  4. A Kumo control's dotted parts are read, and so is every component a file of app/components/controls/ exports.

What the check does not prove is in its header and the status row, and is held by the audit opening the screen.

Merge with a merge commit, and name both runs. This closes the first three parts of #84; the fourth, the audit opening every changed screen, starts with the next pull request under app/.

@Madraka
Madraka merged commit f8f5c5e into main Nov 18, 2026
8 checks passed
@Madraka
Madraka deleted the ci/controls-check branch November 18, 2026 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant