Repository navigation
test(clicks): journeys for regenerating, copying, exporting and choosing tools in a chat - #541
Merged
Merged
Conversation
An answer's Copy button opened a menu, so copying took two clicks. A click on Copy now copies it as Markdown (its citations as footnotes, as before); the arrow beside it, as Regenerate has, holds Copy as Markdown, Copy text and Export as Markdown, PDF or JSON. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HXPWXcSCQb9hWPr7xkZu7B
…aved In a conversation, the Tools chip saved each change and then read the conversation back, and the next change was made from what the page still held. Switching a group off and then turning on the limit before the first save came back sent the old tools (Auto) with the limit, and the group came back on. Now each change shows at once, the changes are saved in the order they were made, and the conversation is read back after the last one. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HXPWXcSCQb9hWPr7xkZu7B
…ing tools in a chat chat-regenerate (from Home: the conversation, Regenerate, back to the first version), chat-copy, chat-export-pdf (the server's PDF downloaded, or the browser's print dialog counted outside the browser) and chat-tools (a group off and a limit), on a computer and a phone. They run before cloud-model, which stays last since it points Lens away from the stand-in model; the stand-in model now answers a regenerated question with "..., version 2." so the versions differ. Both baselines are from full runs, so they also carry entity-merge and graph-merge, which they lacked. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HXPWXcSCQb9hWPr7xkZu7B
…-r960xc-c9-journeys
…and-in model titles conversations Since #531 Lens asks the model for a conversation's title after its first answer, and the stand-in model's one reply became every conversation's title in the list beside Chat. chat-ask waits for the reply's words, found them at once in that list, and ended before its own answer was saved, so chat-regenerate and the journeys after it found a conversation with a question and no answer. The stand-in now answers the title prompt with the first question's words, as a model would, and first-question and chat-ask wait for the reply inside the newest answer, not anywhere on the page. The page survey counts a page's controls again for a few seconds when it finds none, so a settings page still loading isn't recorded with none. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HXPWXcSCQb9hWPr7xkZu7B
…-r960xc-c9-journeys
Both devices, 37 of 37 journeys ok, every journey's count as before. The per-page control counts move with main: Settings › AI assistant has the auto title switch, Settings › Sensors two more controls. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HXPWXcSCQb9hWPr7xkZu7B
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The clicks survey (
ci/clicks) now measures the chat features that have merged, on a computer and on a phone. Eachcount is from full runs of
ci/clicks/run.shon this branch with main (6eefdff) merged in, and the Clicks workflowruns them again on CI:
chat-regeneratechat-askstarted, Regenerate, then ‹ back to the first versionchat-copychat-export-pdfchat-toolsNo keys or passkey touches in any of them.
baseline.jsonandbaseline-phone.jsonare regenerated from those runs,so CI holds every journey to its count. They now also carry
entity-mergeandgraph-merge: both were injourneys.mjsbut not in the baselines, so CI wasn't holding them to a number yet. Every journey that was already inthe baselines kept its count on both devices, and no page has a control under the Ask button.
Two web app fixes the journeys turned up, each small and in the chat components:
C3's goal is "Get anything out of a conversation in one click". A click on Copy now copies the answer as
Markdown (citations as footnotes, as before). The arrow beside it, the same split button Regenerate has, holds
Copy as Markdown, Copy text and Export as Markdown, PDF or JSON.
docs/assistant.mdsays so.the conversation was read back, and the next change was built on what the page still held. So switching a group
off and then turning the limit on before the first save came back sent the old tools (Auto) with the limit, and
the group came back on. The first full survey run caught it: the chip ended at "Tools: Auto · 10 calls". The new
useSaveToolshook (tools-picker.tsx) shows each change at once, saves the changes in the order they were made,and reads the conversation back after the last one. A new jest test holds the first save back, makes the second
change, and checks that it keeps the first (it fails against the old code).
Other changes:
fake-model.mjs: the stand-in model answers the same question again in the same conversation (a regeneratedanswer) with "…answering, version 2.", so the journey can tell the versions apart. It keys on the question and
the conversation before it, not the excerpts, which are marked afresh on each call. Every other call gets the same
reply as before, and the other journeys'
stand-in model answeringmatch still holds.fake-model.mjsalso titles conversations. Since feat(chat): title conversations after their first answer #531 Lens asks the model for a title after a conversation's firstanswer, and the stand-in's one reply became every conversation's title in the list beside Chat. That made the first
CI run here fail all four journeys:
chat-askwaits for the reply's words, found them at once in that list (theconversation the welcome tour started), and ended before its own answer was saved, so the journeys after it found
a conversation with a question and no answer. The stand-in now answers the title prompt with the first question's
words, as a model would, and
first-questionandchat-askwait for the reply inside the newest answer(
answered()injourneys.mjs), not anywhere on the page.counted()insurvey.mjs): two full runs here recorded a settings page still loading as having no controls (Documents in one,Video in the other), which would have gone into the baseline as fact.
cloud-model, not after it.cloud-modelhas to stay last because it pointsLens at a cloud model with a dummy key, and these need the stand-in model to answer. The baselines compare by id,
so this order doesn't change any other journey.
chat-export-pdffollows whichever path the server takes. Where the server can make the PDF (Chromium, anytopdfor LibreOffice), the browser saves the download. Where it can't (409), the web app opens the print dialog, which
is counted as one click on
(outside the browser), asreport-pdfdoes. In both runs here the server fetchedanytopdf and made the PDF (200), so the browser downloaded it. CI's ubuntu-latest runner has Chrome on the PATH,
so it makes the PDF there too.
docs/requirements.md: the regenerate row also nameschat-regenerate≤ 4 clicks.Motivation and Context
Chat-gaps plan, C9 item 1 (journeys). The deep research journey waits for its web app (C8), which hasn't merged.
Types of changes
!in the title)Checklist:
make hookschecks it on commit).docs/accordingly.## UnreleasedinCHANGELOG.md. (n/a: the title and the commits say it)Evidence
ci/clicks/run.sh --compare ci/clicks/baseline.jsonandci/clicks/run.sh --device phone --compare ci/clicks/baseline-phone.json, full runs with main (6eefdff) merged in, after the title fix: 37 of 37 journeys ok on each, every count the same as in the baselines before, which are regenerated from these runs (the per-page control counts move with main:/settings/aihas the auto title switch,/settings/sensorstwo more controls).NODE_ENV=test npx jeston the chat suites (tools picker, copy and export, chat, versions, composer, details, web citations): 51 passed. ESLint, Prettier andtsc --noEmitare clean on the web app files changed here, again after merging main.python3 ci/check_requirements.pyandci/test_check_requirements.pypass.mkdocs build --strictis clean.ci/local-ci.shon this branch at a5be9f2: every job green (FastAPI embedded 678s, FastAPI SurrealDB server 578s, Next.js 413s, pre-commit 134s, PR title), 2026-10-18 01:42 UTC.Done questions (AGENTS.md)
POST /chats/{cid}/messageswithregenerate,PUT /chats/{cid}/head,GET /chats/{cid}/export.{md,pdf,json},PATCH /chats/{cid}withtoolsandmax_tool_calls) and MCP (read_chat,export_chat). Both fixes are web app only.run.shneeds the same ports and rclone as before.docs/assistant.mdanddocs/requirements.md; the baselines come fromrun.shoutput, not hand edits.report-pdf's print stub; the save hook uses TanStack Query's own cancel and cache update.Refine later
docs/requirements.mdyet, sochat-copy,chat-export-pdfandchat-toolsaren't named as checks there. Add them with their counts (1, 2 and 4 clicks) when the labels pass adds those rows.chat-export-pdfdepends on whether the survey's server can make a PDF. With network access it fetches anytopdf from GitHub on the first PDF (or uses Chromium if it's on the PATH, as on CI's runner). Offline it takes the print path, which counts one more step outside the browser. A run with no network would read one step worse than the baseline.chat-toolsis the default 10. Any other number needs a click into the field, Ctrl+A and the digits, or the − and + buttons one call at a time.ci/clicks/*.mjsfiles failprettier --checkon main, and no Nx project lints them. Aproject.jsonwith a lint or format target would bring them intomake affected.useSaveTools's pattern would fit them too.🤖 Generated with Claude Code
https://claude.ai/code/session_01HXPWXcSCQb9hWPr7xkZu7B