Commit graph

6665 commits

Author SHA1 Message Date
b3nw
e8f7e28a3c fix: address gate cert BRICKs + Greptile P1 on PR #5688
Address the RED gate cert on PR #5688 (2 BRICK + 1 CORE) and the
incoming Greptile review (1 P1 + 3 P2):

- BRICK-1 (race-safety): drop the mtime heuristic and any age-based
  lock removal. Add /api/updates/clear_lock with a fail-closed
  fcntl.flock holder probe (refuses if any process still holds the
  file, on POSIX). On non-POSIX, fails closed. Touches only
  .git/index.lock (the only well-known short-lived lock git creates).
- BRICK-2 (destructive path coupling): remove lock_conflict from the
  force-button condition. Add a separate btnClearUpdateLock that calls
  /api/updates/clear_lock -- never apply_force_update. The recovery
  path never runs checkout/clean/reset --hard.
- CORE-1 (unconditional pre-cleanup): apply_force_update no longer
  iterates .git/**/*.lock. Lock cleanup is exclusively the clear_lock
  endpoint's job.
- Greptile P1: when a pull-lock error fires after a stash was pushed,
  run git stash pop (with apply+drop fallback) so the user's local
  modifications aren't stranded in the stash silently. v2 tests
  cover the stashed and the clean cases.
- Greptile P2 (broad 'lock file' substring): tightened _GIT_LOCK_SIGNATURES
  to specific git error strings ('index.lock': file exists, '.lock':
  file exists, 'another git process seems to be running',
  'unable to create .git/index.lock') so unrelated ref-transaction
  lock-loss messages no longer trigger a lock-conflict response.
- Greptile P2 (redundant git_dir.exists / magic number): both gone as a
  side effect of removing the apply_force_update cleanup loop entirely.

Refactor: rebased onto current upstream/master so PR is no longer
'behind' 130 commits.

Tests:
- 14 new v2 tests covering holder probe (true/false/NOGIL probe),
  _try_remove_lock (refuse-on-held/success-on-unheld),
  apply_clear_lock (success/refused), signature set parameter table
  including false-positive class, apply_force_update no-touch
  contract, pull-lock stash restore, pull-lock no-stash-when-clean.
- 2 v1 tests removed (they encoded the unsafe behavior).
- 2 v1 parametrize rows dropped (their positive cases relied on the
  broad 'lock file' substring).

