Skip to content

perf(sessions): cache file-derived session summaries by file identity - #1796

Merged
vastsa merged 159 commits into
vastsa:mainfrom
CJLY-0915:perf/native-session-list-projection-cache
Oct 25, 2026
Merged

vastsa merged 159 commits into
vastsa:mainfrom
CJLY-0915:perf/native-session-list-projection-cache

Conversation

@CJLY-0915

Copy link
Copy Markdown
Contributor

做了什么

native.session.list() 每次调用都会把每个会话文件从头重建一遍行数据:nativePiSnapshot() 先 readFileSync + SHA-256 + 逐行 JSON.parse,随后 list() 再对每个文件构造 SessionManager.inMemory、getBranch()、buildSessionContext() —— 全部是宿主主线程上的同步操作。开销因此随会话数量与文件体积线性增长(在实测机器上是 80 个会话 / 1.13 GB)。

本 PR 只缓存纯由单个文件字节推导的事实,文件未变时复用。

实现

  • 新增 NativeSessionProjection,保存 header 身份、cwd、标题、消息数、时间戳、已保存的模型、thinking 级别,以及结构标志(JSONL 是否合法、是否以换行结尾、header 版本、是否非空)。
  • 以 (dev, ino, size, mtimeMs) 为键。任何追加、轮转或整体替换都会改变键并触发重新解析;某次扫描不再看到的文件,其投影会被逐出,缓存规模跟随扫描根目录。
  • list() 现在只读取缓存的投影,再叠加实时状态。
  • 结构只读判定收敛为单一 structuralReason(),快照路径(detail / open / fork)与缓存投影共用,两处判定顺序不会再各自漂移。

刻意不缓存的部分

所有权、项目信任、provider 可用性、cwd 是否存在,全部每次调用重算。所有写入路径仍然通过 nativePiSnapshot() 对完整字节做哈希,NativePiSessionLease.assertUnchanged() 与 acceptOwnAppend() 未改动 —— 外部改写检测与租约校验的严格程度与改动前完全一致。

同时,列表路径不再为了「证明可以加锁」而读取整个文件:没有 .pi-desktop.lock 本身即代表租约可获取,只有锁文件存在时才物化快照(该分支仍会走 canAcquire() 的 append-only 回收判定)。

实测数据

同一台机器,真实 ~/.pi/agent/sessions 目录,28 个会话,其中单个文件 21 MB:

list()
改动前 826 / 807 / 933 ms
改动后,冷启动(首次调用,仍解析全部文件) 802 ms
改动后,热路径 21 / 16 ms

冷启动开销按设计不变;收益发生在之后每一次扫描,也就是会话侧边栏触发的路径。

测试

packages/agent-runtime/src/native-pi-session.test.ts 新增两个用例:

  • 文件未变时复用同一份投影(两次扫描中 SessionManager.inMemory 只被调用一次);追加之后重新解析,并正确反映新的 messageCount 与 updatedAt;
  • 投影命中缓存期间,活跃租约仍然报 busy,释放后恢复为可提示。

范围

仅 perf。只读原因、去重、fork、写入行为均无变化。

检查结果

  • pnpm build:js —— 通过
  • pnpm typecheck —— 通过
  • pnpm lint —— 通过
  • pnpm -r --if-present test(packages/agent-runtime)—— 通过,102 个文件 / 1414 个测试
  • pnpm check:pr-base —— 通过(基线为 8f4285f)
  • cargo fmt --check、cargo test -p host-core --locked、cargo clippy —— 未运行:提交机器没有 Rust 工具链。
  • pnpm test:e2e —— 未运行:smoke 套件需要已构建的 pi-desktop-host-core 二进制,同样依赖缺失的工具链。残余风险:改动只涉及宿主侧的会话列表投影,相关单测(102 个文件)、完整 typecheck / lint / build 均已通过,但未做打包应用的实机运行。

本改动不声称修复任何一次具体卡死,它移除的是会话列表路径上一项同步且随规模线性增长的开销。

liubai and others added 12 commits October 20, 2026 16:19
The AskTool card kept its question index and draft answers in component
state, so switching sessions unmounted the card and returning to the same
pending ask reset every answer. Store the draft by requestId instead and
let the card read and write that entry, dropping it when the ask is
resolved, dismissed, or removed.

Amends the asktool card spec's request-transition rule and adds
E2E-ASKTOOL-draft-survives-session-switch.
The transcript guard only dropped empty messages whose status was error or
aborted. An empty complete assistant message therefore reached the outbox
on every provider retry, growing the request body and feeding the EMPTY
loop. Drop empty assistant rows whatever their status, while keeping
messages that carry an error payload, a tool row, or a steering
reservation.

Adds empty-assistant-persistence tests for each of those cases.
An isolated session's files live in its worktree, but chat references can
still carry a path from the parent checkout: project instructions, MCP tools,
or a reference captured before isolation. The resolver rejected that path as
outside its roots, and the renderer then handed the file view a relative path
that it resolved against the parent checkout, so the click either failed or
opened the main-branch copy.

Rebase an absolute parent-checkout reference onto the same relative path in
the worktree when that file exists, and keep the worktree's absolute path in
the renderer so the file view opens the branch copy. Paths that exist only in
the parent still report outside-allowed-roots.

fixes vastsa#1747
Follow mode can still read pinned when a send or retry hid the pane. On the
next reveal the scroll hook then bottomed the transcript before the
reading-position hook could restore the recorded bookmark, so a reader who
had scrolled up returned to the newest turn.

Route the reveal through one shared ownership rule: an unpinned bookmark or a
pending restore keeps the edge, a genuinely pinned pane bottoms, and an
unpinned pane without a bookmark reapplies its retained offset. Both hooks
now agree on which one acts.

fixes vastsa#1771
The abort listener returned immediately unless the tool was Bash or
GenerateImages, so Stop was a no-op for every other tool, and
tools.execute was awaited with no deadline. One report measured a Grep
running 21m39s after six Stop clicks.

The listener now applies to every tool. Bash and GenerateImages keep
sending tools.abort and get a bounded 10s grace window for the partial
output the host collected before the kill; every other tool abandons the
wait the moment the signal fires and returns TOOL_ABORTED without a
tools.abort RPC (the host cannot act on it, and the 60s tombstone it
would leave could be inherited by a later Bash reusing the call id).

Both paths race the execute call against the abort, so losing the race
abandons the wait rather than the host call: the orphaned call settles on
its own and its result is discarded.

Fixes vastsa#1767
A stop can reach the runtime without reaching the tool it was meant to
cancel. The executor then keeps awaiting `tools.execute`, the turn never
settles, and `abort()` — which awaits that settlement — never returns. The
renderer awaits the abort RPC before it clears "processing", so the session
stayed pinned even though the ledger had already recorded the turn as
aborted: three turns in one field report were `aborted` while the tool's
process was still alive minutes later.

`abort()` now drives the in-flight tools directly instead of relying only on
the signal each one was handed: it walks the active abort handlers and runs
the same path a signal abort would. Cancellable tools still send
`tools.abort` and get the grace window; every other tool abandons the wait
at once.

Refs vastsa#1767
The file index keeps only the shallowest 8000 entries, so in a large
workspace — a Unity project, where every asset has a .meta sibling — a
script several folders down matches no query at all, even though the
truncation note invites the reader to refine it (vastsa#1781).

While the snapshot is truncated, a non-empty query is now also searched
over the workspace's full listing through the read-only fs/search channel,
after a short typing pause, and the best rows merge with the index's own
matches. The listing is the git list the index already builds, or a deeper
ignore-set walk when the index came from the walk. A complete index never
searches, and a remote session keeps its snapshot because the remote file
protocol has no search operation.

fixes vastsa#1781
The close button is a sibling of the tab button inside the tab wrapper, but
scroll-into-view targeted only the button. With `inline: "nearest"` a button
that is already visible scrolls zero pixels, so the sibling close button
stayed clipped outside the strip's overflow edge — the tab looked like it had
no close control at all (issue vastsa#1762).

Scroll the wrapper instead (falling back to the button), and reserve the
close button's width at the inline end via `scroll-padding-inline` so
sub-pixel rounding cannot reintroduce the clip.
vastsa#1782: when discovery returns no registration endpoint, the login flow fell
back to a literal client id:

    } else {
      clientId = "pi-desktop";
    }

No authorization server has ever registered that id, so the app opened
`<authorize>?client_id=pi-desktop` and the user landed on a bare 404 — with
no explanation and no way forward. It is not a GitHub-specific failure: any
OAuth MCP server without Dynamic Client Registration is affected.

Throw before opening anything, naming what is missing and the two real ways
out. A settings field for a client id does not exist yet, so the message does
not promise one.

The test drives the real startLogin through a mocked discovery that omits
registration_endpoint, and asserts both the message and that openExternal was
never called. Verified against the old code: the test does not merely fail,
it hangs until the 300s timeout, because the previous flow waited for a
callback that could never arrive — the same experience the report describes.

Verification: mcp-oauth.test.mjs 20/20, mcp-oauth-discovery.test.mjs pass,
tsc --noEmit clean.
A failed catalog query used to drop the list back to built-in picks,
discarding what the user was just looking at (issue vastsa#1692 follow-up).
Both markets now keep the last successful result for the same query on
screen — under the failure with a timestamped note, and during the
retry that follows — until a retry succeeds or the query changes.

The snapshot never answers a different query, an empty successful
answer is not a failure to cover, and Load more refreshes it.
vastsa#1751's Electron E2E job ran 30m18s and was cancelled by the job budget with
no failing step to read. The cause is this runner's only timeout:

    const timer = setTimeout(() => child.kill(), 60_000);

SIGTERM is a request. An Electron child still initialising its renderer can
ignore it, and the 'close' event this script awaits then never arrives, so the
step holds the job until GitHub cancels it. The runner's own 60s budget is
never enforced.

Escalate: SIGTERM at 60s, SIGKILL at 65s, and report which one fired. A probe
that cannot start now fails this step in about a minute with its output
attached, instead of burning the job budget.

Verified: normal path still passes ("provider client certificate E2E
passed"); with a child that ignores SIGTERM the escalation force-kills it at
~800ms in an isolated harness, so the timeout path terminates rather than
hanging.
native.session.list() re-read, re-hashed and re-parsed every session file
on each call: nativePiSnapshot() does readFileSync + SHA-256 + per-line
JSON.parse, and list() then rebuilt SessionManager + branch +
buildSessionContext per file. Cost grew linearly with session count and
file size, all of it synchronous on the host main thread.

Cache only the facts that come from one file's bytes (header identity,
cwd, title, message count, timestamps, model, thinking level, structural
flags), keyed by (dev, ino, size, mtimeMs). Any append, rotation or
replacement changes the key and re-parses; projections for files a scan
no longer sees are dropped.

Nothing live is cached. Ownership, project trust, provider availability
and cwd existence are recomputed on every call, and every write path
still hashes the full bytes through nativePiSnapshot(), so external
rewrite detection and lease validation are unchanged.

The list path also stops needing a full snapshot to prove ownership: a
missing .pi-desktop.lock already means the lease is acquirable, so the
snapshot is only materialized when a lock file exists.

Measured on a real ~/.pi/agent/sessions tree (28 sessions, one file at
21 MB): list() 826/807/933 ms before, 802 ms cold and 21/16 ms warm
after. The cold round still parses every file, as before.
spacker-343 and others added 17 commits October 21, 2026 17:03
Long sessions accumulate one system-transcript snapshot per instruction
change. Unless a model declares mid-conversation system support, every
adapter folds them into a single leading message, but the output-cap
estimate charged each superseded snapshot again. The clamp collapsed to
1 and the provider floor (16) went on the wire while the request was far
from the window, so reasoning models were cut off and the turn ended as
EMPTY_MODEL_RESPONSE without compaction ever triggering.

The parent and subagent stream paths now fold the transcript the way
the adapter will before clamping, and hand that same transcript to
pi-ai so its own streamSimple clamp agrees. Context calibration and the
compaction budget keep their existing basis.
Add a persisted 	ranscriptDisplayMode setting with flat, command-first,
and fully-folded layouts. Fully-folded keeps the v0.20.0 command grouping,
command-first keeps run rows standalone, and flat removes nested activity
groups while preserving one outer process.

Make Thinking rows default expanded in flat and command-first, collapse to
a whole-run TextShimmer indicator, and use the same shimmer for the hidden
reasoning live indicator. Keep fully-folded's existing Thinking defaults.
Deprecate keepCommandsExpanded; it remains readable for compatibility.

Cover mode segmentation, settings normalization and sync, and renderer
wiring; update transcript and settings specs and ADRs.
Open the completed process and Thinking disclosure before asserting the
retained reasoning text now that a collapsed Thinking row shows only its
label. Also assert flat mode keeps one outer process without nested
activity groups or standalone run wrappers.
… set

The sidecar merges the operating system's trust store into Node's default CA
set at startup. Those stores are a cache and keep entries that already
expired: Windows still lists Let's Encrypt's `ISRG Root X2` and `R3` with a
2025-09-15 expiry long after the fact.

Merging one of those makes OpenSSL accept an expired certificate as the anchor
for any chain that names it as issuer. A chain like

    leaf -> YE2 -> Root YE -> ISRG Root X2 -> ISRG Root X1

stopped at the expired `ISRG Root X2` instead of walking up to the valid
`ISRG Root X1`, so the handshake failed with `CERT_HAS_EXPIRED` even though
the provider's own chain was valid. The failure is reported as a TLS category
error and is correctly not retried, so the provider is unusable until the
expired entry leaves the store.

Every provider behind such a chain failed, which is why the report looked
provider-specific (issue vastsa#1393). Reproduced on Windows 11 with Electron 43.6.0:
`tls.getCACertificates("system")` returned 146 certificates, 17 of them
expired, and the same host handshakes fine with the bundled roots alone.

An anchor that has already expired can verify nothing, so it is never merged.
The bundled and `NODE_EXTRA_CA_CERTS` sets are untouched, and chain,
expiration and hostname validation stay enabled - this narrows the merge, it
never disables verification.

- `system-ca.ts`: filter the system store by `validTo` before merging.
- `system-ca.test.ts`: assert no expired system anchor reaches the defaults.
- `e2e-provider-certificates.mjs`: the trust probe now measures the usable
  system roots, because the previous "every system certificate is present"
  expectation cannot hold once expired entries are excluded.
The shared transcript module now imports the Thinking shimmer. Keep the
session-reference renderer probe's dependency table complete so it can
continue exercising message references without loading the app store.
feat(transcript): add display modes and thinking shimmer
Bring the contributor branch onto the current integration base before validating and merging the OAuth fix.
Bring the transcript reading-position fix onto the current integration base before validation and merge.
The PR reused D665 after current main assigned that decision to the macOS window surface. Integrate the latest base and keep the deep-search decision uniquely traceable as D669.
The shallow workspace index could hide deep files from the @ menu. Search the full bounded listing while the snapshot is truncated, and discard stale query results.
Current main adds a second search handler in the same workspace IPC module. Keep that handler and the contributor's worktree reference mapping together in the integration candidate.
Absolute references from the parent checkout missed the isolated session's worktree. Resolve the matching file in the worktree and pass that exact path to the file view.
Integrate the reviewed transcript reveal change with the latest main before candidate validation.
Restoring a session could let stale pinned state send a reader to the latest turn. Let the saved unpinned reading bookmark own the pane reveal.
Integrate the reviewed OAuth fallback fix with the latest main before final validation.
Integrate the reviewed timeout fix with the latest main before final validation.
Keep the normal Electron path unchanged while asserting that a child
ignoring SIGTERM receives SIGKILL after the grace period.
v_wyxgwang and others added 29 commits October 23, 2026 17:10
The capsule sits at the end of a completed turn, where the next answer or the composer follows immediately. Opening the breakdown upward keeps that content visible, so the capsule now uses the placement helper's above-first default and the unused below-preference option is removed.
Attribute-only directory handles do not participate in Windows sharing
accounting, leaving ancestors replaceable during fragment reads. Request
list/read access so the existing no-write/no-delete sharing policy pins
the entire canonical chain for the duration of each read.

Exercise the actual native reparse operation and preexisting mutation
handles, with an unpinned victim control. Correct cmd junction fixture
quoting and DOS spelling so these tests reach the filesystem boundary.
Incorporate the latest validated Composer fixes without rewriting the contributor's commits so the final PR candidate contains current main.
fix(chat): open turn usage popover upward
Decouple browser execution from side-panel presentation so switching
conversations, collapsing the panel, or reloading the renderer no longer
interrupts a session's page. Preserve trusted session routing and sandbox
boundaries while retaining a hidden native backing host for Chromium.

Cover background input, capture, renderer recovery, and resource cleanup
with regression and native Electron tests.
…fecycle

fix(browser): keep side-panel pages available in background sessions
Windows permits attribute-only handles to change reparse points despite
read sharing pins, as the real FSCTL control demonstrated. Open canonical
ancestors and every owned child relative to retained native directory
handles so no absolute child path can be redirected during serving.

Keep the successful attribute-junction attack as a regression control at
session, base, and data boundaries. Preserve bounded same-handle reads,
reparse validation, normal ACLs, and the existing private RPC contract.
Keep the shared contributor history intact while incorporating current main for the final native Windows and Electron integration checks.

# Conflicts:
#	docs/project/unreleased.md
…ation

feat(chat): render inline generative UI visualizations
Let a saved model binding opt into reasoning_effort for compatible gateways
without removing the automatic DeepSeek protection. Preserve the choice
through Host persistence, runtime projection, copying and configuration sync.

Add the tri-state settings control, request-body and persistence regressions,
and real renderer save/reopen coverage across locales and window sizes.

Fixes vastsa#1821
fix: preserve explicit reasoning effort overrides for custom gateways
Inline visualization cards were on for every local session, so a model could
write fragments and the transcript would frame them without the user ever
asking for the feature. The new `AppSettings.inlineVisualizations` switch is
absent and false by default, which keeps the transcript unchanged for anyone
who does not opt in.

One helper decides what the process treats as disabled, so the session launch,
the `/` menu, and the on-demand `Skill` tool cannot disagree. While the switch
is off the prompt advertises no visualization directory, the `visualize` skill
is withheld from the catalog, and the renderer still strips reference lines —
a historical reply must not show its absolute path as text — but produces no
card, so nothing is read from disk or framed.
Let custom endpoints work without a key instead of requiring a separate
no-auth switch. Preserve stored keys on blank edits and stage explicit
key removal until Save, including anonymous model discovery.

Cover credential transitions and localized setup paths while retaining
the existing host storage and runtime no-auth contracts.
…k with todo (vastsa#1844)

* feat(chat): scope background tasks to their session and share one dock with todo

Background commands belonged to the host, not to the session that started them:
the list was global, the tab was global, and deleting a session left its servers
running. Todo and the task bar were also two stacked surfaces, so a running task
competed with the plan and ask rows for the same vertical space.

Tasks now carry a per-session concurrency limit of 10, refusals name that limit,
a process-wide ceiling stays only as a host safety net, and a spawn is rejected
when its session is already gone. Deleting a session signals its running tasks
through the existing per-session cleanup path; archiving does not, because
archiving is reversible. Both are covered by host tests.

The renderer keeps the wire contract session-agnostic and filters locally, so
switching sessions changes only what is displayed. Todo and tasks share one
container whose header carries the progress summary, the live count, the tab
list and the disclosure: collapsing hides only the panels, so tabs stay
reachable, and a newly started task raises a badge on its tab instead of
stealing the tab. Removal is a view action gated on a terminal state in the
state layer, so a running or still-settling task can never be dropped from the
list while its process lives.

* docs(chat): record the task-dock plan behind the shared container

The layout was settled by building it and clicking through it, so the reasoning
belongs with the change rather than in a chat log. The interactive prototypes
live outside the repository and are linked from the pull request.

The plan records the decisions that shaped the result and the ones rejected
along the way: why the per-session limit is 10 while a process-wide ceiling stays
behind it, why the wire contract keeps returning every task and the renderer
filters, why deletion signals stop while archiving does not, and why the header
became a row of siblings instead of one button.

* docs(chat): point the plan at the uploaded prototype

The prototypes are an uploaded artifact, not repository content, so the plan
must not describe a docs/demos tree that does not exist. It now links the single
chosen page and records which alternatives it beat and why: an inline tab list in
the header won because it is the only form that keeps the tabs reachable while
collapsed without introducing a second header state.

* fix(chat): expand the dock when a collapsed tab is clicked

The container advertised a behaviour it did not implement: clicking a tab
while collapsed only swapped the remembered tab, so the panel stayed
hidden and the click looked like it did nothing (D15). A tab click now
goes through selectTab, which writes the tab and the expansion together,
making the user's intent one operation instead of two that could disagree.

The badge rule also decided visibility with its own copy of the tab logic
and passed a hard 	rue for the todo side, so it could disagree with the
panel actually on screen. Both paths now call the same rule, and the hook
takes the todo side from the container that already reads it.

dock-state.ts had no direct tests, which is how the two defects survived.
It now has a suite covering the collapse-tab rule, the fallback for an
emptied side, and the badge/visibility agreement.

---------

Co-authored-by: v_wyxgwang <[email protected]>
* docs(changelog): note session-scoped tasks and the shared dock

The 0.21.0 catalog is the in-app whats-new source for the beta that ships
these two user-visible changes, so testers can read them without a network
fetch. English stays the source of truth and the other eight catalogs
carry the same two entries in the same position.

* chore(release): v0.21.0-beta.8
Keep credential controls on one row instead of spending another row on
key removal. Retain the localized tooltip, accessible name, and existing
staged credential-removal behavior.

Exercise the rendered icon geometry, target size, focus restoration,
and localized setup journeys.
…sa#1850)

Restored reading ranges should preserve their bookmark without leaving
readers behind a manual history paging control. Continue bounded pages
near the viewport boundary and rejoin live output only after the gap closes.

Keep explicit search paging isolated, preserve the viewport and model
input, and cover continuation, retries, and hidden-pane cleanup.

Co-authored-by: Lan <[email protected]>
…astsa#1849)

* fix(provider): send reasoning_effort to official DeepSeek endpoints

deepseekRequestCompat() forced supportsReasoningEffort off for every
DeepSeek-family Completions row so relays would stop rejecting the field
(vastsa#1701 / vastsa#1664). Official api.deepseek.com rows document reasoning_effort
next to thinking, so they only ever sent the thinking toggle and low,
high, and max all produced the same request — the selected level was
silently ignored (vastsa#1821).

Keep the suppression for non-official endpoints, where the field was
reported rejected, and leave official rows to pi-ai's URL detection. The
per-model supportsReasoningEffort selection added for vastsa#1846 still wins in
both directions, so a user can omit the field on an official row too.

Probed api.deepseek.com live with deepseek-flash and deepseek-v4-pro:
every level the runtime can send (low, medium, high, xhigh, max) returns
200 and the request body carries the selected value; off sends only
thinking: {type: "disabled"}. Recorded as D672 amending D389.

refs vastsa#1821

* chore(ci): rerun checks after a runner-side Electron E2E hang

The previous run failed only in the trusted-extensions Electron E2E at
scripts/e2e-provider-client-certificate.mjs: the mTLS fixture probe hung
and was killed by SIGKILL after 65s. The same job on main prints the same
"Electron 43 net.fetch failed before HTTP" baseline line and passes, so
the failure is runner-side rather than caused by this branch.

Rerun is not available to this account (workflow_dispatch and run rerun
both require repository admin rights), so this empty commit retriggers
the workflow without changing any content.

* fix(provider): match official DeepSeek hosts precisely

Substring matching can classify a relay as an official DeepSeek endpoint and disable the relay compatibility guard. Match parsed hostnames so only deepseek.com and its subdomains use the official endpoint behavior.

---------

Co-authored-by: Lan <[email protected]>
Co-authored-by: vastsa <[email protected]>
* fix(chat): keep the returned reading page across session revalidation

Switching back to a retained session committed its cached page and then
replaced it with a bounded history read around the bookmark, because the
"bookmark already loaded" short-circuit was gated on selectingSessionId
not matching the target session. During a warm return that condition is
always false, so the 60-row window replaced the 100-row page and painted
the load-later affordance even though no newer row was missing, while
live turns arriving afterwards were not merged.

Publish the retained page as the reading range when it already holds the
bookmark, which keeps the anchor and the reader's offset across the
revalidation swap. Fall back to the bounded read only when the anchor is
outside the loaded page, as ADR 0137 intends.

fixes vastsa#1851

* fix(chat): preserve active transcript navigation

Automatic reading position restoration must not replace an explicit search or navigation that already owns the transcript view. Check focused or loading state before accepting a bookmark already present in the current page.

---------

Co-authored-by: vastsa <[email protected]>
A pointer press or a nested disclosure toggle recorded every enclosing
level's current state as a permanent choice, so automatic folding stopped
applying for the rest of the pane's life and a reveal could pin a level
closed. Activity groups also folded as soon as they stopped owning the
live segment, hiding work mid-run and folding away reasoning the reader
had just asked to see.

Disclosure ownership is split in two: an explicit header or rail choice
stays local to its level, while focus or a selection holds a level and
its ancestors open only until the reader leaves. Group defaults now
follow the turn, and visible reasoning keeps its group open. The
activity issue counter becomes one inline chip instead of an unstyled
span that wrapped its icon and count in narrow bands.
fix(transcript): 修复思考与轮次的自动折叠及问题徽标排版
The Todo/background-task container stored its collapse inside the
per-session entry, so every session the user switched to started from
its own default and reopened a container they had just closed.

Move the collapse out of the per-session state: it is one container-wide
condition that survives session switches, while the tab choice and the
badge stay per session. The container now also starts collapsed, so the
composer keeps its room until the user opens it, and the state is no
longer pruned together with dead sessions.
fix(composer): keep the task dock collapse across session switches
Promote the 0.21 preview line to a stable desktop release. Align all
workspace version surfaces, refresh the bundled model catalog, and
complete the shipped release notes in every supported locale.
Promote the validated 0.21 preview line to a stable desktop release.
vastsa#1865)

A bare abort match classified socket and stream failures such as
"software caused connection abort" and "stream aborted" as
TURN_ABORTED. Those turns skipped provider retry and rendered as a
user Stop.

Message text is a cancellation only for the fixed runtime and
AbortError phrases. Connection-abort wording stays a retriable
NETWORK_ERROR, and stream-abort wording stays a retriable
STREAM_FAILED.

Co-authored-by: xpeng5278-web <[email protected]>
CodeMirror kept light control defaults while the dark file view inherited white text, making find and replace content invisible. Rebuild the vendored view with explicit theme surfaces, ship a bounded hotfix version, and cover the light/dark user path in Electron.

Co-authored-by: vastsa <[email protected]>
@vastsa
vastsa merged commit 7a95fd0 into vastsa:main Oct 25, 2026
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.