Skip to content

Commit ec8c6f6

Browse files
committed
Merge main into readable-answers
theme.css: main's whole-pixel type scale (#2698), with the conversation at 15px and the message box at 16px on a touch screen. CHANGELOG: this branch's lines move to Unreleased, since 1.2.6 and 1.2.7 have shipped, and the 15px line no longer says it matches the app's other text.
2 parents d015198 + d6662f5 commit ec8c6f6

786 files changed

Lines changed: 66197 additions & 9970 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: 71 additions & 34 deletions
Large diffs are not rendered by default.

‎.env.example‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,8 @@ OPENAI_API_KEY=
333333
AGENT_COMPUTER_URL=http://localhost:4100
334334
# Secret every computer requires from its caller. `agent-computer` drives a browser holding real
335335
# logins, while policy, audit and sign-in live in the API server. The computer refuses to start
336-
# without this value and refuses every request that does not present it. Use a long random value;
337-
# `scripts/start.sh` sets a development one for you.
336+
# without this value and refuses every request that does not present it. Use a long random value
337+
# (`openssl rand -hex 32`); `scripts/start.sh` generates one and writes it here. There is no default.
338338
COMPUTER_TOKEN=
339339
# Local only, and commented out because this file gets copied. Uncommenting it lets a Bot browse this
340340
# machine's own services, which is what a laptop wants and what a deployment must never have: it
@@ -517,7 +517,8 @@ MANAGED_AGENT_TOKEN=
517517
# Bot's shell could read the person's logins off the disk.
518518
COMPUTER_SUPERVISOR_URL=
519519
# Shared with the supervisor. Not the security boundary, its four verbs are, but it keeps anything
520-
# else that can reach the port from cycling a Bot's computer.
520+
# else that can reach the port from cycling a Bot's computer. The supervisor refuses to start
521+
# without it; `scripts/start.sh` generates one and writes it here. There is no default.
521522
SUPERVISOR_TOKEN=
522523
# Set to runsc to run every computer under gVisor, if the host has it. Unset, a computer is an
523524
# ordinary container and shares the host kernel, which is worth knowing when the Bot is not ours.
Lines changed: 53 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
11
name: Stop on failure
22
description: >-
3-
Marks this run as failed, so Stop on failure (ci-stop.yml, scripts/ci-stop.ts) cancels the rest of
4-
it at once, and from CI the pull request's other checks too. A job's last step, with `if: failure()`.
3+
Cancels this run at once, and from CI the pull request's Desktop run on the same commit too. A
4+
job's last step, with `if: failure()`. The job needs `actions: write`.
55
6-
# Only on a pull request from this repository: the one run Stop on failure watches. A fork's token
7-
# cannot cancel anything, and a merge group, a push to main, a schedule and the release's own call
8-
# of these checks (whose event is the release's push) run everything, as they always have.
6+
# A pull request's checks stop at the first failure rather than running to the end. The failing job
7+
# cancels its own run here, with its own token, so stopping holds no runner of its own: it used to
8+
# be a watcher workflow (ci-stop.yml) that sat on a 16-core runner for the whole of every pull
9+
# request's CI, polling for a failure, and took slots CI's real jobs were queued for.
910
#
10-
# Why a mark and not `gh run cancel` here: cancelling needs `actions: write`, and the release calls
11-
# CI granting `actions: read`. A called job cannot ask for more than its caller grants, so a job here
12-
# that asked for it would stop the release's call of CI from starting. An artifact needs no grant.
11+
# `verify` still runs on a cancelled CI run, since it runs always(), and reports the failure, so the
12+
# required check is red, never skipped. A failure in CI cancels the pull request's Desktop run on the
13+
# same commit too, since the pull request cannot merge anyway. A failure in Desktop cancels only
14+
# Desktop: its checks are not required, so its failure must not turn CI's required check red.
15+
#
16+
# The failing job itself is recorded as cancelled, since its run is cancelled while it runs this
17+
# step. So this step names it in an error, which stays on the job, and `verify` names every job with
18+
# a failed step. Re-run failed jobs re-runs the cancelled ones with it.
19+
#
20+
# Only on a pull request from this repository. A fork's token is read-only, so it could not cancel,
21+
# and its checks run to the end as before. A merge group, a push to main and the release's own call
22+
# of CI run everything, as they always have.
1323
#
1424
# Why an action and not a `run:` step: the upstream upgrade (scripts/integrate-upstream.ts) runs
1525
# the `run` steps of ci.yml's `static` and `test` jobs as written and refuses one with a condition.
@@ -21,15 +31,40 @@ runs:
2131
- if: always() && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
2232
shell: bash
2333
env:
34+
GH_TOKEN: ${{ github.token }}
35+
REPOSITORY: ${{ github.repository }}
36+
RUN_ID: ${{ github.run_id }}
2437
JOB: ${{ github.job }}
38+
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
39+
# "<owner>/<repo>/.github/workflows/<file>@<ref>": which workflow this run is.
40+
WORKFLOW_REF: ${{ github.workflow_ref }}
41+
# The required workflow, whose failure stops the other one too.
42+
PRIMARY: .github/workflows/ci.yml
43+
OTHERS: .github/workflows/desktop.yml
2544
run: |
26-
mkdir -p "$RUNNER_TEMP/stop-on-failure"
27-
printf '%s\n' "$JOB" > "$RUNNER_TEMP/stop-on-failure/job.txt"
28-
# The name is scripts/ci-stop.ts's STOP_ARTIFACT. Several failing jobs write the same one.
29-
- if: always() && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
30-
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
31-
with:
32-
name: stop-on-failure
33-
path: ${{ runner.temp }}/stop-on-failure
34-
overwrite: true
35-
retention-days: 1
45+
set -uo pipefail
46+
echo "::error title=Stopped at the first failure::$JOB failed, so this run is cancelled here. Its log above shows the step that failed."
47+
workflow=".github/workflows/${WORKFLOW_REF#*/.github/workflows/}"
48+
workflow="${workflow%%@*}"
49+
if [ "$workflow" = "$PRIMARY" ]; then
50+
for path in $OTHERS; do
51+
ids=$(gh api "repos/$REPOSITORY/actions/runs?head_sha=$HEAD_SHA&event=pull_request&per_page=100" \
52+
--jq ".workflow_runs[] | select((.path | split(\"@\")[0]) == \"$path\" and .status != \"completed\") | .id") \
53+
|| { echo "::warning::Could not list the pull request's $path runs, so they run to the end."; ids=""; }
54+
ids="${ids//$'\r'/}" # Windows' gh ends its lines with CRLF.
55+
for id in $ids; do
56+
if gh run cancel "$id" --repo "$REPOSITORY"; then
57+
echo "Cancelled run $id ($path): $JOB failed in run $RUN_ID."
58+
else
59+
echo "::warning::Could not cancel run $id ($path); it may be over already."
60+
fi
61+
done
62+
done
63+
fi
64+
# Last, since cancelling this run ends this step too. Another failed job may have cancelled
65+
# it first, which GitHub answers with a conflict.
66+
if gh run cancel "$RUN_ID" --repo "$REPOSITORY"; then
67+
echo "Cancelled this run ($workflow): $JOB failed."
68+
else
69+
echo "::warning::Could not cancel this run; another failed job may have cancelled it already."
70+
fi

