Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
4fc0c3a
ci: count clicks and keystrokes per feature, with a baseline
claude Oct 10, 2026
e7409ba
ci(clicks): read --compare from the caller's folder; scroll past a co…
claude Oct 10, 2026
8eee90d
ci(clicks): summary step without A && B || C
claude Oct 10, 2026
87d9366
Merge remote-tracking branch 'origin/claude/project-thread-th17qg' in…
claude Oct 10, 2026
7c8dbe5
ci(clicks): survey every module, and on a phone with taps and swipes
claude Oct 10, 2026
37473aa
Merge remote-tracking branch 'origin/main' into claude/project-thread…
claude Oct 10, 2026
298e1ca
ci(clicks): steady phone swipes and journey waits
claude Oct 10, 2026
38dd0db
Merge remote-tracking branch 'origin/main' into claude/project-thread…
claude Oct 10, 2026
dfdf90d
ci(clicks): tap New conversation where Chat opens on the list
claude Oct 10, 2026
c598a1e
ci(clicks): phone baseline on main with the setup and Notes cuts
claude Oct 10, 2026
32c0cd0
ci(clicks): wait for the imports' analysis before finding an entity
claude Oct 10, 2026
88b6965
ci(clicks): wait on the Entities page, not the API
claude Oct 10, 2026
2e009b9
Merge remote-tracking branch 'origin/main' into claude/project-thread…
claude Oct 10, 2026
4fbee6c
ci(clicks): baselines on main with one-click install and named pipelines
claude Oct 10, 2026
2094a5c
Merge remote-tracking branch 'origin/main' into claude/project-thread…
claude Oct 10, 2026
1a83d25
ci(clicks): make the podcast journey pick the pasted transcript
claude Oct 11, 2026
1a53a87
Merge remote-tracking branch 'origin/main' into claude/project-thread…
claude Oct 11, 2026
bcd7836
ci(clicks): baselines on main with the graph opening on your data
claude Oct 11, 2026
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
28 changes: 20 additions & 8 deletions .github/workflows/clicks.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Clicks

# Drives a fresh Lens through setup and its main features and counts the clicks and keystrokes each takes
# (ci/clicks). A journey that takes more than ci/clicks/baseline.json says, or fails, turns this red; a change that
# takes fewer updates the baseline in the same pull request.
# Drives a fresh Lens through setup and its main features, on a computer and on a phone, and counts the clicks (taps),
# keystrokes, swipes and passkey touches each takes (ci/clicks). A journey that takes more than ci/clicks/baseline.json
# (baseline-phone.json) says, or fails, turns this red; a change that takes fewer updates the baseline in the same pull
# request.
on:
push:
branches: [main]
Expand All @@ -26,7 +27,7 @@ jobs:
clicks:
name: Clicks and keystrokes per feature
runs-on: ${{ fromJSON(vars.CI_RUNNER || '"ubuntu-latest"') }}
timeout-minutes: 40
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v7
Expand All @@ -48,14 +49,25 @@ jobs:
(cd fastapi_backend && uv sync --frozen)
(cd nextjs-frontend && pnpm install --frozen-lockfile && pnpm build)
(cd ci/clicks && npm ci && npx playwright install --with-deps chromium)
- name: Survey
# rclone, the version the Lens image carries (fastapi_backend/Dockerfile), for watching a folder
mkdir -p "$RUNNER_TEMP/bin"
c=$(docker create rclone/rclone:1.75.1)
docker cp "$c:/usr/local/bin/rclone" "$RUNNER_TEMP/bin/rclone"
docker rm "$c"
echo "$RUNNER_TEMP/bin" >> "$GITHUB_PATH"
- name: Survey on a computer
run: ci/clicks/run.sh --compare ci/clicks/baseline.json --fail-on-regression
- name: Survey on a phone
if: success() || failure()
run: ci/clicks/run.sh --device phone --compare ci/clicks/baseline-phone.json --fail-on-regression
- name: Summary
if: always()
run: |
if [ -f ci/clicks/results/clicks.md ]; then
sed -n '1,/^## Per page/p' ci/clicks/results/clicks.md >> "$GITHUB_STEP_SUMMARY"
fi
for f in clicks clicks-phone; do
if [ -f "ci/clicks/results/$f.md" ]; then
sed -n '1,/^## Per page/p' "ci/clicks/results/$f.md" >> "$GITHUB_STEP_SUMMARY"
fi
done
- uses: actions/upload-artifact@v7
if: always()
with:
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,12 @@ affected: node_modules/.bin/nx ## Lint, type check, test and build only the proj
# Run it (Docker)
PROD_COMPOSE=$(DOCKER_COMPOSE) -f docker-compose.prod.yml
.PHONY: clicks
clicks: env ## Count the clicks and keystrokes each journey takes on a fresh Lens (ci/clicks), compared with the baseline
clicks: env ## Count the clicks, keys and taps each journey takes on a fresh Lens, computer and phone (ci/clicks), vs the baselines
cd $(BACKEND_DIR) && uv sync
cd $(FRONTEND_DIR) && pnpm install && pnpm run build
cd ci/clicks && npm ci
ci/clicks/run.sh --compare ci/clicks/baseline.json
ci/clicks/run.sh --device phone --compare ci/clicks/baseline-phone.json

