Commit Graph

1053 Commits

Author SHA1 Message Date
Hunter Bown cc76f5d9dd Merge remote-tracking branch 'origin/rebrand/r4-docs-readme' into work/v0.8.41-codewhale-ready 2026-05-23 13:18:53 -05:00
Hunter Bown 3a60a28791 Merge remote-tracking branch 'origin/rebrand/r2-binary-names' into work/v0.8.41-codewhale-ready 2026-05-23 13:18:49 -05:00
Hunter Bown cd84ede8ab Merge remote-tracking branch 'origin/rebrand/r1-cargo-workspace' into work/v0.8.41-codewhale-ready 2026-05-23 13:18:47 -05:00
Hunter Bown 9e822a3576 fix(tui): hide stale completed tasks from Work sidebar
Filter old terminal task records out of the Work sidebar while keeping active and recent task state visible.
2026-05-23 13:18:21 -05:00
Hunter Bown 96b903aa39 fix(tui): filter terminal control sequence fragments from composer
Prevent leaked OSC/Kitty terminal control fragments from landing in composer input while preserving legitimate overlapping user text.
2026-05-23 13:18:00 -05:00
Hunter Bown 6356a810c5 fix(tui): launch feedback urls asynchronously
Keep feedback URL launching off the UI path so feedback actions do not stall interactive input.
2026-05-23 13:17:51 -05:00
Hunter Bown ee47d64597 fix(tui): quiet animations under tmux
Force low-motion terminal behavior under tmux/screen and keep the fallback footer label stable so passive animations do not register as activity.
2026-05-23 13:06:57 -05:00
Hunter Bown 4143409208 fix(tui): detach clipboard fallback waits
Detach clipboard fallback helpers from the Enter hot path so terminal paste/clipboard probing cannot stall submission.
2026-05-23 13:06:46 -05:00
Hunter Bown c675fe64d2 fix(tui): offload offline queue persistence
Move offline queue persistence off the UI hot path so Enter handling does not wait on synchronous disk work.
2026-05-23 13:06:32 -05:00
Hunter Bown 7a87aebec7 fix(tui): move composer history persistence off UI thread
Move composer history persistence off the Enter hot path so submitting messages does not block the TUI event loop.
2026-05-23 13:05:59 -05:00
Hunter Bown d9fb21c0a0 fix(tui): avoid blocking on bare separator mentions
Skip bare separator and dot tokens during @-mention completion so Windows and WSL2 workspaces do not trigger an eager filesystem walk on the UI thread.
2026-05-23 13:05:48 -05:00
Hunter Bown c09f5bf039 fix(subagent): keep agent_eval recoverable after child termination
Keep agent_eval recoverable after a child session terminates by preserving the available transcript result instead of losing the final output.
2026-05-23 13:05:36 -05:00
Hunter Bown ac6fdf4da9 Merge branch 'main' into rebrand/r1-cargo-workspace 2026-05-23 12:50:54 -05:00
Hunter Bown b7e31a734b test: isolate tool-result spillover tests
Isolate SHA spillover tests with the existing guard and a temporary spillover root so Windows parallel test runs cannot race shared spillover state.
2026-05-23 12:50:02 -05:00
Hunter Bown a3acdbe70b docs(brand): rename to codewhale across READMEs and docs
Sweep brand mentions of `DeepSeek TUI` / `deepseek-tui` / bare
`deepseek` (the dispatcher binary) across all user-facing docs to
the new `codewhale` brand. The DeepSeek **provider** integration is
left untouched throughout: env vars (`DEEPSEEK_*`), model IDs
(`deepseek-v4-pro`, `deepseek-v4-flash`, `deepseek-chat`,
`deepseek-reasoner`), the `api.deepseek.com` host, the
`~/.deepseek/` config dir, and the `--provider deepseek` argument
value all keep the legacy spelling.

Anti-scope items deliberately left as the legacy `deepseek-tui`:

- Homebrew tap and formula (`Hmbown/homebrew-deepseek-tui`,
  `brew install deepseek-tui`, `scoop install deepseek-tui`). The
  tap rename ships separately.
- Docker image (`ghcr.io/hmbown/deepseek-tui`). Image-tag rename
  ships separately.
- CNB mirror namespace (`cnb.cool/deepseek-tui.com/DeepSeek-TUI`).
  Third-party hosted path.
- Security contact email (`security@deepseek-tui.com`).
- GitHub repo URL (`Hmbown/DeepSeek-TUI`).

New artifact:

- `docs/REBRAND.md` documents what changed, what didn't, the
  deprecation window, and migration commands for npm / Cargo /
  Homebrew / manual installs.