‎.github/ci-budgets.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"build": 3,
3333
"component list": 1,
3434
"component dockerfile (*)": 10,
35+
"release note": 1,
3536
"verify": 1
3637
}
3738
},

‎.github/pull_request_template.md‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,18 @@ conditional update, `LISTEN`/`NOTIFY` for fan-out.
4242

4343
## Changelog
4444

45-
- [ ] A line in `CHANGELOG.md` under `Unreleased`, or a sentence on why a deployment behaves no
46-
differently afterwards.
45+
<!--
46+
The release note. The release copies it into CHANGELOG.md; never edit CHANGELOG.md yourself, CI
47+
refuses a pull request that does. Write it for the person running OpenBot, deciding whether to
48+
upgrade: what a deployment does differently afterwards. Put each line under a bold heading on a line
49+
of its own, the way CHANGELOG.md does (**Before upgrading.**, **API.**, **OpenBot Desktop.**, or a
50+
heading of your own), and name anything you deprecate in backticks with its sunset under
51+
**Before upgrading.** Write none instead when nobody running OpenBot would notice.
52+
53+
**API.**
54+
55+
- **Added: what it is.** What a deployment does differently, and what to do about it.
56+
-->
4757

4858
## Proof
4959

‎.github/workflows/ci-stop.yml‎

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)