Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion skills/objectui/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ is `.passthrough()`, so one authored there is kept and run by nothing (objectui#

Layouts are components that render children. Responsive column counts go on the
node as `columns` — a number, or a breakpoint object ([`rules/protocol.md`](./rules/protocol.md)
has the keys the renderer reads and the one it drops).
has the six keys the renderer reads and the release that still drops `2xl`).

### 6. Type safety over magic

Expand Down
2 changes: 1 addition & 1 deletion skills/objectui/evals/protocol.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
{
"id": 3,
"prompt": "I have a grid in an ObjectUI page that should show 1 column on phones, 2 on tablets and 6 on wide desktops. I wrote { \"type\": \"grid\", \"props\": { \"cols\": { \"xs\": 1, \"md\": 2, \"2xl\": 6 } } } and it renders as a flat two-column grid at every width.",
"expected_output": "Names three separate faults: the keys are under props and so are never read; the key is columns, not cols, which no schema or renderer declares; and 2xl parses but the grid renderer reads only xs through xl, so a 2xl entry emits no class. Rewrites it as columns on the node, stopping at xl, and offers className for a wider step.",
"expected_output": "Names the two faults that cause the flat grid: the keys are under props and so are never read; the key is columns, not cols, which no schema or renderer declares. Rewrites it as columns on the node with xs, md and 2xl. Notes that 2xl is the sixth breakpoint key and is read by the grid renderer since objectui#7097; on an earlier @object-ui/components release the 2xl step is accepted and silently dropped, so there stop at xl or carry the widest step in className.",
"files": [],
"assertions": {
"must_contain": [
Expand Down
10 changes: 5 additions & 5 deletions skills/objectui/guides/mobile.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ Use responsive column configurations in grid layouts:
```

`columns` takes a number or a breakpoint object -- the schema above renders
`grid-cols-1 md:grid-cols-2 lg:grid-cols-4`. The breakpoint keys the `grid`
renderer actually reads, the `2xl` entry the spec accepts and the renderer
drops, and the `cols` / `props` spellings that render nothing are in
[`rules/protocol.md`](../rules/protocol.md) under "Rule: Layout
Responsiveness".
`grid-cols-1 md:grid-cols-2 lg:grid-cols-4`. The six breakpoint keys the `grid`
renderer reads, the `2xl` step that an `@object-ui/components` release
predating objectui#7097 accepts and silently drops, and the `cols` / `props`
spellings that render nothing are in [`rules/protocol.md`](../rules/protocol.md)
under "Rule: Layout Responsiveness".

## Mobile-first Tailwind classes in schemas

Expand Down
15 changes: 9 additions & 6 deletions skills/objectui/rules/protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ param support ⊇ form support).
## Rule: Layout Responsiveness

`grid` declares its column count as `columns` — either a number, or a
breakpoint object keyed `xs` / `sm` / `md` / `lg` / `xl` (`GridSchema` in
breakpoint object keyed `xs` / `sm` / `md` / `lg` / `xl` / `2xl` (`GridSchema` in
`packages/types/src/layout.ts`):

<!-- os:check -->
Expand All @@ -327,12 +327,15 @@ A bare `"columns": 4` already gets a mobile-first ramp (1 column, 2 at `sm`,
4 at `md`), so reach for the object form only when you need the breakpoints
spelled out.

**`2xl` is accepted and then dropped.** The spec's `BreakpointColumnMapSchema`
declares six keys — `xs` … `xl` **plus `2xl`** — but the `grid` renderer reads
only the first five, so `{ "xs": 1, "2xl": 6 }` validates, emits no `2xl:`
class, and renders at the `xs` count forever. Measured: `{xs:1, xl:5}` →
**`2xl` is the sixth key.** Six keys — `xs` … `xl` **plus `2xl`** — are
objectui's own breakpoint vocabulary: `BreakpointName` in `@object-ui/types` is
the key set of `GridSchema.columns`, and `BreakpointColumnMap` in
`@object-ui/layout` (`responsive-grid`) spells the same six. Since objectui#7097
the `grid` renderer reads all six. Measured on main: `{xs:1, xl:5}` →
`grid grid-cols-1 xl:grid-cols-5 gap-4`; `{xs:1, "2xl":6}` →
`grid grid-cols-1 gap-4`. Stop at `xl`, or carry the widest step in
`grid grid-cols-1 2xl:grid-cols-6 gap-4`. On an `@object-ui/components` release
that predates objectui#7097 the `2xl` step is accepted and silently dropped
(`grid grid-cols-1 gap-4`): there, stop at `xl` or carry the widest step in
`className`.

**❌ DO NOT** spell it `cols` — no schema, renderer or registry declares that
Expand Down
Loading