From 4fc0c3adb13688386c41d9894628f3ccf837b96c Mon Sep 17 00:00:00 2001 From: Adeel Ahmad Date: Sat, 10 Oct 2026 20:29:05 +0000 Subject: [PATCH 01/15] ci: count clicks and keystrokes per feature, with a baseline A Playwright survey (ci/clicks) drives a fresh Lens from the web installer through setup and 19 features, counting clicks, keys and passkey prompts per feature, module and page. The Clicks workflow fails when a journey takes more than baseline.json. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_018XZkebEbpvyi9y3qmDVD8V --- .github/workflows/clicks.yml | 60 ++ Makefile | 7 + ci/clicks/.gitignore | 2 + ci/clicks/README.md | 34 + ci/clicks/baseline.json | 1184 ++++++++++++++++++++++++++++++++++ ci/clicks/fake-install.sh | 8 + ci/clicks/fake-model.mjs | 59 ++ ci/clicks/journeys.mjs | 313 +++++++++ ci/clicks/meter.mjs | 127 ++++ ci/clicks/package-lock.json | 57 ++ ci/clicks/package.json | 12 + ci/clicks/report.mjs | 114 ++++ ci/clicks/run.sh | 45 ++ ci/clicks/survey.mjs | 179 +++++ 14 files changed, 2201 insertions(+) create mode 100644 .github/workflows/clicks.yml create mode 100644 ci/clicks/.gitignore create mode 100644 ci/clicks/README.md create mode 100644 ci/clicks/baseline.json create mode 100755 ci/clicks/fake-install.sh create mode 100644 ci/clicks/fake-model.mjs create mode 100644 ci/clicks/journeys.mjs create mode 100644 ci/clicks/meter.mjs create mode 100644 ci/clicks/package-lock.json create mode 100644 ci/clicks/package.json create mode 100644 ci/clicks/report.mjs create mode 100755 ci/clicks/run.sh create mode 100644 ci/clicks/survey.mjs diff --git a/.github/workflows/clicks.yml b/.github/workflows/clicks.yml new file mode 100644 index 000000000..c4fd80c28 --- /dev/null +++ b/.github/workflows/clicks.yml @@ -0,0 +1,60 @@ +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. +on: + push: + branches: [main] + pull_request: + paths: + - "nextjs-frontend/**" + - "fastapi_backend/app/**" + - "installer/**" + - "ci/clicks/**" + - ".github/workflows/clicks.yml" + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +permissions: + contents: read + +jobs: + clicks: + name: Clicks and keystrokes per feature + runs-on: ${{ fromJSON(vars.CI_RUNNER || '"ubuntu-latest"') }} + timeout-minutes: 40 + steps: + - uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v7 + with: + cache-local-path: ${{ runner.environment == 'self-hosted' && format('{0}/uv-cache', runner.tool_cache) || '' }} + python-version: "3.12" + - uses: pnpm/action-setup@v6 + with: + package_json_file: nextjs-frontend/package.json + run_install: false + - uses: actions/setup-node@v7 + with: + node-version: "22" + cache: ${{ runner.environment == 'github-hosted' && 'pnpm' || '' }} + cache-dependency-path: nextjs-frontend/pnpm-lock.yaml + - name: Install + run: | + make env + (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 + run: ci/clicks/run.sh --compare ci/clicks/baseline.json --fail-on-regression + - name: Summary + if: always() + run: test -f ci/clicks/results/clicks.md && sed -n '1,/^## Per page/p' ci/clicks/results/clicks.md >> "$GITHUB_STEP_SUMMARY" || true + - uses: actions/upload-artifact@v7 + if: always() + with: + name: clicks + path: ci/clicks/results/ diff --git a/Makefile b/Makefile index 24ce7c0e6..f32d7cae8 100644 --- a/Makefile +++ b/Makefile @@ -49,6 +49,13 @@ docs-build: ## Build the documentation site, failing on broken links # 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 + 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 + .PHONY: run dev stop setup-code logs run: .env ## Build once and run the whole stack, no hot reload (the fast way to use it): http://localhost:3000 diff --git a/ci/clicks/.gitignore b/ci/clicks/.gitignore new file mode 100644 index 000000000..d1f24e07f --- /dev/null +++ b/ci/clicks/.gitignore @@ -0,0 +1,2 @@ +node_modules/ +results/ diff --git a/ci/clicks/README.md b/ci/clicks/README.md new file mode 100644 index 000000000..4bb9c4364 --- /dev/null +++ b/ci/clicks/README.md @@ -0,0 +1,34 @@ +# Clicks and keystrokes 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. + +```sh +make clicks # builds, then runs the survey and compares with the baseline +ci/clicks/run.sh --only chat-ask,note-create # some journeys (ids in journeys.mjs) +``` + +`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`. + +## 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. +- 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). + +## 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. diff --git a/ci/clicks/baseline.json b/ci/clicks/baseline.json new file mode 100644 index 000000000..97dcfc0d1 --- /dev/null +++ b/ci/clicks/baseline.json @@ -0,0 +1,1184 @@ +{ + "surveyed": "2026-10-10T20:28:52.714Z", + "commit": "", + "viewport": "1400x900", + "journeys": [ + { + "module": "Setup", + "feature": "Install with the web installer (defaults, local model found)", + "note": "The install line in a terminal, then the browser installer. The browser opens on its own on a desktop; on a server the link is opened by hand (counted). A computer missing Docker also asks for its password.", + "clicks": 8, + "keys": 2, + "prompts": 0, + "steps": [ + { + "page": "(outside the browser)", + "kind": "terminal", + "what": "paste the install line and press Enter", + "clicks": 0, + "keys": 2, + "prompts": 0 + }, + { + "page": "(outside the browser)", + "kind": "link", + "what": "open the installer link", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "installer:/", + "kind": "click", + "what": "Continue (this computer)", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "installer:/", + "kind": "click", + "what": "Continue (how it runs)", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "installer:/", + "kind": "click", + "what": "pick the model server found on this computer", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "installer:/", + "kind": "click", + "what": "Continue (AI model)", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "installer:/", + "kind": "click", + "what": "Continue (extras)", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "installer:/", + "kind": "click", + "what": "Install Lens", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "installer:/", + "kind": "click", + "what": "Open Lens", + "clicks": 1, + "keys": 0, + "prompts": 0 + } + ], + "id": "install", + "ms": 1925, + "ok": true + }, + { + "module": "Setup", + "feature": "Create the first admin (passkey)", + "note": "From the setup link, which fills in the setup code.", + "clicks": 2, + "keys": 17, + "prompts": 1, + "steps": [ + { + "page": "/setup", + "kind": "type", + "what": "email", + "clicks": 1, + "keys": 17, + "prompts": 0 + }, + { + "page": "/setup", + "kind": "click", + "what": "Create admin with a passkey", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/setup", + "kind": "passkey", + "what": "create the passkey", + "clicks": 0, + "keys": 0, + "prompts": 1 + } + ], + "id": "first-admin", + "ms": 515, + "ok": true + }, + { + "module": "Setup", + "feature": "First-run setup wizard, every step with its defaults", + "note": "The namespaces come from the install's configuration, so the wizard opens on the model provider. Finish with defaults (one click) skips the remaining steps.", + "clicks": 4, + "keys": 0, + "prompts": 0, + "steps": [ + { + "page": "/welcome", + "kind": "click", + "what": "Save and continue (Connect a model provider)", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/welcome", + "kind": "click", + "what": "Save and continue (Storage)", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/welcome", + "kind": "click", + "what": "Save and continue (Apps and AI assistants)", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/welcome", + "kind": "click", + "what": "Save and finish (Telemetry)", + "clicks": 1, + "keys": 0, + "prompts": 0 + } + ], + "id": "setup-wizard", + "ms": 690, + "ok": true + }, + { + "module": "Setup", + "feature": "Ask the first question from the welcome tour", + "note": "", + "clicks": 0, + "keys": 44, + "prompts": 0, + "steps": [ + { + "page": "/", + "kind": "type", + "what": "question", + "clicks": 0, + "keys": 42, + "prompts": 0 + }, + { + "page": "/", + "kind": "key", + "what": "Enter to ask", + "clicks": 0, + "keys": 1, + "prompts": 0 + }, + { + "page": "/chat", + "kind": "key", + "what": "Enter again: the question waits in Chat's composer", + "clicks": 0, + "keys": 1, + "prompts": 0 + } + ], + "id": "first-question", + "ms": 2409, + "ok": true + }, + { + "module": "Import", + "feature": "Import a pasted transcript", + "note": "", + "clicks": 3, + "keys": 1, + "prompts": 0, + "steps": [ + { + "page": "/", + "kind": "click", + "what": "Import (top bar)", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/import", + "kind": "click", + "what": "Paste tab", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/import", + "kind": "paste", + "what": "paste the transcript", + "clicks": 0, + "keys": 1, + "prompts": 0 + }, + { + "page": "/import", + "kind": "click", + "what": "Import (covered by something else on the page)", + "clicks": 1, + "keys": 0, + "prompts": 0 + } + ], + "id": "import-paste", + "ms": 7044, + "ok": true + }, + { + "module": "Library", + "feature": "Open a recording from the Library", + "note": "", + "clicks": 2, + "keys": 0, + "prompts": 0, + "steps": [ + { + "page": "/", + "kind": "click", + "what": "Library", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/library", + "kind": "click", + "what": "the recording", + "clicks": 1, + "keys": 0, + "prompts": 0 + } + ], + "id": "library-open", + "ms": 2819, + "ok": true + }, + { + "module": "Search", + "feature": "Search for a word and see where it was said", + "note": "", + "clicks": 2, + "keys": 10, + "prompts": 0, + "steps": [ + { + "page": "/", + "kind": "click", + "what": "Search", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/search", + "kind": "type", + "what": "the word", + "clicks": 1, + "keys": 9, + "prompts": 0 + }, + { + "page": "/search", + "kind": "key", + "what": "Enter to search", + "clicks": 0, + "keys": 1, + "prompts": 0 + } + ], + "id": "search-word", + "ms": 3260, + "ok": true + }, + { + "module": "Navigation", + "feature": "Jump to a recording with Ctrl+K", + "note": "", + "clicks": 0, + "keys": 9, + "prompts": 0, + "steps": [ + { + "page": "/", + "kind": "key", + "what": "Ctrl+K", + "clicks": 0, + "keys": 1, + "prompts": 0 + }, + { + "page": "/", + "kind": "type", + "what": "part of its title", + "clicks": 0, + "keys": 7, + "prompts": 0 + }, + { + "page": "/", + "kind": "key", + "what": "Enter to open", + "clicks": 0, + "keys": 1, + "prompts": 0 + } + ], + "id": "jump-to", + "ms": 2357, + "ok": true + }, + { + "module": "Chat", + "feature": "Ask the assistant in Chat", + "note": "", + "clicks": 3, + "keys": 34, + "prompts": 0, + "steps": [ + { + "page": "/", + "kind": "click", + "what": "Chat", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/chat", + "kind": "click", + "what": "New conversation", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/chat", + "kind": "type", + "what": "question", + "clicks": 1, + "keys": 33, + "prompts": 0 + }, + { + "page": "/chat", + "kind": "key", + "what": "Enter to send", + "clicks": 0, + "keys": 1, + "prompts": 0 + } + ], + "id": "chat-ask", + "ms": 3638, + "ok": true + }, + { + "module": "Notes", + "feature": "Write a note", + "note": "", + "clicks": 4, + "keys": 36, + "prompts": 0, + "steps": [ + { + "page": "/", + "kind": "click", + "what": "Notes", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/notes", + "kind": "click", + "what": "New note", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/notes/:id", + "kind": "replace", + "what": "title", + "clicks": 1, + "keys": 9, + "prompts": 0 + }, + { + "page": "/notes/:id", + "kind": "type", + "what": "first line", + "clicks": 1, + "keys": 27, + "prompts": 0 + } + ], + "id": "note-create", + "ms": 3515, + "ok": true + }, + { + "module": "Topics", + "feature": "Add a topic", + "note": "", + "clicks": 2, + "keys": 9, + "prompts": 0, + "steps": [ + { + "page": "/", + "kind": "click", + "what": "Topics", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/topics", + "kind": "click", + "what": "Add topic", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/topics", + "kind": "type", + "what": "label", + "clicks": 0, + "keys": 8, + "prompts": 0 + }, + { + "page": "/topics", + "kind": "key", + "what": "Enter to add", + "clicks": 0, + "keys": 1, + "prompts": 0 + } + ], + "id": "topic-add", + "ms": 3026, + "ok": true + }, + { + "module": "Pipelines", + "feature": "Make a pipeline from the standard steps", + "note": "", + "clicks": 3, + "keys": 14, + "prompts": 0, + "steps": [ + { + "page": "/", + "kind": "click", + "what": "Pipelines", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/pipelines", + "kind": "click", + "what": "New pipeline", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/pipelines/new", + "kind": "type", + "what": "name", + "clicks": 0, + "keys": 14, + "prompts": 0 + }, + { + "page": "/pipelines/new", + "kind": "click", + "what": "Create pipeline", + "clicks": 1, + "keys": 0, + "prompts": 0 + } + ], + "id": "pipeline-create", + "ms": 2909, + "ok": true + }, + { + "module": "Routines", + "feature": "Make a nightly routine (sync sources, the default action)", + "note": "", + "clicks": 3, + "keys": 12, + "prompts": 0, + "steps": [ + { + "page": "/", + "kind": "click", + "what": "Routines", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/routines", + "kind": "click", + "what": "New routine", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/routines/new", + "kind": "type", + "what": "name", + "clicks": 0, + "keys": 12, + "prompts": 0 + }, + { + "page": "/routines/new", + "kind": "click", + "what": "Create routine", + "clicks": 1, + "keys": 0, + "prompts": 0 + } + ], + "id": "routine-create", + "ms": 2735, + "ok": true + }, + { + "module": "Extensions", + "feature": "Add the example skill to the assistant", + "note": "", + "clicks": 3, + "keys": 0, + "prompts": 0, + "steps": [ + { + "page": "/", + "kind": "click", + "what": "Extensions", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/extensions", + "kind": "click", + "what": "New", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/extensions/new", + "kind": "click", + "what": "Add to the assistant", + "clicks": 1, + "keys": 0, + "prompts": 0 + } + ], + "id": "extension-add", + "ms": 2637, + "ok": true + }, + { + "module": "Sensors", + "feature": "Make a webhook sensor", + "note": "", + "clicks": 3, + "keys": 0, + "prompts": 0, + "steps": [ + { + "page": "/", + "kind": "click", + "what": "Sensors", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/sensors", + "kind": "click", + "what": "Add sensor", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/sensors", + "kind": "click", + "what": "Make webhook", + "clicks": 1, + "keys": 0, + "prompts": 0 + } + ], + "id": "sensor-webhook", + "ms": 2687, + "ok": true + }, + { + "module": "Settings", + "feature": "Change the model's timeout", + "note": "", + "clicks": 3, + "keys": 5, + "prompts": 0, + "steps": [ + { + "page": "/", + "kind": "click", + "what": "Settings", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/settings/speakers", + "kind": "click", + "what": "LLM provider", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/settings/llm", + "kind": "replace", + "what": "timeout", + "clicks": 1, + "keys": 4, + "prompts": 0 + }, + { + "page": "/settings/llm", + "kind": "key", + "what": "Ctrl+S to save", + "clicks": 0, + "keys": 1, + "prompts": 0 + } + ], + "id": "settings-change", + "ms": 3646, + "ok": true + }, + { + "module": "Admin", + "feature": "Add a person as a viewer", + "note": "", + "clicks": 5, + "keys": 18, + "prompts": 0, + "steps": [ + { + "page": "/", + "kind": "click", + "what": "Admin", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/admin/people", + "kind": "click", + "what": "Create account", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/admin/people", + "kind": "type", + "what": "email", + "clicks": 0, + "keys": 18, + "prompts": 0 + }, + { + "page": "/admin/people", + "kind": "click", + "what": "Create account", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/admin/people", + "kind": "click", + "what": "Copy the sign-in link", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/admin/people", + "kind": "click", + "what": "Done", + "clicks": 1, + "keys": 0, + "prompts": 0 + } + ], + "id": "person-add", + "ms": 3268, + "ok": true + }, + { + "module": "Account", + "feature": "Make an API token", + "note": "", + "clicks": 4, + "keys": 6, + "prompts": 0, + "steps": [ + { + "page": "/", + "kind": "click", + "what": "Account menu", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/", + "kind": "click", + "what": "API tokens", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/account/tokens", + "kind": "click", + "what": "New token", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/account/tokens", + "kind": "type", + "what": "name", + "clicks": 0, + "keys": 6, + "prompts": 0 + }, + { + "page": "/account/tokens", + "kind": "click", + "what": "Create token", + "clicks": 1, + "keys": 0, + "prompts": 0 + } + ], + "id": "api-token", + "ms": 2869, + "ok": true + }, + { + "module": "Navigation", + "feature": "Switch to another namespace", + "note": "", + "clicks": 2, + "keys": 0, + "prompts": 0, + "steps": [ + { + "page": "/", + "kind": "click", + "what": "the namespace switcher", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/", + "kind": "click", + "what": "podcasts", + "clicks": 1, + "keys": 0, + "prompts": 0 + } + ], + "id": "namespace-switch", + "ms": 2348, + "ok": true + } + ], + "pages": [ + { + "page": "/", + "label": "Home", + "reach": 1, + "controls": 4 + }, + { + "page": "/library", + "label": "Library", + "reach": 1, + "controls": 4 + }, + { + "page": "/search", + "label": "Search", + "reach": 1, + "controls": 11 + }, + { + "page": "/chat", + "label": "Chat", + "reach": 1, + "controls": 9 + }, + { + "page": "/notes", + "label": "Notes", + "reach": 1, + "controls": 2 + }, + { + "page": "/entities", + "label": "Entities", + "reach": 1, + "controls": 10 + }, + { + "page": "/topics", + "label": "Topics", + "reach": 1, + "controls": 4 + }, + { + "page": "/graph", + "label": "Graph", + "reach": 1, + "controls": 19 + }, + { + "page": "/podcasts", + "label": "Podcasts", + "reach": 1, + "controls": 1 + }, + { + "page": "/reports", + "label": "Reports", + "reach": 1, + "controls": 4 + }, + { + "page": "/pipelines", + "label": "Pipelines", + "reach": 1, + "controls": 16 + }, + { + "page": "/workflows", + "label": "Pipelines › Workflows", + "reach": 2, + "controls": 7 + }, + { + "page": "/workflows/nodes", + "label": "Pipelines › Custom nodes", + "reach": 2, + "controls": 6 + }, + { + "page": "/content-types", + "label": "Pipelines › Content types", + "reach": 2, + "controls": 66 + }, + { + "page": "/templates", + "label": "Pipelines › Templates", + "reach": 2, + "controls": 9 + }, + { + "page": "/routines", + "label": "Routines", + "reach": 1, + "controls": 20 + }, + { + "page": "/routines/changes", + "label": "Routines › Proposed changes", + "reach": 2, + "controls": 5 + }, + { + "page": "/routines/history", + "label": "Routines › History", + "reach": 2, + "controls": 3 + }, + { + "page": "/extensions", + "label": "Extensions", + "reach": 1, + "controls": 6 + }, + { + "page": "/sensors", + "label": "Sensors", + "reach": 1, + "controls": 9 + }, + { + "page": "/sources", + "label": "Sensors › Files, email and calendars", + "reach": 2, + "controls": 5 + }, + { + "page": "/sensors/logins", + "label": "Sensors › Hub logins", + "reach": 2, + "controls": 5 + }, + { + "page": "/settings/speakers", + "label": "Settings", + "reach": 1, + "controls": 5 + }, + { + "page": "/settings/transcription", + "label": "Settings › Transcription", + "reach": 2, + "controls": 4 + }, + { + "page": "/settings/speaker-separation", + "label": "Settings › Speaker separation", + "reach": 2, + "controls": 9 + }, + { + "page": "/settings/speech-providers", + "label": "Settings › Speech providers", + "reach": 2, + "controls": 18 + }, + { + "page": "/settings/voice-ids", + "label": "Settings › Voice IDs", + "reach": 2, + "controls": 6 + }, + { + "page": "/settings/analysis", + "label": "Settings › Analysis", + "reach": 2, + "controls": 3 + }, + { + "page": "/settings/llm", + "label": "Settings › LLM provider", + "reach": 2, + "controls": 10 + }, + { + "page": "/settings/local-model", + "label": "Settings › Local model", + "reach": 2, + "controls": 25 + }, + { + "page": "/settings/ai", + "label": "Settings › AI assistant", + "reach": 2, + "controls": 48 + }, + { + "page": "/settings/search", + "label": "Settings › Search", + "reach": 2, + "controls": 17 + }, + { + "page": "/settings/reports", + "label": "Settings › Reports and graph", + "reach": 2, + "controls": 5 + }, + { + "page": "/settings/video", + "label": "Settings › Video, OCR, faces and objects", + "reach": 2, + "controls": 19 + }, + { + "page": "/settings/workers", + "label": "Settings › Workers", + "reach": 2, + "controls": 18 + }, + { + "page": "/settings/sign-in", + "label": "Settings › Sign-in", + "reach": 2, + "controls": 2 + }, + { + "page": "/settings/encryption", + "label": "Settings › Encryption", + "reach": 2, + "controls": 3 + }, + { + "page": "/settings/components", + "label": "Settings › Components", + "reach": 2, + "controls": 3 + }, + { + "page": "/settings/access", + "label": "Settings › Access & embedding", + "reach": 2, + "controls": 6 + }, + { + "page": "/settings/remote-access", + "label": "Settings › Remote access", + "reach": 2, + "controls": 4 + }, + { + "page": "/settings/mail", + "label": "Settings › Email", + "reach": 2, + "controls": 8 + }, + { + "page": "/settings/bridge", + "label": "Settings › Chat rooms", + "reach": 2, + "controls": 13 + }, + { + "page": "/settings/notifications", + "label": "Settings › Notifications", + "reach": 2, + "controls": 5 + }, + { + "page": "/settings/telemetry", + "label": "Settings › Telemetry", + "reach": 2, + "controls": 10 + }, + { + "page": "/settings/fedora", + "label": "Settings › Fedora repository", + "reach": 2, + "controls": 10 + }, + { + "page": "/settings/sensors", + "label": "Settings › Sensors", + "reach": 2, + "controls": 15 + }, + { + "page": "/settings/uploads", + "label": "Settings › Uploads", + "reach": 2, + "controls": 23 + }, + { + "page": "/settings/storage", + "label": "Settings › Storage", + "reach": 2, + "controls": 3 + }, + { + "page": "/settings/documents", + "label": "Settings › Documents", + "reach": 2, + "controls": 10 + }, + { + "page": "/settings/tokens", + "label": "Settings › API keys", + "reach": 2, + "controls": 7 + }, + { + "page": "/settings/iiif", + "label": "Settings › IIIF & metadata", + "reach": 2, + "controls": 20 + }, + { + "page": "/settings/startup", + "label": "Settings › Set at startup", + "reach": 2, + "controls": 0 + }, + { + "page": "/admin/people", + "label": "Admin", + "reach": 1, + "controls": 11 + }, + { + "page": "/admin/namespaces", + "label": "Admin › Namespaces", + "reach": 2, + "controls": 7 + }, + { + "page": "/admin/audit", + "label": "Admin › Audit log", + "reach": 2, + "controls": 28 + }, + { + "page": "/admin/health", + "label": "Admin › System health", + "reach": 2, + "controls": 10 + } + ] +} diff --git a/ci/clicks/fake-install.sh b/ci/clicks/fake-install.sh new file mode 100755 index 000000000..94840e485 --- /dev/null +++ b/ci/clicks/fake-install.sh @@ -0,0 +1,8 @@ +#!/bin/sh +# Stands in for install.sh when the survey drives the web installer: says what install.sh says, without installing, +# and points at the Lens the survey already started. +b=$(printf '\033[1m'); r=$(printf '\033[0m') +echo "${b}Checking this computer${r}" +echo "${b}Getting Lens${r}" +echo "${b}Building and starting${r}" +echo "Lens is running: ${LENS_SURVEY_SETUP_URL:-http://localhost:3000/setup}" diff --git a/ci/clicks/fake-model.mjs b/ci/clicks/fake-model.mjs new file mode 100644 index 000000000..cd28af9ca --- /dev/null +++ b/ci/clicks/fake-model.mjs @@ -0,0 +1,59 @@ +// A stand-in OpenAI-compatible model server, so the journeys that need a model (the install wizard finding one, the +// setup wizard testing one, the assistant answering) run without a real one. Every answer is the same short reply. +import http from "node:http"; + +const REPLY = "This is the survey's stand-in model answering."; +const MODELS = ["survey-chat", "survey-embed"]; + +export function startFakeModel(port) { + const server = http.createServer((req, res) => { + let body = ""; + req.on("data", (c) => (body += c)); + req.on("end", () => { + const url = req.url.replace(/^\/v1/, ""); + const json = (code, data) => { + res.writeHead(code, { "Content-Type": "application/json" }); + res.end(JSON.stringify(data)); + }; + if (req.method === "GET" && url.startsWith("/models")) + return json(200, { object: "list", data: MODELS.map((id) => ({ id, object: "model" })) }); + if (req.method === "GET" && url.startsWith("/api/tags")) return json(200, { models: MODELS.map((name) => ({ name })) }); + let payload = {}; + try { + payload = JSON.parse(body || "{}"); + } catch { + /* an empty answer below */ + } + if (url.startsWith("/embeddings")) { + const inputs = Array.isArray(payload.input) ? payload.input : [payload.input ?? ""]; + return json(200, { + object: "list", + model: "survey-embed", + data: inputs.map((_, index) => ({ object: "embedding", index, embedding: Array.from({ length: 8 }, (_, i) => (i + 1) / 8) })), + }); + } + if (url.startsWith("/chat/completions")) { + const model = payload.model || MODELS[0]; + if (payload.stream) { + res.writeHead(200, { "Content-Type": "text/event-stream" }); + const chunk = (delta, finish = null) => + `data: ${JSON.stringify({ id: "survey", object: "chat.completion.chunk", model, choices: [{ index: 0, delta, finish_reason: finish }] })}\n\n`; + res.write(chunk({ role: "assistant", content: REPLY })); + res.write(chunk({}, "stop")); + return res.end("data: [DONE]\n\n"); + } + // structured output: an empty object satisfies most schemas' optional fields + const content = payload.response_format ? "{}" : REPLY; + return json(200, { + id: "survey", + object: "chat.completion", + model, + choices: [{ index: 0, message: { role: "assistant", content }, finish_reason: "stop" }], + usage: { prompt_tokens: 1, completion_tokens: 1, total_tokens: 2 }, + }); + } + json(404, { error: "not found" }); + }); + }); + return new Promise((resolve) => server.listen(port, "127.0.0.1", () => resolve(server))); +} diff --git a/ci/clicks/journeys.mjs b/ci/clicks/journeys.mjs new file mode 100644 index 000000000..cd8a78bd5 --- /dev/null +++ b/ci/clicks/journeys.mjs @@ -0,0 +1,313 @@ +// What the survey does, in order: each journey is one feature, done the way a person would with the defaults, from +// where they'd usually start. They run one after another on the same fresh Lens, so later ones can use what earlier +// ones made (the admin account, an imported transcript). Keep ids stable: the baseline compares by id. + +const INSTALLER = "http://localhost:3990"; + +/** A page in the primary navigation (the sidebar). */ +const nav = (page, label) => + page + .getByRole("navigation", { name: "Primary" }) + .getByRole("link", { name: new RegExp(`^${label}( \\d+)?$`) }) // a count can follow the label (Library 1) + .first(); + +/** The model-backed answer the stand-in model gives (fake-model.mjs). */ +const ANSWER = /stand-in model answering/; + +const TRANSCRIPT = [ + "Host A: Welcome back. Today we talk about local models on small computers.", + "Host B: A Raspberry Pi can run Lens when the models are in the cloud.", + "Host A: And everything stays on your own hardware.", +].join("\n"); + +export const JOURNEYS = [ + // --- Setup ------------------------------------------------------------------------------------------------------- + { + id: "install", + module: "Setup", + feature: "Install with the web installer (defaults, local model found)", + note: "The install line in a terminal, then the browser installer. The browser opens on its own on a desktop; on a server the link is opened by hand (counted). A computer missing Docker also asks for its password.", + needs: "installer", + async run({ page, meter, base }) { + meter.record("terminal", "paste the install line and press Enter", 0, 2); + meter.openLink("open the installer link"); + await page.goto(`${INSTALLER}/?t=survey-token`); + await meter.click(page.locator("#next"), "Continue (this computer)"); + await page.getByRole("heading", { name: "How Lens runs" }).waitFor(); + await meter.click(page.locator("#next"), "Continue (how it runs)"); + const found = page.getByRole("button", { name: /Ollama · \d+ models/ }); + await found.waitFor(); + await meter.click(found, "pick the model server found on this computer"); + await meter.click(page.locator("#next"), "Continue (AI model)"); + await page.getByRole("heading", { name: "Extras" }).waitFor(); + await meter.click(page.locator("#next"), "Continue (extras)"); + await page.getByRole("heading", { name: "Ready to install" }).waitFor(); + await meter.click(page.locator("#next"), "Install Lens"); + const open = page.getByRole("button", { name: "Open Lens" }); + await open.waitFor({ timeout: 60000 }); + await meter.click(open, "Open Lens"); + await page.waitForURL(`${base}/setup**`); + }, + }, + { + id: "first-admin", + module: "Setup", + feature: "Create the first admin (passkey)", + note: "From the setup link, which fills in the setup code.", + async run({ page, meter, base, code, installer }) { + if (!installer) { + meter.openLink("open the setup link the server printed"); + await page.goto(`${base}/setup?code=${code}`); + } + await page.getByRole("heading", { name: "Set up this server" }).waitFor(); + await meter.type(page.getByRole("textbox", { name: "Email" }), "admin@example.com", "email"); + await meter.click(page.getByRole("button", { name: /Create admin/ }), "Create admin with a passkey"); + meter.passkey("create the passkey"); + await page.waitForURL(`${base}/welcome`); + }, + }, + { + id: "setup-wizard", + module: "Setup", + feature: "First-run setup wizard, every step with its defaults", + note: "The namespaces come from the install's configuration, so the wizard opens on the model provider. Finish with defaults (one click) skips the remaining steps.", + async run({ page, meter, base }) { + await page.getByRole("heading", { name: "Connect a model provider" }).waitFor(); + await page.getByRole("button", { name: /Ollama 2 models/ }).waitFor(); + for (const [heading, button] of [ + ["Connect a model provider", "Save and continue"], + ["Storage", "Save and continue"], + ["Apps and AI assistants", "Save and continue"], + ["Telemetry", "Save and finish"], + ]) { + await page.getByRole("heading", { name: heading, exact: true }).waitFor(); + await meter.click(page.getByRole("button", { name: button }), `${button} (${heading})`); + } + await page.waitForURL(`${base}/`); + }, + }, + { + id: "first-question", + module: "Setup", + feature: "Ask the first question from the welcome tour", + async run({ page, meter }) { + const dialog = page.getByRole("dialog", { name: "Welcome to Lens" }); + await dialog.waitFor(); + await meter.type(dialog.getByRole("textbox", { name: "Ask the assistant" }), "What did the hosts say about Raspberry Pi?", "question"); + await meter.press("Enter", "Enter to ask"); + // The tour opens Chat with the question in the composer, not sent + const composer = page.getByRole("textbox", { name: "Your question" }); + await composer.waitFor(); + if (!(await page.getByText(ANSWER).first().isVisible().catch(() => false))) { + await page.waitForTimeout(1500); + if ((await composer.inputValue()).trim()) await meter.press("Enter", "Enter again: the question waits in Chat's composer"); + } + await page.getByText(ANSWER).first().waitFor({ timeout: 60000 }); + }, + }, + + // --- Everyday use: each starts on Home, as after signing in ----------------------------------------------------- + { + id: "import-paste", + module: "Import", + feature: "Import a pasted transcript", + from: "/", + async run({ page, meter }) { + await meter.click(page.getByRole("banner").getByRole("link", { name: "Import" }), "Import (top bar)"); + await meter.click(page.getByRole("tab", { name: "Paste" }), "Paste tab"); + await meter.paste(page.getByRole("textbox", { name: "Paste a transcript" }), TRANSCRIPT, "paste the transcript"); + await page.getByText("3 turns").waitFor(); + await meter.click(page.getByRole("main").getByRole("button", { name: "Import", exact: true }), "Import"); + await page.getByText(/import sent/).waitFor({ timeout: 30000 }); + }, + }, + { + id: "library-open", + module: "Library", + feature: "Open a recording from the Library", + from: "/", + async run({ page, meter }) { + await meter.click(nav(page, "Library"), "Library"); + const item = page.getByRole("main").getByRole("link", { name: /Welcome back/ }).first(); + await item.waitFor(); + await meter.click(item, "the recording"); + await page.waitForURL(/\/(recordings|resources)\//); + }, + }, + { + id: "search-word", + module: "Search", + feature: "Search for a word and see where it was said", + from: "/", + async run({ page, meter }) { + await meter.click(nav(page, "Search"), "Search"); + await meter.type(page.getByRole("searchbox", { name: "Search transcripts" }), "raspberry", "the word"); + await meter.press("Enter", "Enter to search"); + await page.getByRole("main").getByText(/Raspberry Pi can run Lens/).first().waitFor(); + }, + }, + { + id: "jump-to", + module: "Navigation", + feature: "Jump to a recording with Ctrl+K", + from: "/", + async run({ page, meter }) { + await meter.press("Control+k", "Ctrl+K"); + await meter.type(page.getByRole("combobox", { name: /Search recordings and pages/ }), "welcome", "part of its title"); + await page.getByRole("option", { name: /Welcome back/ }).first().waitFor(); + await meter.press("Enter", "Enter to open"); + await page.waitForURL(/\/(recordings|resources)\//); + }, + }, + { + id: "chat-ask", + module: "Chat", + feature: "Ask the assistant in Chat", + from: "/", + async run({ page, meter }) { + await meter.click(nav(page, "Chat"), "Chat"); + await meter.click(page.getByRole("button", { name: "New conversation" }), "New conversation"); + await meter.type(page.getByRole("textbox", { name: "Your question" }), "Who said what about Raspberry Pi?", "question"); + await meter.press("Enter", "Enter to send"); + await page.getByText(ANSWER).first().waitFor({ timeout: 60000 }); + }, + }, + { + id: "note-create", + module: "Notes", + feature: "Write a note", + from: "/", + async run({ page, meter }) { + await meter.click(nav(page, "Notes"), "Notes"); + await meter.click(page.getByRole("main").getByRole("button", { name: "New note" }).first(), "New note"); + await page.waitForURL(/\/notes\/\d+/); + const title = page.getByRole("textbox", { name: "Title" }); + await meter.replace(title, "Pi setup", "title"); + const body = page.locator("main affine-page-root [contenteditable=true]").first(); + const editor = (await body.count()) ? body : page.locator("main .inline-editor").last(); + await meter.type(editor, "Use cloud models on the Pi.", "first line"); + await page.getByText("Saved").first().waitFor(); + }, + }, + { + id: "topic-add", + module: "Topics", + feature: "Add a topic", + from: "/", + async run({ page, meter }) { + await meter.click(nav(page, "Topics"), "Topics"); + await meter.click(page.getByRole("main").getByRole("button", { name: "Add topic" }).first(), "Add topic"); + await meter.type(page.getByRole("textbox", { name: "Label", exact: true }), "Hardware", "label"); + await meter.press("Enter", "Enter to add"); + await page.getByRole("main").getByText("Hardware").first().waitFor(); + }, + }, + { + id: "pipeline-create", + module: "Pipelines", + feature: "Make a pipeline from the standard steps", + from: "/", + async run({ page, meter }) { + await meter.click(nav(page, "Pipelines"), "Pipelines"); + await meter.click(page.getByRole("main").getByRole("link", { name: "New pipeline" }), "New pipeline"); + await meter.type(page.getByRole("textbox", { name: "Pipeline name" }), "Quick pipeline", "name"); + await meter.click(page.getByRole("button", { name: "Create pipeline" }), "Create pipeline"); + await page.waitForURL(/\/pipelines\/\d+/); + }, + }, + { + id: "routine-create", + module: "Routines", + feature: "Make a nightly routine (sync sources, the default action)", + from: "/", + async run({ page, meter }) { + await meter.click(nav(page, "Routines"), "Routines"); + await meter.click(page.getByRole("main").getByRole("link", { name: "New routine" }), "New routine"); + await meter.type(page.getByRole("textbox", { name: "Name" }), "Nightly sync", "name"); + await meter.click(page.getByRole("button", { name: "Create routine" }), "Create routine"); + await page.waitForURL(/\/routines\/\d+/); + }, + }, + { + id: "extension-add", + module: "Extensions", + feature: "Add the example skill to the assistant", + from: "/", + async run({ page, meter }) { + await meter.click(nav(page, "Extensions"), "Extensions"); + await meter.click(page.getByRole("main").getByRole("link", { name: "New", exact: true }), "New"); + await meter.click(page.getByRole("button", { name: "Add to the assistant" }), "Add to the assistant"); + await page.waitForURL(/\/extensions\/\d+/); + }, + }, + { + id: "sensor-webhook", + module: "Sensors", + feature: "Make a webhook sensor", + from: "/", + async run({ page, meter }) { + await meter.click(nav(page, "Sensors"), "Sensors"); + await meter.click(page.getByRole("main").getByRole("button", { name: "Add sensor" }).first(), "Add sensor"); + await meter.click(page.getByRole("dialog").getByRole("button", { name: "Make webhook" }), "Make webhook"); + await page.getByText(/token/i).first().waitFor(); + }, + }, + { + id: "settings-change", + module: "Settings", + feature: "Change the model's timeout", + from: "/", + async run({ page, meter }) { + await meter.click(nav(page, "Settings"), "Settings"); + await meter.click(page.getByRole("link", { name: "LLM provider" }), "LLM provider"); + await meter.replace(page.getByRole("textbox", { name: "Timeout (seconds)" }), "120", "timeout"); + await meter.press("Control+s", "Ctrl+S to save"); + await page.getByText(/Saved|Last saved/).first().waitFor(); + }, + }, + { + id: "person-add", + module: "Admin", + feature: "Add a person as a viewer", + from: "/", + async run({ page, meter }) { + await meter.click(nav(page, "Admin"), "Admin"); + await meter.click(page.getByRole("button", { name: "Create account" }), "Create account"); + const d = page.getByRole("dialog"); + await meter.type(d.getByRole("textbox", { name: "Email" }), "viewer@example.com", "email"); + await meter.click(d.getByRole("button", { name: "Create account" }), "Create account"); + // The sign-in link is shown once, to send to them + await meter.click(d.getByRole("button", { name: /Copy/ }), "Copy the sign-in link"); + await meter.click(d.getByRole("button", { name: "Done" }), "Done"); + await page.getByRole("main").getByText("viewer@example.com").first().waitFor(); + }, + }, + { + id: "api-token", + module: "Account", + feature: "Make an API token", + from: "/", + async run({ page, meter }) { + await meter.click(page.getByRole("button", { name: "Account menu" }), "Account menu"); + await meter.click(page.getByRole("menuitem", { name: /API tokens/ }), "API tokens"); + await meter.click(page.getByRole("main").getByRole("button", { name: "New token" }).first(), "New token"); + const d = page.getByRole("dialog"); + await meter.type(d.getByRole("textbox", { name: "Name" }), "script", "name"); + await meter.click(d.getByRole("button", { name: "Create token" }), "Create token"); + await page.getByText(/copy/i).first().waitFor(); + }, + }, + { + id: "namespace-switch", + module: "Navigation", + feature: "Switch to another namespace", + from: "/", + async run({ page, meter }) { + await meter.click(page.getByRole("button", { name: /^Namespace: / }), "the namespace switcher"); + await meter.click(page.getByRole("option", { name: /^podcasts/ }), "podcasts"); + await page.getByRole("button", { name: /^Namespace: podcasts/ }).waitFor(); + }, + }, +]; + +export { TRANSCRIPT, ANSWER }; diff --git a/ci/clicks/meter.mjs b/ci/clicks/meter.mjs new file mode 100644 index 000000000..2af7d9be2 --- /dev/null +++ b/ci/clicks/meter.mjs @@ -0,0 +1,127 @@ +// Counts what a person does in the browser: clicks, keystrokes and passkey prompts, attributed to the page they're on. +// +// The rules, so runs compare: +// - click: one mouse click. Choosing from a native is two (open it, pick); a file chooser is two (the button, -// then picking the file in the system dialog). +// then picking the file in the system dialog). On a phone a click is a tap, counted the same way. // - keys: every character typed, plus each key or shortcut pressed (Enter, Tab, Ctrl+K count one each). Pasting counts // one (the shortcut). Typing into a field that doesn't already have the focus adds the click that focuses it. // - prompts: a passkey prompt (a touch or a PIN on the device), counted apart from clicks. +// - swipes (phone only): a control off the screen, down the page or along a strip that scrolls sideways, takes a swipe +// to bring into view before the tap. On a computer scrolling isn't counted. /** A page's address with the parts that differ per run (ids, codes, query values) taken out. */ export function pageKey(url) { @@ -20,14 +22,16 @@ export function pageKey(url) { } export class Meter { - constructor(page) { + /** `touch`: a phone, where clicks are taps and bringing a control into view takes a swipe. */ + constructor(page, { touch = false } = {}) { this.page = page; + this.touch = touch; this.journey = null; this.journeys = []; } start(module, feature, note = "") { - this.journey = { module, feature, note, clicks: 0, keys: 0, prompts: 0, steps: [], started: Date.now() }; + this.journey = { module, feature, note, clicks: 0, keys: 0, prompts: 0, swipes: 0, steps: [], started: Date.now() }; } end(ok = true, error = null) { @@ -42,28 +46,46 @@ export class Meter { return j; } - record(kind, what, clicks, keys, prompts = 0) { + record(kind, what, clicks, keys, prompts = 0, swipes = 0) { const j = this.journey; if (!j) return; j.clicks += clicks; j.keys += keys; j.prompts += prompts; - j.steps.push({ page: pageKey(this.page.url()), kind, what, clicks, keys, prompts }); + j.swipes += swipes; + const step = { page: pageKey(this.page.url()), kind, what, clicks, keys, prompts }; + if (swipes) step.swipes = swipes; + j.steps.push(step); + } + + /** On a phone, 1 when the control is off the screen (a swipe brings it into view); otherwise 0. */ + async swipesTo(locator) { + if (!this.touch) return 0; + const box = await locator.boundingBox(); + const view = this.page.viewportSize(); + if (!box || !view) return 0; + const off = box.y < 0 || box.y + box.height > view.height || box.x < 0 || box.x + box.width > view.width; + return off ? 1 : 0; + } + + /** A click, or a tap on a phone. */ + async tapOrClick(locator, options = {}) { + return this.touch ? locator.tap(options) : locator.click(options); } async click(locator, what) { await locator.waitFor(); // on the page it belongs to, so the step is counted there - this.record("click", what, 1, 0); + this.record(this.touch ? "tap" : "click", what, 1, 0, 0, await this.swipesTo(locator)); try { - await locator.click({ trial: true, timeout: 3000 }); - return await locator.click(); + await this.tapOrClick(locator, { trial: true, timeout: 3000 }); + return await this.tapOrClick(locator); } catch { // Covered where it scrolled to: a person scrolls on to the end of the page (not counted) and tries again - await this.page.mouse.wheel(0, 10000); + await this.page.mouse.wheel(0, 10000).catch(() => {}); await this.page.waitForTimeout(300); } try { - await locator.click({ trial: true, timeout: 2000 }); + await this.tapOrClick(locator, { trial: true, timeout: 2000 }); } catch { // Something still lies over it (the floating Ask button, a toast). The step notes it; the click still counts // one, done here with the keyboard so it reaches the control rather than what covers it. @@ -74,15 +96,15 @@ export class Meter { await this.page.keyboard.press("Enter"); return; } - await locator.click(); + await this.tapOrClick(locator); } /** Types `text` into a field, adding the click that focuses it when it isn't focused already. */ async type(locator, text, what) { await locator.waitFor(); const focused = await locator.evaluate((el) => el === document.activeElement || el.contains(document.activeElement)); - this.record("type", what, focused ? 0 : 1, text.length); - if (!focused) await locator.click(); + this.record("type", what, focused ? 0 : 1, text.length, 0, focused ? 0 : await this.swipesTo(locator)); + if (!focused) await this.tapOrClick(locator); await locator.pressSequentially(text); } @@ -90,7 +112,7 @@ export class Meter { async paste(locator, text, what) { await locator.waitFor(); const focused = await locator.evaluate((el) => el === document.activeElement || el.contains(document.activeElement)); - this.record("paste", what, focused ? 0 : 1, 1); + this.record("paste", what, focused ? 0 : 1, 1, 0, focused ? 0 : await this.swipesTo(locator)); await locator.fill(text); } @@ -101,8 +123,8 @@ export class Meter { focused: el === document.activeElement, selected: el === document.activeElement && el.value != null && el.selectionStart === 0 && el.selectionEnd === el.value.length, })); - this.record("replace", what, focused ? 0 : 1, (selected ? 0 : 1) + text.length); - if (!focused) await locator.click(); + this.record("replace", what, focused ? 0 : 1, (selected ? 0 : 1) + text.length, 0, focused ? 0 : await this.swipesTo(locator)); + if (!focused) await this.tapOrClick(locator); if (!selected) await this.page.keyboard.press("ControlOrMeta+a"); await locator.pressSequentially(text); } @@ -115,14 +137,14 @@ export class Meter { /** Picks an option from a native select: open it, choose. */ async select(locator, value, what) { await locator.waitFor(); - this.record("select", what, 2, 0); + this.record("select", what, 2, 0, 0, await this.swipesTo(locator)); await locator.selectOption(value); } /** Opens the system file chooser from `button` and picks `files`. */ async upload(button, files, what) { - this.record("upload", what, 2, 0); - const [chooser] = await Promise.all([this.page.waitForEvent("filechooser"), button.click()]); + this.record("upload", what, 2, 0, 0, await this.swipesTo(button)); + const [chooser] = await Promise.all([this.page.waitForEvent("filechooser"), this.tapOrClick(button)]); await chooser.setFiles(files); } diff --git a/ci/clicks/report.mjs b/ci/clicks/report.mjs index 9af472e2e..276a465db 100644 --- a/ci/clicks/report.mjs +++ b/ci/clicks/report.mjs @@ -1,6 +1,6 @@ // The survey's tables, and how a run compares with an earlier one (the baseline). -const total = (j) => j.clicks + j.keys + j.prompts; +const total = (j) => j.clicks + j.keys + j.prompts + (j.swipes ?? 0); /** Per-journey changes from `base` to `now`: worse when a journey takes more, or fails where it passed. */ export function compare(now, base) { @@ -16,8 +16,21 @@ export function compare(now, base) { out.push({ id: j.id, what: "fails now", worse: true }); continue; } - const d = { clicks: j.clicks - b.clicks, keys: j.keys - b.keys, prompts: j.prompts - b.prompts }; - if (d.clicks || d.keys || d.prompts) + if (!j.ok) { + out.push({ id: j.id, what: "still can't be done", worse: false }); + continue; + } + if (!b.ok) { + out.push({ id: j.id, what: "can be done now", worse: false }); + continue; + } + const d = { + clicks: j.clicks - b.clicks, + keys: j.keys - b.keys, + prompts: j.prompts - b.prompts, + swipes: (j.swipes ?? 0) - (b.swipes ?? 0), + }; + if (d.clicks || d.keys || d.prompts || d.swipes) out.push({ id: j.id, what: Object.entries(d) @@ -36,7 +49,7 @@ export function compare(now, base) { export function perPage(result) { const pages = new Map(); const get = (key) => { - if (!pages.has(key)) pages.set(key, { page: key, clicks: 0, keys: 0, prompts: 0, journeys: new Set() }); + if (!pages.has(key)) pages.set(key, { page: key, clicks: 0, keys: 0, prompts: 0, swipes: 0, journeys: new Set() }); return pages.get(key); }; for (const j of result.journeys) @@ -45,6 +58,7 @@ export function perPage(result) { p.clicks += s.clicks; p.keys += s.keys; p.prompts += s.prompts; + p.swipes += s.swipes ?? 0; p.journeys.add(j.id); } for (const s of result.pages || []) Object.assign(get(s.page), { label: s.label, reach: s.reach, controls: s.controls }); @@ -55,55 +69,70 @@ export function perPage(result) { export function markdown(result, base) { const diff = base ? new Map(compare(result, base).map((d) => [d.id, d])) : null; + const phone = result.device === "phone"; + // On a phone clicks are taps, and swipes (bringing a control into view) are counted too + const Clicks = phone ? "Taps" : "Clicks"; + const sw = (x) => (phone ? ` ${x} |` : ""); const lines = [ - "# Clicks and keystrokes per feature", + `# ${Clicks}, keystrokes${phone ? ", swipes" : ""} and passkey touches per feature${phone ? " on a phone" : ""}`, "", `Surveyed ${result.surveyed}${result.commit ? ` at ${result.commit.slice(0, 7)}` : ""}, Chromium ${result.viewport}.`, - "Clicks include the click that focuses a field before typing; keys are characters typed plus keys and shortcuts", - "pressed (a paste is one); prompts are passkey touches. Generated by ci/clicks; see its README for the rules.", + `${Clicks} include the ${phone ? "tap" : "click"} that focuses a field before typing; keys are characters typed plus keys and shortcuts`, + "pressed (a paste is one); prompts are passkey touches." + + (phone ? " Swipes bring a control that is off the screen into view." : "") + + " Generated by ci/clicks; see its README for the rules.", "", ]; const modules = [...new Set(result.journeys.map((j) => j.module))]; - let sum = { clicks: 0, keys: 0, prompts: 0 }; - lines.push(`| Module | Feature | Clicks | Keys | Prompts | Total | Pages${diff ? " | vs baseline" : ""} |`); - lines.push(`|---|---|--:|--:|--:|--:|---${diff ? "|---" : ""}|`); + let sum = { clicks: 0, keys: 0, prompts: 0, swipes: 0 }; + lines.push(`| Module | Feature | ${Clicks} | Keys | Prompts |${sw("Swipes")} Total | Pages${diff ? " | vs baseline" : ""} |`); + lines.push(`|---|---|--:|--:|--:|${sw("--:")}--:|---${diff ? "|---" : ""}|`); for (const m of modules) for (const j of result.journeys.filter((x) => x.module === m)) { - sum = { clicks: sum.clicks + j.clicks, keys: sum.keys + j.keys, prompts: sum.prompts + j.prompts }; + sum = { clicks: sum.clicks + j.clicks, keys: sum.keys + j.keys, prompts: sum.prompts + j.prompts, swipes: sum.swipes + (j.swipes ?? 0) }; const pages = [...new Set(j.steps.map((s) => s.page))].join(", "); const d = diff?.get(j.id); const feature = j.ok ? j.feature : `${j.feature} (failed: ${j.error})`; lines.push( - `| ${m} | ${feature} | ${j.clicks} | ${j.keys} | ${j.prompts} | ${total(j)} | ${pages}${diff ? ` | ${d ? d.what : "same"}` : ""} |`, + `| ${m} | ${feature} | ${j.clicks} | ${j.keys} | ${j.prompts} |${sw(j.swipes ?? 0)} ${total(j)} | ${pages}${diff ? ` | ${d ? d.what : "same"}` : ""} |`, ); } - lines.push(`| **All** | **${result.journeys.length} features** | **${sum.clicks}** | **${sum.keys}** | **${sum.prompts}** | **${sum.clicks + sum.keys + sum.prompts}** | |`); - lines.push("", "## Per module", "", "| Module | Features | Clicks | Keys | Prompts |", "|---|--:|--:|--:|--:|"); + lines.push( + `| **All** | **${result.journeys.length} features** | **${sum.clicks}** | **${sum.keys}** | **${sum.prompts}** |${sw(`**${sum.swipes}**`)} **${sum.clicks + sum.keys + sum.prompts + sum.swipes}** | |`, + ); + lines.push("", "## Per module", "", `| Module | Features | ${Clicks} | Keys | Prompts |${sw("Swipes")}`, `|---|--:|--:|--:|--:|${sw("--:")}`); for (const m of modules) { const js = result.journeys.filter((x) => x.module === m); - const s = (k) => js.reduce((n, j) => n + j[k], 0); - lines.push(`| ${m} | ${js.length} | ${s("clicks")} | ${s("keys")} | ${s("prompts")} |`); + const s = (k) => js.reduce((n, j) => n + (j[k] ?? 0), 0); + lines.push(`| ${m} | ${js.length} | ${s("clicks")} | ${s("keys")} | ${s("prompts")} |${sw(s("swipes"))}`); } lines.push( "", "## Per page", "", - "Reach is clicks from Home through the navigation; controls are the buttons, links and fields showing in the page's", - "main area on a fresh install (a measure of how busy it is). Clicks and keys are what the features above did there.", + `Reach is ${Clicks.toLowerCase()} from Home through the navigation${phone ? " (the menu button first)" : ""}; controls are the buttons, links and fields showing in the page's`, + `main area on a fresh install (a measure of how busy it is). ${Clicks} and keys are what the features above did there.`, "", - "| Page | Reach | Controls | Clicks | Keys | Prompts | Features |", - "|---|--:|--:|--:|--:|--:|---|", + `| Page | Reach | Controls | ${Clicks} | Keys | Prompts |${sw("Swipes")} Features |`, + `|---|--:|--:|--:|--:|--:|${sw("--:")}---|`, ); for (const p of perPage(result)) lines.push( - `| ${p.label ? `${p.label} (\`${p.page}\`)` : `\`${p.page}\``} | ${p.reach ?? ""} | ${p.controls ?? ""} | ${p.clicks || ""} | ${p.keys || ""} | ${p.prompts || ""} | ${p.journeys.join(", ")} |`, + `| ${p.label ? `${p.label} (\`${p.page}\`)` : `\`${p.page}\``} | ${p.reach ?? ""} | ${p.controls ?? ""} | ${p.clicks || ""} | ${p.keys || ""} | ${p.prompts || ""} |${sw(p.swipes || "")} ${p.journeys.join(", ")} |`, ); lines.push("", "## Steps", ""); + const act = phone ? "tap" : "click"; for (const j of result.journeys) { lines.push(`### ${j.module}: ${j.feature}`, ""); if (j.note) lines.push(j.note, ""); + if (!j.ok) lines.push(`Failed: ${j.error}`, ""); for (const s of j.steps) { - const cost = [s.clicks && `${s.clicks} click${s.clicks > 1 ? "s" : ""}`, s.keys && `${s.keys} key${s.keys > 1 ? "s" : ""}`, s.prompts && "passkey"] + const cost = [ + s.swipes && `${s.swipes} swipe${s.swipes > 1 ? "s" : ""}`, + s.clicks && `${s.clicks} ${act}${s.clicks > 1 ? "s" : ""}`, + s.keys && `${s.keys} key${s.keys > 1 ? "s" : ""}`, + s.prompts && "passkey", + ] .filter(Boolean) .join(" + "); lines.push(`1. \`${s.page}\` ${s.what} (${cost})`); diff --git a/ci/clicks/survey.mjs b/ci/clicks/survey.mjs index 54abbe63c..6f134c08a 100644 --- a/ci/clicks/survey.mjs +++ b/ci/clicks/survey.mjs @@ -3,14 +3,17 @@ // README.md for the rules and how to compare with the baseline. // // node survey.mjs [--base http://localhost:3000] [--out results] [--compare baseline.json] [--only id,id] -// [--no-installer] [--fail-on-regression] +// [--device desktop|phone] [--no-installer] [--fail-on-regression] +// +// --device phone runs the same journeys on a phone-sized touch screen (taps and swipes instead of clicks, no keyboard +// shortcuts) and writes results/clicks-phone.json and clicks-phone.md. import { spawn } from "node:child_process"; import fs from "node:fs"; import os from "node:os"; import path from "node:path"; import { fileURLToPath } from "node:url"; -import { chromium } from "playwright"; +import { chromium, devices } from "playwright"; import { startFakeModel } from "./fake-model.mjs"; import { JOURNEYS } from "./journeys.mjs"; @@ -20,8 +23,14 @@ import { compare, markdown } from "./report.mjs"; const here = path.dirname(fileURLToPath(import.meta.url)); const repo = path.resolve(here, "../.."); +/** Where the survey runs: a desktop browser, or a phone (Pixel 7: 412x839, touch, no hover or keyboard shortcuts). */ +const DEVICES = { + desktop: { name: "1400x900", context: { viewport: { width: 1400, height: 900 } }, suffix: "" }, + phone: { name: "Pixel 7, 412x839, touch", context: { ...devices["Pixel 7"] }, suffix: "-phone", touch: true }, +}; + function parse(argv) { - const a = { base: "http://localhost:3000", out: path.join(here, "results"), installer: true, failOnRegression: false }; + const a = { base: "http://localhost:3000", out: path.join(here, "results"), installer: true, failOnRegression: false, device: "desktop" }; for (let i = 0; i < argv.length; i++) { const k = argv[i]; if (k === "--base") a.base = argv[++i]; @@ -29,11 +38,13 @@ function parse(argv) { else if (k === "--compare") a.compare = argv[++i]; else if (k === "--only") a.only = new Set(argv[++i].split(",")); else if (k === "--no-installer") a.installer = false; + else if (k === "--device") a.device = argv[++i]; else if (k === "--fail-on-regression") a.failOnRegression = true; else if (k === "--headed") a.headed = true; else if (k === "--state") a.state = argv[++i]; else throw new Error(`unknown argument ${k}`); } + if (!DEVICES[a.device]) throw new Error(`--device is one of ${Object.keys(DEVICES).join(", ")}`); return a; } @@ -65,7 +76,7 @@ async function startInstaller(base) { } /** For each page in the primary navigation (and its tabs and sections): clicks from Home, and its controls. */ -async function surveyPages(page, base) { +async function surveyPages(page, base, phone) { const pages = []; const controls = () => page.evaluate(() => { @@ -77,19 +88,26 @@ async function surveyPages(page, base) { const settle = () => page.waitForTimeout(1200); await page.goto(base + "/", { waitUntil: "domcontentloaded" }); await settle(); + if (phone) await page.getByRole("button", { name: "Open navigation" }).tap(); const nav = await page .getByRole("navigation", { name: "Primary" }) .getByRole("link") - .evaluateAll((els) => els.map((e) => ({ label: e.textContent.trim(), href: e.getAttribute("href") }))); + // the label without the count that can follow it (Library 1) + .evaluateAll((els) => els.map((e) => ({ label: (e.querySelector("span")?.textContent ?? e.textContent).trim(), href: e.getAttribute("href") }))); const items = nav.filter((n, i) => n.label && n.label !== "Lens" && !n.label.startsWith("Notes ·") && nav.findIndex((m) => m.href === n.href && m.label === n.label) === i); + // On a phone the navigation sits behind the menu button: one more tap to reach every page + const menu = phone ? 1 : 0; for (const item of items) { await page.goto(base + "/", { waitUntil: "domcontentloaded" }); await settle(); - await page.getByRole("navigation", { name: "Primary" }).getByRole("link", { name: item.label, exact: true }).first().click(); + if (phone) await page.getByRole("button", { name: "Open navigation" }).tap(); + const name = new RegExp(`^${item.label.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}( \\d+)?$`); + const link = page.getByRole("navigation", { name: "Primary" }).getByRole("link", { name }).first(); + await (phone ? link.tap() : link.click()); await page.waitForLoadState("domcontentloaded"); await settle(); const key = pageKey(page.url()); - pages.push({ page: key, label: item.label, reach: 1, controls: await controls() }); + pages.push({ page: key, label: item.label, reach: 1 + menu, controls: await controls() }); // a second level: settings sections, and tabs that are links (Admin, Sensors, Pipelines) const sub = await page .locator("main") @@ -101,7 +119,7 @@ async function surveyPages(page, base) { if (!s.href || pages.some((p) => p.page === pageKey(base + s.href))) continue; await page.goto(base + s.href, { waitUntil: "domcontentloaded" }); await settle(); - pages.push({ page: pageKey(page.url()), label: `${item.label} › ${s.label}`, reach: 2, controls: await controls() }); + pages.push({ page: pageKey(page.url()), label: `${item.label} › ${s.label}`, reach: 2 + menu, controls: await controls() }); } } return pages; @@ -114,7 +132,8 @@ async function main() { const browser = await chromium.launch({ headless: !a.headed }); // --state: keep the sign-in between runs while writing journeys (not for measuring: a run starts signed out) const state = a.state && fs.existsSync(a.state) ? a.state : undefined; - const context = await browser.newContext({ viewport: { width: 1400, height: 900 }, locale: "en-US", storageState: state }); + const device = DEVICES[a.device]; + const context = await browser.newContext({ ...device.context, locale: "en-US", storageState: state }); const page = await context.newPage(); page.setDefaultTimeout(20000); // A passkey authenticator that says yes, as a person touching their fingerprint reader would @@ -124,8 +143,14 @@ async function main() { options: { protocol: "ctap2", transport: "internal", hasResidentKey: true, hasUserVerification: true, isUserVerified: true, automaticPresenceSimulation: true }, }); - const meter = new Meter(page); - const ctx = { base: a.base, page, meter, here, code: process.env.LENS_SETUP_CODE || "survey-code", installer: !!installer }; + const meter = new Meter(page, { touch: !!device.touch }); + const ctx = { + base: a.base, page, meter, here, code: process.env.LENS_SETUP_CODE || "survey-code", installer: !!installer, + phone: !!device.touch, + }; + const base = a.compare ? JSON.parse(fs.readFileSync(a.compare, "utf8")) : null; + // A journey that failed in the baseline too (one that can't be done on a phone yet) is reported, not a new failure + const failedBefore = new Set((base?.journeys || []).filter((j) => !j.ok).map((j) => j.id)); let failed = 0; for (const j of JOURNEYS) { if (a.only && !a.only.has(j.id)) continue; @@ -133,24 +158,32 @@ async function main() { meter.start(j.module, j.feature, j.note); meter.journey.id = j.id; try { + if ("ns" in j) { + // Starts with this namespace picked ("" for all namespaces), whatever the journey before left: not counted + await page.goto(a.base + "/", { waitUntil: "domcontentloaded" }); + await page.evaluate((ns) => (ns ? localStorage.setItem("lens.namespace", ns) : localStorage.removeItem("lens.namespace")), j.ns); + } if (j.from) { await page.goto(a.base + j.from, { waitUntil: "domcontentloaded" }); - await page.getByRole("navigation", { name: "Primary" }).waitFor(); + await page.getByRole("banner").waitFor(); await page.waitForTimeout(2000); // hydrated, so the first click lands } await j.run(ctx); const r = meter.end(true); - console.log(`ok ${j.id.padEnd(22)} ${String(r.clicks).padStart(3)} clicks ${String(r.keys).padStart(4)} keys ${r.prompts} prompts`); + console.log( + `ok ${j.id.padEnd(22)} ${String(r.clicks).padStart(3)} ${ctx.phone ? "taps " : "clicks"} ${String(r.keys).padStart(4)} keys ${r.prompts} prompts` + + (ctx.phone ? ` ${r.swipes} swipes` : ""), + ); } catch (e) { - failed++; + if (!failedBefore.has(j.id)) failed++; fs.mkdirSync(a.out, { recursive: true }); - await page.screenshot({ path: path.join(a.out, `failed-${j.id}.png`) }).catch(() => {}); + await page.screenshot({ path: path.join(a.out, `failed-${j.id}${device.suffix}.png`) }).catch(() => {}); meter.end(false, e.message); - console.log(`FAIL ${j.id}: ${String(e.message).split("\n")[0]}`); + console.log(`${failedBefore.has(j.id) ? "fail (as in the baseline)" : "FAIL"} ${j.id}: ${String(e.message).split("\n")[0]}`); } } if (a.state) await context.storageState({ path: a.state }); - const pages = a.only ? [] : await surveyPages(page, a.base); + const pages = a.only ? [] : await surveyPages(page, a.base, ctx.phone); await browser.close(); installer?.kill(); model.close(); @@ -158,16 +191,16 @@ async function main() { const result = { surveyed: new Date().toISOString(), commit: process.env.GITHUB_SHA || "", - viewport: "1400x900", + viewport: device.name, + device: a.device, journeys: meter.journeys, pages, }; fs.mkdirSync(a.out, { recursive: true }); - fs.writeFileSync(path.join(a.out, "clicks.json"), JSON.stringify(result, null, 2) + "\n"); - const base = a.compare ? JSON.parse(fs.readFileSync(a.compare, "utf8")) : null; - const md = markdown(result, base); - fs.writeFileSync(path.join(a.out, "clicks.md"), md); - console.log(`\nwrote ${path.join(a.out, "clicks.json")} and clicks.md`); + const name = `clicks${device.suffix}`; + fs.writeFileSync(path.join(a.out, `${name}.json`), JSON.stringify(result, null, 2) + "\n"); + fs.writeFileSync(path.join(a.out, `${name}.md`), markdown(result, base)); + console.log(`\nwrote ${path.join(a.out, `${name}.json`)} and ${name}.md`); if (base) { const worse = compare(result, base).filter((d) => d.worse); for (const d of worse) console.log(`worse: ${d.id} ${d.what}`); From 298e1ca12f721efcd3c9dc64c4b5e7bfa6a17cc0 Mon Sep 17 00:00:00 2001 From: Adeel Ahmad Date: Sat, 10 Oct 2026 22:27:49 +0000 Subject: [PATCH 05/15] ci(clicks): steady phone swipes and journey waits Measure where a control settles before counting a swipe, scope the webhook token check to its dialog, and wait for the entity list to filter. The phone baseline is the run with these fixes. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_0145yfQfD4eNkWHgPkk3Q82r --- ci/clicks/baseline-phone.json | 82 ++++++++++++++++++++--------------- ci/clicks/journeys.mjs | 4 +- ci/clicks/meter.mjs | 10 ++++- 3 files changed, 59 insertions(+), 37 deletions(-) diff --git a/ci/clicks/baseline-phone.json b/ci/clicks/baseline-phone.json index e49171196..614e1ff9a 100644 --- a/ci/clicks/baseline-phone.json +++ b/ci/clicks/baseline-phone.json @@ -1,5 +1,5 @@ { - "surveyed": "2026-10-10T21:56:33.215Z", + "surveyed": "2026-10-10T22:24:38.726Z", "commit": "", "viewport": "Pixel 7, 412x839, touch", "device": "phone", @@ -90,7 +90,7 @@ } ], "id": "install", - "ms": 2589, + "ms": 3441, "ok": true }, { @@ -128,7 +128,7 @@ } ], "id": "first-admin", - "ms": 697, + "ms": 859, "ok": true }, { @@ -176,7 +176,7 @@ } ], "id": "setup-wizard", - "ms": 828, + "ms": 1316, "ok": true }, { @@ -214,7 +214,7 @@ } ], "id": "first-question", - "ms": 2944, + "ms": 2957, "ok": true }, { @@ -277,7 +277,7 @@ } ], "id": "import-paste", - "ms": 4017, + "ms": 4960, "ok": true }, { @@ -315,7 +315,7 @@ } ], "id": "library-open", - "ms": 3017, + "ms": 3226, "ok": true }, { @@ -361,7 +361,7 @@ } ], "id": "search-word", - "ms": 3518, + "ms": 3843, "ok": true }, { @@ -399,7 +399,7 @@ } ], "id": "jump-to", - "ms": 2451, + "ms": 2581, "ok": true }, { @@ -453,7 +453,7 @@ } ], "id": "chat-ask", - "ms": 3170, + "ms": 3670, "ok": true }, { @@ -507,7 +507,7 @@ } ], "id": "note-create", - "ms": 3802, + "ms": 4436, "ok": true }, { @@ -561,7 +561,7 @@ } ], "id": "topic-add", - "ms": 3716, + "ms": 4049, "ok": true }, { @@ -615,7 +615,7 @@ } ], "id": "pipeline-create", - "ms": 3124, + "ms": 3512, "ok": true }, { @@ -670,7 +670,7 @@ } ], "id": "routine-create", - "ms": 3156, + "ms": 3443, "ok": true }, { @@ -717,7 +717,7 @@ } ], "id": "extension-add", - "ms": 8257, + "ms": 8661, "ok": true }, { @@ -763,7 +763,7 @@ } ], "id": "sensor-webhook", - "ms": 2909, + "ms": 3264, "ok": true }, { @@ -819,7 +819,7 @@ } ], "id": "settings-change", - "ms": 8925, + "ms": 9692, "ok": true }, { @@ -889,7 +889,7 @@ } ], "id": "person-add", - "ms": 3279, + "ms": 4057, "ok": true }, { @@ -943,7 +943,7 @@ } ], "id": "api-token", - "ms": 2785, + "ms": 3285, "ok": true }, { @@ -956,7 +956,7 @@ "swipes": 0, "steps": [], "id": "namespace-switch", - "ms": 7243, + "ms": 7245, "ok": false, "error": "the namespace switcher isn't on the screen on a phone" }, @@ -987,7 +987,7 @@ } ], "id": "agent-connect", - "ms": 3155, + "ms": 3278, "ok": true }, { @@ -1034,14 +1034,14 @@ { "page": "/import", "kind": "tap", - "what": "Import", + "what": "Import (covered by something else on the page)", "clicks": 1, "keys": 0, "prompts": 0 } ], "id": "import-file", - "ms": 3487, + "ms": 9166, "ok": true }, { @@ -1136,7 +1136,7 @@ } ], "id": "source-folder", - "ms": 5309, + "ms": 5764, "ok": true }, { @@ -1182,7 +1182,7 @@ } ], "id": "entity-find", - "ms": 3824, + "ms": 4878, "ok": true }, { @@ -1212,7 +1212,7 @@ } ], "id": "graph-find", - "ms": 9592, + "ms": 9648, "ok": false, "error": "the namespace switcher isn't on the screen on a phone" }, @@ -1276,7 +1276,7 @@ } ], "id": "podcast-create", - "ms": 8905, + "ms": 9428, "ok": true }, { @@ -1330,7 +1330,7 @@ } ], "id": "report-pdf", - "ms": 3577, + "ms": 4058, "ok": true }, { @@ -1392,7 +1392,7 @@ } ], "id": "workflow-create", - "ms": 3362, + "ms": 3882, "ok": true }, { @@ -1455,7 +1455,7 @@ } ], "id": "template-create", - "ms": 3073, + "ms": 3743, "ok": true }, { @@ -1517,7 +1517,7 @@ } ], "id": "namespace-create", - "ms": 3119, + "ms": 3577, "ok": true }, { @@ -1579,7 +1579,7 @@ } ], "id": "speaker-rename", - "ms": 4092, + "ms": 4460, "ok": true }, { @@ -1651,7 +1651,7 @@ } ], "id": "cloud-model", - "ms": 8559, + "ms": 9323, "ok": true } ], @@ -1716,6 +1716,12 @@ "reach": 2, "controls": 7 }, + { + "page": "/costs", + "label": "Costs", + "reach": 2, + "controls": 12 + }, { "page": "/pipelines", "label": "Pipelines", @@ -1762,7 +1768,7 @@ "page": "/routines/history", "label": "Routines › History", "reach": 3, - "controls": 8 + "controls": 9 }, { "page": "/extensions", @@ -1840,7 +1846,7 @@ "page": "/settings/ai", "label": "Settings › AI assistant", "reach": 3, - "controls": 52 + "controls": 55 }, { "page": "/settings/search", @@ -1938,6 +1944,12 @@ "reach": 3, "controls": 23 }, + { + "page": "/settings/backups", + "label": "Settings › Backups", + "reach": 3, + "controls": 9 + }, { "page": "/settings/storage", "label": "Settings › Storage", diff --git a/ci/clicks/journeys.mjs b/ci/clicks/journeys.mjs index f80ba99d4..526fa4bb1 100644 --- a/ci/clicks/journeys.mjs +++ b/ci/clicks/journeys.mjs @@ -308,7 +308,7 @@ export const JOURNEYS = [ await go(ctx, "Sensors"); await meter.click(page.getByRole("main").getByRole("button", { name: "Add sensor" }).first(), "Add sensor"); await meter.click(page.getByRole("dialog").getByRole("button", { name: "Make webhook" }), "Make webhook"); - await page.getByText(/token/i).first().waitFor(); + await page.getByRole("dialog").getByText(/token/i).first().waitFor(); }, }, { @@ -460,6 +460,8 @@ export const JOURNEYS = [ const { page, meter } = ctx; await go(ctx, "Entities"); await meter.type(page.getByRole("searchbox", { name: "Find entities" }), "rasp", "part of its name"); + // the list filters as you type: the other entity leaves it + await page.getByRole("main").getByRole("table").getByText("Lens", { exact: true }).waitFor({ state: "hidden" }); await meter.click(page.getByRole("main").getByRole("button", { name: "Raspberry Pi", exact: true }), "Raspberry Pi"); await page.waitForURL(/entity=\d+/); await page.getByText(/Raspberry Pi can run Lens/).first().waitFor(); diff --git a/ci/clicks/meter.mjs b/ci/clicks/meter.mjs index 99da68cb8..e3cae7109 100644 --- a/ci/clicks/meter.mjs +++ b/ci/clicks/meter.mjs @@ -61,7 +61,15 @@ export class Meter { /** On a phone, 1 when the control is off the screen (a swipe brings it into view); otherwise 0. */ async swipesTo(locator) { if (!this.touch) return 0; - const box = await locator.boundingBox(); + // Where it settles, not where an opening dialog or a late layout has it for a moment + let box = await locator.boundingBox(); + for (let i = 0; i < 10; i++) { + await this.page.waitForTimeout(100); + const next = await locator.boundingBox(); + const same = box && next && box.x === next.x && box.y === next.y && box.width === next.width; + box = next; + if (same) break; + } const view = this.page.viewportSize(); if (!box || !view) return 0; const off = box.y < 0 || box.y + box.height > view.height || box.x < 0 || box.x + box.width > view.width; From dfdf90d893e4a7e4a8035b98d7e04f2745145d53 Mon Sep 17 00:00:00 2001 From: Adeel Ahmad Date: Sat, 10 Oct 2026 22:50:22 +0000 Subject: [PATCH 06/15] ci(clicks): tap New conversation where Chat opens on the list On a phone Chat opens on the conversation list, so the journey taps New conversation when the question box isn't there. The computer baseline is a run on main with the setup, Chat, Search and Notes cuts. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_0145yfQfD4eNkWHgPkk3Q82r --- ci/clicks/baseline.json | 722 ++++++++++++++++++++++++++++++++++++++-- ci/clicks/journeys.mjs | 6 +- 2 files changed, 691 insertions(+), 37 deletions(-) diff --git a/ci/clicks/baseline.json b/ci/clicks/baseline.json index 794570df8..4717b448b 100644 --- a/ci/clicks/baseline.json +++ b/ci/clicks/baseline.json @@ -1,7 +1,8 @@ { - "surveyed": "2026-10-10T21:42:56.433Z", + "surveyed": "2026-10-10T22:44:48.962Z", "commit": "", "viewport": "1400x900", + "device": "desktop", "journeys": [ { "module": "Setup", @@ -10,6 +11,7 @@ "clicks": 7, "keys": 2, "prompts": 0, + "swipes": 0, "steps": [ { "page": "(outside the browser)", @@ -77,7 +79,7 @@ } ], "id": "install", - "ms": 1749, + "ms": 2454, "ok": true }, { @@ -87,6 +89,7 @@ "clicks": 1, "keys": 17, "prompts": 1, + "swipes": 0, "steps": [ { "page": "/setup", @@ -114,7 +117,7 @@ } ], "id": "first-admin", - "ms": 409, + "ms": 500, "ok": true }, { @@ -124,6 +127,7 @@ "clicks": 4, "keys": 0, "prompts": 0, + "swipes": 0, "steps": [ { "page": "/welcome", @@ -159,7 +163,7 @@ } ], "id": "setup-wizard", - "ms": 572, + "ms": 654, "ok": true }, { @@ -169,6 +173,7 @@ "clicks": 0, "keys": 43, "prompts": 0, + "swipes": 0, "steps": [ { "page": "/", @@ -188,7 +193,7 @@ } ], "id": "first-question", - "ms": 1175, + "ms": 1250, "ok": true }, { @@ -198,6 +203,7 @@ "clicks": 3, "keys": 1, "prompts": 0, + "swipes": 0, "steps": [ { "page": "/", @@ -233,7 +239,7 @@ } ], "id": "import-paste", - "ms": 4120, + "ms": 4163, "ok": true }, { @@ -243,6 +249,7 @@ "clicks": 2, "keys": 0, "prompts": 0, + "swipes": 0, "steps": [ { "page": "/", @@ -262,7 +269,7 @@ } ], "id": "library-open", - "ms": 2598, + "ms": 2592, "ok": true }, { @@ -272,6 +279,7 @@ "clicks": 1, "keys": 10, "prompts": 0, + "swipes": 0, "steps": [ { "page": "/", @@ -299,7 +307,7 @@ } ], "id": "search-word", - "ms": 3202, + "ms": 3218, "ok": true }, { @@ -309,6 +317,7 @@ "clicks": 0, "keys": 9, "prompts": 0, + "swipes": 0, "steps": [ { "page": "/", @@ -336,7 +345,7 @@ } ], "id": "jump-to", - "ms": 2312, + "ms": 2368, "ok": true }, { @@ -346,6 +355,7 @@ "clicks": 1, "keys": 34, "prompts": 0, + "swipes": 0, "steps": [ { "page": "/", @@ -373,7 +383,7 @@ } ], "id": "chat-ask", - "ms": 2750, + "ms": 3439, "ok": true }, { @@ -383,6 +393,7 @@ "clicks": 3, "keys": 35, "prompts": 0, + "swipes": 0, "steps": [ { "page": "/", @@ -418,7 +429,7 @@ } ], "id": "note-create", - "ms": 3328, + "ms": 3416, "ok": true }, { @@ -428,6 +439,7 @@ "clicks": 2, "keys": 9, "prompts": 0, + "swipes": 0, "steps": [ { "page": "/", @@ -463,7 +475,7 @@ } ], "id": "topic-add", - "ms": 3367, + "ms": 3514, "ok": true }, { @@ -473,6 +485,7 @@ "clicks": 3, "keys": 14, "prompts": 0, + "swipes": 0, "steps": [ { "page": "/", @@ -508,7 +521,7 @@ } ], "id": "pipeline-create", - "ms": 2676, + "ms": 3092, "ok": true }, { @@ -518,6 +531,7 @@ "clicks": 3, "keys": 12, "prompts": 0, + "swipes": 0, "steps": [ { "page": "/", @@ -553,7 +567,7 @@ } ], "id": "routine-create", - "ms": 2854, + "ms": 2864, "ok": true }, { @@ -563,6 +577,7 @@ "clicks": 3, "keys": 0, "prompts": 0, + "swipes": 0, "steps": [ { "page": "/", @@ -590,7 +605,7 @@ } ], "id": "extension-add", - "ms": 2571, + "ms": 2680, "ok": true }, { @@ -600,6 +615,7 @@ "clicks": 3, "keys": 0, "prompts": 0, + "swipes": 0, "steps": [ { "page": "/", @@ -627,7 +643,7 @@ } ], "id": "sensor-webhook", - "ms": 2608, + "ms": 2680, "ok": true }, { @@ -637,6 +653,7 @@ "clicks": 3, "keys": 5, "prompts": 0, + "swipes": 0, "steps": [ { "page": "/", @@ -672,7 +689,7 @@ } ], "id": "settings-change", - "ms": 3279, + "ms": 3360, "ok": true }, { @@ -682,6 +699,7 @@ "clicks": 5, "keys": 18, "prompts": 0, + "swipes": 0, "steps": [ { "page": "/", @@ -733,7 +751,7 @@ } ], "id": "person-add", - "ms": 2964, + "ms": 3352, "ok": true }, { @@ -743,6 +761,7 @@ "clicks": 4, "keys": 6, "prompts": 0, + "swipes": 0, "steps": [ { "page": "/", @@ -786,7 +805,7 @@ } ], "id": "api-token", - "ms": 2797, + "ms": 3124, "ok": true }, { @@ -796,6 +815,7 @@ "clicks": 2, "keys": 0, "prompts": 0, + "swipes": 0, "steps": [ { "page": "/", @@ -815,7 +835,631 @@ } ], "id": "namespace-switch", - "ms": 2314, + "ms": 2327, + "ok": true + }, + { + "module": "Agents", + "feature": "Connect an AI assistant (Claude, ChatGPT, Cursor) over MCP", + "note": "In the assistant: add a connector and give it Lens's MCP address; the assistant opens Lens's consent page, where the person allows it. After setup Lens shows the MCP address nowhere, so it is typed (counted as typed).", + "clicks": 3, + "keys": 25, + "prompts": 0, + "swipes": 0, + "steps": [ + { + "page": "/", + "kind": "outside", + "what": "in the assistant: add a connector, type Lens's MCP address, add it", + "clicks": 2, + "keys": 25, + "prompts": 0 + }, + { + "page": "/oauth/authorize", + "kind": "click", + "what": "Allow", + "clicks": 1, + "keys": 0, + "prompts": 0 + } + ], + "id": "agent-connect", + "ms": 2699, + "ok": true + }, + { + "module": "Import", + "feature": "Upload a transcript file", + "note": "", + "clicks": 4, + "keys": 0, + "prompts": 0, + "swipes": 0, + "steps": [ + { + "page": "/", + "kind": "click", + "what": "Import (top bar)", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/", + "kind": "upload", + "what": "Choose files, then the file", + "clicks": 2, + "keys": 0, + "prompts": 0 + }, + { + "page": "/import", + "kind": "click", + "what": "Import (covered by something else on the page)", + "clicks": 1, + "keys": 0, + "prompts": 0 + } + ], + "id": "import-file", + "ms": 8889, + "ok": true + }, + { + "module": "Sensors", + "feature": "Watch a folder on this machine for new files", + "note": "Needs rclone, as the Lens image has (CI copies the image's version); the folders offered are the allowed ones set at startup.", + "clicks": 9, + "keys": 0, + "prompts": 0, + "swipes": 0, + "steps": [ + { + "page": "/", + "kind": "click", + "what": "Sensors", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/sensors", + "kind": "click", + "what": "Files, email and calendars tab", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/sources", + "kind": "click", + "what": "Add connection", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/sources", + "kind": "click", + "what": "This machine", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/sources", + "kind": "click", + "what": "Test connection", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/sources", + "kind": "click", + "what": "Done (the test passed)", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/sources", + "kind": "click", + "what": "the allowed folder", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/sources", + "kind": "click", + "what": "Watch this folder", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/sources", + "kind": "click", + "what": "Start watching", + "clicks": 1, + "keys": 0, + "prompts": 0 + } + ], + "id": "source-folder", + "ms": 5300, + "ok": true + }, + { + "module": "Entities", + "feature": "Find an entity and see where it was mentioned", + "note": "", + "clicks": 3, + "keys": 4, + "prompts": 0, + "swipes": 0, + "steps": [ + { + "page": "/", + "kind": "click", + "what": "Entities", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/entities", + "kind": "type", + "what": "part of its name", + "clicks": 1, + "keys": 4, + "prompts": 0 + }, + { + "page": "/entities", + "kind": "click", + "what": "Raspberry Pi", + "clicks": 1, + "keys": 0, + "prompts": 0 + } + ], + "id": "entity-find", + "ms": 4303, + "ok": true + }, + { + "module": "Graph", + "feature": "Find a speaker in the graph of what was imported", + "note": "The first namespace keeps its graph to itself, so the graph opens empty until it is picked as the namespace.", + "clicks": 4, + "keys": 7, + "prompts": 0, + "swipes": 0, + "steps": [ + { + "page": "/", + "kind": "click", + "what": "Graph", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/graph", + "kind": "click", + "what": "the namespace switcher", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/graph", + "kind": "click", + "what": "interviews", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/graph", + "kind": "type", + "what": "part of the name", + "clicks": 1, + "keys": 6, + "prompts": 0 + }, + { + "page": "/graph", + "kind": "key", + "what": "Enter to pick it", + "clicks": 0, + "keys": 1, + "prompts": 0 + } + ], + "id": "graph-find", + "ms": 4621, + "ok": true + }, + { + "module": "Podcasts", + "feature": "Make a podcast from a recording", + "note": "", + "clicks": 5, + "keys": 0, + "prompts": 0, + "swipes": 0, + "steps": [ + { + "page": "/", + "kind": "click", + "what": "Library", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/library", + "kind": "click", + "what": "the recording", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/resources/:id", + "kind": "click", + "what": "More actions", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/resources/:id", + "kind": "click", + "what": "Create podcast…", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/resources/:id", + "kind": "click", + "what": "Create podcast", + "clicks": 1, + "keys": 0, + "prompts": 0 + } + ], + "id": "podcast-create", + "ms": 3847, + "ok": true + }, + { + "module": "Reports", + "feature": "Save the namespace report as a PDF", + "note": "The browser's print dialog does the saving (one click there, counted).", + "clicks": 4, + "keys": 0, + "prompts": 0, + "swipes": 0, + "steps": [ + { + "page": "/", + "kind": "click", + "what": "Reports", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/reports", + "kind": "click", + "what": "PDF / HTML", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/reports", + "kind": "click", + "what": "Print or save as PDF", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/reports", + "kind": "outside", + "what": "the print dialog: Save", + "clicks": 1, + "keys": 0, + "prompts": 0 + } + ], + "id": "report-pdf", + "ms": 3205, + "ok": true + }, + { + "module": "Pipelines", + "feature": "Make a workflow", + "note": "", + "clicks": 4, + "keys": 13, + "prompts": 0, + "swipes": 0, + "steps": [ + { + "page": "/", + "kind": "click", + "what": "Pipelines", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/pipelines", + "kind": "click", + "what": "Workflows tab", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/workflows", + "kind": "click", + "what": "New workflow", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/workflows/new", + "kind": "type", + "what": "name", + "clicks": 0, + "keys": 13, + "prompts": 0 + }, + { + "page": "/workflows/new", + "kind": "click", + "what": "Create workflow", + "clicks": 1, + "keys": 0, + "prompts": 0 + } + ], + "id": "workflow-create", + "ms": 3294, + "ok": true + }, + { + "module": "Pipelines", + "feature": "Make a prompt template", + "note": "", + "clicks": 4, + "keys": 10, + "prompts": 0, + "swipes": 0, + "steps": [ + { + "page": "/", + "kind": "click", + "what": "Pipelines", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/pipelines", + "kind": "click", + "what": "Templates tab", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/templates", + "kind": "click", + "what": "New template", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/templates/new", + "kind": "type", + "what": "name", + "clicks": 0, + "keys": 10, + "prompts": 0 + }, + { + "page": "/templates/new", + "kind": "click", + "what": "Create and edit", + "clicks": 1, + "keys": 0, + "prompts": 0 + } + ], + "id": "template-create", + "ms": 2961, + "ok": true + }, + { + "module": "Admin", + "feature": "Make a namespace", + "note": "", + "clicks": 3, + "keys": 15, + "prompts": 0, + "swipes": 0, + "steps": [ + { + "page": "/", + "kind": "click", + "what": "Admin", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/admin/people", + "kind": "click", + "what": "Namespaces tab", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/admin/namespaces", + "kind": "click", + "what": "New namespace", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/admin/namespaces", + "kind": "type", + "what": "name", + "clicks": 0, + "keys": 14, + "prompts": 0 + }, + { + "page": "/admin/namespaces", + "kind": "key", + "what": "Enter to create", + "clicks": 0, + "keys": 1, + "prompts": 0 + } + ], + "id": "namespace-create", + "ms": 3098, + "ok": true + }, + { + "module": "Speakers", + "feature": "Name a speaker", + "note": "", + "clicks": 3, + "keys": 7, + "prompts": 0, + "swipes": 0, + "steps": [ + { + "page": "/", + "kind": "click", + "what": "Settings", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/settings/speakers", + "kind": "click", + "what": "Host A", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/speakers/:id", + "kind": "click", + "what": "Rename", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/speakers/:id", + "kind": "replace", + "what": "the name", + "clicks": 0, + "keys": 6, + "prompts": 0 + }, + { + "page": "/speakers/:id", + "kind": "key", + "what": "Enter to save", + "clicks": 0, + "keys": 1, + "prompts": 0 + } + ], + "id": "speaker-rename", + "ms": 3862, + "ok": true + }, + { + "module": "Setup", + "feature": "Switch to a cloud model with an API key", + "note": "What a Raspberry Pi install does after the installer: an OpenAI-compatible cloud provider, its model and a pasted key.", + "clicks": 5, + "keys": 40, + "prompts": 0, + "swipes": 0, + "steps": [ + { + "page": "/", + "kind": "click", + "what": "Settings", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/settings/speakers", + "kind": "click", + "what": "LLM provider", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/settings/llm", + "kind": "replace", + "what": "the provider's address", + "clicks": 1, + "keys": 26, + "prompts": 0 + }, + { + "page": "/settings/llm", + "kind": "replace", + "what": "the model", + "clicks": 1, + "keys": 12, + "prompts": 0 + }, + { + "page": "/settings/llm", + "kind": "paste", + "what": "paste the API key", + "clicks": 1, + "keys": 1, + "prompts": 0 + }, + { + "page": "/settings/llm", + "kind": "key", + "what": "Ctrl+S to save", + "clicks": 0, + "keys": 1, + "prompts": 0 + } + ], + "id": "cloud-model", + "ms": 2908, "ok": true } ], @@ -830,7 +1474,7 @@ "page": "/library", "label": "Library", "reach": 1, - "controls": 4 + "controls": 39 }, { "page": "/search", @@ -866,7 +1510,7 @@ "page": "/graph", "label": "Graph", "reach": 1, - "controls": 19 + "controls": 18 }, { "page": "/podcasts", @@ -878,25 +1522,25 @@ "page": "/reports", "label": "Reports", "reach": 1, - "controls": 4 + "controls": 7 }, { "page": "/costs", "label": "Costs", "reach": 1, - "controls": 4 + "controls": 12 }, { "page": "/pipelines", "label": "Pipelines", "reach": 1, - "controls": 16 + "controls": 20 }, { "page": "/workflows", "label": "Pipelines › Workflows", "reach": 2, - "controls": 7 + "controls": 8 }, { "page": "/workflows/nodes", @@ -914,7 +1558,7 @@ "page": "/templates", "label": "Pipelines › Templates", "reach": 2, - "controls": 9 + "controls": 11 }, { "page": "/routines", @@ -932,7 +1576,7 @@ "page": "/routines/history", "label": "Routines › History", "reach": 2, - "controls": 3 + "controls": 8 }, { "page": "/extensions", @@ -944,13 +1588,13 @@ "page": "/sensors", "label": "Sensors", "reach": 1, - "controls": 9 + "controls": 8 }, { "page": "/sources", "label": "Sensors › Files, email and calendars", "reach": 2, - "controls": 5 + "controls": 9 }, { "page": "/sensors/logins", @@ -998,7 +1642,7 @@ "page": "/settings/llm", "label": "Settings › LLM provider", "reach": 2, - "controls": 10 + "controls": 11 }, { "page": "/settings/local-model", @@ -1010,7 +1654,7 @@ "page": "/settings/ai", "label": "Settings › AI assistant", "reach": 2, - "controls": 53 + "controls": 56 }, { "page": "/settings/search", @@ -1136,7 +1780,7 @@ "page": "/settings/iiif", "label": "Settings › IIIF & metadata", "reach": 2, - "controls": 20 + "controls": 21 }, { "page": "/settings/startup", @@ -1148,25 +1792,31 @@ "page": "/admin/people", "label": "Admin", "reach": 1, - "controls": 11 + "controls": 12 }, { "page": "/admin/namespaces", "label": "Admin › Namespaces", "reach": 2, - "controls": 7 + "controls": 8 }, { "page": "/admin/audit", "label": "Admin › Audit log", "reach": 2, - "controls": 28 + "controls": 35 }, { "page": "/admin/health", "label": "Admin › System health", "reach": 2, "controls": 10 + }, + { + "page": "/notes/:id", + "label": "Untitled", + "reach": 1, + "controls": 9 } ] } diff --git a/ci/clicks/journeys.mjs b/ci/clicks/journeys.mjs index 7496bcf74..3df3c8d44 100644 --- a/ci/clicks/journeys.mjs +++ b/ci/clicks/journeys.mjs @@ -221,7 +221,11 @@ export const JOURNEYS = [ async run(ctx) { const { page, meter } = ctx; await go(ctx, "Chat"); - await meter.type(page.getByRole("textbox", { name: "Your question" }), "Who said what about Raspberry Pi?", "question"); + const question = page.getByRole("textbox", { name: "Your question" }); + // A phone's Chat opens on the list of conversations once there is one + if (!(await question.waitFor({ timeout: 3000 }).then(() => true, () => false))) + await meter.click(page.getByRole("button", { name: "New conversation" }), "New conversation"); + await meter.type(question, "Who said what about Raspberry Pi?", "question"); await meter.press("Enter", "Enter to send"); await page.getByText(ANSWER).first().waitFor({ timeout: 60000 }); }, From e80ba1d7315e27c813ffa87ca2a55b039ed514d9 Mon Sep 17 00:00:00 2001 From: Adeel Ahmad Date: Sat, 10 Oct 2026 22:53:23 +0000 Subject: [PATCH 07/15] feat(ui): copy the MCP address from the account menu after setup After setup Lens showed its MCP address nowhere but the setup wizard, so connecting an assistant meant typing it. The account menu now has Copy MCP address (one click, with a toast saying what to do with it), and API tokens shows the address with Copy above Apps with access, saying to use an API token while apps can't sign in. Connecting an assistant over MCP drops from 3 clicks + 25 keys to 5 clicks + 1 paste on a computer and on a phone; the agent-connect journey now copies from the menu and checks the clipboard, and both baselines carry it. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01JYGqrDpgP3Gcw1Jwf5mwT8 --- ci/clicks/baseline-phone.json | 28 +++++-- ci/clicks/baseline.json | 28 +++++-- ci/clicks/journeys.mjs | 10 ++- docs/mcp.md | 2 + .../__tests__/connect-assistant.test.tsx | 83 +++++++++++++++++++ nextjs-frontend/components/account/apps.tsx | 7 +- .../components/account/connect-assistant.tsx | 48 +++++++++++ .../components/app-shell/account-menu.tsx | 27 +++++- .../components/setup/setup-wizard.tsx | 3 +- 9 files changed, 218 insertions(+), 18 deletions(-) create mode 100644 nextjs-frontend/__tests__/connect-assistant.test.tsx create mode 100644 nextjs-frontend/components/account/connect-assistant.tsx diff --git a/ci/clicks/baseline-phone.json b/ci/clicks/baseline-phone.json index 614e1ff9a..b9277d961 100644 --- a/ci/clicks/baseline-phone.json +++ b/ci/clicks/baseline-phone.json @@ -963,18 +963,34 @@ { "module": "Agents", "feature": "Connect an AI assistant (Claude, ChatGPT, Cursor) over MCP", - "note": "In the assistant: add a connector and give it Lens's MCP address; the assistant opens Lens's consent page, where the person allows it. After setup Lens shows the MCP address nowhere, so it is typed (counted as typed).", - "clicks": 3, - "keys": 25, + "note": "Copy MCP address in the account menu; in the assistant: add a connector and paste the address; the assistant opens Lens's consent page, where the person allows it.", + "clicks": 5, + "keys": 1, "prompts": 0, "swipes": 0, "steps": [ + { + "page": "/", + "kind": "tap", + "what": "Account menu", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/", + "kind": "tap", + "what": "Copy MCP address", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, { "page": "/", "kind": "outside", - "what": "in the assistant: add a connector, type Lens's MCP address, add it", + "what": "in the assistant: add a connector, paste Lens's MCP address, add it", "clicks": 2, - "keys": 25, + "keys": 1, "prompts": 0 }, { @@ -987,7 +1003,7 @@ } ], "id": "agent-connect", - "ms": 3278, + "ms": 3330, "ok": true }, { diff --git a/ci/clicks/baseline.json b/ci/clicks/baseline.json index dfa6f0da9..aa5f36e94 100644 --- a/ci/clicks/baseline.json +++ b/ci/clicks/baseline.json @@ -865,18 +865,34 @@ { "module": "Agents", "feature": "Connect an AI assistant (Claude, ChatGPT, Cursor) over MCP", - "note": "In the assistant: add a connector and give it Lens's MCP address; the assistant opens Lens's consent page, where the person allows it. After setup Lens shows the MCP address nowhere, so it is typed (counted as typed).", - "clicks": 3, - "keys": 25, + "note": "Copy MCP address in the account menu; in the assistant: add a connector and paste the address; the assistant opens Lens's consent page, where the person allows it.", + "clicks": 5, + "keys": 1, "prompts": 0, "swipes": 0, "steps": [ + { + "page": "/", + "kind": "click", + "what": "Account menu", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/", + "kind": "click", + "what": "Copy MCP address", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, { "page": "/", "kind": "outside", - "what": "in the assistant: add a connector, type Lens's MCP address, add it", + "what": "in the assistant: add a connector, paste Lens's MCP address, add it", "clicks": 2, - "keys": 25, + "keys": 1, "prompts": 0 }, { @@ -889,7 +905,7 @@ } ], "id": "agent-connect", - "ms": 2695, + "ms": 3061, "ok": true }, { diff --git a/ci/clicks/journeys.mjs b/ci/clicks/journeys.mjs index 526fa4bb1..cf8fe2112 100644 --- a/ci/clicks/journeys.mjs +++ b/ci/clicks/journeys.mjs @@ -378,12 +378,18 @@ export const JOURNEYS = [ ns: "", module: "Agents", feature: "Connect an AI assistant (Claude, ChatGPT, Cursor) over MCP", - note: "In the assistant: add a connector and give it Lens's MCP address; the assistant opens Lens's consent page, where the person allows it. After setup Lens shows the MCP address nowhere, so it is typed (counted as typed).", + note: "Copy MCP address in the account menu; in the assistant: add a connector and paste the address; the assistant opens Lens's consent page, where the person allows it.", from: "/", async run(ctx) { const { page, meter, base } = ctx; const mcp = `${base}/mcp`; - meter.record("outside", "in the assistant: add a connector, type Lens's MCP address, add it", 2, mcp.length); + await page.context().grantPermissions(["clipboard-read", "clipboard-write"], { origin: base }); + await meter.click(page.getByRole("button", { name: "Account menu" }), "Account menu"); + await meter.click(page.getByRole("menuitem", { name: "Copy MCP address" }), "Copy MCP address"); + await page.getByText("MCP address copied").waitFor(); + const copied = await page.evaluate(() => navigator.clipboard.readText()); + if (copied !== mcp) throw new Error(`copied ${copied}, not ${mcp}`); + meter.record("outside", "in the assistant: add a connector, paste Lens's MCP address, add it", 2, 1); // What the assistant does by itself (RFC 7591 registration, PKCE), then it opens the consent page const redirect = "http://127.0.0.1:9/callback"; const r = await fetch(`${base}/api/v1/oauth/register`, { diff --git a/docs/mcp.md b/docs/mcp.md index e39289d5a..68f60ef05 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -13,6 +13,8 @@ It works the other way too: Lens's own assistant calls the tools of MCP servers The server is at `/mcp` on the web app's address: `https://lens.example.org/mcp` (`http://localhost:3000/mcp` locally). Add it to the client as a remote (Streamable HTTP) server, and the client sends you to Lens to sign in. +In the web app, **Copy MCP address** in the account menu (your picture, top right) copies it in one click; it is also +under API tokens, above Apps with access, and in the setup wizard's Apps step. | Client | | |---|---| diff --git a/nextjs-frontend/__tests__/connect-assistant.test.tsx b/nextjs-frontend/__tests__/connect-assistant.test.tsx new file mode 100644 index 000000000..1bd44221f --- /dev/null +++ b/nextjs-frontend/__tests__/connect-assistant.test.tsx @@ -0,0 +1,83 @@ +import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; +import { fireEvent, render, screen, waitFor } from "@testing-library/react"; +import "@testing-library/jest-dom"; + +import { ConnectedApps } from "@/components/account/apps"; +import { connectHint } from "@/components/account/connect-assistant"; +import { AccountMenu } from "@/components/app-shell/account-menu"; +import { TooltipProvider } from "@/components/ui/tooltip"; + +const ok = (data: unknown) => Promise.resolve({ data, response: { ok: true, status: 200 } }); +jest.mock("@/app/openapi-client", () => ({ + Oauth: { listGrants: () => ok([]), revokeGrant: () => ok({}) }, + Tokens: { listTokens: () => ok([]) }, +})); +jest.mock("next-auth/react", () => ({ useSession: () => ({ data: { accessToken: "t" } }), signOut: jest.fn() })); +jest.mock("@/lib/hooks/session", () => ({ + useArchive: () => ({ me: { user: { name: "Vi", email: "vi@x.io" }, roles: {} }, admin: false }), +})); +const toast = jest.fn(); +jest.mock("@/components/ui/toast", () => ({ useToast: () => toast })); + +const MCP = `${window.location.origin}/mcp`; +let writeText: jest.Mock; +let signIn: boolean; + +beforeEach(() => { + signIn = true; + writeText = jest.fn(() => Promise.resolve()); + Object.assign(navigator, { clipboard: { writeText } }); + // OAuth discovery answers only while apps may sign in + global.fetch = jest.fn(() => Promise.resolve({ ok: signIn } as Response)); +}); + +function show(ui: React.ReactNode) { + const qc = new QueryClient({ defaultOptions: { queries: { retry: false } } }); + return render( + + {ui} + , + ); +} + +describe("connecting an assistant", () => { + it("shows the MCP address with Copy above the apps with access", async () => { + show(); + expect(await screen.findByText(MCP)).toBeInTheDocument(); + expect(await screen.findByText(/Add it to Claude, ChatGPT, Cursor/)).toBeInTheDocument(); + fireEvent.click(screen.getByRole("button", { name: "Copy MCP address" })); + await waitFor(() => expect(writeText).toHaveBeenCalledWith(MCP)); + expect(await screen.findByRole("button", { name: "Copied" })).toBeInTheDocument(); + }); + + it("says to give an API token while apps can't sign in", async () => { + signIn = false; + show(); + expect(await screen.findByText(/give the assistant an API token/)).toBeInTheDocument(); + expect(connectHint(undefined)).toMatch(/as a connector/); + }); + + it("copies the address from the account menu in one click", async () => { + show(); + fireEvent.keyDown(screen.getByRole("button", { name: "Account menu" }), { key: "Enter" }); + fireEvent.click(await screen.findByRole("menuitem", { name: "Copy MCP address" })); + await waitFor(() => expect(writeText).toHaveBeenCalledWith(MCP)); + await waitFor(() => + expect(toast).toHaveBeenCalledWith( + expect.objectContaining({ title: "MCP address copied", body: expect.stringContaining(MCP), tone: "green" }), + ), + ); + }); + + it("shows the address when the browser won't copy", async () => { + writeText.mockRejectedValue(new Error("denied")); + show(); + fireEvent.keyDown(screen.getByRole("button", { name: "Account menu" }), { key: "Enter" }); + fireEvent.click(await screen.findByRole("menuitem", { name: "Copy MCP address" })); + await waitFor(() => + expect(toast).toHaveBeenCalledWith( + expect.objectContaining({ title: "Copy the MCP address", body: expect.stringContaining(MCP) }), + ), + ); + }); +}); diff --git a/nextjs-frontend/components/account/apps.tsx b/nextjs-frontend/components/account/apps.tsx index 875931df8..0d372823d 100644 --- a/nextjs-frontend/components/account/apps.tsx +++ b/nextjs-frontend/components/account/apps.tsx @@ -6,6 +6,7 @@ import { useState } from "react"; import { Oauth } from "@/app/openapi-client"; import type { OAuthGrant } from "@/app/openapi-client/types.gen"; +import { ConnectAssistant } from "@/components/account/connect-assistant"; import { tokenExpiry } from "@/components/account/token-model"; import { ACCESS_LABEL, appHost } from "@/components/oauth/model"; import { Banner } from "@/components/ui/banner"; @@ -17,7 +18,10 @@ import { useToast } from "@/components/ui/toast"; import { data, useApiClient } from "@/lib/api/browser"; import { relative, shortDate } from "@/lib/format"; -/** The apps this person gave access to through OAuth (docs/authentication.md#oauth), each with Revoke. */ +/** + * The apps this person gave access to through OAuth (docs/authentication.md#oauth), each with Revoke, and above them + * the MCP address to connect another. + */ export function ConnectedApps() { const client = useApiClient(); const qc = useQueryClient(); @@ -53,6 +57,7 @@ export function ConnectedApps() { until you revoke them.

+ {grants.isPending ? ( ) : grants.isError ? ( diff --git a/nextjs-frontend/components/account/connect-assistant.tsx b/nextjs-frontend/components/account/connect-assistant.tsx new file mode 100644 index 000000000..a27af9ddc --- /dev/null +++ b/nextjs-frontend/components/account/connect-assistant.tsx @@ -0,0 +1,48 @@ +"use client"; + +import { useQuery } from "@tanstack/react-query"; +import { useEffect, useState } from "react"; + +import { CodeBlock } from "@/components/ui/states"; + +/** Where AI assistants and other MCP clients connect: the web app's own address plus /mcp (docs/mcp.md). */ +export function mcpAddress(): string { + return typeof window === "undefined" ? "/mcp" : `${window.location.origin}/mcp`; +} + +/** The MCP address once the page is in the browser (the server can't know the address people use). */ +export function useMcpAddress(): string { + const [mcp, setMcp] = useState("/mcp"); + useEffect(() => setMcp(mcpAddress()), []); + return mcp; +} + +/** Whether apps may sign people in here (tokens.oauth_enabled): OAuth discovery answers only when they may. */ +export function useAppSignIn(enabled = true) { + return useQuery({ + queryKey: ["oauth", "on"], + queryFn: async () => (await fetch("/.well-known/oauth-authorization-server", { cache: "no-store" })).ok, + enabled, + staleTime: 30_000, + }); +} + +/** What to do with the address: add it as a connector, or give a token while apps can't sign in. */ +export function connectHint(signIn: boolean | undefined): string { + return signIn === false + ? "Apps can’t sign in here, so give the assistant an API token as its key (an admin turns sign-in on in Settings → API keys)." + : "Add it to Claude, ChatGPT, Cursor or another MCP client as a connector; you allow it here once."; +} + +/** The MCP address with Copy, so connecting an assistant after setup is a copy and a paste (API tokens page). */ +export function ConnectAssistant() { + const mcp = useMcpAddress(); + const signIn = useAppSignIn(); + return ( +
+ Connect an assistant + +

{connectHint(signIn.data)}

+
+ ); +} diff --git a/nextjs-frontend/components/app-shell/account-menu.tsx b/nextjs-frontend/components/app-shell/account-menu.tsx index c9614778a..b865c3b07 100644 --- a/nextjs-frontend/components/app-shell/account-menu.tsx +++ b/nextjs-frontend/components/app-shell/account-menu.tsx @@ -1,15 +1,17 @@ "use client"; import { useQuery } from "@tanstack/react-query"; -import { KeyRound, Keyboard, LogOut, Signpost, SunMoon, UserRound, Users } from "lucide-react"; +import { KeyRound, Keyboard, LogOut, Plug, Signpost, SunMoon, UserRound, Users } from "lucide-react"; import Link from "next/link"; import { signOut } from "next-auth/react"; import { useState } from "react"; import { Tokens } from "@/app/openapi-client"; +import { connectHint, mcpAddress, useAppSignIn } from "@/components/account/connect-assistant"; import { useTheme, type ThemeChoice } from "@/components/app-shell/theme"; import { Menu, MenuContent, MenuItem, MenuTrigger } from "@/components/ui/menu"; import { Avatar, Skeleton } from "@/components/ui/states"; +import { useToast } from "@/components/ui/toast"; import { data, useApiClient } from "@/lib/api/browser"; import { useArchive } from "@/lib/hooks/session"; @@ -31,12 +33,17 @@ export function rolesSummary(admin: boolean, roles: Record, part return list.slice(0, 3).join(" · ") + (list.length > 3 ? ` · +${list.length - 3} more` : ""); } -/** Name, roles, profile and password, API tokens, appearance, shortcuts, the welcome tour, sign out (Access AC4). */ +/** + * Name, roles, profile and password, API tokens, the MCP address to connect an assistant, appearance, shortcuts, the + * welcome tour, sign out (Access AC4). + */ export function AccountMenu({ name, email }: { name?: string | null; email: string }) { const { me, admin } = useArchive(); const client = useApiClient(); const [open, setOpen] = useState(false); const [theme, setTheme] = useTheme(); + const toast = useToast(); + const signIn = useAppSignIn(open); const tokens = useQuery({ queryKey: ["tokens"], queryFn: () => data(Tokens.listTokens({ client })), @@ -46,6 +53,16 @@ export function AccountMenu({ name, email }: { name?: string | null; email: stri const roles = (me?.roles ?? {}) as Record; const owns = !admin && Object.values(roles).includes("owner"); const display = me?.user.name || name || me?.user.email || email; + // In the click itself, not after the menu closes: some browsers only let a click write to the clipboard. + const copyMcp = async () => { + const mcp = mcpAddress(); + try { + await navigator.clipboard.writeText(mcp); + toast({ title: "MCP address copied", body: `${mcp}. ${connectHint(signIn.data)}`, tone: "green" }); + } catch { + toast({ title: "Copy the MCP address", body: `${mcp}. It’s also under API tokens.`, tone: "gate" }); + } + }; return ( @@ -76,6 +93,12 @@ export function AccountMenu({ name, email }: { name?: string | null; email: stri {tokens.data && {tokens.data.length}} + + + {owns && ( diff --git a/nextjs-frontend/components/setup/setup-wizard.tsx b/nextjs-frontend/components/setup/setup-wizard.tsx index c94939a3b..750585597 100644 --- a/nextjs-frontend/components/setup/setup-wizard.tsx +++ b/nextjs-frontend/components/setup/setup-wizard.tsx @@ -14,6 +14,7 @@ import { type SetupView, type TelemetryTestResult, } from "@/app/openapi-client"; +import { mcpAddress } from "@/components/account/connect-assistant"; import { AuthAlert, AuthBrand } from "@/components/auth/auth-card"; import { SegmentedChoice } from "@/components/settings/controls"; import { AddConnection } from "@/components/storage/add-connection"; @@ -756,7 +757,7 @@ function AppsStep({ view, onNext }: { view: SetupView; onNext: (saved: boolean) const [minutes, setMinutes] = useState(String(o.access_minutes)); const [days, setDays] = useState(String(o.refresh_days)); const [copied, setCopied] = useState(false); - const mcp = typeof window === "undefined" ? "/mcp" : `${window.location.origin}/mcp`; + const mcp = mcpAddress(); const mins = Number(minutes); const ds = Number(days); const validMinutes = Number.isInteger(mins) && mins >= 5 && mins <= 1440; From c598a1e628cb98763573450d162baba05f0d4c82 Mon Sep 17 00:00:00 2001 From: Adeel Ahmad Date: Sat, 10 Oct 2026 22:54:56 +0000 Subject: [PATCH 08/15] ci(clicks): phone baseline on main with the setup and Notes cuts Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_0145yfQfD4eNkWHgPkk3Q82r --- ci/clicks/baseline-phone.json | 100 ++++++++++++++-------------------- 1 file changed, 42 insertions(+), 58 deletions(-) diff --git a/ci/clicks/baseline-phone.json b/ci/clicks/baseline-phone.json index 614e1ff9a..197679d5a 100644 --- a/ci/clicks/baseline-phone.json +++ b/ci/clicks/baseline-phone.json @@ -1,5 +1,5 @@ { - "surveyed": "2026-10-10T22:24:38.726Z", + "surveyed": "2026-10-10T22:54:07.795Z", "commit": "", "viewport": "Pixel 7, 412x839, touch", "device": "phone", @@ -8,7 +8,7 @@ "module": "Setup", "feature": "Install with the web installer (defaults, local model found)", "note": "The install line in a terminal, then the browser installer. The browser opens on its own on a desktop; on a server the link is opened by hand (counted). A computer missing Docker also asks for its password.", - "clicks": 8, + "clicks": 7, "keys": 2, "prompts": 0, "swipes": 3, @@ -46,14 +46,6 @@ "prompts": 0, "swipes": 1 }, - { - "page": "installer:/", - "kind": "tap", - "what": "pick the model server found on this computer", - "clicks": 1, - "keys": 0, - "prompts": 0 - }, { "page": "installer:/", "kind": "tap", @@ -90,14 +82,14 @@ } ], "id": "install", - "ms": 3441, + "ms": 3183, "ok": true }, { "module": "Setup", "feature": "Create the first admin (passkey)", "note": "From the setup link, which fills in the setup code.", - "clicks": 2, + "clicks": 1, "keys": 17, "prompts": 1, "swipes": 0, @@ -106,7 +98,7 @@ "page": "/setup", "kind": "type", "what": "email", - "clicks": 1, + "clicks": 0, "keys": 17, "prompts": 0 }, @@ -128,7 +120,7 @@ } ], "id": "first-admin", - "ms": 859, + "ms": 648, "ok": true }, { @@ -176,7 +168,7 @@ } ], "id": "setup-wizard", - "ms": 1316, + "ms": 1282, "ok": true }, { @@ -184,7 +176,7 @@ "feature": "Ask the first question from the welcome tour", "note": "", "clicks": 0, - "keys": 44, + "keys": 43, "prompts": 0, "swipes": 0, "steps": [ @@ -203,18 +195,10 @@ "clicks": 0, "keys": 1, "prompts": 0 - }, - { - "page": "/chat", - "kind": "key", - "what": "Enter again: the question waits in Chat's composer", - "clicks": 0, - "keys": 1, - "prompts": 0 } ], "id": "first-question", - "ms": 2957, + "ms": 1206, "ok": true }, { @@ -277,7 +261,7 @@ } ], "id": "import-paste", - "ms": 4960, + "ms": 4818, "ok": true }, { @@ -315,7 +299,7 @@ } ], "id": "library-open", - "ms": 3226, + "ms": 3213, "ok": true }, { @@ -361,7 +345,7 @@ } ], "id": "search-word", - "ms": 3843, + "ms": 3835, "ok": true }, { @@ -399,7 +383,7 @@ } ], "id": "jump-to", - "ms": 2581, + "ms": 2547, "ok": true }, { @@ -453,15 +437,15 @@ } ], "id": "chat-ask", - "ms": 3670, + "ms": 6561, "ok": true }, { "module": "Notes", "feature": "Write a note", "note": "", - "clicks": 5, - "keys": 36, + "clicks": 4, + "keys": 35, "prompts": 0, "swipes": 0, "steps": [ @@ -493,8 +477,8 @@ "page": "/notes/:id", "kind": "replace", "what": "title", - "clicks": 1, - "keys": 9, + "clicks": 0, + "keys": 8, "prompts": 0 }, { @@ -507,7 +491,7 @@ } ], "id": "note-create", - "ms": 4436, + "ms": 4322, "ok": true }, { @@ -561,7 +545,7 @@ } ], "id": "topic-add", - "ms": 4049, + "ms": 3890, "ok": true }, { @@ -615,7 +599,7 @@ } ], "id": "pipeline-create", - "ms": 3512, + "ms": 3501, "ok": true }, { @@ -670,7 +654,7 @@ } ], "id": "routine-create", - "ms": 3443, + "ms": 3485, "ok": true }, { @@ -717,7 +701,7 @@ } ], "id": "extension-add", - "ms": 8661, + "ms": 8632, "ok": true }, { @@ -763,7 +747,7 @@ } ], "id": "sensor-webhook", - "ms": 3264, + "ms": 3313, "ok": true }, { @@ -819,7 +803,7 @@ } ], "id": "settings-change", - "ms": 9692, + "ms": 9507, "ok": true }, { @@ -889,7 +873,7 @@ } ], "id": "person-add", - "ms": 4057, + "ms": 3922, "ok": true }, { @@ -943,7 +927,7 @@ } ], "id": "api-token", - "ms": 3285, + "ms": 3344, "ok": true }, { @@ -956,7 +940,7 @@ "swipes": 0, "steps": [], "id": "namespace-switch", - "ms": 7245, + "ms": 7237, "ok": false, "error": "the namespace switcher isn't on the screen on a phone" }, @@ -987,7 +971,7 @@ } ], "id": "agent-connect", - "ms": 3278, + "ms": 3012, "ok": true }, { @@ -1034,14 +1018,14 @@ { "page": "/import", "kind": "tap", - "what": "Import (covered by something else on the page)", + "what": "Import", "clicks": 1, "keys": 0, "prompts": 0 } ], "id": "import-file", - "ms": 9166, + "ms": 4016, "ok": true }, { @@ -1136,7 +1120,7 @@ } ], "id": "source-folder", - "ms": 5764, + "ms": 5979, "ok": true }, { @@ -1182,7 +1166,7 @@ } ], "id": "entity-find", - "ms": 4878, + "ms": 5033, "ok": true }, { @@ -1212,7 +1196,7 @@ } ], "id": "graph-find", - "ms": 9648, + "ms": 9686, "ok": false, "error": "the namespace switcher isn't on the screen on a phone" }, @@ -1276,7 +1260,7 @@ } ], "id": "podcast-create", - "ms": 9428, + "ms": 9360, "ok": true }, { @@ -1330,7 +1314,7 @@ } ], "id": "report-pdf", - "ms": 4058, + "ms": 4030, "ok": true }, { @@ -1392,7 +1376,7 @@ } ], "id": "workflow-create", - "ms": 3882, + "ms": 3831, "ok": true }, { @@ -1455,7 +1439,7 @@ } ], "id": "template-create", - "ms": 3743, + "ms": 3707, "ok": true }, { @@ -1517,7 +1501,7 @@ } ], "id": "namespace-create", - "ms": 3577, + "ms": 3524, "ok": true }, { @@ -1579,7 +1563,7 @@ } ], "id": "speaker-rename", - "ms": 4460, + "ms": 4439, "ok": true }, { @@ -1651,7 +1635,7 @@ } ], "id": "cloud-model", - "ms": 9323, + "ms": 9242, "ok": true } ], @@ -1846,7 +1830,7 @@ "page": "/settings/ai", "label": "Settings › AI assistant", "reach": 3, - "controls": 55 + "controls": 56 }, { "page": "/settings/search", From 32c0cd01b2ddfa8acb9e5089aa29f6663a6aaae8 Mon Sep 17 00:00:00 2001 From: Adeel Ahmad Date: Sat, 10 Oct 2026 22:58:17 +0000 Subject: [PATCH 09/15] ci(clicks): wait for the imports' analysis before finding an entity In CI the entity search opened before the imported transcripts were analysed, so the entity wasn't there yet. The journey now waits (not counted) until the API has it. The API's log is saved with the results, so a failure in CI can be read from the artifact. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_0145yfQfD4eNkWHgPkk3Q82r --- ci/clicks/README.md | 3 ++- ci/clicks/journeys.mjs | 12 ++++++++++++ ci/clicks/run.sh | 2 +- ci/clicks/survey.mjs | 2 ++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/ci/clicks/README.md b/ci/clicks/README.md index c0b45749c..001806771 100644 --- a/ci/clicks/README.md +++ b/ci/clicks/README.md @@ -17,7 +17,8 @@ ci/clicks/run.sh --device phone --compare ci/clicks/baseline-phone.json 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`). 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). +`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 diff --git a/ci/clicks/journeys.mjs b/ci/clicks/journeys.mjs index 3df3c8d44..62588ac14 100644 --- a/ci/clicks/journeys.mjs +++ b/ci/clicks/journeys.mjs @@ -40,6 +40,17 @@ async function openImport(ctx) { await page.waitForURL(/\/import/); } +/** Waits, not counted, until the API's answer at `url` has `text`: something made in the background, which a person + * would come back to later. */ +async function apiHas({ page, base }, url, text, what) { + for (let i = 0; i < 150; i++) { + const r = await page.request.get(base + url).catch(() => null); + if (r?.ok() && (await r.text()).includes(text)) return; + await page.waitForTimeout(2000); + } + throw new Error(`${what} wasn't there after 5 minutes`); +} + /** Fails the journey with the reason when a control isn't on the screen at all (on a phone some are hidden). */ async function needs({ phone }, locator, what) { try { @@ -463,6 +474,7 @@ export const JOURNEYS = [ from: "/", async run(ctx) { const { page, meter } = ctx; + await apiHas(ctx, "/api/v1/entities?q=raspberry", "Raspberry Pi", "the entity from the imports' analysis"); await go(ctx, "Entities"); await meter.type(page.getByRole("searchbox", { name: "Find entities" }), "rasp", "part of its name"); // the list filters as you type: the other entity leaves it diff --git a/ci/clicks/run.sh b/ci/clicks/run.sh index 89b3f454e..f92317fcb 100755 --- a/ci/clicks/run.sh +++ b/ci/clicks/run.sh @@ -40,6 +40,6 @@ for url in http://127.0.0.1:8000/api/v1/auth/status http://127.0.0.1:3000/login; done status=0 -LENS_SURVEY_DIR="$tmp/install" node "$here/survey.mjs" "$@" || status=$? +LENS_SURVEY_DIR="$tmp/install" LENS_SURVEY_BACKEND_LOG="$tmp/backend.log" node "$here/survey.mjs" "$@" || status=$? if [ $status -ne 0 ]; then tail -40 "$tmp/backend.log" >&2; fi exit $status diff --git a/ci/clicks/survey.mjs b/ci/clicks/survey.mjs index 6f134c08a..dcd0aadb3 100644 --- a/ci/clicks/survey.mjs +++ b/ci/clicks/survey.mjs @@ -201,6 +201,8 @@ async function main() { fs.writeFileSync(path.join(a.out, `${name}.json`), JSON.stringify(result, null, 2) + "\n"); fs.writeFileSync(path.join(a.out, `${name}.md`), markdown(result, base)); console.log(`\nwrote ${path.join(a.out, `${name}.json`)} and ${name}.md`); + // The API's log beside the results, so a failure in CI can be read from the artifact + if (process.env.LENS_SURVEY_BACKEND_LOG) fs.copyFileSync(process.env.LENS_SURVEY_BACKEND_LOG, path.join(a.out, `backend${device.suffix}.log`)); if (base) { const worse = compare(result, base).filter((d) => d.worse); for (const d of worse) console.log(`worse: ${d.id} ${d.what}`); From 88b696586016ecf2a539644ef808f7a7a8055a36 Mon Sep 17 00:00:00 2001 From: Adeel Ahmad Date: Sat, 10 Oct 2026 23:07:46 +0000 Subject: [PATCH 10/15] ci(clicks): wait on the Entities page, not the API The API wants the session's bearer token, which the browser's requests don't carry, so the wait reloads the Entities page until the entity shows (not counted) and then starts the journey from Home. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_0145yfQfD4eNkWHgPkk3Q82r --- ci/clicks/journeys.mjs | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/ci/clicks/journeys.mjs b/ci/clicks/journeys.mjs index 62588ac14..80b64f582 100644 --- a/ci/clicks/journeys.mjs +++ b/ci/clicks/journeys.mjs @@ -40,15 +40,17 @@ async function openImport(ctx) { await page.waitForURL(/\/import/); } -/** Waits, not counted, until the API's answer at `url` has `text`: something made in the background, which a person - * would come back to later. */ -async function apiHas({ page, base }, url, text, what) { - for (let i = 0; i < 150; i++) { - const r = await page.request.get(base + url).catch(() => null); - if (r?.ok() && (await r.text()).includes(text)) return; - await page.waitForTimeout(2000); +/** Waits, not counted, until the page at `where` shows `locator`: something made in the background, which a person + * would come back to later. Then back to `from`, where the journey starts. */ +async function madeInBackground({ page, base }, where, locator, from, what) { + for (let i = 0; !(await locator.isVisible()); i++) { + if (i === 60) throw new Error(`${what} wasn't there after 5 minutes`); + await page.goto(base + where, { waitUntil: "domcontentloaded" }); + await page.waitForTimeout(5000); } - throw new Error(`${what} wasn't there after 5 minutes`); + await page.goto(base + from, { waitUntil: "domcontentloaded" }); + await page.getByRole("banner").waitFor(); + await page.waitForTimeout(2000); } /** Fails the journey with the reason when a control isn't on the screen at all (on a phone some are hidden). */ @@ -474,12 +476,13 @@ export const JOURNEYS = [ from: "/", async run(ctx) { const { page, meter } = ctx; - await apiHas(ctx, "/api/v1/entities?q=raspberry", "Raspberry Pi", "the entity from the imports' analysis"); + const entity = page.getByRole("main").getByRole("button", { name: "Raspberry Pi", exact: true }); + await madeInBackground(ctx, "/entities", entity, "/", "the entity the imports' analysis makes"); await go(ctx, "Entities"); await meter.type(page.getByRole("searchbox", { name: "Find entities" }), "rasp", "part of its name"); // the list filters as you type: the other entity leaves it await page.getByRole("main").getByRole("table").getByText("Lens", { exact: true }).waitFor({ state: "hidden" }); - await meter.click(page.getByRole("main").getByRole("button", { name: "Raspberry Pi", exact: true }), "Raspberry Pi"); + await meter.click(entity, "Raspberry Pi"); await page.waitForURL(/entity=\d+/); await page.getByText(/Raspberry Pi can run Lens/).first().waitFor(); }, From 4fbee6c7bd9a520e15a5c1459ee2dd71989879fb Mon Sep 17 00:00:00 2001 From: Adeel Ahmad Date: Sat, 10 Oct 2026 23:21:18 +0000 Subject: [PATCH 11/15] ci(clicks): baselines on main with one-click install and named pipelines Computer 93 clicks, 313 keys; phone 115 taps, 315 keys, 10 swipes. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_0145yfQfD4eNkWHgPkk3Q82r --- ci/clicks/baseline-phone.json | 185 ++++----- ci/clicks/baseline.json | 726 ++++++++++++++++++++++++++++++++-- 2 files changed, 754 insertions(+), 157 deletions(-) diff --git a/ci/clicks/baseline-phone.json b/ci/clicks/baseline-phone.json index 197679d5a..87b161eb5 100644 --- a/ci/clicks/baseline-phone.json +++ b/ci/clicks/baseline-phone.json @@ -1,5 +1,5 @@ { - "surveyed": "2026-10-10T22:54:07.795Z", + "surveyed": "2026-10-10T23:20:59.350Z", "commit": "", "viewport": "Pixel 7, 412x839, touch", "device": "phone", @@ -8,10 +8,10 @@ "module": "Setup", "feature": "Install with the web installer (defaults, local model found)", "note": "The install line in a terminal, then the browser installer. The browser opens on its own on a desktop; on a server the link is opened by hand (counted). A computer missing Docker also asks for its password.", - "clicks": 7, + "clicks": 3, "keys": 2, "prompts": 0, - "swipes": 3, + "swipes": 0, "steps": [ { "page": "(outside the browser)", @@ -32,42 +32,7 @@ { "page": "installer:/", "kind": "tap", - "what": "Continue (this computer)", - "clicks": 1, - "keys": 0, - "prompts": 0 - }, - { - "page": "installer:/", - "kind": "tap", - "what": "Continue (how it runs)", - "clicks": 1, - "keys": 0, - "prompts": 0, - "swipes": 1 - }, - { - "page": "installer:/", - "kind": "tap", - "what": "Continue (AI model)", - "clicks": 1, - "keys": 0, - "prompts": 0, - "swipes": 1 - }, - { - "page": "installer:/", - "kind": "tap", - "what": "Continue (extras)", - "clicks": 1, - "keys": 0, - "prompts": 0, - "swipes": 1 - }, - { - "page": "installer:/", - "kind": "tap", - "what": "Install Lens", + "what": "Install with the defaults", "clicks": 1, "keys": 0, "prompts": 0 @@ -82,7 +47,7 @@ } ], "id": "install", - "ms": 3183, + "ms": 2292, "ok": true }, { @@ -120,7 +85,7 @@ } ], "id": "first-admin", - "ms": 648, + "ms": 606, "ok": true }, { @@ -168,7 +133,7 @@ } ], "id": "setup-wizard", - "ms": 1282, + "ms": 1300, "ok": true }, { @@ -198,7 +163,7 @@ } ], "id": "first-question", - "ms": 1206, + "ms": 1183, "ok": true }, { @@ -261,7 +226,7 @@ } ], "id": "import-paste", - "ms": 4818, + "ms": 4332, "ok": true }, { @@ -299,7 +264,7 @@ } ], "id": "library-open", - "ms": 3213, + "ms": 3127, "ok": true }, { @@ -345,7 +310,7 @@ } ], "id": "search-word", - "ms": 3835, + "ms": 3763, "ok": true }, { @@ -383,7 +348,7 @@ } ], "id": "jump-to", - "ms": 2547, + "ms": 2525, "ok": true }, { @@ -437,15 +402,15 @@ } ], "id": "chat-ask", - "ms": 6561, + "ms": 6600, "ok": true }, { "module": "Notes", "feature": "Write a note", "note": "", - "clicks": 4, - "keys": 35, + "clicks": 3, + "keys": 36, "prompts": 0, "swipes": 0, "steps": [ @@ -481,17 +446,25 @@ "keys": 8, "prompts": 0 }, + { + "page": "/notes/:id", + "kind": "key", + "what": "Enter to go to the first line", + "clicks": 0, + "keys": 1, + "prompts": 0 + }, { "page": "/notes/:id", "kind": "type", "what": "first line", - "clicks": 1, + "clicks": 0, "keys": 27, "prompts": 0 } ], "id": "note-create", - "ms": 4322, + "ms": 4179, "ok": true }, { @@ -545,15 +518,15 @@ } ], "id": "topic-add", - "ms": 3890, + "ms": 4084, "ok": true }, { "module": "Pipelines", "feature": "Make a pipeline from the standard steps", "note": "", - "clicks": 4, - "keys": 14, + "clicks": 3, + "keys": 1, "prompts": 0, "swipes": 0, "steps": [ @@ -583,33 +556,25 @@ }, { "page": "/pipelines/new", - "kind": "type", - "what": "name", + "kind": "key", + "what": "Enter to create", "clicks": 0, - "keys": 14, - "prompts": 0 - }, - { - "page": "/pipelines/new", - "kind": "tap", - "what": "Create pipeline", - "clicks": 1, - "keys": 0, + "keys": 1, "prompts": 0 } ], "id": "pipeline-create", - "ms": 3501, + "ms": 3081, "ok": true }, { "module": "Routines", "feature": "Make a nightly routine (sync sources, the default action)", "note": "", - "clicks": 4, - "keys": 12, + "clicks": 3, + "keys": 1, "prompts": 0, - "swipes": 1, + "swipes": 0, "steps": [ { "page": "/", @@ -637,24 +602,15 @@ }, { "page": "/routines/new", - "kind": "type", - "what": "name", + "kind": "key", + "what": "Enter to create", "clicks": 0, - "keys": 12, + "keys": 1, "prompts": 0 - }, - { - "page": "/routines/new", - "kind": "tap", - "what": "Create routine", - "clicks": 1, - "keys": 0, - "prompts": 0, - "swipes": 1 } ], "id": "routine-create", - "ms": 3485, + "ms": 3144, "ok": true }, { @@ -701,7 +657,7 @@ } ], "id": "extension-add", - "ms": 8632, + "ms": 8603, "ok": true }, { @@ -747,7 +703,7 @@ } ], "id": "sensor-webhook", - "ms": 3313, + "ms": 3242, "ok": true }, { @@ -803,7 +759,7 @@ } ], "id": "settings-change", - "ms": 9507, + "ms": 9470, "ok": true }, { @@ -873,14 +829,14 @@ } ], "id": "person-add", - "ms": 3922, + "ms": 3842, "ok": true }, { "module": "Account", "feature": "Make an API token", "note": "", - "clicks": 4, + "clicks": 3, "keys": 6, "prompts": 0, "swipes": 0, @@ -901,14 +857,6 @@ "keys": 0, "prompts": 0 }, - { - "page": "/account/tokens", - "kind": "tap", - "what": "New token", - "clicks": 1, - "keys": 0, - "prompts": 0 - }, { "page": "/account/tokens", "kind": "type", @@ -927,7 +875,7 @@ } ], "id": "api-token", - "ms": 3344, + "ms": 3446, "ok": true }, { @@ -940,7 +888,7 @@ "swipes": 0, "steps": [], "id": "namespace-switch", - "ms": 7237, + "ms": 7266, "ok": false, "error": "the namespace switcher isn't on the screen on a phone" }, @@ -971,7 +919,7 @@ } ], "id": "agent-connect", - "ms": 3012, + "ms": 2809, "ok": true }, { @@ -1025,7 +973,7 @@ } ], "id": "import-file", - "ms": 4016, + "ms": 3782, "ok": true }, { @@ -1120,7 +1068,7 @@ } ], "id": "source-folder", - "ms": 5979, + "ms": 5836, "ok": true }, { @@ -1166,7 +1114,7 @@ } ], "id": "entity-find", - "ms": 5033, + "ms": 12131, "ok": true }, { @@ -1196,7 +1144,7 @@ } ], "id": "graph-find", - "ms": 9686, + "ms": 9662, "ok": false, "error": "the namespace switcher isn't on the screen on a phone" }, @@ -1207,7 +1155,7 @@ "clicks": 6, "keys": 0, "prompts": 0, - "swipes": 1, + "swipes": 0, "steps": [ { "page": "/", @@ -1252,15 +1200,14 @@ { "page": "/resources/:id", "kind": "tap", - "what": "Create podcast (covered by something else on the page)", + "what": "Create podcast", "clicks": 1, "keys": 0, - "prompts": 0, - "swipes": 1 + "prompts": 0 } ], "id": "podcast-create", - "ms": 9360, + "ms": 4182, "ok": true }, { @@ -1314,7 +1261,7 @@ } ], "id": "report-pdf", - "ms": 4030, + "ms": 4035, "ok": true }, { @@ -1376,7 +1323,7 @@ } ], "id": "workflow-create", - "ms": 3831, + "ms": 3838, "ok": true }, { @@ -1439,7 +1386,7 @@ } ], "id": "template-create", - "ms": 3707, + "ms": 3937, "ok": true }, { @@ -1501,7 +1448,7 @@ } ], "id": "namespace-create", - "ms": 3524, + "ms": 3554, "ok": true }, { @@ -1563,7 +1510,7 @@ } ], "id": "speaker-rename", - "ms": 4439, + "ms": 4521, "ok": true }, { @@ -1635,7 +1582,7 @@ } ], "id": "cloud-model", - "ms": 9242, + "ms": 9165, "ok": true } ], @@ -1752,7 +1699,7 @@ "page": "/routines/history", "label": "Routines › History", "reach": 3, - "controls": 9 + "controls": 8 }, { "page": "/extensions", @@ -1830,7 +1777,7 @@ "page": "/settings/ai", "label": "Settings › AI assistant", "reach": 3, - "controls": 56 + "controls": 57 }, { "page": "/settings/search", @@ -1896,7 +1843,7 @@ "page": "/settings/bridge", "label": "Settings › Chat rooms", "reach": 3, - "controls": 13 + "controls": 14 }, { "page": "/settings/notifications", @@ -1908,7 +1855,7 @@ "page": "/settings/telemetry", "label": "Settings › Telemetry", "reach": 3, - "controls": 12 + "controls": 13 }, { "page": "/settings/fedora", @@ -1986,7 +1933,7 @@ "page": "/admin/health", "label": "Admin › System health", "reach": 3, - "controls": 10 + "controls": 11 }, { "page": "/notes/:id", diff --git a/ci/clicks/baseline.json b/ci/clicks/baseline.json index 6c6f55be4..4a3411c83 100644 --- a/ci/clicks/baseline.json +++ b/ci/clicks/baseline.json @@ -1,7 +1,8 @@ { - "surveyed": "2026-10-10T22:47:49.235Z", + "surveyed": "2026-10-10T23:16:44.807Z", "commit": "", "viewport": "1400x900", + "device": "desktop", "journeys": [ { "module": "Setup", @@ -10,6 +11,7 @@ "clicks": 3, "keys": 2, "prompts": 0, + "swipes": 0, "steps": [ { "page": "(outside the browser)", @@ -45,7 +47,7 @@ } ], "id": "install", - "ms": 2000, + "ms": 1911, "ok": true }, { @@ -55,6 +57,7 @@ "clicks": 1, "keys": 17, "prompts": 1, + "swipes": 0, "steps": [ { "page": "/setup", @@ -82,7 +85,7 @@ } ], "id": "first-admin", - "ms": 423, + "ms": 451, "ok": true }, { @@ -92,6 +95,7 @@ "clicks": 4, "keys": 0, "prompts": 0, + "swipes": 0, "steps": [ { "page": "/welcome", @@ -127,7 +131,7 @@ } ], "id": "setup-wizard", - "ms": 572, + "ms": 695, "ok": true }, { @@ -137,6 +141,7 @@ "clicks": 0, "keys": 43, "prompts": 0, + "swipes": 0, "steps": [ { "page": "/", @@ -156,7 +161,7 @@ } ], "id": "first-question", - "ms": 2207, + "ms": 1237, "ok": true }, { @@ -166,6 +171,7 @@ "clicks": 3, "keys": 1, "prompts": 0, + "swipes": 0, "steps": [ { "page": "/", @@ -201,7 +207,7 @@ } ], "id": "import-paste", - "ms": 4107, + "ms": 4191, "ok": true }, { @@ -211,6 +217,7 @@ "clicks": 2, "keys": 0, "prompts": 0, + "swipes": 0, "steps": [ { "page": "/", @@ -230,7 +237,7 @@ } ], "id": "library-open", - "ms": 2525, + "ms": 2637, "ok": true }, { @@ -240,6 +247,7 @@ "clicks": 1, "keys": 10, "prompts": 0, + "swipes": 0, "steps": [ { "page": "/", @@ -267,7 +275,7 @@ } ], "id": "search-word", - "ms": 3176, + "ms": 3163, "ok": true }, { @@ -277,6 +285,7 @@ "clicks": 0, "keys": 9, "prompts": 0, + "swipes": 0, "steps": [ { "page": "/", @@ -304,7 +313,7 @@ } ], "id": "jump-to", - "ms": 2251, + "ms": 2296, "ok": true }, { @@ -314,6 +323,7 @@ "clicks": 1, "keys": 34, "prompts": 0, + "swipes": 0, "steps": [ { "page": "/", @@ -341,7 +351,7 @@ } ], "id": "chat-ask", - "ms": 3390, + "ms": 3492, "ok": true }, { @@ -351,6 +361,7 @@ "clicks": 2, "keys": 36, "prompts": 0, + "swipes": 0, "steps": [ { "page": "/", @@ -394,7 +405,7 @@ } ], "id": "note-create", - "ms": 3254, + "ms": 3365, "ok": true }, { @@ -404,6 +415,7 @@ "clicks": 2, "keys": 9, "prompts": 0, + "swipes": 0, "steps": [ { "page": "/", @@ -439,7 +451,7 @@ } ], "id": "topic-add", - "ms": 3368, + "ms": 3376, "ok": true }, { @@ -449,6 +461,7 @@ "clicks": 2, "keys": 1, "prompts": 0, + "swipes": 0, "steps": [ { "page": "/", @@ -476,7 +489,7 @@ } ], "id": "pipeline-create", - "ms": 2548, + "ms": 2523, "ok": true }, { @@ -486,6 +499,7 @@ "clicks": 2, "keys": 1, "prompts": 0, + "swipes": 0, "steps": [ { "page": "/", @@ -513,7 +527,7 @@ } ], "id": "routine-create", - "ms": 3298, + "ms": 2615, "ok": true }, { @@ -523,6 +537,7 @@ "clicks": 3, "keys": 0, "prompts": 0, + "swipes": 0, "steps": [ { "page": "/", @@ -550,7 +565,7 @@ } ], "id": "extension-add", - "ms": 2533, + "ms": 2539, "ok": true }, { @@ -560,6 +575,7 @@ "clicks": 3, "keys": 0, "prompts": 0, + "swipes": 0, "steps": [ { "page": "/", @@ -587,7 +603,7 @@ } ], "id": "sensor-webhook", - "ms": 2822, + "ms": 2633, "ok": true }, { @@ -597,6 +613,7 @@ "clicks": 3, "keys": 5, "prompts": 0, + "swipes": 0, "steps": [ { "page": "/", @@ -632,7 +649,7 @@ } ], "id": "settings-change", - "ms": 3430, + "ms": 3352, "ok": true }, { @@ -642,6 +659,7 @@ "clicks": 5, "keys": 18, "prompts": 0, + "swipes": 0, "steps": [ { "page": "/", @@ -693,7 +711,7 @@ } ], "id": "person-add", - "ms": 3059, + "ms": 3150, "ok": true }, { @@ -703,6 +721,7 @@ "clicks": 3, "keys": 6, "prompts": 0, + "swipes": 0, "steps": [ { "page": "/", @@ -738,7 +757,7 @@ } ], "id": "api-token", - "ms": 3137, + "ms": 3381, "ok": true }, { @@ -748,6 +767,7 @@ "clicks": 2, "keys": 0, "prompts": 0, + "swipes": 0, "steps": [ { "page": "/", @@ -767,7 +787,631 @@ } ], "id": "namespace-switch", - "ms": 2256, + "ms": 2331, + "ok": true + }, + { + "module": "Agents", + "feature": "Connect an AI assistant (Claude, ChatGPT, Cursor) over MCP", + "note": "In the assistant: add a connector and give it Lens's MCP address; the assistant opens Lens's consent page, where the person allows it. After setup Lens shows the MCP address nowhere, so it is typed (counted as typed).", + "clicks": 3, + "keys": 25, + "prompts": 0, + "swipes": 0, + "steps": [ + { + "page": "/", + "kind": "outside", + "what": "in the assistant: add a connector, type Lens's MCP address, add it", + "clicks": 2, + "keys": 25, + "prompts": 0 + }, + { + "page": "/oauth/authorize", + "kind": "click", + "what": "Allow", + "clicks": 1, + "keys": 0, + "prompts": 0 + } + ], + "id": "agent-connect", + "ms": 2781, + "ok": true + }, + { + "module": "Import", + "feature": "Upload a transcript file", + "note": "", + "clicks": 4, + "keys": 0, + "prompts": 0, + "swipes": 0, + "steps": [ + { + "page": "/", + "kind": "click", + "what": "Import (top bar)", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/", + "kind": "upload", + "what": "Choose files, then the file", + "clicks": 2, + "keys": 0, + "prompts": 0 + }, + { + "page": "/import", + "kind": "click", + "what": "Import (covered by something else on the page)", + "clicks": 1, + "keys": 0, + "prompts": 0 + } + ], + "id": "import-file", + "ms": 8883, + "ok": true + }, + { + "module": "Sensors", + "feature": "Watch a folder on this machine for new files", + "note": "Needs rclone, as the Lens image has (CI copies the image's version); the folders offered are the allowed ones set at startup.", + "clicks": 9, + "keys": 0, + "prompts": 0, + "swipes": 0, + "steps": [ + { + "page": "/", + "kind": "click", + "what": "Sensors", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/sensors", + "kind": "click", + "what": "Files, email and calendars tab", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/sources", + "kind": "click", + "what": "Add connection", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/sources", + "kind": "click", + "what": "This machine", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/sources", + "kind": "click", + "what": "Test connection", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/sources", + "kind": "click", + "what": "Done (the test passed)", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/sources", + "kind": "click", + "what": "the allowed folder", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/sources", + "kind": "click", + "what": "Watch this folder", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/sources", + "kind": "click", + "what": "Start watching", + "clicks": 1, + "keys": 0, + "prompts": 0 + } + ], + "id": "source-folder", + "ms": 4908, + "ok": true + }, + { + "module": "Entities", + "feature": "Find an entity and see where it was mentioned", + "note": "", + "clicks": 3, + "keys": 4, + "prompts": 0, + "swipes": 0, + "steps": [ + { + "page": "/", + "kind": "click", + "what": "Entities", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/entities", + "kind": "type", + "what": "part of its name", + "clicks": 1, + "keys": 4, + "prompts": 0 + }, + { + "page": "/entities", + "kind": "click", + "what": "Raspberry Pi", + "clicks": 1, + "keys": 0, + "prompts": 0 + } + ], + "id": "entity-find", + "ms": 11494, + "ok": true + }, + { + "module": "Graph", + "feature": "Find a speaker in the graph of what was imported", + "note": "The first namespace keeps its graph to itself, so the graph opens empty until it is picked as the namespace.", + "clicks": 4, + "keys": 7, + "prompts": 0, + "swipes": 0, + "steps": [ + { + "page": "/", + "kind": "click", + "what": "Graph", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/graph", + "kind": "click", + "what": "the namespace switcher", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/graph", + "kind": "click", + "what": "interviews", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/graph", + "kind": "type", + "what": "part of the name", + "clicks": 1, + "keys": 6, + "prompts": 0 + }, + { + "page": "/graph", + "kind": "key", + "what": "Enter to pick it", + "clicks": 0, + "keys": 1, + "prompts": 0 + } + ], + "id": "graph-find", + "ms": 4532, + "ok": true + }, + { + "module": "Podcasts", + "feature": "Make a podcast from a recording", + "note": "", + "clicks": 5, + "keys": 0, + "prompts": 0, + "swipes": 0, + "steps": [ + { + "page": "/", + "kind": "click", + "what": "Library", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/library", + "kind": "click", + "what": "the recording", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/resources/:id", + "kind": "click", + "what": "More actions", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/resources/:id", + "kind": "click", + "what": "Create podcast…", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/resources/:id", + "kind": "click", + "what": "Create podcast", + "clicks": 1, + "keys": 0, + "prompts": 0 + } + ], + "id": "podcast-create", + "ms": 3501, + "ok": true + }, + { + "module": "Reports", + "feature": "Save the namespace report as a PDF", + "note": "The browser's print dialog does the saving (one click there, counted).", + "clicks": 4, + "keys": 0, + "prompts": 0, + "swipes": 0, + "steps": [ + { + "page": "/", + "kind": "click", + "what": "Reports", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/reports", + "kind": "click", + "what": "PDF / HTML", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/reports", + "kind": "click", + "what": "Print or save as PDF", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/reports", + "kind": "outside", + "what": "the print dialog: Save", + "clicks": 1, + "keys": 0, + "prompts": 0 + } + ], + "id": "report-pdf", + "ms": 3382, + "ok": true + }, + { + "module": "Pipelines", + "feature": "Make a workflow", + "note": "", + "clicks": 4, + "keys": 13, + "prompts": 0, + "swipes": 0, + "steps": [ + { + "page": "/", + "kind": "click", + "what": "Pipelines", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/pipelines", + "kind": "click", + "what": "Workflows tab", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/workflows", + "kind": "click", + "what": "New workflow", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/workflows/new", + "kind": "type", + "what": "name", + "clicks": 0, + "keys": 13, + "prompts": 0 + }, + { + "page": "/workflows/new", + "kind": "click", + "what": "Create workflow", + "clicks": 1, + "keys": 0, + "prompts": 0 + } + ], + "id": "workflow-create", + "ms": 3069, + "ok": true + }, + { + "module": "Pipelines", + "feature": "Make a prompt template", + "note": "", + "clicks": 4, + "keys": 10, + "prompts": 0, + "swipes": 0, + "steps": [ + { + "page": "/", + "kind": "click", + "what": "Pipelines", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/pipelines", + "kind": "click", + "what": "Templates tab", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/templates", + "kind": "click", + "what": "New template", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/templates/new", + "kind": "type", + "what": "name", + "clicks": 0, + "keys": 10, + "prompts": 0 + }, + { + "page": "/templates/new", + "kind": "click", + "what": "Create and edit", + "clicks": 1, + "keys": 0, + "prompts": 0 + } + ], + "id": "template-create", + "ms": 3030, + "ok": true + }, + { + "module": "Admin", + "feature": "Make a namespace", + "note": "", + "clicks": 3, + "keys": 15, + "prompts": 0, + "swipes": 0, + "steps": [ + { + "page": "/", + "kind": "click", + "what": "Admin", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/admin/people", + "kind": "click", + "what": "Namespaces tab", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/admin/namespaces", + "kind": "click", + "what": "New namespace", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/admin/namespaces", + "kind": "type", + "what": "name", + "clicks": 0, + "keys": 14, + "prompts": 0 + }, + { + "page": "/admin/namespaces", + "kind": "key", + "what": "Enter to create", + "clicks": 0, + "keys": 1, + "prompts": 0 + } + ], + "id": "namespace-create", + "ms": 3012, + "ok": true + }, + { + "module": "Speakers", + "feature": "Name a speaker", + "note": "", + "clicks": 3, + "keys": 7, + "prompts": 0, + "swipes": 0, + "steps": [ + { + "page": "/", + "kind": "click", + "what": "Settings", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/settings/speakers", + "kind": "click", + "what": "Host A", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/speakers/:id", + "kind": "click", + "what": "Rename", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/speakers/:id", + "kind": "replace", + "what": "the name", + "clicks": 0, + "keys": 6, + "prompts": 0 + }, + { + "page": "/speakers/:id", + "kind": "key", + "what": "Enter to save", + "clicks": 0, + "keys": 1, + "prompts": 0 + } + ], + "id": "speaker-rename", + "ms": 3962, + "ok": true + }, + { + "module": "Setup", + "feature": "Switch to a cloud model with an API key", + "note": "What a Raspberry Pi install does after the installer: an OpenAI-compatible cloud provider, its model and a pasted key.", + "clicks": 5, + "keys": 40, + "prompts": 0, + "swipes": 0, + "steps": [ + { + "page": "/", + "kind": "click", + "what": "Settings", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/settings/speakers", + "kind": "click", + "what": "LLM provider", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/settings/llm", + "kind": "replace", + "what": "the provider's address", + "clicks": 1, + "keys": 26, + "prompts": 0 + }, + { + "page": "/settings/llm", + "kind": "replace", + "what": "the model", + "clicks": 1, + "keys": 12, + "prompts": 0 + }, + { + "page": "/settings/llm", + "kind": "paste", + "what": "paste the API key", + "clicks": 1, + "keys": 1, + "prompts": 0 + }, + { + "page": "/settings/llm", + "kind": "key", + "what": "Ctrl+S to save", + "clicks": 0, + "keys": 1, + "prompts": 0 + } + ], + "id": "cloud-model", + "ms": 3064, "ok": true } ], @@ -782,7 +1426,7 @@ "page": "/library", "label": "Library", "reach": 1, - "controls": 4 + "controls": 38 }, { "page": "/search", @@ -818,7 +1462,7 @@ "page": "/graph", "label": "Graph", "reach": 1, - "controls": 19 + "controls": 18 }, { "page": "/podcasts", @@ -830,25 +1474,25 @@ "page": "/reports", "label": "Reports", "reach": 1, - "controls": 4 + "controls": 7 }, { "page": "/costs", "label": "Costs", "reach": 1, - "controls": 4 + "controls": 11 }, { "page": "/pipelines", "label": "Pipelines", "reach": 1, - "controls": 16 + "controls": 20 }, { "page": "/workflows", "label": "Pipelines › Workflows", "reach": 2, - "controls": 7 + "controls": 8 }, { "page": "/workflows/nodes", @@ -866,7 +1510,7 @@ "page": "/templates", "label": "Pipelines › Templates", "reach": 2, - "controls": 9 + "controls": 11 }, { "page": "/routines", @@ -884,7 +1528,7 @@ "page": "/routines/history", "label": "Routines › History", "reach": 2, - "controls": 6 + "controls": 8 }, { "page": "/extensions", @@ -896,13 +1540,13 @@ "page": "/sensors", "label": "Sensors", "reach": 1, - "controls": 9 + "controls": 8 }, { "page": "/sources", "label": "Sensors › Files, email and calendars", "reach": 2, - "controls": 5 + "controls": 9 }, { "page": "/sensors/logins", @@ -950,7 +1594,7 @@ "page": "/settings/llm", "label": "Settings › LLM provider", "reach": 2, - "controls": 10 + "controls": 11 }, { "page": "/settings/local-model", @@ -962,13 +1606,13 @@ "page": "/settings/ai", "label": "Settings › AI assistant", "reach": 2, - "controls": 56 + "controls": 57 }, { "page": "/settings/search", "label": "Settings › Search", "reach": 2, - "controls": 17 + "controls": 18 }, { "page": "/settings/reports", @@ -1028,7 +1672,7 @@ "page": "/settings/bridge", "label": "Settings › Chat rooms", "reach": 2, - "controls": 13 + "controls": 14 }, { "page": "/settings/notifications", @@ -1088,7 +1732,7 @@ "page": "/settings/iiif", "label": "Settings › IIIF & metadata", "reach": 2, - "controls": 20 + "controls": 21 }, { "page": "/settings/startup", @@ -1100,25 +1744,31 @@ "page": "/admin/people", "label": "Admin", "reach": 1, - "controls": 11 + "controls": 12 }, { "page": "/admin/namespaces", "label": "Admin › Namespaces", "reach": 2, - "controls": 7 + "controls": 8 }, { "page": "/admin/audit", "label": "Admin › Audit log", "reach": 2, - "controls": 28 + "controls": 35 }, { "page": "/admin/health", "label": "Admin › System health", "reach": 2, "controls": 11 + }, + { + "page": "/notes/:id", + "label": "Untitled", + "reach": 1, + "controls": 9 } ] } From 1a83d25161b2b0f655717437febd37afe0042df9 Mon Sep 17 00:00:00 2001 From: Adeel Ahmad Date: Sun, 11 Oct 2026 00:42:43 +0000 Subject: [PATCH 12/15] ci(clicks): make the podcast journey pick the pasted transcript Both imports match "Welcome back", and the Library's order between them varies. The dialog shows the recording's title, so on a phone the Create button was below the screen for one and not the other (a swipe counted in some runs only). Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_0145yfQfD4eNkWHgPkk3Q82r --- ci/clicks/journeys.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ci/clicks/journeys.mjs b/ci/clicks/journeys.mjs index 251dc4cf1..3af0be4dc 100644 --- a/ci/clicks/journeys.mjs +++ b/ci/clicks/journeys.mjs @@ -537,7 +537,9 @@ export const JOURNEYS = [ async run(ctx) { const { page, meter } = ctx; await go(ctx, "Library"); - await meter.click(page.getByRole("main").getByRole("link", { name: /Welcome back/ }).first(), "the recording"); + // the pasted transcript, not the uploaded file (pi-episode): its title is in the dialog, so its height depends on it + const recording = page.getByRole("main").getByRole("link", { name: /Welcome back/ }).filter({ hasNotText: "pi-episode" }); + await meter.click(recording.first(), "the recording"); await page.waitForURL(/\/(recordings|resources)\//); await meter.click(page.getByRole("main").getByRole("button", { name: "More actions" }), "More actions"); await meter.click(page.getByRole("menuitem", { name: /Create podcast/ }), "Create podcast…"); From 0b1524db2a3bdc493ec5eea53ef431f872c4ce93 Mon Sep 17 00:00:00 2001 From: Adeel Ahmad Date: Sun, 11 Oct 2026 00:52:00 +0000 Subject: [PATCH 13/15] ci(clicks): agent-connect baselines from a run on the merged survey branch Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01JYGqrDpgP3Gcw1Jwf5mwT8 --- ci/clicks/baseline-phone.json | 28 ++++++++++++++++++++++------ ci/clicks/baseline.json | 28 ++++++++++++++++++++++------ 2 files changed, 44 insertions(+), 12 deletions(-) diff --git a/ci/clicks/baseline-phone.json b/ci/clicks/baseline-phone.json index 87b161eb5..3ed8e0e75 100644 --- a/ci/clicks/baseline-phone.json +++ b/ci/clicks/baseline-phone.json @@ -895,18 +895,34 @@ { "module": "Agents", "feature": "Connect an AI assistant (Claude, ChatGPT, Cursor) over MCP", - "note": "In the assistant: add a connector and give it Lens's MCP address; the assistant opens Lens's consent page, where the person allows it. After setup Lens shows the MCP address nowhere, so it is typed (counted as typed).", - "clicks": 3, - "keys": 25, + "note": "Copy MCP address in the account menu; in the assistant: add a connector and paste the address; the assistant opens Lens's consent page, where the person allows it.", + "clicks": 5, + "keys": 1, "prompts": 0, "swipes": 0, "steps": [ + { + "page": "/", + "kind": "tap", + "what": "Account menu", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/", + "kind": "tap", + "what": "Copy MCP address", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, { "page": "/", "kind": "outside", - "what": "in the assistant: add a connector, type Lens's MCP address, add it", + "what": "in the assistant: add a connector, paste Lens's MCP address, add it", "clicks": 2, - "keys": 25, + "keys": 1, "prompts": 0 }, { @@ -919,7 +935,7 @@ } ], "id": "agent-connect", - "ms": 2809, + "ms": 3335, "ok": true }, { diff --git a/ci/clicks/baseline.json b/ci/clicks/baseline.json index 4a3411c83..9fcb689b6 100644 --- a/ci/clicks/baseline.json +++ b/ci/clicks/baseline.json @@ -793,18 +793,34 @@ { "module": "Agents", "feature": "Connect an AI assistant (Claude, ChatGPT, Cursor) over MCP", - "note": "In the assistant: add a connector and give it Lens's MCP address; the assistant opens Lens's consent page, where the person allows it. After setup Lens shows the MCP address nowhere, so it is typed (counted as typed).", - "clicks": 3, - "keys": 25, + "note": "Copy MCP address in the account menu; in the assistant: add a connector and paste the address; the assistant opens Lens's consent page, where the person allows it.", + "clicks": 5, + "keys": 1, "prompts": 0, "swipes": 0, "steps": [ + { + "page": "/", + "kind": "click", + "what": "Account menu", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/", + "kind": "click", + "what": "Copy MCP address", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, { "page": "/", "kind": "outside", - "what": "in the assistant: add a connector, type Lens's MCP address, add it", + "what": "in the assistant: add a connector, paste Lens's MCP address, add it", "clicks": 2, - "keys": 25, + "keys": 1, "prompts": 0 }, { @@ -817,7 +833,7 @@ } ], "id": "agent-connect", - "ms": 2781, + "ms": 2856, "ok": true }, { From bcd783666fa7083e4b7cf2cc46ba1c1acba86188 Mon Sep 17 00:00:00 2001 From: Adeel Ahmad Date: Sun, 11 Oct 2026 00:53:15 +0000 Subject: [PATCH 14/15] ci(clicks): baselines on main with the graph opening on your data Computer 90 clicks, 313 keys; phone 119 taps, 322 keys, 11 swipes, and the graph can be found on a phone now. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_0145yfQfD4eNkWHgPkk3Q82r --- ci/clicks/baseline-phone.json | 118 +++++++++++++++++++++------------- ci/clicks/baseline.json | 96 ++++++++++++--------------- 2 files changed, 115 insertions(+), 99 deletions(-) diff --git a/ci/clicks/baseline-phone.json b/ci/clicks/baseline-phone.json index 87b161eb5..716c4c8a0 100644 --- a/ci/clicks/baseline-phone.json +++ b/ci/clicks/baseline-phone.json @@ -1,5 +1,5 @@ { - "surveyed": "2026-10-10T23:20:59.350Z", + "surveyed": "2026-10-11T00:53:00.799Z", "commit": "", "viewport": "Pixel 7, 412x839, touch", "device": "phone", @@ -47,7 +47,7 @@ } ], "id": "install", - "ms": 2292, + "ms": 2213, "ok": true }, { @@ -85,7 +85,7 @@ } ], "id": "first-admin", - "ms": 606, + "ms": 583, "ok": true }, { @@ -133,7 +133,7 @@ } ], "id": "setup-wizard", - "ms": 1300, + "ms": 1211, "ok": true }, { @@ -163,7 +163,7 @@ } ], "id": "first-question", - "ms": 1183, + "ms": 1197, "ok": true }, { @@ -226,7 +226,7 @@ } ], "id": "import-paste", - "ms": 4332, + "ms": 4796, "ok": true }, { @@ -264,7 +264,7 @@ } ], "id": "library-open", - "ms": 3127, + "ms": 3173, "ok": true }, { @@ -310,7 +310,7 @@ } ], "id": "search-word", - "ms": 3763, + "ms": 3758, "ok": true }, { @@ -348,7 +348,7 @@ } ], "id": "jump-to", - "ms": 2525, + "ms": 2450, "ok": true }, { @@ -402,7 +402,7 @@ } ], "id": "chat-ask", - "ms": 6600, + "ms": 6305, "ok": true }, { @@ -464,7 +464,7 @@ } ], "id": "note-create", - "ms": 4179, + "ms": 3712, "ok": true }, { @@ -518,7 +518,7 @@ } ], "id": "topic-add", - "ms": 4084, + "ms": 3726, "ok": true }, { @@ -564,7 +564,7 @@ } ], "id": "pipeline-create", - "ms": 3081, + "ms": 3030, "ok": true }, { @@ -610,7 +610,7 @@ } ], "id": "routine-create", - "ms": 3144, + "ms": 3090, "ok": true }, { @@ -657,7 +657,7 @@ } ], "id": "extension-add", - "ms": 8603, + "ms": 8436, "ok": true }, { @@ -703,7 +703,7 @@ } ], "id": "sensor-webhook", - "ms": 3242, + "ms": 3093, "ok": true }, { @@ -759,7 +759,7 @@ } ], "id": "settings-change", - "ms": 9470, + "ms": 9344, "ok": true }, { @@ -829,7 +829,7 @@ } ], "id": "person-add", - "ms": 3842, + "ms": 3706, "ok": true }, { @@ -875,7 +875,7 @@ } ], "id": "api-token", - "ms": 3446, + "ms": 3445, "ok": true }, { @@ -888,7 +888,7 @@ "swipes": 0, "steps": [], "id": "namespace-switch", - "ms": 7266, + "ms": 7198, "ok": false, "error": "the namespace switcher isn't on the screen on a phone" }, @@ -919,7 +919,7 @@ } ], "id": "agent-connect", - "ms": 2809, + "ms": 2724, "ok": true }, { @@ -973,7 +973,7 @@ } ], "id": "import-file", - "ms": 3782, + "ms": 3691, "ok": true }, { @@ -1068,7 +1068,7 @@ } ], "id": "source-folder", - "ms": 5836, + "ms": 5665, "ok": true }, { @@ -1114,15 +1114,15 @@ } ], "id": "entity-find", - "ms": 12131, + "ms": 12012, "ok": true }, { "module": "Graph", "feature": "Find a speaker in the graph of what was imported", "note": "The first namespace keeps its graph to itself, so the graph opens empty until it is picked as the namespace.", - "clicks": 2, - "keys": 0, + "clicks": 4, + "keys": 7, "prompts": 0, "swipes": 0, "steps": [ @@ -1141,12 +1141,43 @@ "clicks": 1, "keys": 0, "prompts": 0 + }, + { + "page": "/graph", + "kind": "tap", + "what": "Filters", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/graph", + "kind": "type", + "what": "part of the name", + "clicks": 0, + "keys": 6, + "prompts": 0 + }, + { + "page": "/graph", + "kind": "key", + "what": "Enter to pick it", + "clicks": 0, + "keys": 1, + "prompts": 0 + }, + { + "page": "/graph", + "kind": "tap", + "what": "close the filters (they stay open over the node)", + "clicks": 1, + "keys": 0, + "prompts": 0 } ], "id": "graph-find", - "ms": 9662, - "ok": false, - "error": "the namespace switcher isn't on the screen on a phone" + "ms": 5205, + "ok": true }, { "module": "Podcasts", @@ -1155,7 +1186,7 @@ "clicks": 6, "keys": 0, "prompts": 0, - "swipes": 0, + "swipes": 1, "steps": [ { "page": "/", @@ -1200,14 +1231,15 @@ { "page": "/resources/:id", "kind": "tap", - "what": "Create podcast", + "what": "Create podcast (covered by something else on the page)", "clicks": 1, "keys": 0, - "prompts": 0 + "prompts": 0, + "swipes": 1 } ], "id": "podcast-create", - "ms": 4182, + "ms": 9333, "ok": true }, { @@ -1261,7 +1293,7 @@ } ], "id": "report-pdf", - "ms": 4035, + "ms": 3978, "ok": true }, { @@ -1323,7 +1355,7 @@ } ], "id": "workflow-create", - "ms": 3838, + "ms": 3773, "ok": true }, { @@ -1386,7 +1418,7 @@ } ], "id": "template-create", - "ms": 3937, + "ms": 3624, "ok": true }, { @@ -1448,7 +1480,7 @@ } ], "id": "namespace-create", - "ms": 3554, + "ms": 3451, "ok": true }, { @@ -1510,7 +1542,7 @@ } ], "id": "speaker-rename", - "ms": 4521, + "ms": 4635, "ok": true }, { @@ -1582,7 +1614,7 @@ } ], "id": "cloud-model", - "ms": 9165, + "ms": 9086, "ok": true } ], @@ -1633,7 +1665,7 @@ "page": "/graph", "label": "Graph", "reach": 2, - "controls": 4 + "controls": 14 }, { "page": "/podcasts", @@ -1699,7 +1731,7 @@ "page": "/routines/history", "label": "Routines › History", "reach": 3, - "controls": 8 + "controls": 9 }, { "page": "/extensions", @@ -1855,7 +1887,7 @@ "page": "/settings/telemetry", "label": "Settings › Telemetry", "reach": 3, - "controls": 13 + "controls": 14 }, { "page": "/settings/fedora", @@ -1937,7 +1969,7 @@ }, { "page": "/notes/:id", - "label": "Pi setup", + "label": "Untitled", "reach": 2, "controls": 9 } diff --git a/ci/clicks/baseline.json b/ci/clicks/baseline.json index 4a3411c83..d301553f1 100644 --- a/ci/clicks/baseline.json +++ b/ci/clicks/baseline.json @@ -1,5 +1,5 @@ { - "surveyed": "2026-10-10T23:16:44.807Z", + "surveyed": "2026-10-11T00:48:55.719Z", "commit": "", "viewport": "1400x900", "device": "desktop", @@ -47,7 +47,7 @@ } ], "id": "install", - "ms": 1911, + "ms": 4116, "ok": true }, { @@ -85,7 +85,7 @@ } ], "id": "first-admin", - "ms": 451, + "ms": 454, "ok": true }, { @@ -131,7 +131,7 @@ } ], "id": "setup-wizard", - "ms": 695, + "ms": 588, "ok": true }, { @@ -161,7 +161,7 @@ } ], "id": "first-question", - "ms": 1237, + "ms": 2274, "ok": true }, { @@ -207,7 +207,7 @@ } ], "id": "import-paste", - "ms": 4191, + "ms": 4177, "ok": true }, { @@ -237,7 +237,7 @@ } ], "id": "library-open", - "ms": 2637, + "ms": 2548, "ok": true }, { @@ -275,7 +275,7 @@ } ], "id": "search-word", - "ms": 3163, + "ms": 3344, "ok": true }, { @@ -313,7 +313,7 @@ } ], "id": "jump-to", - "ms": 2296, + "ms": 2251, "ok": true }, { @@ -351,7 +351,7 @@ } ], "id": "chat-ask", - "ms": 3492, + "ms": 3328, "ok": true }, { @@ -405,7 +405,7 @@ } ], "id": "note-create", - "ms": 3365, + "ms": 3171, "ok": true }, { @@ -451,7 +451,7 @@ } ], "id": "topic-add", - "ms": 3376, + "ms": 3191, "ok": true }, { @@ -489,7 +489,7 @@ } ], "id": "pipeline-create", - "ms": 2523, + "ms": 2482, "ok": true }, { @@ -527,7 +527,7 @@ } ], "id": "routine-create", - "ms": 2615, + "ms": 2559, "ok": true }, { @@ -565,7 +565,7 @@ } ], "id": "extension-add", - "ms": 2539, + "ms": 2578, "ok": true }, { @@ -603,7 +603,7 @@ } ], "id": "sensor-webhook", - "ms": 2633, + "ms": 2539, "ok": true }, { @@ -649,7 +649,7 @@ } ], "id": "settings-change", - "ms": 3352, + "ms": 3291, "ok": true }, { @@ -711,7 +711,7 @@ } ], "id": "person-add", - "ms": 3150, + "ms": 3222, "ok": true }, { @@ -757,7 +757,7 @@ } ], "id": "api-token", - "ms": 3381, + "ms": 3217, "ok": true }, { @@ -787,7 +787,7 @@ } ], "id": "namespace-switch", - "ms": 2331, + "ms": 2272, "ok": true }, { @@ -817,7 +817,7 @@ } ], "id": "agent-connect", - "ms": 2781, + "ms": 2572, "ok": true }, { @@ -855,7 +855,7 @@ } ], "id": "import-file", - "ms": 8883, + "ms": 8713, "ok": true }, { @@ -941,7 +941,7 @@ } ], "id": "source-folder", - "ms": 4908, + "ms": 8482, "ok": true }, { @@ -979,14 +979,14 @@ } ], "id": "entity-find", - "ms": 11494, + "ms": 11323, "ok": true }, { "module": "Graph", "feature": "Find a speaker in the graph of what was imported", "note": "The first namespace keeps its graph to itself, so the graph opens empty until it is picked as the namespace.", - "clicks": 4, + "clicks": 1, "keys": 7, "prompts": 0, "swipes": 0, @@ -999,27 +999,11 @@ "keys": 0, "prompts": 0 }, - { - "page": "/graph", - "kind": "click", - "what": "the namespace switcher", - "clicks": 1, - "keys": 0, - "prompts": 0 - }, - { - "page": "/graph", - "kind": "click", - "what": "interviews", - "clicks": 1, - "keys": 0, - "prompts": 0 - }, { "page": "/graph", "kind": "type", "what": "part of the name", - "clicks": 1, + "clicks": 0, "keys": 6, "prompts": 0 }, @@ -1033,7 +1017,7 @@ } ], "id": "graph-find", - "ms": 4532, + "ms": 4309, "ok": true }, { @@ -1087,7 +1071,7 @@ } ], "id": "podcast-create", - "ms": 3501, + "ms": 3466, "ok": true }, { @@ -1133,7 +1117,7 @@ } ], "id": "report-pdf", - "ms": 3382, + "ms": 3327, "ok": true }, { @@ -1187,7 +1171,7 @@ } ], "id": "workflow-create", - "ms": 3069, + "ms": 2900, "ok": true }, { @@ -1241,7 +1225,7 @@ } ], "id": "template-create", - "ms": 3030, + "ms": 2791, "ok": true }, { @@ -1295,7 +1279,7 @@ } ], "id": "namespace-create", - "ms": 3012, + "ms": 2828, "ok": true }, { @@ -1349,7 +1333,7 @@ } ], "id": "speaker-rename", - "ms": 3962, + "ms": 3891, "ok": true }, { @@ -1411,7 +1395,7 @@ } ], "id": "cloud-model", - "ms": 3064, + "ms": 2847, "ok": true } ], @@ -1426,7 +1410,7 @@ "page": "/library", "label": "Library", "reach": 1, - "controls": 38 + "controls": 39 }, { "page": "/search", @@ -1462,7 +1446,7 @@ "page": "/graph", "label": "Graph", "reach": 1, - "controls": 18 + "controls": 29 }, { "page": "/podcasts", @@ -1480,7 +1464,7 @@ "page": "/costs", "label": "Costs", "reach": 1, - "controls": 11 + "controls": 12 }, { "page": "/pipelines", @@ -1528,7 +1512,7 @@ "page": "/routines/history", "label": "Routines › History", "reach": 2, - "controls": 8 + "controls": 9 }, { "page": "/extensions", @@ -1612,7 +1596,7 @@ "page": "/settings/search", "label": "Settings › Search", "reach": 2, - "controls": 18 + "controls": 17 }, { "page": "/settings/reports", @@ -1684,7 +1668,7 @@ "page": "/settings/telemetry", "label": "Settings › Telemetry", "reach": 2, - "controls": 13 + "controls": 14 }, { "page": "/settings/fedora", From 47df37e028b1fe557613d7fbe3589381c670ff25 Mon Sep 17 00:00:00 2001 From: Adeel Ahmad Date: Sun, 11 Oct 2026 02:03:49 +0000 Subject: [PATCH 15/15] ci(clicks): port the cloud-model journey through the presets (#350), agent-connect baselines on main The cloud-model journey from #350 (the Settings presets from #334 broke the old one on main), with #350's baselines and the agent-connect entry from a run of this branch on main. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01JYGqrDpgP3Gcw1Jwf5mwT8 --- ci/clicks/baseline-phone.json | 142 ++++++++++++++++++++-------------- ci/clicks/baseline.json | 132 ++++++++++++++++++------------- ci/clicks/journeys.mjs | 8 +- 3 files changed, 167 insertions(+), 115 deletions(-) diff --git a/ci/clicks/baseline-phone.json b/ci/clicks/baseline-phone.json index 716c4c8a0..b11da16b5 100644 --- a/ci/clicks/baseline-phone.json +++ b/ci/clicks/baseline-phone.json @@ -1,5 +1,5 @@ { - "surveyed": "2026-10-11T00:53:00.799Z", + "surveyed": "2026-10-11T01:55:01.175Z", "commit": "", "viewport": "Pixel 7, 412x839, touch", "device": "phone", @@ -47,7 +47,7 @@ } ], "id": "install", - "ms": 2213, + "ms": 2184, "ok": true }, { @@ -85,7 +85,7 @@ } ], "id": "first-admin", - "ms": 583, + "ms": 518, "ok": true }, { @@ -95,7 +95,7 @@ "clicks": 4, "keys": 0, "prompts": 0, - "swipes": 2, + "swipes": 1, "steps": [ { "page": "/welcome", @@ -112,8 +112,7 @@ "what": "Save and continue (Storage)", "clicks": 1, "keys": 0, - "prompts": 0, - "swipes": 1 + "prompts": 0 }, { "page": "/welcome", @@ -133,7 +132,7 @@ } ], "id": "setup-wizard", - "ms": 1211, + "ms": 1195, "ok": true }, { @@ -163,7 +162,7 @@ } ], "id": "first-question", - "ms": 1197, + "ms": 1114, "ok": true }, { @@ -226,7 +225,7 @@ } ], "id": "import-paste", - "ms": 4796, + "ms": 4748, "ok": true }, { @@ -264,7 +263,7 @@ } ], "id": "library-open", - "ms": 3173, + "ms": 3045, "ok": true }, { @@ -310,7 +309,7 @@ } ], "id": "search-word", - "ms": 3758, + "ms": 3671, "ok": true }, { @@ -348,7 +347,7 @@ } ], "id": "jump-to", - "ms": 2450, + "ms": 2422, "ok": true }, { @@ -402,7 +401,7 @@ } ], "id": "chat-ask", - "ms": 6305, + "ms": 6251, "ok": true }, { @@ -464,7 +463,7 @@ } ], "id": "note-create", - "ms": 3712, + "ms": 3556, "ok": true }, { @@ -518,7 +517,7 @@ } ], "id": "topic-add", - "ms": 3726, + "ms": 3699, "ok": true }, { @@ -564,7 +563,7 @@ } ], "id": "pipeline-create", - "ms": 3030, + "ms": 2993, "ok": true }, { @@ -610,7 +609,7 @@ } ], "id": "routine-create", - "ms": 3090, + "ms": 2982, "ok": true }, { @@ -657,7 +656,7 @@ } ], "id": "extension-add", - "ms": 8436, + "ms": 8345, "ok": true }, { @@ -703,7 +702,7 @@ } ], "id": "sensor-webhook", - "ms": 3093, + "ms": 3098, "ok": true }, { @@ -759,7 +758,7 @@ } ], "id": "settings-change", - "ms": 9344, + "ms": 9321, "ok": true }, { @@ -829,7 +828,7 @@ } ], "id": "person-add", - "ms": 3706, + "ms": 3764, "ok": true }, { @@ -875,7 +874,7 @@ } ], "id": "api-token", - "ms": 3445, + "ms": 3435, "ok": true }, { @@ -888,25 +887,41 @@ "swipes": 0, "steps": [], "id": "namespace-switch", - "ms": 7198, + "ms": 7184, "ok": false, "error": "the namespace switcher isn't on the screen on a phone" }, { "module": "Agents", "feature": "Connect an AI assistant (Claude, ChatGPT, Cursor) over MCP", - "note": "In the assistant: add a connector and give it Lens's MCP address; the assistant opens Lens's consent page, where the person allows it. After setup Lens shows the MCP address nowhere, so it is typed (counted as typed).", - "clicks": 3, - "keys": 25, + "note": "Copy MCP address in the account menu; in the assistant: add a connector and paste the address; the assistant opens Lens's consent page, where the person allows it.", + "clicks": 5, + "keys": 1, "prompts": 0, "swipes": 0, "steps": [ + { + "page": "/", + "kind": "tap", + "what": "Account menu", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/", + "kind": "tap", + "what": "Copy MCP address", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, { "page": "/", "kind": "outside", - "what": "in the assistant: add a connector, type Lens's MCP address, add it", + "what": "in the assistant: add a connector, paste Lens's MCP address, add it", "clicks": 2, - "keys": 25, + "keys": 1, "prompts": 0 }, { @@ -919,7 +934,7 @@ } ], "id": "agent-connect", - "ms": 2724, + "ms": 3195, "ok": true }, { @@ -973,7 +988,7 @@ } ], "id": "import-file", - "ms": 3691, + "ms": 4123, "ok": true }, { @@ -1068,7 +1083,7 @@ } ], "id": "source-folder", - "ms": 5665, + "ms": 5586, "ok": true }, { @@ -1114,7 +1129,7 @@ } ], "id": "entity-find", - "ms": 12012, + "ms": 11897, "ok": true }, { @@ -1176,7 +1191,7 @@ } ], "id": "graph-find", - "ms": 5205, + "ms": 5005, "ok": true }, { @@ -1239,7 +1254,7 @@ } ], "id": "podcast-create", - "ms": 9333, + "ms": 9255, "ok": true }, { @@ -1293,7 +1308,7 @@ } ], "id": "report-pdf", - "ms": 3978, + "ms": 4039, "ok": true }, { @@ -1355,7 +1370,7 @@ } ], "id": "workflow-create", - "ms": 3773, + "ms": 3669, "ok": true }, { @@ -1418,7 +1433,7 @@ } ], "id": "template-create", - "ms": 3624, + "ms": 3614, "ok": true }, { @@ -1480,7 +1495,7 @@ } ], "id": "namespace-create", - "ms": 3451, + "ms": 3416, "ok": true }, { @@ -1542,17 +1557,17 @@ } ], "id": "speaker-rename", - "ms": 4635, + "ms": 4235, "ok": true }, { "module": "Setup", "feature": "Switch to a cloud model with an API key", - "note": "What a Raspberry Pi install does after the installer: an OpenAI-compatible cloud provider, its model and a pasted key.", - "clicks": 7, - "keys": 39, + "note": "What a Raspberry Pi install does after the installer: a cloud provider picked from the presets fills in its address and model, then a pasted key.", + "clicks": 5, + "keys": 1, "prompts": 0, - "swipes": 2, + "swipes": 1, "steps": [ { "page": "/", @@ -1581,28 +1596,19 @@ }, { "page": "/settings/llm", - "kind": "replace", - "what": "the provider's address", - "clicks": 1, - "keys": 26, - "prompts": 0 - }, - { - "page": "/settings/llm", - "kind": "replace", - "what": "the model", + "kind": "tap", + "what": "OpenAI (fills in the address and the model)", "clicks": 1, - "keys": 12, + "keys": 0, "prompts": 0 }, { "page": "/settings/llm", "kind": "paste", "what": "paste the API key", - "clicks": 1, + "clicks": 0, "keys": 1, - "prompts": 0, - "swipes": 1 + "prompts": 0 }, { "page": "/settings/llm", @@ -1614,7 +1620,7 @@ } ], "id": "cloud-model", - "ms": 9086, + "ms": 9453, "ok": true } ], @@ -1797,7 +1803,7 @@ "page": "/settings/llm", "label": "Settings › LLM provider", "reach": 3, - "controls": 11 + "controls": 20 }, { "page": "/settings/local-model", @@ -1901,6 +1907,24 @@ "reach": 3, "controls": 15 }, + { + "page": "/settings/nfs", + "label": "Settings › NFS share", + "reach": 3, + "controls": 4 + }, + { + "page": "/settings/smb", + "label": "Settings › SMB share", + "reach": 3, + "controls": 2 + }, + { + "page": "/settings/shares", + "label": "Settings › File shares", + "reach": 3, + "controls": 6 + }, { "page": "/settings/uploads", "label": "Settings › Uploads", diff --git a/ci/clicks/baseline.json b/ci/clicks/baseline.json index d301553f1..671be5435 100644 --- a/ci/clicks/baseline.json +++ b/ci/clicks/baseline.json @@ -1,5 +1,5 @@ { - "surveyed": "2026-10-11T00:48:55.719Z", + "surveyed": "2026-10-11T01:50:54.212Z", "commit": "", "viewport": "1400x900", "device": "desktop", @@ -47,7 +47,7 @@ } ], "id": "install", - "ms": 4116, + "ms": 2561, "ok": true }, { @@ -85,7 +85,7 @@ } ], "id": "first-admin", - "ms": 454, + "ms": 422, "ok": true }, { @@ -131,7 +131,7 @@ } ], "id": "setup-wizard", - "ms": 588, + "ms": 572, "ok": true }, { @@ -161,7 +161,7 @@ } ], "id": "first-question", - "ms": 2274, + "ms": 2196, "ok": true }, { @@ -207,7 +207,7 @@ } ], "id": "import-paste", - "ms": 4177, + "ms": 4093, "ok": true }, { @@ -237,7 +237,7 @@ } ], "id": "library-open", - "ms": 2548, + "ms": 2522, "ok": true }, { @@ -275,7 +275,7 @@ } ], "id": "search-word", - "ms": 3344, + "ms": 3096, "ok": true }, { @@ -313,7 +313,7 @@ } ], "id": "jump-to", - "ms": 2251, + "ms": 2245, "ok": true }, { @@ -351,7 +351,7 @@ } ], "id": "chat-ask", - "ms": 3328, + "ms": 3280, "ok": true }, { @@ -405,7 +405,7 @@ } ], "id": "note-create", - "ms": 3171, + "ms": 3052, "ok": true }, { @@ -451,7 +451,7 @@ } ], "id": "topic-add", - "ms": 3191, + "ms": 3206, "ok": true }, { @@ -489,7 +489,7 @@ } ], "id": "pipeline-create", - "ms": 2482, + "ms": 2517, "ok": true }, { @@ -527,7 +527,7 @@ } ], "id": "routine-create", - "ms": 2559, + "ms": 2516, "ok": true }, { @@ -565,7 +565,7 @@ } ], "id": "extension-add", - "ms": 2578, + "ms": 2513, "ok": true }, { @@ -603,7 +603,7 @@ } ], "id": "sensor-webhook", - "ms": 2539, + "ms": 2568, "ok": true }, { @@ -649,7 +649,7 @@ } ], "id": "settings-change", - "ms": 3291, + "ms": 3218, "ok": true }, { @@ -711,7 +711,7 @@ } ], "id": "person-add", - "ms": 3222, + "ms": 2983, "ok": true }, { @@ -757,7 +757,7 @@ } ], "id": "api-token", - "ms": 3217, + "ms": 3061, "ok": true }, { @@ -787,24 +787,40 @@ } ], "id": "namespace-switch", - "ms": 2272, + "ms": 2242, "ok": true }, { "module": "Agents", "feature": "Connect an AI assistant (Claude, ChatGPT, Cursor) over MCP", - "note": "In the assistant: add a connector and give it Lens's MCP address; the assistant opens Lens's consent page, where the person allows it. After setup Lens shows the MCP address nowhere, so it is typed (counted as typed).", - "clicks": 3, - "keys": 25, + "note": "Copy MCP address in the account menu; in the assistant: add a connector and paste the address; the assistant opens Lens's consent page, where the person allows it.", + "clicks": 5, + "keys": 1, "prompts": 0, "swipes": 0, "steps": [ + { + "page": "/", + "kind": "click", + "what": "Account menu", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, + { + "page": "/", + "kind": "click", + "what": "Copy MCP address", + "clicks": 1, + "keys": 0, + "prompts": 0 + }, { "page": "/", "kind": "outside", - "what": "in the assistant: add a connector, type Lens's MCP address, add it", + "what": "in the assistant: add a connector, paste Lens's MCP address, add it", "clicks": 2, - "keys": 25, + "keys": 1, "prompts": 0 }, { @@ -817,7 +833,7 @@ } ], "id": "agent-connect", - "ms": 2572, + "ms": 2761, "ok": true }, { @@ -855,7 +871,7 @@ } ], "id": "import-file", - "ms": 8713, + "ms": 8592, "ok": true }, { @@ -941,7 +957,7 @@ } ], "id": "source-folder", - "ms": 8482, + "ms": 10678, "ok": true }, { @@ -979,7 +995,7 @@ } ], "id": "entity-find", - "ms": 11323, + "ms": 11282, "ok": true }, { @@ -1017,7 +1033,7 @@ } ], "id": "graph-find", - "ms": 4309, + "ms": 4153, "ok": true }, { @@ -1071,7 +1087,7 @@ } ], "id": "podcast-create", - "ms": 3466, + "ms": 3347, "ok": true }, { @@ -1117,7 +1133,7 @@ } ], "id": "report-pdf", - "ms": 3327, + "ms": 3299, "ok": true }, { @@ -1171,7 +1187,7 @@ } ], "id": "workflow-create", - "ms": 2900, + "ms": 2944, "ok": true }, { @@ -1225,7 +1241,7 @@ } ], "id": "template-create", - "ms": 2791, + "ms": 2846, "ok": true }, { @@ -1279,7 +1295,7 @@ } ], "id": "namespace-create", - "ms": 2828, + "ms": 2835, "ok": true }, { @@ -1333,15 +1349,15 @@ } ], "id": "speaker-rename", - "ms": 3891, + "ms": 3808, "ok": true }, { "module": "Setup", "feature": "Switch to a cloud model with an API key", - "note": "What a Raspberry Pi install does after the installer: an OpenAI-compatible cloud provider, its model and a pasted key.", - "clicks": 5, - "keys": 40, + "note": "What a Raspberry Pi install does after the installer: a cloud provider picked from the presets fills in its address and model, then a pasted key.", + "clicks": 3, + "keys": 2, "prompts": 0, "swipes": 0, "steps": [ @@ -1363,25 +1379,17 @@ }, { "page": "/settings/llm", - "kind": "replace", - "what": "the provider's address", - "clicks": 1, - "keys": 26, - "prompts": 0 - }, - { - "page": "/settings/llm", - "kind": "replace", - "what": "the model", + "kind": "click", + "what": "OpenAI (fills in the address and the model)", "clicks": 1, - "keys": 12, + "keys": 0, "prompts": 0 }, { "page": "/settings/llm", "kind": "paste", "what": "paste the API key", - "clicks": 1, + "clicks": 0, "keys": 1, "prompts": 0 }, @@ -1395,7 +1403,7 @@ } ], "id": "cloud-model", - "ms": 2847, + "ms": 2711, "ok": true } ], @@ -1578,7 +1586,7 @@ "page": "/settings/llm", "label": "Settings › LLM provider", "reach": 2, - "controls": 11 + "controls": 20 }, { "page": "/settings/local-model", @@ -1682,6 +1690,24 @@ "reach": 2, "controls": 15 }, + { + "page": "/settings/nfs", + "label": "Settings › NFS share", + "reach": 2, + "controls": 4 + }, + { + "page": "/settings/smb", + "label": "Settings › SMB share", + "reach": 2, + "controls": 2 + }, + { + "page": "/settings/shares", + "label": "Settings › File shares", + "reach": 2, + "controls": 6 + }, { "page": "/settings/uploads", "label": "Settings › Uploads", diff --git a/ci/clicks/journeys.mjs b/ci/clicks/journeys.mjs index ed76c3b19..d1befb418 100644 --- a/ci/clicks/journeys.mjs +++ b/ci/clicks/journeys.mjs @@ -646,14 +646,16 @@ export const JOURNEYS = [ ns: "", module: "Setup", feature: "Switch to a cloud model with an API key", - note: "What a Raspberry Pi install does after the installer: an OpenAI-compatible cloud provider, its model and a pasted key.", + note: "What a Raspberry Pi install does after the installer: a cloud provider picked from the presets fills in its address and model, then a pasted key.", from: "/", async run(ctx) { const { page, meter } = ctx; await go(ctx, "Settings"); await meter.click(page.getByRole("link", { name: "LLM provider" }), "LLM provider"); - await meter.replace(page.getByRole("textbox", { name: "Base URL (OpenAI-compatible)" }), "https://api.openai.com/v1", "the provider's address"); - await meter.replace(page.getByRole("textbox", { name: "Model", exact: true }), "gpt-4o-mini", "the model"); + const cloud = page.getByRole("group", { name: "Cloud providers" }).getByRole("button", { name: "OpenAI" }); + await meter.click(cloud, "OpenAI (fills in the address and the model)"); + // The key field takes the focus: a person sees the cursor land there before pasting + await page.waitForFunction(() => document.activeElement?.type === "password", null, { timeout: 3000 }).catch(() => {}); await meter.paste(page.getByRole("textbox", { name: "API key" }), "sk-survey-0000000000000000", "paste the API key"); await save(ctx); await page.getByText(/Saved|Last saved/).first().waitFor();