Skip to content

Commit 4e3633f

Browse files
committed
Lighter lists: flat rows, label section titles, one-sentence intros
PageRows draws no card: rows sit flat on the panel, split by hairline dividers, with their text lined up under the section label. A row's icon tile is hidden unless the list sets `icons`, which the Apps lists, a Bot's apps, Reconnect, Artifacts and waiting items keep. Item size="sm" is 8px top and bottom, about 53px with a description. PageSection titles are 13px medium grey labels. PageSection and PageShell take `learnMore`, which puts the longer explanation behind a "Learn more" disclosure. Approvals, Memory, Notifications, Skills, Vault, Skill detail and New routine open with one sentence each. Docs (app guidelines rules 7 and 11, design system, screen-layout skill), the ui-card test and the look-guard allowlist follow.
1 parent 28eee8e commit 4e3633f

28 files changed

Lines changed: 325 additions & 156 deletions

‎.claude/skills/openbot-screen-layout/SKILL.md‎

Lines changed: 38 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ deviation worth stating out loud and worth a comment saying why.
4444
Four components make the frame. They compose in this order and nest no other way.
4545

4646
```
47-
PageShell the page: header (title, description, action, backButton) then children
48-
PageSection a titled group of unrelated decisions, with a deliberately large gap above it
49-
PageRows the grouped card: rounded-lg border bg-card
47+
PageShell the page: header (title, one-sentence description, action, backButton) then children
48+
PageSection a group of unrelated decisions under a small grey label, a large gap above it
49+
PageRows the list: flat rows, no card, split by hairline dividers
5050
Item one row, size="sm", divided from its neighbours by <Separator />
5151
PageEmpty what a section says when it has nothing to list
5252
```
@@ -66,21 +66,22 @@ components above; a screen that sets its own is drifting.
6666
|---------|-----|----------------|
6767
| Page edge (top / sides / bottom) | 48 / 16 / 64px | `PageShell` column (`pt-12` or `pt-8` under the bar, `px-4`, `pb-16`) |
6868
| Title → description | 8px | `PageShell` header |
69+
| Section label → description | 0px | `PageSection` |
6970
| Title block → first content | 32px | `PageShell`: `[&>header+*]:mt-8` |
7071
| Title → tabs, tabs → content | 24px, then 32px | `PageShell`: `[&>header+nav]`, `[&>header+nav+*]` |
7172
| Section → section | 48px | `PageSection` (`mt-12`) |
72-
| Section heading → description | 4px | `PageSection` |
73-
| Heading block → section content | 16px | `PageRows` / `PageEmpty` (`mt-4`) |
73+
| Label block → section content | 8px | `PageRows` / `PageEmpty` (`mt-2`) |
7474
| Controls stacked inside a section | 12px | the screen, with `gap-3` |
75-
| A row in `PageRows` | 65px with a description, never under 56px | `Item` (`px-4 py-3.5 gap-3`), `PageRows` (`min-h-14`) |
76-
| Divider between rows | inset 16px from both edges | `PageRows`, on every horizontal `Separator` inside it |
75+
| A row in `PageRows` | about 53px with a description, never under 48px | `Item size="sm"` (`py-2 gap-3`), `PageRows` (`min-h-12`) |
76+
| Row text → column edge | 0px: the text lines up with the label above | `PageRows` (`-mx-2`, rows `px-2`) |
77+
| Divider between rows | lined up with the rows' text | `PageRows`, on every horizontal `Separator` inside it |
7778

7879
The 32px under the title is deliberately tighter than the 48px between sections: the title belongs
7980
to the page it introduces. Those `PageShell` selectors outrank the first child's own `mt-*`, so a
8081
section or notice keeps its usual margin everywhere else and loses it only at the top.
8182