CHANGELOG entries:

- Root `CHANGELOG.md` and `crates/tui/CHANGELOG.md` both gain a
  new `[Unreleased]` section describing the rename and the one-
  release deprecation window. Historical entries are untouched.

Issue templates:

- `.github/ISSUE_TEMPLATE/bug_report.md` and `feature_request.md`
  refer to "codewhale" / `codewhale --version` instead of the old
  brand name in their environment fields.

The rebrand sweep was driven by a perl script with bulk patterns
(`deepseek-tui` -> `codewhale-tui`, `DeepSeek TUI` -> `codewhale`,
bare `deepseek` -> `codewhale` with provider/model/host/env-var/
config-path negative lookbehind/lookahead) followed by targeted
reverts for the anti-scope items above. Output was visually
reviewed file-by-file before committing.

Verified:

- `cargo check --workspace --all-targets --locked` — pass.
- `cargo test --workspace --all-features --locked` — pass (no
  test source touched here; suite stayed green to confirm no
  doc-from-string assertions broke).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 11:25:48 -05:00
Hunter Bown 8da9fb7d52 test(qa-pty): retarget harness at codewhale-tui binary
The qa_pty integration tests booted the canonical TUI via
`Harness::cargo_bin("deepseek-tui")`. After the previous commit
renamed the canonical bin to `codewhale-tui` and made `deepseek-tui`
a tiny deprecation shim that forwards to it via PATH, those tests
launched the shim and hung waiting for a TUI frame because the
sealed PATH in the test sandbox has no `codewhale-tui`.

Point the harness at `cargo_bin("codewhale-tui")` directly. Also
add a `CARGO_BIN_EXE_codewhale-tui` compile-time fallback in the
harness so older Cargo versions still work, alongside the existing
legacy `deepseek-tui` fallback.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 11:11:11 -05:00
Hunter Bown 3efa6aad7d feat(cli): rename binaries to codewhale; keep deepseek aliases
Rename the canonical binaries:
  - `deepseek` → `codewhale` (CLI dispatcher)
  - `deepseek-tui` → `codewhale-tui` (TUI runtime)

Both legacy names continue to ship as tiny deprecation shims that print
a one-line warning to stderr and forward argv to the new binary. The
shims are produced by two new `[[bin]]` entries in `crates/cli/Cargo.toml`
and `crates/tui/Cargo.toml` pointing at small source files under
`src/bin/`. They will be removed in v0.9.0.

Touchpoints:
- Cargo bin entries + new shim source files.
- clap `name`/`bin_name`/usage strings flip to `codewhale`.
- Dispatcher's sibling-binary discovery looks for `codewhale-tui` and
  reports `codewhale` in its error/help prose. `DEEPSEEK_TUI_BIN` env
  var stays — env vars are explicitly anti-scope.
- `update.rs` now downloads `codewhale-*` assets and verifies them
  against `codewhale-artifacts-sha256.txt`. Legacy `deepseek-*` assets
  and `deepseek-artifacts-sha256.txt` are still produced by the release
  matrix so v0.8.40's `deepseek update` keeps working through one
  transition release.
- `ci.yml`, `nightly.yml`, `release.yml` updated to build/upload the new
  canonical binaries; `release.yml`'s matrix doubles to also ship the
  legacy shim binaries so v0.8.40 update clients land on the shim.
- `scripts/release/crates.sh` and `check-versions.sh` updated for the
  renamed crate names from R1.

Local gates green: `cargo check --workspace --all-targets --locked`,
`cargo fmt --all -- --check`, `cargo clippy --workspace --all-targets
--all-features --locked -- -D warnings`, `cargo test --workspace
--all-features --locked` (3226+ pass, 0 fail), and `cargo build
--release` produces all four binaries:
  - target/release/codewhale       (canonical dispatcher)
  - target/release/codewhale-tui   (canonical TUI)
  - target/release/deepseek        (legacy shim, forwards to codewhale)
  - target/release/deepseek-tui    (legacy shim, forwards to codewhale-tui)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 10:48:41 -05:00
Hunter Bown c6d73d98de refactor(crates): rename workspace members to codewhale-*
Rename the 14 workspace member crates from `deepseek-*` (and
`deepseek-tui-*`) to `codewhale-*`. Internal-only — binary names
(`deepseek` and `deepseek-tui`) are intentionally untouched in this
phase; they move in the next phase along with the deprecation shims.

Affects:
- 14 `[package] name = "..."` declarations.
- All inter-crate `[dependencies]` entries that referenced the old
  package names.