.PHONY: run dev stop setup-code logs

Expand Down
31 changes: 23 additions & 8 deletions ci/clicks/README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,49 @@
# Clicks and keystrokes per feature
# Clicks, keystrokes and taps per feature

A survey of what Lens asks of people: it drives a fresh Lens in Chromium from the install wizard through setup and
each main feature, the way a person would with the defaults, and counts the clicks, keystrokes and passkey touches
each takes, per feature, per module and per page. `baseline.json` is the last accepted run; CI (the Clicks
workflow) fails a pull request whose journeys take more, so friction only goes down.
each takes, per feature, per module and per page. It runs twice: on a computer (1400x900) and on a phone (Pixel 7,
412x839, touch), where clicks are taps, swipes are counted and there are no keyboard shortcuts. `baseline.json` and
`baseline-phone.json` are the last accepted runs; CI (the Clicks workflow) fails a pull request whose journeys take
more, so friction only goes down.

```sh
make clicks # builds, then runs the survey and compares with the baseline
make clicks # builds, then runs the survey on both and compares with the baselines
ci/clicks/run.sh --only chat-ask,note-create # some journeys (ids in journeys.mjs)
ci/clicks/run.sh --device phone --compare ci/clicks/baseline-phone.json
```

`run.sh` starts a Lens of its own on a temporary database and data folder (ports 3000, 8000, 3990 and 11434 must be
free), a stand-in OpenAI-compatible model on 11434 (`fake-model.mjs`, so the installer and the setup wizard find a
local model and the assistant answers), and the web installer with a stand-in for install.sh (`fake-install.sh`).
Results go to `results/clicks.json` and `results/clicks.md`.
rclone must be on the PATH, as it is in the Lens image (the Clicks workflow copies the image's version). Results go to
`results/clicks.json` and `results/clicks.md` (`clicks-phone.*` for the phone), with the API's log beside them
(`backend.log`, `backend-phone.log`) and a screenshot of each journey that failed.

## What counts

- **Clicks**: each mouse click. Typing into a field that doesn't have the focus adds the click that focuses it.
Choosing from a native select is two; a file chooser is two (the button, then the file).
- **Keys**: each character typed, plus each key or shortcut pressed (Enter, Ctrl+K, Ctrl+S count one). A paste is one.
- **Prompts**: passkey touches.
- **On a phone** a click is a tap, counted the same way. A **swipe** is counted when the control to tap or type into
is off the screen (down the page, or along a strip that scrolls sideways) and has to be brought into view. Keyboard
shortcuts don't exist there, so journeys use the buttons (Save, the Jump to box, the menu button for the
navigation).
- **Outside the browser**: steps in the terminal, the assistant being connected or the browser's print dialog are
counted on the page `(outside the browser)`.
- A step whose control is covered by something else (the floating Ask button) is still one click, marked
"covered" in the steps.
- **Per page**: reach is clicks from Home through the sidebar (sections and tabs are two); controls are the buttons,
links and fields in the page's main area on a fresh install, not counting navigation.

Journeys run in order on the same Lens, each from Home unless it continues the one before (setup does).
Journeys run in order on the same Lens, each from Home unless it continues the one before (setup does). A journey
that can't be done at all (on a phone, say, where the namespace switcher is hidden) fails with the reason; it is in
the baseline as failed, so it doesn't turn CI red until it can be done, and then it counts as an improvement.

## When a change cuts clicks

Run the survey, check `results/clicks.md` shows the journey going down, and copy `results/clicks.json` over
`baseline.json` in the same pull request. A new journey goes at the end of `journeys.mjs` with an id that stays.
Run the survey, check `results/clicks.md` (and `clicks-phone.md`) shows the journey going down, and copy
`results/clicks.json` over `baseline.json` (`clicks-phone.json` over `baseline-phone.json`) in the same pull
request; the Clicks workflow's `clicks` artifact has both from CI. A new journey goes at the end of `journeys.mjs`
with an id that stays.
Loading
Loading