Skip to content

Commit 65e6a6b

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/row-description-text-sm
# Conflicts: # .claude/skills/openbot-screen-layout/SKILL.md # app/src/components/layout/page-parts.tsx # app/src/components/ui/item.tsx # docs/app-guidelines.md
2 parents ccf52fb + 7e097af commit 65e6a6b

124 files changed

Lines changed: 16188 additions & 2143 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.claude/skills/openbot-copy/SKILL.md‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,11 @@ because the admin is the one who sets them. A page anybody can open may not.
111111
"OK" when it does something specific.
112112
9. **Errors**: what failed, in the person's terms, and one next step. "Couldn't load your
113113
connections. Try again in a moment." No stack of reasons, no blame. Never "Reload the page": the
114-
same screens show in the OpenBot Desktop window, which has no reload button. While OpenBot
115-
Desktop can't reach the OpenBot it is connected to, one line says so and the screens wait
116-
(`lib/desktop/connection-lost.ts`), so a section's error is never the place to name that cause.
114+
same screens show in the OpenBot Desktop window, which has no reload button. While the person
115+
is offline or OpenBot isn't answering, in a browser or in OpenBot Desktop, one line says so and
116+
the screens wait (`lib/desktop/connection-lost.ts`): "You're offline, or {host} isn't
117+
answering. OpenBot will reconnect by itself." A section's error is never the place to name that
118+
cause, and a network failure is never told as being signed out.
117119
`tests/no-reload-the-page-in-user-copy.test.ts` reads every shown string.
118120
10. **Empty states** say what will appear and how: "No skills yet. Write one with New skill."
119121

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

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@ PageShell the page: header (title, description, action, backButton) then
5454
`PageShell` takes a `width`: `prose` (`max-w-3xl`, 768px) is the default, and every
5555
configuration screen uses it so no screen is wider than another. Sentences inside it are held to
5656
`max-w-prose`, so the column has room for a label beside its control without stretching the text.
57-
`wide` (`max-w-5xl`) exists for one screen — `admin/audit.tsx`, because an audit log is a table to be
58-
scanned and prose width would wrap every row. It is not a licence for anything else to be wide.
57+
`wide` (`max-w-4xl`, 896px) is for a grid of cards picked out by how they look: the Artifacts
58+
gallery, three cards a row on a desktop window. `full` (no column) exists for one screen, the audit
59+
log (`manage/audit-page.tsx`), because it is a table to be scanned and prose width would wrap every
60+
row. Neither is a licence for rows or forms to be wide.
5961

6062
## The Rhythm
6163

@@ -72,7 +74,7 @@ components above; a screen that sets its own is drifting.
7274
| Section heading → description | 4px | `PageSection` |
7375
| Heading block → section content | 16px | `PageRows` / `PageEmpty` (`mt-4`) |
7476
| Controls stacked inside a section | 12px | the screen, with `gap-3` |
75-
| A row in `PageRows` | 69px with a description, never under 56px | `Item` (`px-4 py-3.5 gap-3`), `PageRows` (`min-h-14`) |
77+
| A row in `PageRows` | 71px with a description, never under 56px | `Item` (`px-4 py-3.5 gap-3`), `PageRows` (`min-h-14`) |
7678
| Divider between rows | inset 16px from both edges | `PageRows`, on every horizontal `Separator` inside it |
7779

7880
The 32px under the title is deliberately tighter than the 48px between sections: the title belongs
@@ -204,10 +206,8 @@ Only where the request asks for a dialog (Screens, Not Dialogs).
204206
## Units
205207

206208
The root is the browser's 16px, so Tailwind's spacing, sizes and widths are their documented values
207-
(`p-4` is 16px, `max-w-3xl` is 768px) and land on its 4px grid. Text is the exception: `styles.css`
208-
sets every `--text-*` to Tailwind's default times 15/16, so `text-sm` is 13.125px and body text is
209-
15px. That is the scale this app has always read at; do not size text in px or rem by hand to match
210-
the docs.
209+
(`p-4` is 16px, `max-w-3xl` is 768px) and land on its 4px grid. Text is on Tailwind's own scale
210+
too: `text-xs` is 12px, `text-sm` 14px and body text 16px. Do not size text in px or rem by hand.
211211

212212
Even so, never hardcode a pixel constant derived from a Tailwind token, and never compute a ratio
213213
from one. Measure the element — `offsetWidth`, `clientWidth`, a `ResizeObserver` — and scale from what
@@ -227,7 +227,8 @@ is actually on screen. The root was once 15px, and every constant taken from the
227227
- A width, ratio or scale needs a number in pixels → the Units section. Measure, do not assume.
228228
- Choosing a margin or gap between blocks → the Rhythm table. If the frame already gives it, set none.
229229
- The screen genuinely does not fit this shape → say so in the response and comment the reason in the
230-
code. There are two accepted precedents: a table (`admin/audit.tsx`, `width="wide"`), and the
230+
code. There are three accepted precedents: a table (the audit log, `width="full"`), the
231+
Artifacts gallery (`width="wide"`, a grid of cards), and the
231232
Connections tiles (`connections.index.tsx`), a grid of separate `variant="outline"` cards, 56px
232233
tall and 12px apart, because apps are picked out by their mark rather than read down as a list.
233234
- The question is which states the screen renders while loading or failing → not this skill;
@@ -239,7 +240,7 @@ is actually on screen. The root was once 15px, and every constant taken from the
239240
|--------|---------------|------------|
240241
| 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` |
241242
| Rows separated by `gap-*` instead of `<Separator />` | A stack of cards rather than one card of rows | `<Separator />` between rows, none after the last |
242-
| `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 |
243+
| `width="wide"` or `"full"` on rows or a form | Prose width is the default for a reason; the others are for a grid of cards and a table | Leave `width` alone |
243244
| 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 |
244245
| Children on an element passed to `Item`'s `render` | They replace the row's own children; the row draws empty | Pass a childless element |
245246
| `bg-card` on a row inside a dialog | `--card` equals `--popover`; the row is invisible | `variant="muted"` |