- All `use deepseek_*::...` statements rewritten to `use codewhale_*`.
- Cargo.lock regenerated.

CI workflows and release scripts that pass `-p deepseek-*` still
reference the old names; those move with the binary rename phase so
that pair lands together.

Local gates green: `cargo check --workspace --all-targets --locked`,
`cargo fmt --all -- --check`, `cargo clippy --workspace --all-targets
--all-features --locked -- -D warnings`, `cargo test --workspace
--all-features --locked` (3226+ pass, 0 fail).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 10:21:33 -05:00
Hunter Bown 1ca495f5a3 style: cargo fmt 2026-05-21 16:22:23 +08:00
Zhongyue Lin a5501e608a fix(client): keep mutation-tool result confirmations off wire dedup (#1695)
Co-Authored-By: LeoLin990405 <126708262+LeoLin990405@users.noreply.github.com>
2026-05-21 03:21:42 -05:00
Hunter Bown faf5e07adb feat(tui): add Fin tool-agent and screenshot OCR 2026-05-21 10:47:14 +08:00
Hunter Bown 3c95eadc22 test(tui): satisfy model picker lint 2026-05-21 09:51:18 +08:00
Hunter Bown 396b0e822b fix(tui): persist model picker effort 2026-05-21 09:45:03 +08:00
Hunter Bown 26c66079ba fix(tui): persist selected model mode 2026-05-21 09:15:52 +08:00
Hunter Bown 67fb788110 fix(tui): harvest final v0.8.40 polish 2026-05-21 08:45:04 +08:00
Hunter Bown b639740b73 chore: bump CHANGELOG date to 2026-05-21 for v0.8.40 release 2026-05-21 06:52:48 +08:00
Hunter Bown 66b4a5fd59 fix(tui): rank exact slash aliases first 2026-05-21 01:00:18 +08:00
Hunter Bown 9f0ff4be93 fix(subagents): allow explicit write-role edits 2026-05-21 00:54:27 +08:00
Hunter Bown ad122fd6f8 feat(subagents): make step API timeout configurable 2026-05-21 00:45:04 +08:00
Hunter Bown 2c642ec375 feat(session): fork conversations inside the TUI 2026-05-21 00:24:52 +08:00
Hunter Bown d065241c93 fix(tui): clear all displayed cost state 2026-05-21 00:13:02 +08:00
Hunter Bown 6821f294e2 fix(rlm): decode stdout lossily 2026-05-21 00:12:59 +08:00
Hunter Bown ae1bb9dd95 fix(tui): avoid grayscale luma overflow 2026-05-21 00:12:55 +08:00
Hunter Bown f8aa5b95e0 docs(subagents): clarify detached session lifecycle 2026-05-21 00:03:17 +08:00
Hunter Bown 0e222ed0bd fix(review): parse encoded JSON output 2026-05-21 00:03:02 +08:00
Hunter Bown eed4c2dfa6 fix(eval): preserve quoted shell payloads 2026-05-21 00:02:52 +08:00
Hunter Bown a595edd56d fix(logging): rotate TUI logs per process 2026-05-21 00:02:41 +08:00
Hunter Bown e63a4ba4a9 fix(tui): preserve drafts around mouse reports 2026-05-21 00:02:11 +08:00
Hunter Bown 8597afc076 feat(provider): add Wanjie Ark support 2026-05-21 00:02:02 +08:00
Hunter Bown d106773178 test(shell): stabilize Windows background helper 2026-05-20 23:57:38 +08:00
Hunter Bown 912da38cca chore(release): prepare v0.8.40 2026-05-18 23:29:20 +08:00
Nightt 4144fc6a2b test(tui): cover steer prompt restore state 2026-05-18 23:07:22 +08:00
Nightt 710505db76 fix(tui): stop rendering after cancel restore 2026-05-18 23:07:22 +08:00
Nightt 4a03f83997 fix(tui): restore cancelled prompt on ctrl-c 2026-05-18 23:07:22 +08:00
Paulo Aboim Pinto ba8b4b7adf fix: remove skip-past-newline from move_cursor_line_end
Per gemini-code-assist review on #1749: End on a newline character
should stay at the end of the current line (idempotent), not skip
to the next line.  Removes the non-standard skip-past-newline logic
and updates the associated tests.
2026-05-18 23:07:13 +08:00
Paulo Aboim Pinto f77a07e207 feat: Home/End jump to line start/end in multiline composer
Plain Home and End now navigate within the current line instead of
jumping to the absolute start/end of the entire input.  Ctrl+A and
Ctrl+E remain as absolute start/end shortcuts.

- Add move_cursor_line_start() / move_cursor_line_end() to App
- Wire Home -> move_cursor_line_start(), End -> move_cursor_line_end()
- On single-line input the new methods behave identically to the
  absolute versions (no behaviour change)
- End on a newline character skips to the end of the next line
- 14 tests covering multiline, singleline, and edge cases
2026-05-18 23:07:13 +08:00
Zhongyue Lin 0ce41505bc fix(shell): robust cmd detection + stronger test assertion (review #1744)
Address gemini-code-assist review on PR #1744 (two MEDIUM):

- cmd detection used program.eq_ignore_ascii_case("cmd"), which fails
  for a full path (C:\Windows\System32\cmd.exe) or a .exe suffix, so the
  raw_arg quoting fix would not apply. Use Path::file_stem() instead
  (fully-qualified std::path::Path -> no unused import off-Windows).
- Strengthen the Windows block of issue_1691_quoted_commit_message_round_trips
  to assert argv content equals spec.args, not just arg count, so the
  raw_arg payload (quotes preserved, no extra escaping) is actually
  verified. sandbox/mod.rs already asserts content -- left untouched.

Windows paths are cfg-gated (compile-checked on macOS, executed on
Windows CI). macOS build + clippy clean.

Refs #1691.
2026-05-18 23:06:52 +08:00
Zhongyue Lin b3223cd48d fix(shell): preserve quoted args on Windows cmd /C invocation (#1691)
git commit -m "feat: complete sub-pages" failed on Windows with
'pathspec sub-pages" did not match' because the quoted -m message was
split on spaces. Root cause is not a tokenizer bug: CommandSpec::shell()
builds 'cmd /C "chcp 65001 >/dev/null & <command>"' and std::process::Command
applies MSVCRT escaping (" -> \"); cmd.exe does not use MSVCRT parsing,
so the quoting is destroyed and git receives feat:/complete/sub-pages"
as separate pathspecs. The Unix sh -c path was already correct.

Add a cfg-split push_shell_args() replacing cmd.args() at the 3 std
spawn sites in shell.rs. On Windows, for the cmd /C <payload> shape
only, pass /C and payload via CommandExt::raw_arg so the string reaches
cmd.exe verbatim (as a terminal does); other programs keep normal
escaping. Non-Windows is a faithful pass-through (byte-for-byte
unchanged). portable_pty path intentionally untouched (out of scope).

The Unix path is provably unchanged (tested); the Windows raw_arg
runtime correctness is only verifiable on a Windows runner -- flagged in
the PR for Windows CI verification per the #1736 Windows policy.

Refs #1691, #1736.
2026-05-18 23:06:52 +08:00
Zhongyue Lin 351898d05f fix(tui): emit thinking-only notice only at true turn end (review #1742)
Address gemini-code-assist review on PR #1742 (MEDIUM): the status was
emitted at the assistant-persist site, but the same turn can still
CONTINUE for pending steers or sub-agent completions -- the user would
see a spurious 'turn ended without output' notice immediately before the
turn resumed.

Capture thinking_only_no_sendable at the persist site (no emission
there) and decide at the end of the tool_uses.is_empty() path, just
before the terminal break -- reachable only when there were no pending
steers, no sub-agent completions, and we were not holding for running
children. Extend should_emit_thinking_only_status with steers_pending
and holding_for_subagents (false if either), recomputed live at the
decision point as defense-in-depth. Unit test updated with the two new
no-emit cases.

Refs #1727.
2026-05-18 23:06:52 +08:00
Zhongyue Lin 4ab7c53442 fix(tui): surface thinking-only turns instead of silently ending (#1727)
When a model streams a turn with only a reasoning block (empty content,
no tool_calls -- e.g. gpt-oss via ollama's harmony->OpenAI shim mapping
to reasoning_content), has_sendable_assistant_content is false: the
if-only persist branch was skipped, NO event was emitted, and the turn
fell through to break. The UI spinner hung with no reply and no error.

Add an else-if at the same persist site that, only on a clean end
(tool_uses empty, turn_error.is_none(), not cancelled), warns and emits
an Event::status notice telling the user the turn ended and they can
retry. No assistant message is persisted (prior behavior preserved); no
retry/re-prompt/placeholder policy is added (out of scope). Guard
ordering extracted into a pure should_emit_thinking_only_status() helper
with a unit test, matching the existing should_hold_turn_for_subagents
style. Maintainer audit #1736 confirms #1727 is not shipped in v0.8.39
and release-blocking.

Refs #1727, #1736.
2026-05-18 23:06:52 +08:00