Commit Graph
100 Commits
Author SHA1 Message Date
nesquena-hermes 671f4504ae fix(#4702): co-seed _lastMessageClientHeight with every programmatic _lastScrollTop write (Codex gate)
Codex found the guard had a first-event gap: programmatic seeds of _lastScrollTop
(_setMessageScrollToBottom, scrollToBottom, snapshot restore paths) didn't seed
_lastMessageClientHeight, so the FIRST native toolbar-collapse scroll saw a null
prior height -> grew=false -> the false-unpin still fired. Now every programmatic
_lastScrollTop=el.scrollTop is paired with _lastMessageClientHeight=el.clientHeight.
2026-06-24 10:02:52 +00:00
nesquena-hermes fe40912eb9 fix(#4702): don't false-unpin a freshly-opened session on iOS portrait toolbar settle
iOS Safari portrait resolves its dynamic toolbar height after first paint; when the
toolbar collapses the #messages scroller grows (clientHeight up), firing a scroll
event with decreased scrollTop that was misread as an upward user scroll -> falsely
set _messageUserUnpinned, and the ResizeObserver settle then self-cancelled, leaving
the reader stranded at the TOP of a freshly-opened conversation (landscape unaffected
since it doesn't resize late). Sibling of #4701.

Fix (touch-safe, no-op on desktop/landscape where clientHeight is stable):
- Track _lastMessageClientHeight; gate movedUp on !grew so a container-height
  INCREASE can't be read as an upward scroll. Reset on session switch.
- For explicit (open) settles, also observe the scroller itself so a late portrait
  toolbar collapse re-anchors the bottom.

Independent of #4818 (overflow-anchor paint-gap) — different mechanism, coexists.
Diagnosis credit: investigation. Co-authored-by: reinocheong <reporter>
2026-06-24 09:56:06 +00:00
nesquena-hermes 77b59f7c85 test(#4768): drop unused 're' import (ruff F401) 2026-06-24 09:29:15 +00:00
nesquena-hermes 054e39151b release: stamp v0.51.622 (#4768 cron-absent Tasks tab graceful degrade) 2026-06-24 09:24:54 +00:00
nesquena-hermes f4e150e105 Merge remote-tracking branch 'origin/master' into fix/4768-cron-graceful-degrade 2026-06-24 09:23:37 +00:00
nesquena-hermes 1e3132376b fix(#4768): only treat absent cron package as unavailable, re-raise real import bugs (Codex gate)
ModuleNotFoundError fires both when cron.jobs is absent AND when an existing
cron/jobs.py fails to import its own dependency. Catch as exc and only return the
graceful {jobs:[],cron_unavailable:true} when exc.name is 'cron'/'cron.jobs';
re-raise otherwise so a real cron bug isn't silently swallowed.
2026-06-24 09:12:46 +00:00
nesquena-hermes 61f3c766df release: stamp v0.51.621 (#4241 Vietnamese UI language) 2026-06-24 09:11:06 +00:00
nesquena-hermes 1be24e0660 test(#4241): bump remaining hardcoded locale-count assertions for vi (14th locale)
Full-suite caught 7 more per-locale count tests: open_in_vscode (->13, a
pre-existing one-locale gap unrelated to vi), usage_cache_hit_detail/usage_cached_percent
(->14), and the i18n_tooltips LOCALE_COUNT (13->14). vi carries these keys.
2026-06-24 08:50:52 +00:00
nesquena-hermes 34694a1f02 fix(#4768): degrade GET /api/crons gracefully when the cron module is absent
In split-container / minimal Docker deployments the WebUI image may not ship the
agent's cron package on its import path, so the Tasks tab's GET /api/crons did
'from cron.jobs import list_jobs' and 500'd with ModuleNotFoundError — breaking the
whole tab. Now the import is guarded and returns {jobs: [], cron_unavailable: true}
instead, so the Tasks tab loads (empty) instead of erroring. Happy path unchanged.
Co-authored-by: reporter
2026-06-24 08:42:50 +00:00
nesquena-hermes 1fc24ddf68 feat(#4241): add Vietnamese (vi) as 14th UI locale + wire parity
Maintainer-completed @thanhtantran's #4241 (Nathan approved bringing it in):
- vi locale block in static/i18n.js (contributor's 1615-line translation) rebased onto master.
- Added vi to _LOGIN_LOCALE in api/routes.py (login-page localization, issue #1442 parity).
- Bumped the per-locale hardcoded-count assertions 13->14 across the locale-parity
  tests (rtl, quota_chip, hide_suggestions, virtualize_transcript, no_git, help_tab,
  verdigris/zeus skins, auxiliary_models) and added 'vi' to the composer-voice-buttons
  LOCALES tuples. vi already carries all current English keys (verified 14x per key).
All 497 locale/parity tests pass. Co-authored-by: thanhtantran
2026-06-24 08:39:14 +00:00
nesquena-hermes 3de15e53a5 Merge branch 'peek-4241' into gate/4241-vietnamese 2026-06-24 08:26:00 +00:00
nesquena-hermes c3d2fe4a20 release: stamp v0.51.620 (#4808 streaming /api/sessions cache TTL hotfix) 2026-06-24 08:19:43 +00:00
nesquena-hermes 1fc86a47c7 Merge remote-tracking branch 'origin/master' into fix/4808-streaming-sessions-cache-ttl 2026-06-24 08:18:44 +00:00
nesquena-hermes a0c295d4d8 release: stamp v0.51.619 (#4827 reasoning-echo suppression) 2026-06-24 08:09:17 +00:00
nesquena-hermes 8eed95a25e fix(#4808): widen /api/sessions cache TTL while streaming to stop per-poll rebuilds
The frontend polls /api/sessions every 5s while a turn streams
(static/sessions.js _streamingPollMs=5000), but the cache TTL was 2.5s
(_SESSIONS_CACHE_TTL_SECONDS) — so every streaming poll landed in a fresh window
and forced a full all_sessions() rebuild on the hot path under the global store
LOCK, pinning CPU to 100% and starving token rendering on large stores
(recurrence of #4672). The #4680 freeze-marker only de-dupes rebuilds WITHIN one
TTL window; with polls spaced wider than the TTL it never helped.

Fix: while _session_list_cache_streaming_freeze_marker() indicates an active
stream, use _SESSIONS_CACHE_STREAMING_TTL_SECONDS=10.0 (> the 5s poll) so the
sidebar holds steady across streaming polls. Live runtime state (active stream,
sort order, pending flags) is overlaid on every response regardless of cache, and
structural/settings changes still evict immediately via the source stamp — only a
streaming session's own persisted title/message_count can lag up to 10s, which the
#4672 design already deems acceptable. Idle path byte-for-byte unchanged.

Diagnosis credit: investigation reproduced 6 streaming polls -> 6 rebuilds before,
1 after. Co-authored-by: batkuip <reporter>
2026-06-24 08:06:45 +00:00
nesquena-hermes 22b98e3922 Merge branch 'peek-4828' into gate/4828-reasoning-echo
# Conflicts:
#	CHANGELOG.md
2026-06-24 07:57:31 +00:00
nesquena-hermes a51b06910f release: stamp v0.51.618 (#4809 worklog duration preserve) 2026-06-24 07:50:06 +00:00
nesquena-hermes dcce509e7b Merge remote-tracking branch 'origin/master' into gate/4809-worklog-dur
# Conflicts:
#	CHANGELOG.md
2026-06-24 07:49:32 +00:00
nesquena-hermes f3086f4974 Merge branch 'peek-4809' into gate/4809-worklog-dur
# Conflicts:
#	CHANGELOG.md
2026-06-24 07:25:32 +00:00
nesquena-hermes 19af32f1fa release: stamp v0.51.617 (#4818 mobile scroll-jank fix) 2026-06-24 07:23:29 +00:00
nesquena-hermes 92b3ca7046 Merge branch 'peek-4818' into gate/4818-mobile-scroll 2026-06-24 06:59:17 +00:00
nesquena-hermes 9883cf80a0 release: stamp v0.51.616 (#4793 recycle hardening) 2026-06-24 06:50:31 +00:00
nesquena-hermes 988acdb441 Merge remote-tracking branch 'origin/master' into gate/4803-recycle-harden 2026-06-24 06:49:41 +00:00
nesquena-hermes 05cf44ffca Merge branch 'peek-4803' into gate/4803-recycle-harden 2026-06-24 06:37:38 +00:00
nesquena-hermes 4855f26098 release: stamp v0.51.615 (#4756 model-catalog session-visit refresh) 2026-06-24 06:37:22 +00:00
nesquena-hermes b9f1491de7 Merge branch 'peek-4798-v2' into gate/4798-v2 2026-06-24 06:25:59 +00:00
nesquena-hermes 25ccb0340c release: stamp v0.51.614 (#2814 Kanban consolidated view toggle) 2026-06-23 23:52:12 +00:00
nesquena-hermes e9283c8182 fix(#2814): default _kanbanLanesByProfile=true to match server default (Opus note)
The JS module default was false (consolidated) while the server defaults
lane_by_profile=True (lanes). If the board painted before _kanbanApplyConfigDefaults
ran, there'd be a one-frame consolidated flicker before snapping to lanes. Matching
the client default to the server default removes the flicker. Co-authored-by: stefan-wisbric
2026-06-23 23:51:22 +00:00
nesquena-hermes 5253724f90 rebase(#2814): resolve i18n onto current master + add kanban_view_* keys to all 13 locales
Took master's i18n.js as base (it has all 13 locale blocks + had reorganized the
kanban keys, so the stale-branch conflict block would have duplicated them in
zh-Hant), then inserted #2814's 5 kanban_view_* keys into every locale block after
kanban_new_task — real translations for it/ja/zh/zh-Hant/fr (from the PR), English
fallback elsewhere. All 13 locales now have exactly 1 of each key; locale-parity +
kanban tests green (291 passed).
2026-06-23 23:40:45 +00:00
nesquena-hermes c184c0c2ad release: stamp v0.51.613 (#4800 streaming render freeze fix) 2026-06-23 23:17:37 +00:00
nesquena-hermes 86c3e67a46 test(#4800): accept _scheduleRender(parsed) in the token-handler anchor-registry assertion
#4800 changed the token SSE handler's call from _scheduleRender() to
_scheduleRender(parsed) (passes the pre-computed parse into the cache — the perf
optimization). The slice6 anchor-registry test asserted the literal no-arg call;
relaxed to _scheduleRender( so it matches the call regardless of args. Behavior
(token handler schedules a render) preserved + improved. Co-authored-by: wlknight
2026-06-23 23:07:15 +00:00
nesquena-hermes d68afd7862 fix(#4800): key the streaming parse-cache on liveReasoningText too (Codex gate)
The parse-result cache keyed only on assistantText, but _parseStreamState() is a
function of BOTH assistantText AND liveReasoningText. A 'reasoning' SSE event (which
mutates liveReasoningText without calling _scheduleRender) landing between a token's
_scheduleRender(parsed) and the rAF firing made _doRender serve a parsed computed from
the older reasoning -> _renderLiveThinking could show stale thinking text. Keying the
cache on liveReasoningText too forces a fresh _parseStreamState when reasoning changed,
and also makes a canceled-then-rescheduled render miss the stale entry. Co-authored-by: wlknight
2026-06-23 22:52:51 +00:00
nesquena-hermes 643eb2e396 test(#4800): make _scheduleRender guard test signature-agnostic
#4800 changed _scheduleRender() -> _scheduleRender(parsed) (parse-result cache).
test_streaming_race_fix's regex hardcoded the empty-arg signature so it couldn't
find the function ('_scheduleRender not found') even though the _streamFinalized
guard it checks is intact (line 3759). Regex now matches any args. Co-authored-by: wlknight
2026-06-23 22:46:49 +00:00
nesquena-hermes 1dbff4e708 Merge branch 'peek-4800' into gate/4800-stream-perf 2026-06-23 22:46:14 +00:00
nesquena-hermes e8b33066ec Merge remote-tracking branch 'origin/master' into stage/rodboev-4797-4796
# Conflicts:
#	CHANGELOG.md
2026-06-23 22:32:36 +00:00
nesquena-hermes d818b6a68a release: stamp v0.51.612 (#4753 bg-tab notify + #4755 profile default workspace) 2026-06-23 22:19:40 +00:00
nesquena-hermes edbe676b0d Merge branch 'peek-4796' into stage/rodboev-4797-4796 2026-06-23 22:19:13 +00:00
nesquena-hermes e26a6e47c0 Merge branch 'peek-4797' into stage/rodboev-4797-4796 2026-06-23 22:19:12 +00:00
nesquena-hermes 8234cd7a98 release: stamp v0.51.611 (#484 configurable JSON/YAML code-block view) 2026-06-23 22:15:10 +00:00
nesquena-hermes 8e384548c3 fix(#4788): reword a comment apostrophe that tripped test_smooth_text_fade's brace-matcher
test_smooth_text_fade.py::test_preferences_ui_exposes_and_saves_fade_text_effect
extracts loadSettingsPanel() via a brace-matcher that does NOT skip comments. The
new structured-code wiring added a comment containing 'isn't' + ''auto' mode' —
the apostrophes were mis-read as string delimiters, scrambling the brace depth so
the matcher closed the function early (before the fade-checkbox wiring), failing
the test. Reworded to 'is not' / 'auto mode' (zero behavior change; node -c clean).
The fade feature + the structured-code feature are both unchanged. Co-authored-by: metaember
2026-06-23 21:40:08 +00:00
nesquena-hermes 48663a4af3 Merge branch 'peek-4788' into gate/4788-json-view 2026-06-23 21:19:18 +00:00
nesquena-hermes 952618c648 release: stamp v0.51.610 (#4582 read-only escape-target symlink access) 2026-06-23 20:44:32 +00:00
nesquena-hermes 7db3aa123f Merge branch 'peek-4656' into stage/4656-escape-readonly 2026-06-23 20:43:53 +00:00
nesquena-hermes 5a640cd3b7 release: stamp v0.51.609 (#4781 live worklog collapse) 2026-06-23 20:39:22 +00:00
nesquena-hermes 2d6b3c067f Merge branch 'peek-4781' into stage/4781-worklog-collapse
# Conflicts:
#	CHANGELOG.md
2026-06-23 20:27:38 +00:00
nesquena-hermes b3d332c7a9 release: stamp v0.51.608 (#4346 DOM-node recycling in virtual-scroll) 2026-06-23 20:08:25 +00:00
nesquena-hermes ca368cc166 Merge branch 'peek-4478' into stage/4478-dom-recycle 2026-06-23 20:07:56 +00:00
nesquena-hermes d3425a4ce5 release: stamp v0.51.607 (#4717 empty-profile loading skeleton) 2026-06-23 19:01:44 +00:00
nesquena-hermes e617acfc79 test(#4748): stub _recordSessionProfileCount in the #4766 node harness
#4748 added a _recordSessionProfileCount() call inside _applySessionListPayload();
the pre-existing #4766 test isolates that function in node and must stub the new
helper (same pattern as the other stubbed helpers) or it ReferenceErrors. Not a
weakened assertion — the test still verifies old+new payload tab-count coverage.
2026-06-23 17:58:39 +00:00
nesquena-hermes e89977d270 test(#4748): widen skeleton-flag slice to full _applySessionListPayload body (Codex gate)
#4748 added lines inside _applySessionListPayload() that pushed the
'_sessionListSkeletonActive = false;' assertion past the test's fixed 4000-char
window. Anchor the slice on the next function def (_mergeRenderSessionListOptions)
instead — robust to future additions. Assertion unchanged.
2026-06-23 17:47:43 +00:00
nesquena-hermes a7eb7de83f Merge remote-tracking branch 'origin/master' into peek-4748
# Conflicts:
#	CHANGELOG.md
2026-06-23 17:43:38 +00:00
nesquena-hermes f9a687d01d release: stamp v0.51.606 (#4662 phase 2+3 backend hot-path caching) 2026-06-23 17:27:06 +00:00
nesquena-hermes 18e252d59c test(#4741): update #4766 mock to accept the new redact_enabled kwarg
#4741 added redact_enabled= to _sidebar_session_response_item's call site
(routes.py:2199); the pre-existing #4766 test mocked it with a bare 'lambda row: row'
that rejects the kwarg -> full-suite TypeError. Mock now accepts the keyword-only
arg. Not a weakened assertion — the test still asserts bucket-count omission.
2026-06-23 17:17:17 +00:00
nesquena-hermes 50f7f7fcd3 test(#4741): add two #798 isolation regression guards (Opus gate hardening)
- env-change-with-unchanged-mtime must re-expand (proves the cache stores raw
  un-expanded YAML, not the expanded result -> no stale cross-profile expansion)
- no-cross-serve between two profile config paths (proves the parse cache is
  path-keyed). Both pass on the current impl; locks down the highest-risk
  cross-profile credential-bleed invariant per Opus's non-blocking note.
2026-06-23 17:13:22 +00:00
nesquena-hermes 235bfffaf0 Merge remote-tracking branch 'origin/master' into peek-4741
# Conflicts:
#	CHANGELOG.md
2026-06-23 17:06:17 +00:00
nesquena-hermes 337cd95e32 release: stamp v0.51.605 (#4775 trim hidden/empty sidebar payload rows) 2026-06-23 16:56:22 +00:00
nesquena-hermes 98e672551a Merge branch 'peek-4782' into gate/4782-sidebar-trim 2026-06-23 16:46:10 +00:00
nesquena-hermes 198e98ec74 release: stamp v0.51.604 (live-stream worklog scroll/dedup + mobile session-switch scroll) 2026-06-23 16:36:54 +00:00
nesquena-hermes 29ceed3a72 fix(#4778): gate deferred rAF re-restore on still-unpinned (Opus gate)
Opus caught a narrow timing race: if a reader re-pins between the scroll-rebuild
guard engaging and its deferred rAF firing, the stale re-restore would yank them
back off the bottom. Gate the re-restore on _messageUserUnpinned at rAF time; the
minHeight release still always runs. Normal single-render unpinned case unaffected.
2026-06-23 16:19:50 +00:00
nesquena-hermes f4af6d8419 fix(#4778): scroll-rebuild guard must not reclassify a pinned follower as unpinned
Codex regression gate caught: the guard predicate keyed on a raw messagesEl.scrollTop>0,
so a pinned reader transiently at bottomDistance>250 mid-render (assistant body grows
before the anchor scene re-renders) got flipped to _messageUserUnpinned=true/_scrollPinned=false
and lost auto-follow. Require an explicit non-follow signal (_messageUserUnpinned || _scrollPinned===false)
instead. Updated the existing guard test to a genuine unpinned reader + added a pinned-large-growth
regression. Co-authored-by: franksong2702
2026-06-23 16:17:01 +00:00
nesquena-hermes c6d633fd2c Merge branch 'peek-4777' into stage/livestream-chat-scroll-4778-4777-4780
# Conflicts:
#	CHANGELOG.md
2026-06-23 16:09:00 +00:00
nesquena-hermes a349b0b7e8 Merge branch 'peek-4780' into stage/livestream-chat-scroll-4778-4777-4780 2026-06-23 16:08:31 +00:00
nesquena-hermes 343cb0737e Merge branch 'peek-4778' into stage/livestream-chat-scroll-4778-4777-4780 2026-06-23 16:08:30 +00:00
nesquena-hermes f3a509e2e9 Release v0.51.603 — Release VJ (cache app-shell template, #4774) 2026-06-23 13:39:07 +00:00
nesquena-hermes 9cc3f30d82 test(#4774): point asset-version-encoding test at relocated shell-render helper
#4774 moved the version-token substitution from the index route handler into the cached
_render_index_shell_base() helper. quote(WEBUI_VERSION, safe='') encoding is intact (verified),
just relocated, so the source-marker test scanning the route block no longer found it. Updated
to check the helper. Maintainer test-fix on boriken72's PR.
2026-06-23 13:27:40 +00:00
nesquena-hermes 7c9fef2fb3 stage #4774 (boriken72): cache app-shell template 2026-06-23 13:14:02 +00:00
nesquena-hermes 49e0f84474 Release v0.51.602 — Release VI (sidebar fetches only active source bucket, #4766/#4769) 2026-06-23 12:19:34 +00:00
nesquena-hermes ced64ff1f3 stage #4769 v2 (rodboev): sidebar source-bucket pushdown, re-push 2026-06-23 12:07:34 +00:00
nesquena-hermes c7034655b6 Release v0.51.601 — Release VH (sidebar lineage running/unread state when continuation hidden, #4451) 2026-06-23 06:17:44 +00:00
nesquena-hermes c8ccfa93b1 stage #4451 (santastabber): bubble hidden lineage stream state
# Conflicts:
#	CHANGELOG.md
2026-06-23 06:06:23 +00:00
nesquena-hermes f748854a69 Release v0.51.600 — Release VG (suppress footer jitter during virtual-scroll measurement, #4474) 2026-06-23 05:49:23 +00:00
nesquena-hermes 55f9cdd026 review(#4748): fix dead opacity on empty-hint — dedicated keyframe ends at .4
greptile P2: .skeleton-empty-hint set opacity:.4 but used skeletonFadeInDim,
which ends at opacity:.5 with fill-mode:both — so the animated rest state was .5
while the reduced-motion (animation:none) path rested at .4, an inconsistency.
Use a dedicated skeletonEmptyHintFadeIn keyframe that ends at .4 so both the
animated and reduced-motion paths rest at the same intended opacity.
2026-06-23 05:44:57 +00:00
nesquena-hermes 505465a81e feat(#4717): empty-profile loading skeleton (phase 1.5 of #4662)
The profile-switch skeleton (#4671) always rendered a fixed content shape; for
a brand-new/empty profile that flashed a misleading 'loading conversations'
skeleton that resolved to an empty list. Track each profile's last-seen session
count (localStorage, per profile name, recorded after each non-all-profiles
render) and, when switching into a profile KNOWN to have zero sessions, render a
quiet empty-state placeholder instead of the content skeleton. Unknown profiles
keep the content skeleton (safe default); skipped under an active project/source
filter (the count is an unfiltered total). prefers-reduced-motion + light/dark
aware. Frontend-only. 7 source-structural tests; Phase-1 skeleton tests still
green.
2026-06-23 05:44:57 +00:00
nesquena-hermes 2f250a4198 review(#4741): address greptile P2s — drop redundant lazy import, deep-copy raw config cache
Two greptile findings on #4741:
- api/routes.py: removed the redundant 'from api.config import load_settings'
  inside _session_list_payload_to_response — load_settings is already imported at
  module scope, and this function only runs at request time (after module load).
- api/config.py: _load_yaml_config_file_raw now deep-copies the cached raw dict by
  default so a caller can never mutate the shared _yaml_file_cache entry. The
  internal _load_yaml_config_file passes _copy=False (it immediately runs
  _expand_env_vars, which returns a fresh structure and never mutates its input)
  so the /api/reasoning hot path keeps its cheap no-copy fast path; reload_config
  uses the safe default copy.
2026-06-23 05:43:17 +00:00
nesquena-hermes 001ee0a986 fix(#4662): stamp _cfg_mtime for empty-dict config (Opus gate finding)
The 'and loaded' guard skipped the _cfg_mtime stamp for a config that parses to
an empty {} dict, so get_config()'s current_mtime != _cfg_mtime stale check fired
on every call and re-entered reload_config() under _cfg_lock forever — a hot-path
spin for a freshly created/reset profile's {} config. Split the guard: the no-op
_cfg_cache.update is still skipped for {}, but _cfg_mtime is always stamped when
the file parsed to a dict, matching master's pre-#4662 behavior. Incidentally
fixes the pre-existing empty/None-config spin. Adds a regression test.
2026-06-23 05:43:17 +00:00
nesquena-hermes 6ddd519ba9 docs(#4662): CHANGELOG entry for phase 2+3 backend caching wins 2026-06-23 05:43:17 +00:00
nesquena-hermes 8006db22fc perf(#4662): route reload_config parse through the mtime config cache
Phase 2 of #4662. reload_config() did a raw yaml.safe_load of config.yaml on
every call (~125ms+ on a large file), including on the profile-switch hot path
(~446ms load_settings stage in /api/sessions diagnostics). It now parses through
the mtime+size-keyed cache added in #4652, via a shared _load_yaml_config_file_raw
core (DRY: _load_yaml_config_file = raw + env-expand). reload_config still runs
its OWN env expansion pinned to the unscoped process-env view (block_process_env_fallback
reset + _thread_ctx.env={}) so the #798 TLS profile-isolation invariant is byte-for-byte
preserved; only the disk parse is now cached. An unchanged config.yaml is no longer
reparsed; an mtime change still busts the cache.
2026-06-23 05:42:32 +00:00
nesquena-hermes 4f071895cc perf(#4662): read redaction setting once per sidebar response, not per row
Phase 3 of #4662. _session_list_payload_to_response read settings.json once
per row via _redact_text's per-call load_settings() fallback (the multi-second
response_write stage in /api/sessions diagnostics on large lists). The
_sidebar_session_response_item -> _redact_text(_enabled=...) threading already
existed; this wires the caller to read the api_redact_enabled flag once and
thread it through every row, matching the read-once optimization
redact_session_data() already uses. Behavior-preserving; redaction still
applies (or not) exactly as before.
2026-06-23 05:42:32 +00:00
nesquena-hermes 9795fbac51 Release v0.51.599 — Release VF (dedupe live progress reasoning echoes, #4758) 2026-06-23 05:10:50 +00:00
nesquena-hermes 39eb7c40d2 stage #4758 (franksong2702): dedupe live progress reasoning echoes 2026-06-23 04:54:48 +00:00
nesquena-hermes ecc00d56ac Release v0.51.598 — Release VE (preserve scroll across live worklog rebuilds, #4743) 2026-06-23 04:25:25 +00:00
nesquena-hermes 9fb371addd stage #4743 (franksong2702): preserve scroll across live Compact Worklog rebuilds 2026-06-23 04:14:05 +00:00
nesquena-hermesandstarship-s 064118d329 fix(ui): wrap message footer on narrow screens instead of overflowing (#4724-followup)
The assistant message footer (model · duration · tokens · cost · cache% · time · actions)
could overflow its row on mobile/narrow panes, pushing the per-message action buttons off
the right edge where they were unreachable. #4724 proposed ellipsing every stat, which
shrank them into unreadable stubs (D…, 98…). This instead lets .msg-foot flex-wrap to a
second line: every stat stays full-size + readable, the actions/time are pinned flex:0 0
auto so they never shrink and stay on-screen, and on wider screens where it already fits
wrap never triggers. Pure CSS. + source-structure regression test.

Co-authored-by: starship-s <starship-s@users.noreply.github.com>
2026-06-23 03:54:20 +00:00
nesquena-hermes 9d3d6d4847 test(#4729): drop unused 're' import (ruff F401 lint gate) 2026-06-23 03:02:06 +00:00
nesquena-hermes 40cdd88406 Release v0.51.596 — Release VC (throttle reasoning SSE to stop tab freeze, #4729) 2026-06-23 02:56:16 +00:00
nesquena-hermesandwlknight 8f5ffea4a1 fix(#4729): guaranteed-exit reasoning flush in inner finally (Codex re-gate 2)
Codex re-gate 2: post-run flush is bypassed on exception (jumps to outer except) + retry
paths, so a buffered reasoning tail was lost before apperror there. Added a guarded
_flush_reasoning_buffer() at the top of the inner finally (guaranteed exit for
normal/exception/retry) so the tail always reaches the live Thinking view before teardown.
+ regression asserting the finally flush.

Co-authored-by: wlknight <wlknight@users.noreply.github.com>
2026-06-23 02:44:34 +00:00
nesquena-hermesandwlknight fa51e3413d fix(#4729): flush reasoning buffer at real boundaries, not just on_reasoning(None)
Codex re-gate caught a SILENT gap: the tail-flush only ran on on_reasoning(text=None),
but the agent never calls reasoning_callback(None) — so the last sub-100ms coalesced
buffer was silently lost, and a reasoning→tool/output transition stranded the tail.

Added a shared _flush_reasoning_buffer() helper called at every boundary that closes or
reorders the live reasoning stream: on_token (visible output starting), on_tool (tool
boundary), the defensive on_reasoning(None), and right after agent.run_conversation()
returns (terminal catch-all for a turn that ends on reasoning with no trailing token/tool).
Each flush emits the buffered chunk then clears it (since-last-flush delta semantics, so
the frontend's reasoningText += text stays correct). + regression test for all sites.

Co-authored-by: wlknight <wlknight@users.noreply.github.com>
2026-06-23 02:28:52 +00:00
nesquena-hermesandwlknight 36de84f6b8 test(#4729): pin reasoning-SSE coalescing contract (accumulate+flush+tail, not drop)
wlknight's re-push implemented the coalesce fix-spec from the bounce faithfully
(buffer accumulates deltas, flush emits+clears the buffer, tail flushed on text=None).
The PR shipped no test for it; added a source-structure regression pinning the three
correctness properties so it can't silently regress to the drop-based version that
would lose live reasoning text (frontend appends deltas).

Co-authored-by: wlknight <wlknight@users.noreply.github.com>
2026-06-23 02:14:13 +00:00
nesquena-hermes eabe1426a4 stage #4729 (wlknight): coalesce-throttle reasoning SSE to ~10Hz (fixes browser tab freeze)
# Conflicts:
#	CHANGELOG.md
2026-06-23 02:12:38 +00:00
nesquena-hermes 65dcb07805 Release v0.51.595 — Release VB (TLS handshake no longer stalls the accept loop, #4727) 2026-06-23 01:58:47 +00:00
nesquena-hermes a43a93650a stage #4727 (jcarvine): prevent TLS handshake from stalling the accept loop 2026-06-23 01:47:45 +00:00
nesquena-hermes 12180079ab Release v0.51.594 — Release VA (profile-switch loading skeletons, #4671/#4662 phase 1) 2026-06-23 01:39:03 +00:00
nesquena-hermesandrodboev 749f95d01c docs(#4671): clarify dead-assignment backstop + add four-guard contract comment (Opus polish)
Opus ship-gate non-blocking observations (no MUST-FIX), applied to lower future-maintainer
risk on the crown-jewel profile-switch surface:
- clarified the belt-and-suspenders _sessionListSkeletonActive=false at the real-paint site
- added a FOUR-GUARD CONTRACT doc-comment at the top of switchToProfile naming the four
  interacting state pieces (embargo / invalidation / skeleton-flag / _wsTreeGen + _switchGen)
  so a future edit touching one without the others doesn't silently reopen a window.

Co-authored-by: rodboev <rodboev@users.noreply.github.com>
2026-06-23 01:38:25 +00:00
nesquena-hermes 710f2c6934 test(#4671): parse full switchToProfile body instead of a fixed char window
Codex re-gate 5: the only remaining finding — my race-guard work grew switchToProfile
past the 6500-char window (applyBotName now at offset ~6609). Instead of bumping the
window again (it'll drift), bound the slice on the next top-level function
(openProfileCreate) so the test reads the whole body and can't break on growth.
No race/logic findings this pass — the profile-switch races are converged clean.
2026-06-23 01:27:11 +00:00
nesquena-hermesandrodboev 1b0c64a604 fix(#4671): embargo also guards the fetch-failure path + setup moved inside try (Codex re-gate 4)
Two more edge cases from re-gate 4:
(1) SILENT: a mid-switch /api/sessions that FAILS bypassed the embargo (the drop-check
was only on the success path), so its catch cleared the skeleton + rendered old-profile
cache. Added 'if(_profileSwitchListEmbargo) return;' after the gen guard in the catch too.
(2) CORE: the embargo was set BEFORE the try, so a throw in the synchronous setup could
leak it (the guarded finally only covered the try). Moved the invalidate/embargo/skeleton/
ws-gen setup INSIDE the try so the _switchGen-guarded finally always lifts the embargo.

Co-authored-by: rodboev <rodboev@users.noreply.github.com>
2026-06-23 01:18:58 +00:00
nesquena-hermesandrodboev ce0ef36ab1 fix(#4671): embargo session-list renders during the switch window (Codex re-gate 3)
Codex re-gate 3 found a third clobber variant: point-in-time invalidation isn't enough
because a renderSessionList() can START after the skeleton shows but BEFORE
/api/profile/switch returns. Since the new-profile cookie is only set by the switch
response, that GET fetches the OLD profile's rows, passes the (now-current) generation
guard, and clobbers the skeleton.

Fix: a profile-switch session-list EMBARGO. _setProfileSwitchListEmbargo(true) before
showSessionListSkeleton(); _runRenderSessionListRefresh drops ALL payloads (after the
gen guard, before apply) while embargoed; the switch lifts it immediately before its own
authoritative renderSessionList() (both branches), in the failure-restore, and in a
_switchGen-guarded finally as a safety net so it can't freeze the sidebar on an
early-return/throw. + regression test.

Co-authored-by: rodboev <rodboev@users.noreply.github.com>
2026-06-23 01:11:24 +00:00
nesquena-hermesandrodboev 0a64d7d7c6 fix(#4671): invalidate in-flight session-list renders at switch start (Codex re-gate 2)
Codex re-gate 2 found a remaining CORE clobber variant: a renderSessionList() already
in flight BEFORE the switch (background poll fetching the OLD profile's /api/sessions)
would resolve after the skeleton appears but before the switch's own renderSessionList()
bumped _renderSessionListGen — so it passed the generation guard, cleared the skeleton
flag in _applySessionListPayload, and painted stale rows.

Fix: _invalidateSessionListRenders() bumps _renderSessionListGen + clears
_pendingSessionListPayload / _renderSessionListQueuedRequest, called at switch start
BEFORE showSessionListSkeleton(). Any outstanding pre-switch response is now stale
(its captured _gen < current) and discarded by the existing guard; deferred/queued
applies are dropped. + regression test asserting the helper exists and runs before the
skeleton.

Co-authored-by: rodboev <rodboev@users.noreply.github.com>
2026-06-23 00:56:30 +00:00
nesquena-hermesandrodboev 66786143a8 fix(#4671): close 2 profile-switch render races via skeleton-flag + ws generation token
Reworked from the Codex re-gate (rebased onto fresh master so #4730's gateway-poll
work is preserved, not reverted). Two CORE races + a test-window break:

(1) Skeleton-clobber (sessions.js): renderSessionListFromCache() now bails while
_sessionListSkeletonActive — _allSessions still holds the PREVIOUS profile until
/api/sessions resolves, so a gateway-poll/SSE/timer/cache render mid-switch would
repaint the wrong profile's rows over the skeleton. _applySessionListPayload clears
the flag right before painting (fresh data in hand; superseded responses already
discarded by the generation guard); the fetch-failure path and switch-failure catch
clear it too so it can't strand. NO signature change (kept renderSessionListFromCache()
and _applySessionListPayload(sessData,projData) so the ~10 static tests that anchor on
those markers stay green).

(2) Workspace wrong-profile tree (workspace.js + panels.js): an empty-session switch
reuses the same session_id, so loadDir()'s id guard can't reject a stale pre-switch
/api/list. Added _wsTreeGen generation token + bumpWorkspaceTreeGen(), bumped
UNCONDITIONALLY at switch start (even panel-closed, since loadDir('.') still runs),
captured in loadDir() and re-checked after both awaited /api/list points.

(3) test_issue1116 proximity window 5000->6500 (applyBotName now ~char 5618, still fires).

+ regression tests: skeleton-flag bail/clear lifecycle, ws generation token, failure
restore clears flag; updated #1785 stale-session guard test for the compound condition.

Co-authored-by: rodboev <rodboev@users.noreply.github.com>
2026-06-23 00:46:14 +00:00
nesquena-hermes a8805bb658 stage #4671 (nesquena-hermes, nesquena+rodboev reviewed): profile-switch loading skeletons (#4662 phase 1)
# Conflicts:
#	CHANGELOG.md
2026-06-23 00:17:17 +00:00
nesquena-hermesandakrhin a32c3a3f1e Release v0.51.593 — Release UZ (gateway-poll visibilitychange listener cleanup, #4730 follow-up)
Co-authored-by: akrhin <akrhin@users.noreply.github.com>
2026-06-22 23:50:09 +00:00