‎.github/workflows/ci.yml‎

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,22 +1159,54 @@ jobs:
11591159
REPOSITORY: ${{ github.repository }}
11601160
RUN_ID: ${{ github.run_id }}
11611161
RUN_ATTEMPT: ${{ github.run_attempt }}
1162+
# What failed, one line per job, from this attempt's jobs (every page, slurped). A job that
1163+
# stopped its run at its first failure is recorded as cancelled, and so is every job it
1164+
# stopped, `changes` included, so the results above cannot say which job it was: it is
1165+
# the cancelled job with a failed step, and the first such is named as the one that
1166+
# stopped the run. Left out, as consequences of an earlier failure: a job that started
1167+
# after the stop (only always() jobs start on a cancelled run), and `tests` when a shard
1168+
# did not pass, since its check is that every shard passed. A job's full name is one line,
1169+
# never split at its commas ("format, lint, types"). A run cancelled with no failed job
1170+
# says so, so it is not mistaken for a stop (scripts/verify-failures.test.ts).
1171+
NAME_FAILURES: |
1172+
def line: "\(.name) failed at \"\(.failed_at.name)\"";
1173+
[.[].jobs[]] as $jobs
1174+
| ([$jobs[] | select(any(.steps[]?; .conclusion == "failure"))
1175+
| . + {failed_at: first(.steps[] | select(.conclusion == "failure"))}]
1176+
| sort_by(.failed_at.completed_at)) as $failed
1177+
| any($jobs[]; (.name | startswith("tests (shard ")) and .conclusion != "success" and .conclusion != "skipped") as $shard_down
1178+
| [$failed[] | select(.name != "tests" or ($shard_down | not))] as $failed
1179+
| [$failed[] | select(.conclusion == "cancelled")] as $stoppers
1180+
| if ($stoppers | length) > 0 then
1181+
$stoppers[0] as $stop
1182+
| "Stopped the run: \($stop | line). Its log shows why; the jobs it stopped are marked cancelled.",
1183+
($failed[] | select(.name != $stop.name and .started_at <= $stop.failed_at.completed_at) | "Also failed: \(line).")
1184+
elif ($failed | length) > 0 then
1185+
$failed[] | "Failed: \(line)."
1186+
elif any($jobs[]; .conclusion == "cancelled") then
1187+
"No job failed: the run was cancelled from outside it, by a newer push, the merge queue or a person."
1188+
else empty end
11621189
run: |
11631190
set -euo pipefail
11641191
echo "$RESULTS"
11651192
if [ -n "$QUEUE_RUN" ]; then
11661193
echo "::notice::Tested in the merge queue: $QUEUE_RUN"
11671194
echo "Tested in the merge queue: $QUEUE_RUN" >> "$GITHUB_STEP_SUMMARY"
11681195
fi
1169-
# The jobs with a failed step, named first: a job that stopped its run at its first failure
1170-
# is recorded as cancelled, and so is every job it stopped, `changes` included.
1196+
# What failed, named before every red exit (NAME_FAILURES above says how), on the job and
1197+
# at the top of the run's summary.
11711198
name_failures() {
1172-
if ! failed=$(gh api --paginate "repos/$REPOSITORY/actions/runs/$RUN_ID/attempts/$RUN_ATTEMPT/jobs?per_page=100" \
1173-
--jq '.jobs[] | select(any(.steps[]?; .conclusion == "failure")) | .name'); then
1199+
local named line
1200+
if ! named=$(gh api --paginate "repos/$REPOSITORY/actions/runs/$RUN_ID/attempts/$RUN_ATTEMPT/jobs?per_page=100" \
1201+
| jq -rs "$NAME_FAILURES"); then
11741202
echo "::warning::Could not read this run's jobs to name the ones that failed."
1175-
elif [ -n "$failed" ]; then
1176-
echo "::error::Failed: $(echo "$failed" | paste -sd ',' - | sed 's/,/, /g'). Their logs show the step that failed."
1203+
return 0
11771204
fi
1205+
while IFS= read -r line; do
1206+
[ -n "$line" ] || continue
1207+
echo "::error::$line"
1208+
echo "- $line" >> "$GITHUB_STEP_SUMMARY"
1209+
done <<< "$named"
11781210
}
11791211
if [ "$CHANGES" != success ]; then
11801212
name_failures

0 commit comments

Comments
 (0)