82-
A page with one section gives that section no `title`: the page title already names it, and a second
83-
heading 32px below the first says the same thing twice. Put the description on `PageShell` instead
83+
A page with one section gives that section no `title`: the page title already names it, and a label
84+
32px below it says the same thing twice. Put the description on `PageShell` instead
8485
(`connections.index.tsx`). A count or filter that belongs to a search sits on the search's row, not
8586
on a line of its own.
8687

@@ -90,6 +91,17 @@ sentence of description saying how the first one arrives, and an `action` — th
9091
page already has — when there is one to offer. Don't repeat "Add one with X" in the description when
9192
the action is right there. A search with no results uses `IconSearch` and "No matches".
9293

94+
## Words Under A Title
95+
96+
A page's `description` and a section's `description` are each **one short sentence**: what the page
97+
or the group is for. A longer explanation (how rules combine, what happens in each case, an
98+
exception) goes in `learnMore`, on `PageShell` or `PageSection`. It opens under the sentence when the
99+
person presses "Learn more", and stays in the page while closed, so find-in-page reaches it. A
100+
section whose title and rows already say it needs no description.
101+
102+
The section title is a label, not a heading to read: 13px, medium weight, `muted-foreground`. The
103+
rows under it are what a person reads.
104+
93105
## Screens, Not Dialogs
94106

95107
**A dialog is used only where the request explicitly asks for one. Everything else is a new
@@ -107,25 +119,28 @@ button.
107119

108120
### Procedure 1: Lay out a screen
109121

110-
1. Open with `PageShell`, giving it `title` and `description`. Leave `width` alone.
122+
1. Open with `PageShell`, giving it `title` and a one-sentence `description` (Words Under A Title).
123+
Leave `width` alone.
111124
2. On a detail screen reached from a list, pass `backButton={{ label, linkProps }}` — it draws a
112125
chevron-left bar above the header. Do not put a Back button in `action`; `action` is for the
113126
page's one primary verb, on the title's baseline.
114127
3. Group the page's decisions into `PageSection`s, each with a `title` and, where the grouping is not
115-
self-evident, a `description`.
116-
4. Give each section one `PageRows` card. Rows go inside it as `Item size="sm"`, with `<Separator />`
117-
between them and none after the last. `PageRows` is a card with dividers, not a stack of cards —
118-
gaps between rows are the wrong shape.
128+
self-evident, a one-sentence `description`.
129+
4. Give each section one `PageRows`. Rows go inside it as `Item size="sm"`, with `<Separator />`
130+
between them and none after the last. `PageRows` is a flat list with dividers, not a card and not
131+
a stack of cards: gaps between rows are the wrong shape.
119132
5. Read `admin/plugins/index.tsx` for the whole pattern end to end, and
120133
`admin/plugins/$key.tsx` or `admin/components/$name.tsx` for a screen with several sections and
121134
mixed row kinds.
122135

123136
### Procedure 2: Compose a row
124137

125-
1. `ItemMedia variant="icon"` holds a leading icon from `@/components/icons`, drawn as a 16px glyph on
126-
a 32px muted tile. It is what makes a card of rows scannable; a row without one reads as a
127-
paragraph. Pass the bare icon — the variant sizes and colours it — and use plain `ItemMedia` only
128-
for something that is its own picture, such as a Bot's avatar.
138+
1. A row has no leading icon by default: a glyph beside every row repeats what its title says.
139+
Give the rows icons only where the icon tells them apart: an app's mark, a file's kind. Then
140+
each row's `ItemMedia variant="icon"` holds the icon from `@/components/icons` (a 16px glyph on a
141+
32px tile), and the list is `<PageRows icons>`. Without `icons`, `PageRows` does not draw the
142+
tile. Plain `ItemMedia` is for something that is its own picture, such as a Bot's avatar or an
143+
app's logo, and is always drawn.
129144
2. `ItemContent` holds `ItemTitle` and, where the row needs a second line, `ItemDescription`.
130145
3. `ItemActions` holds the control, or the value when the row is read-only.
131146
4. `ItemHeader` and `ItemFooter` are `basis-full`, so they wrap onto a line of their own inside the
@@ -163,7 +178,7 @@ itself when the screen behind it changes something.
163178