Closes #5687
2026-07-06 17:37:05 +00:00
b3nw
3c5b00f928 fix: detect and recover from stale git lock files during self-update
- Detect lock file errors (lock_conflict flag) on fetch/status/pull
  failures in _apply_update_inner (#1)
- Expose Force Update button on frontend when lock_conflict is
  received (#3)
- Proactively clean stale lock files (>30s old) in apply_force_update
  using rglob discovery instead of a hardcoded path list (#2)
- Add 10 tests: _is_git_lock_error parametrized unit tests,
  _apply_update_inner lock path coverage, and apply_force_update
  stale/recent lock behavior
2026-07-06 17:17:21 +00:00
nesquena-hermes
426f12ce51
Merge pull request #5690 from nesquena/release/stage-5673
Release: proxy-auth PWA caveat docs (#5673)
2026-07-06 10:13:02 -07:00
nesquena-hermes
21755195ee docs(changelog): stamp #5673 proxy-auth PWA caveat docs 2026-07-06 17:05:11 +00:00
nesquena-hermes
8a7d3eb6c2 Merge PR #5673 into stage 2026-07-06 17:04:53 +00:00
nesquena-hermes
26a829c952
docs: weekly contributor tally refresh (20260706) (#5689) 2026-07-06 09:29:07 -07:00
Rod Boev
cdcb31a948 docs(#2781): document proxy auth PWA update caveat 2026-07-06 04:41:45 -04:00
nesquena-hermes
f80e641a9a
Merge pull request #5670 from nesquena/release/stage-5668
Release: shared layout-assertion test helpers (#5668)
2026-07-05 23:19:11 -07:00
nesquena-hermes
ff74ea7993 docs(changelog): stamp #5668 layout-assertion test helpers 2026-07-06 06:13:51 +00:00
nesquena-hermes
358c77d775 Merge PR #5668 into stage 2026-07-06 06:13:26 +00:00
nesquena-hermes
79d3b5996d
Merge pull request #5669 from nesquena/release/stage-visible-2026-07-06
Release: visible-UI batch — mobile nav (#5605), mermaid mobile (#5560), steer upload scope (#5630), header font-scale (#5633), three-panel floor (#5594)
2026-07-05 22:53:31 -07:00
nesquena-hermes
f9ca38dd5c docs(changelog): stamp visible batch (#5605, #5560, #5630, #5633, #5594) 2026-07-06 05:38:46 +00:00
nesquena-hermes
51dffad1ae Merge PR #5594 into visible-batch stage 2026-07-06 05:37:45 +00:00
nesquena-hermes
25e32839a3 Merge PR #5633 into visible-batch stage 2026-07-06 05:37:45 +00:00
nesquena-hermes
db87fd3a07 Merge PR #5630 into visible-batch stage 2026-07-06 05:37:45 +00:00
nesquena-hermes
a2e5dff18e Merge PR #5560 into visible-batch stage 2026-07-06 05:37:44 +00:00
nesquena-hermes
49afd5c0c2 Merge PR #5605 into visible-batch stage 2026-07-06 05:37:44 +00:00
Rod Boev
e82cb801de feat(#5665): add shared layout-assertion helpers for browser tests 2026-07-06 01:23:21 -04:00
nesquena-hermes
3403870ef9
Merge pull request #5663 from nesquena/release/stage-phase1-2026-07-06
Release: Phase-1 batch — table whitespace (#5644), empty error-hint guard (#5653), Playwright CI (#5661)
2026-07-05 21:17:40 -07:00
nesquena-hermes
e3dfc29950 docs(changelog): stamp phase1 batch (#5644, #5653, #5661) 2026-07-06 03:53:18 +00:00
nesquena-hermes
6416192ceb Merge PR #5644 into phase1 stage 2026-07-06 03:52:38 +00:00
nesquena-hermes
f727df5891 Merge PR #5653 into phase1 stage 2026-07-06 03:52:38 +00:00
nesquena-hermes
5f396bb7d6 Merge PR #5661 into phase1 stage 2026-07-06 03:52:38 +00:00
Frank Song
18a2078ebb fix(streaming): guard empty terminal error hints 2026-07-06 11:15:31 +08:00
nesquena-hermes
90102892e0
Merge pull request #5662 from nesquena/review-5655
Release: compression-recovery card on reloaded sessions (#5655)
2026-07-05 20:08:56 -07:00
nesquena-hermes
e7fa04ef24 merge master into review-5655 (base refresh for up-to-date branch protection) 2026-07-06 03:05:41 +00:00
Rod Boev
e19eefbe59 ci(#5658): add restore-keys for graceful cache fallback on version bumps 2026-07-05 22:59:37 -04:00
nesquena-hermes
f501898791 release: show compression-recovery card from session state on rebuilt sessions (#5655)
Follow-up to #5538: the recovery card now also renders from _activeCompressionRecoveryPayload() on the final assistant message when a rebuilt/legacy session lacks the per-message _compressionRecovery marker (guarded to last/turn-final assistant only; no double-render; cleared recovery still hidden). Gate: Codex SAFE, Fable SHIP-UX, suite 12179/0, browser clean.

Co-authored-by: Frank Song <franksong2702@gmail.com>
2026-07-06 02:56:55 +00:00
Rod Boev
f09e5d0b33 ci(#5658): install Playwright in pytest CI so browser tests run 2026-07-05 22:54:44 -04:00
nesquena-hermes
9738ebb614
fix(tests): sync on subscriber count in multitab SSE test (#5628) (#5660)
test_same_stream_in_two_tabs_receives_identical_token_sequence started both
SSE-handler threads then immediately put_nowait'd the tokens + stream_end
without waiting for both threads to subscribe. StreamChannel.put_nowait()
buffers events only while there are zero subscribers and clears that buffer
the moment the first subscriber attaches and broadcasts live — so producing
events in the window after tab A subscribes but before tab B does orphans
tab B (subscribes to a cleared buffer, never sees stream_end, hangs ->
thread.join timeout -> 'every tab should finish' fails). ~20% timing flake
on slow CI runners (3.11 shard-4).

Wait until len(stream._subscribers) == len(handlers) (bounded 5s) before
producing events, so delivery is deterministic regardless of thread-start
timing. Test-only; no production change (buffer-then-broadcast is correct for
the real reconnect case).

Verified: original flakes 2/30 under CPU contention; fixed 30/30.

Fixes #5628

Co-authored-by: nesquena-hermes <nesquena-hermes@users.noreply.github.com>
2026-07-05 19:52:16 -07:00
nesquena-hermes
8929977b5b review: merge #5655 (77f54eeb) 2026-07-06 02:46:52 +00:00
nesquena-hermes
7990b7412a
Merge pull request #5659 from nesquena/review-5645
Release: reload config cache on profile switch (#5645, fixes #5619)
2026-07-05 19:37:58 -07:00
nesquena-hermes
7d3057c7c9 release: reload config cache on profile switch (#5645, #5619)
Root fix for the #5619 profile-switch config-cache bug: split the reload gate so a profile-PATH change forces reload unconditionally (was wrongly suppressed by in-memory overrides → stale default-profile config/models/keys), while a file-mtime change still respects overrides. Folded in a test-isolation fix (Codex): the stage302 regression test leaked _cfg_cache/_cfg_mtime/_cfg_path/_cfg_fingerprint/cfg globals (deepcopy snapshot + clear/update restore, since reload_config mutates _cfg_cache in place). Full gate: Codex SAFE (2 rounds), suite 12178/0, 121 profile/provider tests.

Co-authored-by: Rod Boev <rod.boev@gmail.com>
2026-07-06 02:33:45 +00:00
nesquena-hermes
f7fe895c63 review: merge #5645 (00a69521) 2026-07-06 02:09:22 +00:00
nesquena-hermes
d5bd28b49a
Merge pull request #5656 from nesquena/review-5555
Release: fork read-only cron sessions into a new writable chat (#5555)
2026-07-05 19:07:04 -07:00
nankingjing
32f1e2317f fix(ui): scope .msg-time responsive rules to .msg-role .msg-time
The responsive font-size overrides for .msg-time were applied globally,
affecting both the role header timestamp (which is only a hover title
tooltip there) AND the message footer timestamp (.msg-foot .msg-time).

Scope to .msg-role .msg-time so the footer row retains its balanced
10.5px base while the role header timestamp scales with font-size.
2026-07-06 10:03:46 +08:00
nesquena-hermes
c601e11324 release: fork read-only cron sessions into a new writable chat (#5555)
Relaxes the /api/session/branch read-only gate so a canonical-cron session can be forked into a new WebUI-owned session (source never saved). Gate hardening folded in: the read-only branch gate now covers BOTH the synthesized/missing-sidecar path AND the persisted/loaded path (Codex found a stored read-only non-cron session could be branched + saved); relaxation keys on the server-authoritative resolved source (source_tag/raw_source/source == 'cron'), never the id prefix. Full gate: Codex adversarial SAFE, 84 branch/claim tests + suite 12175/0, browser clean.

Co-authored-by: Rod Boev <rod.boev@gmail.com>
2026-07-06 02:02:52 +00:00
nankingjing
49d54e0a1d fix(ux): scope mermaid min-height to inline+mobile only
Remove min-height:200px from the global .mermaid-viewer-viewport rule
(it was outside the @media(max-width:640px) block despite the PR title).
Add a properly-scoped .mermaid-viewer--inline .mermaid-viewer-viewport
min-height inside an actual @media(max-width:640px) block, capped at
min(200px, 70vh) so it cannot override the lightbox fit-to-screen envelope.
2026-07-06 10:02:05 +08:00
nesquena-hermes
f10cb2a35c review: merge #5555 (11eed2af) 2026-07-06 01:44:21 +00:00
Frank Song
77f54eeb5a Render session recovery card from active session state 2026-07-06 09:43:10 +08:00
nesquena-hermes
89b6ab5c34
Merge pull request #5654 from nesquena/review-5554
Release: redesign cron preset schedule builder — sentence UI (#5554)
2026-07-05 18:40:07 -07:00
nesquena-hermes
936c5b051b release: redesign cron preset schedule builder — sentence UI with time picker + day dropdowns (#5554)
Reworks the #5552 preset builder per maintainer UX feedback + Fable design advisory: one natural 'Schedule: [preset] on [day] at [time]' row; native time picker (themed) replacing hour/minute number boxes; day-of-week + day-of-month dropdowns; raw cron field shown only on Custom; live cron preview; Custom last; new jobs default to Daily 09:00; keystroke-clamp + mid-typing-hide bugs fixed. New i18n keys across all 14 locales. Full gate: Codex SAFE, Fable SHIP-UX, suite 12160/0, browser clean.

Co-authored-by: Rod Boev <rod.boev@gmail.com>
2026-07-06 01:35:55 +00:00
nesquena-hermes
13ecbd79fb review: merge #5554 (2e27ff64) 2026-07-06 00:38:30 +00:00
nesquena-hermes
8cdb4ea27b
Merge pull request #5652 from nesquena/review-5506
Release: restore prose-level fade for Transparent Stream (#5506)
2026-07-05 17:35:47 -07:00
nesquena-hermes
02e18d4d69 release: restore prose-level fade for Transparent Stream (#5506)
Re-adds the per-word prose fade for newly-streamed assistant text in Transparent Stream WITHOUT reintroducing the row-level entrance flicker (#5367). Reduced-motion honored at both JS and CSS layers; thinking/tool rows not animated. Option A: the fade is part of Transparent Stream regardless of the off-by-default 'Fade text effect' toggle; settings description clarified accordingly. Gate: Codex SAFE, Fable SHIP-UX, suite 12158/0, browser-smoke clean.

Co-authored-by: Rod Boev <rod.boev@gmail.com>
2026-07-06 00:26:45 +00:00
nesquena-hermes
e6b2ac9119 review: merge #5506 (0c1bdce0) 2026-07-06 00:16:29 +00:00
nesquena-hermes
de1ff837e3
Merge pull request #5650 from nesquena/review-5502
Release: reuse the rich model picker in Preferences (#5502)
2026-07-05 16:26:14 -07:00
nesquena-hermes
c2e9277c46 release: reuse the rich model picker in Preferences (#5502)
Generalizes renderModelDropdown() to serve both the composer and Preferences pickers (backward-compatible defaults keep the composer identical). Folded in Fable UX fixes: label->chip association, downward shadow for the down-opening settings picker, and mobile keyboard-pop suppression across all 3 render paths (open/internal-filter/refresh) with focus preserved while typing. Full gate (4 rounds): Codex SAFE, Fable SHIP-UX, suite 12153/0, browser clean; composer picker verified unchanged.

Co-authored-by: Rod Boev <rod.boev@gmail.com>
2026-07-05 23:22:31 +00:00
Rod Boev
9f9ebc9746 fix(#5583): keep mobile nav actions visible 2026-07-05 18:40:41 -04:00
nesquena-hermes
d5dae70c43 review: merge #5502 (087c694c) 2026-07-05 22:35:58 +00:00