Skip to content

feat: add setting to expand thinking blocks by default - #639

Merged
agegr merged 4 commits into
agegr:mainfrom
bigstyle777:feat/thinking-expanded-default
Sep 5, 2026
Merged

agegr merged 4 commits into
agegr:mainfrom
bigstyle777:feat/thinking-expanded-default

Conversation

@bigstyle777

@bigstyle777 bigstyle777 commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Thinking blocks now appear as independent disclosures outside Process details, so users can read reasoning without opening tool output. They remain collapsed by default; General settings can expand them automatically and update already-mounted blocks immediately. Closes #411.

  • Keep reasoning and contiguous process segments in their original order. A reply containing only thinking and a final answer no longer has an extra Process details wrapper.
  • Preserve original session entry and block indices for deferred history loading, with cached requests and retry after a failed load.
  • Persist the expansion preference in localStorage, with English, Simplified Chinese, and Traditional Chinese settings copy.
  • Refine the shared settings switch with compact dimensions, theme colors, a subtle border, and keyboard focus, disabled, and busy states. Thinking disclosures expose their expanded state and show a matching chevron.

Validation

  • TypeScript typecheck and ESLint pass.
  • All 886 repository tests pass after merging the current main branch, including new checks for ordered thinking/process splitting and independent disclosure defaults.
  • The repository end-to-end suite passes on desktop and mobile, covering bounded history, pagination, branch navigation, markdown, code, and tool calls.
  • Playwright checks at 1280px and 390px cover default collapse, the actual settings switch and keyboard interaction, persistence after reload, live updates, interleaved tool calls, original deferred block indices, request caching and retry, unfinished turns, and search revealing the matched process segment. Light and dark screenshots were inspected.

bigstyle777 and others added 4 commits August 28, 2026 10:25
Thinking blocks always rendered collapsed, forcing users who review model reasoning to click each block on every response (agegr#411).

Add a General settings toggle persisted in localStorage (pi-thinking-expanded). ThinkingBlock reads it as its initial state, already-mounted blocks sync via a custom window event, and deferred history content loads automatically through the existing promise cache when blocks start expanded.

Closes agegr#411
@agegr
agegr merged commit 8aec7a1 into agegr:main Sep 5, 2026
sleepinginsummer pushed a commit to sleepinginsummer/pi-web that referenced this pull request Sep 9, 2026
* feat: add setting to expand thinking blocks by default

Thinking blocks always rendered collapsed, forcing users who review model reasoning to click each block on every response (agegr#411).

Add a General settings toggle persisted in localStorage (pi-thinking-expanded). ThinkingBlock reads it as its initial state, already-mounted blocks sync via a custom window event, and deferred history content loads automatically through the existing promise cache when blocks start expanded.

Closes agegr#411

* fix: keep thinking outside process details and refine settings switches

---------

Co-authored-by: Alex Yang <agegcn@gmail.com>
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.

feat: add setting to control default expanded state of thinking blocks

2 participants