Commit Graph

2121 Commits

Author SHA1 Message Date
Nightt ea7fc474a9 fix: paginate pending allowlist PR lookup 2026-06-01 21:27:39 -07:00
Nightt dfe1884702 fix: add contribution gate dry run mode 2026-06-01 21:27:39 -07:00
Nightt c8c20e0931 fix: remove dead issue gate guard 2026-06-01 21:27:39 -07:00
Nightt 50590761ac fix: read contribution allowlist from default branch 2026-06-01 21:27:39 -07:00
Nightt dcf8350ff8 fix: harden contribution gate bypasses 2026-06-01 21:27:39 -07:00
Nightt 97c615ca9c chore: add contribution gate workflows 2026-06-01 21:27:39 -07:00
gordonlu f48e398ba5 Revert "fix: restore two-line draft header layout"
This reverts commit 6bc5e629c89aa98762b3f181ade29fefaa77380f.
2026-06-01 21:27:34 -07:00
gordonlu cc60129f3a feat(i18n): add FanoutCounts MessageId, wire into FanoutCard stats line 2026-06-01 21:27:17 -07:00
gordonlu 25017091e1 fix: restore two-line draft header layout 2026-06-01 21:27:17 -07:00
gordonlu 478d45f795 fmt: cargo fmt 2026-06-01 21:27:17 -07:00
gordonlu 19d55799a5 fix: avoid Instant overflow in turn_liveness tests on Windows 2026-06-01 21:27:17 -07:00
gordonlu 6ab77eaba3 feat(i18n): localize all queue command messages across 7 locales 2026-06-01 21:27:17 -07:00
Hunter B ddae7584f8 fix: resolve clippy warnings in harvested PRs (needless-borrow, is_multiple_of, dead unwrap) 2026-06-01 21:24:38 -07:00
Hunter B e99ee5e7b1 chore(release): sync tui crate CHANGELOG for version drift gate 2026-06-01 21:21:56 -07:00
Hunter B e763b44e1e docs(changelog): credit new harvests for v0.8.50 (#2514, #2519, #2503, #2560) 2026-06-01 21:20:44 -07:00
xyuai 5f497e00c4 fix: harden Xiaomi MiMo speech flow 2026-06-01 21:18:28 -07:00
xyuai 8532dcc49e feat: add Xiaomi MiMo speech support 2026-06-01 21:18:28 -07:00
Hu Qiantao 139b542d3f test(ci): add Cache Guard CI test for prefix-cache stability
Add a CI guard test that verifies prefix-cache stability across
multi-turn conversations.

The test runs 8 test cases × 14-24 turns each:
- plain-dialogue (14 turns, with/without reasoning)
- long-dialogue (18 turns)
- mixed-message-sizes (20 turns)
- tool-loop (14 turns, with/without reasoning)
- long-tool-loop (24 turns, with/without reasoning)
- compaction-must-cause-at-least-one-miss (30 turns)

Environment variables:
- CODEWHALE_CACHE_GUARD=1: Enable the guard (default: disabled)
- CODEWHALE_CACHE_GUARD_THRESHOLD=40: Hit rate threshold (0-100)
- CODEWHALE_CACHE_GUARD_STRICT=1: Fail on threshold violation

Usage:
  CODEWHALE_CACHE_GUARD=1 cargo test --test cache_guard
  CODEWHALE_CACHE_GUARD=1 CODEWHALE_CACHE_GUARD_STRICT=1 cargo test --test cache_guard

The mock simulates DeepSeek's server-side prefix cache behavior
using byte-prefix matching. The default threshold (40%) is calibrated
for the mock; real CI should use CODEWHALE_CACHE_GUARD_THRESHOLD=90
for production-quality validation.

9 tests covering:
- 8 multi-turn conversation scenarios
- 1 compaction behavior verification
2026-06-01 21:15:12 -07:00
Hu Qiantao d58613ab23 test(client): add plan mode toggle byte-stability invariant test
Add test plan_mode_toggle_preserves_catalog_byte_stability that verifies
three invariants critical for DeepSeek's KV prefix cache:

1. Building the tool catalog twice for the same mode produces identical
   JSON bytes. This catches any non-determinism in catalog construction
   (e.g., HashMap iteration order, timestamp-dependent logic).

2. Non-deferred tools common to Plan and Agent modes appear in the same
   order. Plan mode excludes execution tools, but the tools that are
   present in both modes must have stable byte positions so that toggling
   between modes doesn't shift byte offsets of shared tools.

3. Activating a deferred tool mid-session appends to the tail without
   reordering the catalog head. This is the existing invariant from #263,
   now covered by a dedicated byte-level assertion.

Also add a doc comment to build_model_tool_catalog documenting the
catalog-head stability invariant.
2026-06-01 21:15:12 -07:00
Justin Gao c9e4c8b2ce fix: clarify comment, avoid per-turn tool clone on happy path
- Comment: remove 'never auto-re-pins' (it does auto-re-freeze),
  describe accurately as 'auto-re-freeze on drift'
- Perf: use as_deref().unwrap_or_default() to borrow &[Tool] for
  verify(), only to_vec() when constructing PinnedPrefix
2026-06-01 21:15:12 -07:00
Justin Gao b122b58c92 refs(#2264): Phase 2 — wire FrozenPrefix::verify() into turn_loop
Adds a three-zone diagnostic layer alongside the existing
PrefixStabilityManager::check_and_update(). On the first turn,
freeze the PinnedPrefix baseline; on subsequent turns, verify
the current system+tool state against the frozen baseline and
log drift via tracing::debug!. Phase 2 is warn-only — no
request refusal — auto-re-freezes on drift to keep subsequent
turn comparisons meaningful.

- Session: add frozen_prefix: Option<FrozenPrefix> field
- turn_loop: import PinnedPrefix, insert verify block after
  check_and_update, before MessageRequest construction
2026-06-01 21:15:12 -07:00
Hunter B 4a09197433 fix(tui): bound foreground shell reader drains
Refs #2571

Harvests the core idea from PR #2573 by @idling11, with local cleanup for normal-exit inherited pipe handles and a foreground orphan-pipe regression.

Co-authored-by: Hanmiao Li <894876246@qq.com>
2026-06-01 20:49:26 -07:00
Hunter B eedeb5290b fix(agent): pass through explicit AtlasCloud model ids
Refs #2569

Harvests the safe part of PR #2569 by allowing AtlasCloud provider-hinted namespaced model IDs to route exactly as requested, without freezing a volatile provider model catalog in the static registry.

Co-authored-by: lucaszhu-hue <lucas.zhu@atlascloud.ai>
2026-06-01 20:06:26 -07:00
Hunter B 88f34fc9dd fix(tui): protect multiline drafts on arrow navigation 2026-06-01 19:58:39 -07:00
Hunter B 41edcd5c4f chore(release): bump local version to 0.8.50 2026-06-01 19:39:45 -07:00
Hunter B 63b7c189b8 fix(release): ship NSIS installer artifact 2026-06-01 19:34:25 -07:00
songzhenrui e6de6f47d5 fix: address Gemini code review feedback
- Define UnStrStr macro for uninstaller string functions
- Use un.StrStr instead of StrStr in uninstaller context
- Rewrite un.RemoveFromPath with correct offset calculations
  and semicolon handling to prevent PATH corruption
- Use dynamic version fetch from GitHub API in CLASSROOM_INSTALL.md
2026-06-01 19:27:30 -07:00
songzhenrui c2c36cca11 feat: add NSIS installer and classroom admin checklist
Closes #1983

- Add scripts/installer/codewhale.nsi: NSIS installer that installs both
  codewhale.exe and codewhale-tui.exe to %LOCALAPPDATA%\Programs\CodeWhale\bin,
  adds to current-user PATH, and includes an uninstaller that cleans PATH
- Add docs/CLASSROOM_INSTALL.md: step-by-step checklist for IT admins
  deploying CodeWhale in labs/classrooms, covering silent install, manual
  fallback, API key provisioning, imaging notes, and troubleshooting
- Update docs/INSTALL.md: add Windows NSIS Installer section referencing
  the new installer and classroom checklist
2026-06-01 19:27:30 -07:00
cyq c92f3c350b feat(tui): expose current model in turn metadata 2026-06-01 19:22:49 -07:00
cyq a41a3825c5 docs(runtime): outline receipt export boundary 2026-06-01 19:22:00 -07:00
cyq baba81cfb9 fix(tui): show session timestamps in listings 2026-06-01 19:21:53 -07:00
Hu Qiantao b1cc344d21 fix(tui): force full repaint on theme switch to prevent stale sidebar colors
When switching themes, ratatui's incremental diff engine may miss
color-only changes in sidebar cells that were rendered with
theme-resolved UiTheme fields rather than palette constants routed
through the backend remap layer.  This manifests as the sidebar
retaining the previous theme's colors until a window resize or
conversation turn triggers a full repaint.

Add a force_next_full_repaint flag on App that is set whenever a
theme or background_color ConfigUpdated event is processed.  The
main render loop merges this into the existing force_terminal_repaint
mechanism, which clears the terminal and redraws every cell.
2026-06-01 19:21:53 -07:00
Hu Qiantao 556e0b46fb fix(tui): use theme colors in sidebar panels instead of hardcoded palette constants
The task, work, agents, and context sidebar panels were using hardcoded
palette::DEEPSEEK_SKY, palette::TEXT_MUTED, palette::STATUS_WARNING etc.
constants (Whale dark theme colors) that never change when the user
switches themes. This caused the sidebar content to remain in Whale dark
colors even after switching to Claude, Catppuccin, Dracula, or other
community themes.

Root cause:
- task_panel_lines() used palette::DEEPSEEK_SKY, TEXT_MUTED, STATUS_* etc.
- work_panel_lines() and helpers used palette::TEXT_MUTED, STATUS_* etc.
- subagent_panel_lines() used palette::DEEPSEEK_SKY, TEXT_DIM, STATUS_* etc.
- render_context_panel() used palette::DEEPSEEK_SKY, TEXT_MUTED, TEXT_DIM
- tool_status_marker() returned hardcoded palette::STATUS_* colors
- agent_status_marker() returned hardcoded palette::STATUS_* colors

Fix:
- All sidebar panel functions now accept &UiTheme and use theme fields
- task_panel_lines: uses app.ui_theme directly
- work_panel_lines: passes ui_theme to all helpers
- subagent_panel_lines: accepts theme parameter
- render_context_panel: uses app.ui_theme
- tool_status_marker/agent_status_marker: accept theme parameter
- All palette::DEEPSEEK_SKY -> theme.accent_primary
- All palette::TEXT_MUTED -> theme.text_muted
- All palette::TEXT_DIM -> theme.text_dim
- All palette::STATUS_WARNING -> theme.warning
- All palette::STATUS_SUCCESS -> theme.success
- All palette::STATUS_ERROR -> theme.error_fg

This ensures sidebar panels immediately reflect the active theme when
switching, without requiring a conversation turn to trigger a refresh.

Also creates a theme modification guide for future contributors.
2026-06-01 19:21:53 -07:00
cyq 0842b3f528 test(config): use real legacy home on windows 2026-06-01 19:21:53 -07:00
cyq eff4e99a2c test(config): stabilize migration home on windows 2026-06-01 19:21:53 -07:00
cyq 6144d64914 fix(config): report legacy config migration 2026-06-01 19:21:53 -07:00
cyq 537afcf07e fix(subagent): cap truncated response retries 2026-06-01 19:21:42 -07:00
cyq 650d1a6195 fix(subagent): guard truncated tool calls 2026-06-01 19:21:42 -07:00
cyq c148b00e89 fix(npm): prefer binary version output 2026-06-01 19:17:58 -07:00
cyq 5becfda03b fix(tui): use effective model window in context inspector 2026-06-01 19:17:58 -07:00
reidliu41 c81cdabc09 feat(tui): add bang shell command shortcut
Support `! <command>` and `!command` in the TUI composer to run shell commands through the existing exec_shell path.

  The shortcut keeps normal approval, sandbox, policy, transcript, and work-panel handling, while avoiding model context
  pollution from local-only tool results.

  Refs #1546
2026-06-01 17:42:04 -07:00
cyq f185d46917 fix(tui): expose mention behavior in config 2026-06-01 17:33:41 -07:00
cyq 73cd721665 feat(tui): add mention browser completions 2026-06-01 17:33:41 -07:00
cyq 908a25d0f6 test(mcp): close stale-session mock responses cleanly 2026-06-01 17:30:05 -07:00
Hunter Bown cbd6239f3d docs: mark agent shell tools approval-gated 2026-06-01 17:23:23 -07:00
cyq 9e9326990d docs: polish mode availability table 2026-06-01 17:23:04 -07:00
cyq fda2141b70 docs: clarify shell tool mode availability 2026-06-01 17:23:04 -07:00
Hunter Bown ae2000b59a docs(tui): align statusline customization limits 2026-06-01 17:20:49 -07:00
cyq 9bd08c2f1c docs(tui): document statusline footer items 2026-06-01 17:20:05 -07:00
cyq 3db7b40458 docs(rebrand): address migration review notes 2026-06-01 17:19:26 -07:00