164179
### Procedure 4: Sizes and variants
165180

166-
1. `Item size="sm"` for rows inside a card. `default` only for a row standing on its own.
181+
1. `Item size="sm"` for rows inside a list. `default` only for a row standing on its own.
167182
2. `Button size="sm"` for a control inside a row or a dialog footer; `lg` for a page's own actions;
168183
`icon-sm` for a control floating over artwork.
169184
3. `Item variant` — pick **one for the whole screen**. `muted` is a fill with no border; `outline` is
@@ -237,8 +252,10 @@ is actually on screen. The root was once 15px, and every constant taken from the
237252

238253
| Signal | What it means | Do instead |
239254
|--------|---------------|------------|
240-
| A hand-written `rounded-lg border border-border bg-card` div wrapping rows | `PageRows` re-implemented, and it will drift from the other seven screens | Use `PageRows` |
241-
| Rows separated by `gap-*` instead of `<Separator />` | A stack of cards rather than one card of rows | `<Separator />` between rows, none after the last |
255+
| A hand-written `rounded-lg border border-border bg-card` div wrapping rows | A card around a list, which `PageRows` no longer draws | Use `PageRows` |
256+
| Rows separated by `gap-*` instead of `<Separator />` | A stack of cards rather than one list of rows | `<Separator />` between rows, none after the last |
257+
| `<PageRows icons>` on a list whose icons are one per kind of setting | A tile that repeats the title, the look this layout dropped | Leave `icons` off; keep it for app marks and file kinds |
258+
| A page or section description of two or more sentences | A paragraph between the title and the rows | One sentence; the rest in `learnMore` |
242259
| `width="wide"` on anything that is not a table | Prose width is the default for a reason; wide was for the audit log | Leave `width` alone |
243260
| A `max-w-*`, `p-*` or text size invented for one screen | A fifth container width, which is what this layout exists to stop | Reach for the existing component |
244261
| Children on an element passed to `Item`'s `render` | They replace the row's own children; the row draws empty | Pass a childless element |

‎CHANGELOG.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@ Newest first. `Unreleased` is what is on `main` and not yet tagged.
4949
long list never meets a proxy's limit on an address. The web app uses the new operations, and
5050
falls back to the old ones on a server from before them.
5151

52+
**Lighter lists.**
53+
54+
- **Settings and list pages read as lists, not admin forms.** Rows sit flat, split by thin lines,
55+
with no box around each list and no icon beside every row. Icons stay where they tell rows apart,
56+
such as app marks and file kinds. Section titles are small grey labels, and each page and section
57+
opens with one short sentence. A longer explanation, such as the full approval rules, is behind
58+
"Learn more".
59+
5260
## 1.2.7
5361

5462
**Before upgrading.**

