Skip to content

Fold an answer's searches into one line, as opencode does - #36

Merged
TechNomadCode merged 2 commits into
mainfrom
feat/fold-search-steps
Oct 20, 2026
Merged

TechNomadCode merged 2 commits into
mainfrom
feat/fold-search-steps

Conversation

@TechNomadCode

Copy link
Copy Markdown
Owner

Slice 15, in the form the owner approved on 2026-10-20 after four sketches (docs/decisions.md, Design).

What changes in the chat

  • Each search is a plain line that doesn't open: "Search" in medium weight, then the query and whose passages came back, at 13px, cut off with an ellipsis like opencode's tool rows. The chat no longer shows a search's passages; the PRD's source names still open the quotes it uses.
  • Two or more searches in a row fold into one line, "Used 3 searches", whose count rolls up as each search starts. It opens once, to the plain lines (28px rows, 8px apart), with a small triangle that points right when closed (faint at rest, full on hover) and turns down when open. The lines slide open in about 0.35s. Under reduced motion nothing turns or slides.
  • No new dependency: CSS (a 0fr → 1fr grid row) and the React the app has. The rolling count is now shared with the PRD's (src/components/rolling-number.tsx).

src/server: only src/server/ai/fake-chat-model.ts, the local fake model: a new phrase, FAKE_SEARCH_AGAIN, makes it search again while the search is on offer, so the tests get searches in a row. Nothing the real model receives changes. The measurement lane's comparisons will list this file as a code difference.

Checks (local, 2026-10-20): verify passed (454 unit tests, production build). test:e2e passed all 59 (2 new) in one full run on the finished code; two other full runs failed 2 and 4 tests while waiting on the fake model's answers, the known timing issue KI-7, noted there. Checked in Chromium at 1440px on a dev server with the fakes. Not checked: Safari and Firefox, including whether they animate the slide (if not, the lines appear at once).

TechNomadCode and others added 2 commits October 20, 2026 23:26
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@TechNomadCode
TechNomadCode merged commit 7d52f68 into main Oct 20, 2026
5 checks passed
@TechNomadCode
TechNomadCode deleted the feat/fold-search-steps branch October 20, 2026 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant