Skip to content

feat(mobile): add persisted Hide thinking details setting - #6103

Merged
iscekic merged 1 commit into
mainfrom
kwf/settings-hide-thinking-details-cb52
Sep 14, 2026
Merged

feat(mobile): add persisted Hide thinking details setting#6103
iscekic merged 1 commit into
mainfrom
kwf/settings-hide-thinking-details-cb52

Conversation

@iscekic

@iscekic iscekic commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Changelog for users

  • Settings → Preferences → General has a new "Hide thinking details" switch, off by default and remembered across app relaunches.
  • With it on, thinking rows, collapsed thinking items, and thinking text disappear from the session page for streaming and loaded sessions.
  • The composer spinner still reads "Thinking" while a reasoning part streams and returns to its normal label afterwards.
  • A running subagent's task card reads "Thinking" while the subagent streams reasoning, instead of "Writing response", a stale tool activity, or "Waiting for activity".
  • Hiding thinking also applies inside an opened subagent sheet, and that sheet's footer spinner still reads "Thinking".
  • A subagent sheet no longer shows an empty padded row when its only message is reasoning.
  • On a cold start with the switch on, no thinking row is drawn before the saved preference resolves.
  • With the switch off, the session page behaves exactly as before.

Changelog for maintainers

  • apps/mobile/src/components/agents/child-session-card-state.ts:103 — accepted: the running card read the raw last assistant part, so a streamed reasoning part behind opencode's pre-created empty text part surfaced as "Writing response"; the card now reuses lastActivePart to pick the part that carries activity, and a pending task with no child session still reads "Waiting for activity".
  • apps/mobile/src/components/agents/session-detail-content.tsx:1078 — accepted: feeding the stripped child list to the in-transcript task card made a running subagent show a stale activity or "Waiting for activity"; the card now reads the raw transcript.
  • apps/mobile/src/components/agents/session-detail-content.tsx:1494 — accepted: a reasoning-only child message left a padded empty row; the sheet now drops messages with no renderable part.
  • apps/mobile/src/components/agents/session-detail-content.tsx:315 — accepted: hasLoaded was ignored, so thinking could paint before the preference resolved; the page now hides reasoning until the preference loads.
  • Adds an off-by-default SecureStore preference agent-hide-thinking-details; only the stored string 'true' enables it, and sign-out clears it.
  • withoutReasoningParts strips reasoning parts while keeping message and array identity when nothing changes; the session page builds a visibility-only displayedMessages list from the raw visibleMessages for the transcript, the details lookup, and subagent rows.
  • The composer spinner and the child-sheet footer read the raw message list; ChildSessionSheet gains an optional getIndicatorMessages (defaults to getChildMessages). computeMessageStatus skips opencode's empty pre-created text part, so the spinner reads "Thinking" during reasoning and then "Writing response".
  • Adds the two preferences.hideThinking* keys to the English and translated catalogs; tests cover the preference parse/store/clear, reasoning stripping, hide/show on the session page, the empty padded row, the running-card label behind the empty placeholder, the spinner label, and the cold-start path. Review focus: spinner-label parity in both modes, no empty padded row for reasoning-only messages, and the cold-start paint.

E2E proof

Seven Android captures are retained from the earlier proof, which replaced the unrecorded claims and the superseded option-on streaming captures: option-on streaming is proven by [p1] and the e2 recording, [p3] the subagent sheet, [e5] the cold start with the option on, [p2] persistence, and [p7]/[p5] layout stability. The running-subagent card is now proven by the new [e1] log evidence, which replaces the earlier static running-card claim: with the child transcript loaded the parent card reads "Thinking", then flips to "Writing response" once the pre-created text part gains content. Limitations: the running-subagent state came from a temporary fixture, because no fake-LLM directive or seed recipe exists for a running subagent, so it is not a re-timed live reasoning token stream; the e2 recording's mid-reasoning spinner label was not captured in a digest (p1 records "Thinking · 4 sec"); recording waits are trimmed.

https://github.com/user-attachments/assets/8944e45f-4847-4cce-bf3a-1e3824427a61

p1-stream.mp4.trim.mp4

[p3] With the option on, open that subagent's sheet: it has no empty padded row above the footer and its footer spinner reads 'Thinking'. — e2e-mobile-app/sheete3b.png

[e5] Cold start with the option on: no thinking row is painted before the preference resolves. — prior/e5-session.png

[p2] Toggling Hide thinking details on and relaunching the app keeps the switch on (it is off before the first toggle)

[p7] Layout stability: toggling the option and the streaming-to-complete transition do not move the composer or the surrounding transcript rows

[p5] Layout stability: toggling the option and the streaming-to-complete transition do not move the composer or the surrounding transcript rows

Owner request

Surface: the mobile app (apps/mobile), Settings and the session page.

Add a new option in Settings: "Hide thinking details" (off by default, persisted like the other settings).

While it is on, thinking parts do not show up on the session page at all: no thinking row, no collapsed "thinking" item, no thinking text, for streamed and for loaded sessions alike. While thinking is streaming, the only indication is the spinner above the composer changing its label to "thinking". Check first whether the spinner already shows "thinking" during a thinking stream regardless of this option; if it does not, make it do so in both modes (that behaviour is expected independently of the new option).

While the option is off, the session page is unchanged.

Prove it live on Android: a session that streams a reasoning part shows the thinking row with the option off and no thinking row with it on; in both modes the composer spinner reads "thinking" while the reasoning part streams and returns to its normal label after; a reloaded session with the option on shows no thinking items.

@iscekic
iscekic marked this pull request as draft September 13, 2026 03:16
Comment thread apps/mobile/src/components/agents/session-detail-content.tsx Outdated
Comment thread apps/mobile/src/components/agents/session-detail-content.tsx
Comment thread apps/mobile/src/components/agents/session-detail-content.tsx Outdated
@kilo-code-bot

kilo-code-bot Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Full re-review after the branch was force-pushed (the previous review SHA 3648be5 is no longer an ancestor of 741c27d): the persisted "Hide thinking details" preference, its reasoning-stripping path, and the raw-message status indicators are internally consistent, and the previously flagged task-card status, empty padded sheet row, cold-start paint, and "Writing response" gaps are all fixed at HEAD.