‎app/src/components/approvals/settings.tsx‎

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1+
import { useMutation, useQuery } from "@tanstack/react-query";
2+
import { Link } from "@tanstack/react-router";
3+
import { Fragment } from "react";
14
import {
25
IconChecklist,
36
IconEyeCheck,
47
IconHandStop,
58
IconTerminal2,
69
} from "@/components/icons";
7-
import { useMutation, useQuery } from "@tanstack/react-query";
8-
import { Link } from "@tanstack/react-router";
9-
import { Fragment } from "react";
1010
import {
1111
PageEmpty,
1212
PageRows,
@@ -38,6 +38,7 @@ import { failureSaid } from "@/lib/load-failure";
3838
import { queryClient } from "@/query-client";
3939
import {
4040
ALWAYS_ASKS,
41+
ALWAYS_ASKS_SHORT,
4142
ASK_FIRST_DESCRIPTION,
4243
ASK_FIRST_TITLE,
4344
HANDED_TO_YOU,
@@ -105,12 +106,13 @@ export function ApprovalSettings() {
105106
</p>
106107
) : null}
107108
<PageSection
108-
description={
109+
description={ALWAYS_ASKS_SHORT}
110+
learnMore={
109111
/*
110112
* What asks whatever these settings say (server/src/approvals/policy.ts), in the same words
111113
* as onboarding's Welcome (ask-first-copy.ts). A Bot's own workspace is left out of what
112114
* always asks on purpose: deleting a file there is an ordinary change, as the last sentence
113-
* says.
115+
* says. The full rule stays one press away rather than standing over the switches.
114116
*/
115117
<>
116118
{ALWAYS_ASKS} They also ask before every edit or command in a folder
@@ -214,9 +216,7 @@ export function ApprovalSettings() {
214216
<PageSection
215217
description={
216218
<>
217-
The strictest matching rule wins. An "ask" rule beats an "allow"
218-
rule.{personal ? " " : " Organization rules are locked. "}Rules for
219-
one Bot are on{" "}
219+
Rules for one Bot are on{" "}
220220
<Link className="underline underline-offset-4" to="/bots">
221221
that Bot's page
222222
</Link>
@@ -226,6 +226,12 @@ export function ApprovalSettings() {
226226
: ""}
227227
</>
228228
}
229+
learnMore={
230+
<>
231+
The strictest matching rule wins. An "ask" rule beats an "allow"
232+
rule.{personal ? "" : " Organization rules are locked."}
233+
</>
234+
}
229235
title="Rules for every Bot"
230236
>
231237
{saved === 0 && inbox.data !== undefined ? (
@@ -271,7 +277,7 @@ export function ApprovalSettings() {
271277
</PageSection>
272278
{agents.data !== undefined && otherBots.length > 0 ? (
273279
<PageSection
274-
description="These don't match a Bot you can open. They still apply to any Bot they match. Remove the ones you don't want."
280+
description="These match no Bot you can open, but they still apply to any Bot they match."
275281
title="Rules for other Bots"
276282
>
277283
<PageRows>

‎app/src/components/approvals/waiting.tsx‎

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ import {
44
approvalPhrase,
55
approvalWords,
66
} from "@openbot/shared/tool-name";
7+
import { useMutation, useQuery } from "@tanstack/react-query";
8+
import { useNavigate } from "@tanstack/react-router";
9+
import { Fragment, type ReactNode, useState } from "react";
10+
import { BotOrb } from "@/components/agents/bot-orb";
11+
import { ShareDetails, shareOf } from "@/components/approvals/share-details";
712
import {
813
IconDots,
914
IconHandStop,
1015
IconMessageQuestion,
1116
IconX,
1217
} from "@/components/icons";
13-
import { useMutation, useQuery } from "@tanstack/react-query";
14-
import { useNavigate } from "@tanstack/react-router";
15-
import { Fragment, type ReactNode, useState } from "react";
16-
import { BotOrb } from "@/components/agents/bot-orb";
17-
import { ShareDetails, shareOf } from "@/components/approvals/share-details";
1818
import { PageRows } from "@/components/layout/page-shell";
1919
import {
2020
BoardRow,
@@ -63,12 +63,12 @@ import {
6363
decideApprovalMutationOptions,
6464
dismissPersonQuestionMutationOptions,
6565
} from "@/lib/approvals";
66+
import { failureSaid } from "@/lib/load-failure";
6667
import { readFailure } from "@/lib/read-failure";
6768
import { relativeTime } from "@/lib/relative-time";
6869
import type { WaitingWhere } from "@/lib/tasks/groups";
6970
import { cn } from "@/lib/utils";
7071
import { queryClient } from "@/query-client";
71-
import { failureSaid } from "@/lib/load-failure";
7272

7373
type WaitingQuestion = ApprovalInboxData["questions"][number];
7474
type WaitingRequest = ApprovalInboxData["requests"][number];
@@ -823,7 +823,10 @@ export function WaitingForYou({
823823
</p>
824824
) : null}
825825
{rows.length > 0 ? (
826-
<PageRows>
826+
<PageRows
827+
// A question and an approval are told apart by their marks, so the tiles stay.
828+
icons
829+
>
827830
{rows.map((row, index) => (
828831
<Fragment key={row.key}>
829832
{index > 0 ? <Separator /> : null}

‎app/src/components/artifacts/artifacts-page.tsx‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,10 @@ export function ArtifactsPage({
247247
))}
248248
</ul>
249249
) : (
250-
<PageRows>
250+
<PageRows
251+
// Each row is told apart by what kind of file it is, so the tiles stay.
252+
icons
253+
>
251254
{artifacts.map((artifact, index) => (
252255
<div key={artifact.id}>
253256
{index > 0 ? <Separator /> : null}

‎app/src/components/bot-profile/access.tsx‎

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1+
import { useMutation, useQuery } from "@tanstack/react-query";
2+
import { Link } from "@tanstack/react-router";
3+
import { Fragment } from "react";
14
import {
25
IconApps,
36
IconBox,
47
IconChevronRight,
58
IconPlug,
69
IconPlus,
710
} from "@/components/icons";
8-
import { useMutation, useQuery } from "@tanstack/react-query";
9-
import { Link } from "@tanstack/react-router";
10-
import { Fragment } from "react";
1111
import {
1212
PageEmpty,
1313
PageRows,
@@ -219,7 +219,10 @@ function YourApps({ agent }: { agent: AgentProfile }) {
219219
Connect an app to let your Bots use it.
220220
</PageEmpty>
221221
) : (
222-
<PageRows>
222+
<PageRows
223+
// Each app is told apart by its own mark, so the tiles stay.
224+
icons
225+
>
223226
{rows.map((app, index) => {
224227
const granted = app.access?.granted ?? false;
225228
const locked = granted && !app.access?.givenByOwner;
@@ -534,7 +537,10 @@ function Granted({
534537
)}
535538
</PageEmpty>
536539
) : (
537-
<PageRows>
540+
<PageRows
541+
// Each app is told apart by its own mark, so the tiles stay.
542+
icons
543+
>
538544
{shownStates.map((app, index) => {
539545
const labels = tools.get(app.key) ?? [];
540546
return (

‎app/src/components/layout/loading-rows.tsx‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import { cn } from "@/lib/utils";
77
const WIDTHS = ["w-40", "w-32", "w-48", "w-36", "w-44"] as const;
88

99
/**
10-
* The shape of a list that hasn't loaded yet: the same card of `Item` rows it will be, with bars
11-
* where the title and description go.
10+
* The shape of a list that hasn't loaded yet: the same `Item` rows it will be, with bars where the
11+
* title and description go.
1212
*
1313
* Built from the real `PageRows` and `Item`, so each placeholder row is as tall as a loaded one and
1414
* nothing jumps when the rows arrive. Shown only for a first load: a list that has data keeps it
@@ -20,13 +20,16 @@ const WIDTHS = ["w-40", "w-32", "w-48", "w-36", "w-44"] as const;
2020
export function LoadingRows({
2121
label,
2222
rows = 3,
23-
media = "icon",
23+
media = "none",
2424
className,
2525
}: {
2626
/** What is loading, read once: "Loading your Bots". */
2727
label: string;
2828
rows?: number;
29-
/** The leading mark the loaded rows have: a 32px icon tile, or a round avatar. */
29+
/**
30+
* The leading mark the loaded rows have: a 32px icon tile (only on a list that draws its tiles,
31+
* `PageRows icons`), a round avatar, or none, as most lists have.
32+
*/
3033
media?: "icon" | "avatar" | "none";
3134
className?: string;
3235
}) {

0 commit comments

Comments
 (0)