Group tool calls and center the new-session composer in the `clai2` web UI
Merged
MP
2mo ago+299+299+012345678901234567890123456789-76-76-01234567890123456789
Part 4 of the clai2 web UI stack (#10261 → #10262 → #10263 → this PR). Based on #10263. No linked issue: built at the CLAI maintainer's request.
Why. Make the UI read like a desktop coding agent, not a log.
- A new session opens on "What should we build in ?" with the composer under it, instead of an empty page with the composer at the bottom.
- Consecutive tool calls other than edits fold into one row, open while running: "Explored 3 files · Ran 2 commands". Edits stay on their own rows with their diffs, since those are what a reviewer reads.
- In CLAI's default code mode every action is a
run_codescript. Rows and group summaries now count the harness calls inside the script (read_file,shell,grep, ...), so a one-call script reads "Read app.py" or "Ranpytest -q" instead of "Ran code".
New public surface. None.
Verification. npm run build (strict tsc --noEmit plus Vite). Headed Playwright against clai2 --web with claude-code:claude-haiku-4-5: the hero on /new, then a turn whose rows render as "Listed .", "Explored 2 files", "Ran python3 -c …". No page errors.
What changes for existing users. Nothing until they enable web.
- No breaking changes in accordance with the version policy.
- Any permitted compatibility impact has a label, warning, migration, release note, and exact API-check waiver.
- PR title is fit for the release changelog.