Skip to content

fix(mobile): a bodyless thinking row is a label, not a disclosure - #864

Merged
huichen merged 1 commit into
mainfrom
fix/thinking-row-disclosure
Sep 26, 2026
Merged

huichen merged 1 commit into
mainfrom
fix/thinking-row-disclosure

Conversation

@huichen

@huichen huichen commented Sep 26, 2026

Copy link
Copy Markdown
Collaborator

What a phone showed

Tap 已思考 on a lean feed and it expanded to an empty box. On a real device that reads as a broken row.

The lean trim removes every reasoning delta by design, so the row is a status ("思考中" / "已思考") and nothing more. It still rendered the chevron and stayed tappable, so the affordance promised content that can never arrive.

The change

The disclosure is gated on having something to disclose:

  • a row with a body keeps its chevron and toggles exactly as before;
  • a row without a body is a plain view — no chevron, no press handler, no empty expansion.

opened and expanded are deliberately kept apart: opened is the layout (a row inside a folded run sits on the open rail), expanded is the reader's own tap. Only the second is a disclosure, and conflating them broke the folded-run layout when I first tried it (caught by an existing test).

Verification

  • New component test pins both directions: a bodyless row renders no chevron and exposes no pressable row; a row with a body still opens its text. Falsified by reverting the gate — that test is the one that fails.
  • The three render scenarios asserted the old behaviour ("a lean reasoning row must have no body" after tapping it), so they now assert the row is not a button at all. scenarios.json parses and the scenarios are re-run below.
  • mobile npx jest --runInBand — 2063 passed, exits cleanly (that matters: a leaked retry timer hangs the CI job rather than failing it, see fix(remote): stop reading a trimmed feed as a broken one #863); tsc --noEmit, eslint clean.

On a lean feed the reasoning row carries no body at all — the trim removes every
reasoning delta and the row is a status ("思考中" / "已思考"), which is the point.
It still rendered the chevron and stayed tappable, so tapping it expanded an
empty box: the row promised content that can never arrive.

The disclosure affordance is now gated on having something to disclose. A row
with a body keeps the chevron and toggles exactly as before; a bodyless row is a
plain view with no chevron and no press handler.

`opened` and `expanded` are deliberately not conflated: `opened` is the layout (a
row inside a folded run sits on the open rail) while `expanded` is the reader's
own tap, and only the second one is a disclosure.

The render scenarios asserted the old behaviour ("a lean reasoning row must have
no body" after tapping it), so they now assert the row is not a button at all —
which is also what a phone was showing.
@huichen
huichen enabled auto-merge (squash) September 26, 2026 03:13
@huichen

huichen commented Sep 26, 2026

Copy link
Copy Markdown
Collaborator Author

Render verification (all five scenarios, real UI in headless Chrome)

Ran the five lean/full render scenarios against this branch (worktree fix-thinking-disclosure, serve-mobile on 8098, headless Chrome on 9223; steps and ready taken verbatim from the committed scenarios, only the URL port and shot paths rewritten).

scenario exit eval errors thinking-row assertion returned
lean-render-live 0 0 "thinking row is a bodyless label, not a disclosure"
lean-render-live-mid 0 0 "思考中(label) + 正在读取(frank-summary.md)"
lean-render-history 0 0 "thinking row is a bodyless label, not a disclosure"
lean-render-full 0 0 "116 chars of reasoning rendered" (still expandable — the contrast holds)
lean-render-full-history 0 0 "116 chars of reasoning rendered"

Falsified: forcing hasBody = true (i.e. the old always-disclosable behaviour) makes lean-render-live fail with exactly a lean reasoning row carries no body, so it must not be expandable (exit 1). Restoring the gate makes it pass again.

Main tree checked afterwards: clean, no dangling symlinks, no stray dev server/Chrome.

@huichen
huichen merged commit 73ab0ed into main Sep 26, 2026
12 checks passed
@huichen
huichen deleted the fix/thinking-row-disclosure branch September 26, 2026 03:16
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