Files Reviewed (108 files)
  • apps/mobile/src/components/agents/child-session-card-state.ts
  • apps/mobile/src/components/agents/child-session-card-state.test.ts
  • apps/mobile/src/components/agents/child-session-sheet.tsx
  • apps/mobile/src/components/agents/compute-status.ts
  • apps/mobile/src/components/agents/compute-status.test.ts
  • apps/mobile/src/components/agents/part-types.ts
  • apps/mobile/src/components/agents/part-types.test.ts
  • apps/mobile/src/components/agents/session-detail-content.tsx
  • apps/mobile/src/components/agents/session-detail-content.test.ts
  • apps/mobile/src/components/agents/session-detail-queue.test.ts
  • apps/mobile/src/components/agents/tool-part-renderer.test.ts
  • apps/mobile/src/components/agents/working-indicator.tsx
  • apps/mobile/src/components/app-unlock-screen.test-helpers.tsx
  • apps/mobile/src/components/general-settings-screen.tsx
  • apps/mobile/src/components/general-settings-screen.mounted.test.tsx
  • apps/mobile/src/lib/auth/auth-context.tsx
  • apps/mobile/src/lib/auth/auth-context.test.tsx
  • apps/mobile/src/lib/auth/credentials.test.ts
  • apps/mobile/src/lib/hooks/use-hide-thinking-preference.ts
  • apps/mobile/src/lib/hooks/use-hide-thinking-preference.test.ts
  • apps/mobile/src/lib/storage-keys.ts
  • apps/mobile/src/i18n/locales/*.json (87 catalogs)
Previous Review Summaries (3 snapshots, latest commit 3648be5)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 3648be5)

Status: No Issues Found | Recommendation: Merge

Executive Summary

The incremental commit on top of 29d1f99 routes the running subagent card's latest assistant-message parts through the shared lastActivePart helper, resolving the previous "Writing response" label behind opencode's empty text placeholder; no new correctness, security, or performance issues found in the three changed files.

Files Reviewed (3 files)
  • apps/mobile/src/components/agents/child-session-card-state.ts
  • apps/mobile/src/components/agents/child-session-card-state.test.ts
  • apps/mobile/src/components/agents/compute-status.ts

Previous review (commit 29d1f99)

Status: 1 Issue Found | Recommendation: Address before merge

Executive Summary

The three previously flagged issues (in-transcript task-card status, empty padded sheet row, cold-start paint) are fixed in this revision; one new gap remains where a running subagent card can still read "Writing response" while its reasoning streams behind opencode's empty text placeholder.

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
apps/mobile/src/components/agents/child-session-card-state.ts 103 computeStatus(latestPart) does not skip opencode's pre-created empty text placeholder, so a running subagent streaming reasoning can read "Writing response" instead of "Thinking".
Files Reviewed (10 files)
  • apps/mobile/src/components/agents/child-session-card-state.ts - 1 issue
  • apps/mobile/src/components/agents/child-session-card-state.test.ts - 0 issues
  • apps/mobile/src/components/agents/child-session-sheet.tsx - 0 issues
  • apps/mobile/src/components/agents/compute-status.ts - 0 issues
  • apps/mobile/src/components/agents/compute-status.test.ts - 0 issues
  • apps/mobile/src/components/agents/session-detail-content.tsx - 0 issues
  • apps/mobile/src/components/agents/session-detail-content.test.ts - 0 issues
  • apps/mobile/src/components/agents/session-detail-queue.test.ts - 0 issues
  • apps/mobile/src/components/agents/tool-part-renderer.test.ts - 0 issues
  • apps/mobile/src/components/agents/working-indicator.tsx - 0 issues

Fix these issues in Kilo Cloud

Previous review (commit b8b4403)

Status: 3 Issues Found | Recommendation: Address before merge

Executive Summary

Hiding thinking details strips reasoning from the main-transcript subagent card as well as the rows, so a running task card's activity and accessibility label silently leave "Thinking"; two minor consistency and initial-load gaps remain.

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 2
Issue Details (click to expand)

WARNING

File Line Issue
apps/mobile/src/components/agents/session-detail-content.tsx 1078 Reasoning-stripped child messages feed the in-transcript task card, so a running subagent can show a stale activity or "Waiting for activity" instead of "Thinking".

SUGGESTION

File Line Issue
apps/mobile/src/components/agents/session-detail-content.tsx 1494 Subagent sheet can render an empty padded row for a reasoning-only child message.
apps/mobile/src/components/agents/session-detail-content.tsx 315 hasLoaded is ignored, so thinking can briefly paint before the preference resolves on cold start.
Files Reviewed (102 files)
  • apps/mobile/src/components/agents/session-detail-content.tsx - 3 issues
  • apps/mobile/src/components/agents/part-types.ts - 0 issues
  • apps/mobile/src/components/agents/child-session-sheet.tsx - 0 issues
  • apps/mobile/src/components/agents/session-detail-content.test.ts - 0 issues
  • apps/mobile/src/components/agents/session-detail-queue.test.ts - 0 issues
  • apps/mobile/src/components/agents/part-types.test.ts - 0 issues
  • apps/mobile/src/components/general-settings-screen.tsx - 0 issues
  • apps/mobile/src/components/general-settings-screen.mounted.test.tsx - 0 issues
  • apps/mobile/src/components/app-unlock-screen.test-helpers.tsx - 0 issues
  • apps/mobile/src/lib/hooks/use-hide-thinking-preference.ts - 0 issues
  • apps/mobile/src/lib/hooks/use-hide-thinking-preference.test.ts - 0 issues
  • apps/mobile/src/lib/storage-keys.ts - 0 issues
  • apps/mobile/src/lib/auth/auth-context.tsx - 0 issues
  • apps/mobile/src/lib/auth/auth-context.test.tsx - 0 issues
  • apps/mobile/src/lib/auth/credentials.test.ts - 0 issues
  • apps/mobile/src/i18n/locales/*.json (87 catalogs) - 0 issues

Fix these issues in Kilo Cloud


Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0

Review guidance: REVIEW.md from base branch main

@iscekic
iscekic force-pushed the kwf/settings-hide-thinking-details-cb52 branch from b8b4403 to 351fe1e Compare September 13, 2026 09:06
@iscekic
iscekic force-pushed the kwf/settings-hide-thinking-details-cb52 branch from 351fe1e to 2be00c1 Compare September 13, 2026 09:09
@iscekic
iscekic force-pushed the kwf/settings-hide-thinking-details-cb52 branch from 2be00c1 to 29d1f99 Compare September 13, 2026 09:36
@iscekic
iscekic marked this pull request as ready for review September 13, 2026 09:44
Comment thread apps/mobile/src/components/agents/child-session-card-state.ts Outdated
@iscekic
iscekic marked this pull request as draft September 13, 2026 09:53
@iscekic
iscekic force-pushed the kwf/settings-hide-thinking-details-cb52 branch from 29d1f99 to 3648be5 Compare September 13, 2026 10:51
@iscekic
iscekic marked this pull request as ready for review September 13, 2026 10:59
@iscekic iscekic added the human-ready The PR is ready for human review. label Sep 13, 2026
@iscekic
iscekic requested a review from eshurakov September 13, 2026 11:06
@iscekic iscekic self-assigned this Sep 13, 2026
@iscekic
iscekic requested a review from pandemicsyn September 13, 2026 22:10
@iscekic
iscekic enabled auto-merge (squash) September 14, 2026 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

human-ready The PR is ready for human review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants