Commit Graph
164 Commits
Author SHA1 Message Date
chengyongru 336572de29 perf(webui): avoid history drafts for turn-end metadata 2026-10-24 20:55:38 +08:00
chengyongru bc5c58d239 feat(webui): distinguish context compaction reasons (NAN-324) (#6389)
* feat(webui): distinguish context compaction reasons (NAN-324)

* fix(webui): describe idle compaction cancellation as interruption

* docs: omit compaction notice details from configuration guide

* fix(i18n): make compaction notices read naturally

* fix(i18n): keep CJK compaction notices concise

* fix(i18n): describe idle compaction as unfinished
2026-10-22 16:13:25 +08:00
chengyongru d5cf09d738 fix(webui): preserve cross-session provenance at display persistence (#6379)
* fix(session): bind internal input identity before acceptance

* fix(webui): bind cross-session display writes at persistence boundary

* fix(webui): simplify session messages to current-target display writes

* chore: trim redundant session message comments
2026-10-22 01:24:18 +08:00
chengyongru b37a23698d fix(webui): admit history without dropping live output (NAN-311) 2026-10-22 01:22:49 +08:00
Xubin Renandchengyongru fbb61a373f feat(update): integrate managed installs and recoverable in-app updates (#6168)
Add owner-aware Stable and Preview updates with explicit consent, verified release plans, protected process handoff and bounded service recovery. Keep configuration and conversations separate from program rollback.

Include the compact About controls, Windows long-path support, native package recovery checks and optional macOS Dock lifecycle integration. Preserve documented guidance for installations owned by other managers.

This code integration does not publish packages, enable signing or advance the public update channel.

Co-authored-by: chengyongru <61816729+chengyongru@users.noreply.github.com>
2026-10-21 19:16:56 +08:00
chengyongru 76da55994b fix(webui): preserve answer checkpoints and stream order (#6368)
* fix(webui): preserve answer checkpoints and stream order

* fix(stream): close hosted-tool answer segments at the producer
2026-10-21 18:30:52 +08:00
chengyongru b32b1327ce refactor(session): unify model and display history storage (#6336)
* refactor(session): persist display history in SQLite

* fix(session): preserve new fork activity timestamps

* test(agent): use SQLite-owned model failure recovery fixture

* test(agent): isolate session slash routing from loop shutdown

Exercise the real inbound dispatcher and await its session worker. Keep response deadlines and behavioral assertions, while leaving full SQLite cleanup to the existing async fixture rather than an unrelated two-second shutdown deadline.

* fix(webui): admit direct deliveries to display history

* docs: clarify session history migration guidance
2026-10-21 16:13:59 +08:00
chengyongru f284749d2f ci: reduce Python test overhead and Windows latency (#6357)
* test: merge overlapping semantic contract coverage

Consolidate the six confirmed NAN-310 overlap groups while preserving replay, usage, generation kwargs, archive metadata, inspect fields, and subagent crash/redelivery assertions.

* test: lighten history seeds and layer runner progress rules

* ci: defer test storage setup and record phase timings

Close each listener-owned binary bridge before waiting for its TCP server; retain active upload and undecided-connection regressions. Avoid consuming readiness twice and run the repository import scan once in its static gate. NAN-310.

* test: scope filesystem mocks and observe consumed socket prefixes

* test: publish subprocess readiness files atomically

* ci: isolate external tool discovery and use three Windows workers
2026-10-21 14:47:55 +08:00
chengyongru 53e0edf709 fix(session): prevent consumed follow-ups from replaying after restart (#6299)
* fix(session): atomically acknowledge consumed follow-ups

* refactor(webui): drop legacy follow-up replay compatibility
2026-10-19 11:31:19 +08:00
Shoaib b4f381ca55 fix(media): keep upload filenames within the UTF-8 byte limit
The 80-character stem limit can still produce a filename longer than 255
bytes when a document name contains CJK characters or emoji. Adding the
upload ID then makes an otherwise valid document name fail on disk.

Retain the character limit and trim only stems that exceed the remaining
byte budget after the ID, separator, and extension. Decode at a character
boundary so the saved name remains valid Unicode.

Add file-write regressions for CJK and emoji document names.

Validation: 38 media and attachment-store tests; Ruff; BasedPyright;
import-boundary checks; git diff --check.
2026-10-18 15:23:07 +08:00
chengyongru 8f6a5594fb refactor(session): centralize state ownership in SQLite (#5943)
* fix(session): move persistence off event loop

* refactor(session): isolate async persistence boundary

* refactor(session): keep a single session manager

* refactor(session): use stateless async adapters

* fix(session): serialize local persistence without file-lock contention

* refactor(session): own async persistence and snapshot commits

* refactor(session): narrow persistence changes to async adapters

* refactor(session): remove redundant async forwarding helpers

* fix(command): offload compact session persistence

* fix(session): adapt idle compaction to current main

* fix(webui): offload session metadata persistence

* refactor(session): centralize state ownership in SQLite

* fix(session): skip storage for non-recoverable followups

* test(webui): honor the full gateway event deadline

* perf(session): persist incremental changes and reuse owner snapshots

* test(agent): allow durable worker shutdown in burst test

* fix(gateway): drain session storage on Windows console shutdown

* fix(session): enforce bounded ownership and lifecycle-safe persistence

* fix: reject unresolved home paths and stabilize platform tests

* fix(session): preserve request context compatibility and owner-backed tests

* docs: focus configuration guide on user-facing behavior

* fix(session): adapt goal admission to async ownership after rebase

* fix(session): integrate current gateway and subagent contracts

* fix(session): align rebased workspace admission and async tests

* fix(session): support compatible SQLite schema evolution

* test(agent): use session owner in workspace context regressions

* test: stabilize Windows lifecycle and browser checks

* refactor(session): remove premature JSONL file export

* ci: bound Windows full-suite worker concurrency

* chore: remove session state refactor notes

* fix(session): queue writes and retain worker connections

* perf(webui): read detached metadata for session and task lists

* perf(agent): bound prompt preparation and local token counting

* docs: remove internal session storage guide

* perf(session): skip archived transcripts during idle scans

* fix(session): coordinate turns and isolate legacy session data

Bind WebUI input generations to the execution session and serialize idle
and SDK compaction with turns. Keep turn drafts through preparation so the
latest channel route persists.

Move imported workspace JSONL and checkpoints to durable private backups
before gateway admission, resuming cleanup after interruptions. Remove
committed child sessions when task creation is cancelled.

Validation: focused Python and frontend regressions, Ruff, BasedPyright,
import boundaries, WebUI build, and isolated gateway/browser flows.

* fix(agent): keep cancellation hooks independent of prompt preparation

* fix(session): preserve admission, delivery, and migration contracts

* fix(agent): preserve cancellation settlement after rebase

* fix(session): preserve request attribution through async ownership
2026-10-16 17:28:47 +08:00
chengyongru 7177ca05e3 perf(providers): estimate missing usage outside the event loop 2026-10-15 11:48:13 +08:00
chengyongru 790a970989 perf(webui): stream bounded file diff previews 2026-10-14 17:49:25 +08:00
chengyongru cdb6210b45 refactor(webui): remove session list previews and timestamps (#6189)
* refactor(webui): remove session list previews and timestamps

* test(webui): limit legacy coverage to persisted sidebar files

* refactor(webui): simplify chat rows and fix gallery states

* refactor(webui): flatten chat row title wrapper
2026-10-14 14:41:52 +08:00
chengyongru 74b22b6522 refactor: deduplicate durable writes and file-edit path resolution 2026-10-14 14:12:48 +08:00
chengyongru 73af08efab fix(webui): allow switching Default permissions back to Full Access (#6175)
* fix(webui): allow authenticated access mode switching

* refactor(webui): remove constant full access eligibility helpers

* refactor(webui): remove obsolete full access policy parameter

* docs(webui): remove redundant access switching paragraph

* refactor(webui): remove obsolete full access capability
2026-10-12 15:39:33 +08:00
Xubin Ren cc5f2a84d3 fix(webui): refine workspace picker navigation and macOS behavior 2026-10-08 20:33:15 +08:00
chengyongru 8a795b428e refactor(webui): remove obsolete native workspace picker paths 2026-10-08 20:33:15 +08:00
chengyongru 66c8d41f66 feat(webui): add a host directory picker and refine composer controls 2026-10-08 20:33:15 +08:00
chengyongru ed022e447f fix(webui): keep edit diffs visible and distinguish file creation (#6049) 2026-10-04 16:55:48 +08:00
chengyongru 9d7cc0204c fix(webui): serialize manifest reads with atomic replacement 2026-10-03 15:46:53 +08:00
Xubin Ren 192ca6e49e feat(webui): complete remote pairing and connection recovery 2026-10-02 11:36:34 +08:00
chengyongru 6ecb74aea9 refactor: remove unused runtime and WebUI helpers (#5999)
* refactor: remove unused runtime and WebUI helpers

* fix: preserve exported agent helper methods
2026-10-02 01:41:05 +08:00
chengyongru 4a7ad00e4f fix(tokens): warm fallback tokenizer in background (#5861)
* fix(tokens): keep fallback token estimation offline

* fix(tokens): warm fallback tokenizer in background

* test(tokens): isolate agent fixtures from tokenizer readiness

* test(tokens): keep Codex pressure fixtures within byte budget

* docs: remove manual wrapping from troubleshooting prose
2026-09-28 13:50:55 +08:00
chengyongru 80c246744f refactor(webui): clear turns only through the owner registry 2026-09-24 13:09:12 +08:00
chengyongru 3fe109bf01 test(utils): simplify atomic write tests and remove stale note 2026-09-23 14:48:29 +08:00
Frank_zhu d3f90e0944 test(utils): make atomic_write_lines directory fsync tests Windows-safe 2026-09-23 14:48:29 +08:00
Frank_zhu 23de1f1e34 refactor(utils): dedupe atomic JSONL write helper
Extract atomic_write_lines so history.jsonl, session JSONL saves, and
WebUI transcript rewrites share unique temp files, optional fsync, and
BaseException cleanup.

Closes #5290
2026-09-23 14:48:29 +08:00
chengyongru 12a9a8a692 fix: keep logging available when rotation is blocked 2026-09-21 17:36:24 +08:00
chengyongru 3a353aa2d9 fix: enforce background log size limit 2026-09-21 17:36:24 +08:00
chengyongru 8a7ca8a654 fix: improve log reliability and correlation 2026-09-21 17:36:24 +08:00
Xubin Ren 448767d147 fix(webui): identify OAuth reauthentication behind fallback replies 2026-09-21 00:13:46 +08:00
chengyongru 0983762fe5 refactor(webui): remove legacy message projection (#5823)
* refactor(webui): defer oversized replay traces as events

* fix(webui): type deferred trace index set

* refactor(webui): remove legacy message projection

* fix(webui): type event protocol boundaries

* test(webui): assert canonical thread events
2026-09-20 16:48:13 +08:00
chengyongru db675a43b6 refactor(webui): unify live and replay event projection (#5819)
* refactor(webui): unify live and replay event projection

* chore(webui): mark legacy projection cleanup

* fix(webui): rewrite streamed replay media URLs
2026-09-20 13:52:43 +08:00
chengyongru 1c3c68262f refactor(tools): unify edit summaries with shared fast diffs
Return compact, workspace-relative summaries from edit_file and apply_patch.
Compute one RapidFuzz line alignment per file and reuse it for summary counts
and WebUI unified diffs, checking snapshots before reuse. Summarize batched
edits by their final file state.

Warn only when a recorded file version changed, without asking for a read
after an edit has already succeeded. Preserve existing edit errors.

Validate summary and activity reuse, repetitive files, diff formatting,
snapshot changes, file creation, and read-state behavior.
2026-09-15 11:25:01 +08:00
chengyongru ddd6b302c9 fix(webui): support remote project paths and honor picker capabilities (#5673)
* fix(webui): honor remote workspace picker capability

* feat(webui): allow remote project path selection

* test(webui): isolate native picker availability from host platform
2026-09-14 13:14:00 +08:00
chengyongru 9e71087a2a fix(webui): align legacy trace detail replay identities 2026-09-12 17:09:51 +08:00
chengyongru a490cd629b fix(webui): cache and defer thread history 2026-09-12 17:09:51 +08:00
chengyongru 7ba60c2ef0 fix(webui): bound history replay work 2026-09-12 17:09:51 +08:00
chengyongru 1469d4811c perf(webui): reduce repeated work and bound history rendering (#5703)
* perf(webui): reduce repeated work and bound history rendering

* fix(webui): keep continuation reasoning with its answer

* refactor(webui): reuse answer buffers and prepared copy text

* perf(webui): restore conditional replay buffer initialization

* fix(webui): remove code block pagination
2026-09-09 14:02:26 +08:00
chengyongru b581a496a6 fix(ui): surface model retry status (NAN-34) (#5504) 2026-09-07 15:12:39 +08:00
chengyongru 192e2e90dc refactor(events): unify scoped runtime notifications across clients (#5670)
* refactor(events): unify scoped runtime notifications across clients

* style(tests): sort auto-compaction event imports

* refactor(events): scope connections and remove retry callback plumbing

* docs: remove runtime notification design write-up

* refactor(bus): route operation events through the message bus

* fix(channels): isolate outbound sends by destination

* style(events): group shared notification imports

* refactor(events): converge runtime and hook delivery on MessageBus

* test(events): migrate fixtures to unified message bus
2026-09-06 02:11:19 +08:00
chengyongru 3495281282 test: remove obsolete nonexistence checks 2026-09-05 23:58:38 +08:00
chengyongru 6b82d642fc feat(webui): visualize context usage by logical round (#5649)
* feat(webui): visualize per-request context reuse

* refactor(webui): report usage by logical round

* fix(webui): align context chart with logical rounds

* refactor(webui): derive turn usage from logical rounds

* fix(webui): polish context usage details
2026-09-04 15:13:17 +08:00
Xubin Ren b04aeeac0e fix(channels): harden message split boundaries 2026-09-04 01:39:41 +08:00
chengyongru 8509432dcf fix(channels): avoid blank boundary chunks
Signed-off-by: chengyongru <2755839590@qq.com>
2026-09-04 01:39:41 +08:00
PP1 01760b7385 fix(channels): preserve indentation across message splits
Signed-off-by: PP1 <74917296+pengpengyi92@users.noreply.github.com>
2026-09-04 01:39:41 +08:00
chengyongru 9895c23cb5 refactor(providers): define typed usage contract 2026-08-25 01:04:25 +08:00
chengyongru 04974b7607 fix(webui): preserve causal message order (NAN-29) (#5503) 2026-08-24 15:08:22 +08:00
Xubin Ren d50a2fab32 fix(tui): avoid saving empty sessions 2026-08-24 10:40:16 +08:00