Commit Graph

6581 Commits

Author SHA1 Message Date
Tianyi Cui
4368c2d40c Merge branch 'master' into fix/translation-brief-uncommitted-pair 2026-07-29 20:54:30 +08:00
Tianyi Cui
77a536855b Merge pull request #894 from deepseek-harness/xjt/readme-proofreading-batch-1
docs(i18n): proofread README translations
2026-07-29 20:30:00 +08:00
xjt
795bdda223 Merge remote-tracking branch 'origin/master' into xjt/readme-proofreading-batch-1
# Conflicts:
#	packages/client/ui-primitives/README.i18n.yaml
#	packages/client/ui-primitives/README.zh.md
2026-07-29 20:21:48 +08:00
xjt
de0348bd9e docs(i18n): standardize reviewed README headings 2026-07-29 20:16:45 +08:00
Chinesezjc
a0534b7b8a Merge pull request #813 from deepseek-harness/feat/web-terminal-card
feat(web): render bash tool output as a terminal card
2026-07-29 19:53:42 +08:00
imccyu
c54bbc0f7e test(web): cover the spacer-write and dead-lead spacer branches 2026-07-29 19:38:43 +08:00
xjt
e1481e2d98 docs(i18n): resolve follow-up review findings 2026-07-29 18:38:56 +08:00
j-xiang
ed4a6fd026 docs(i18n): address automated review 2026-07-29 17:46:06 +08:00
j-xiang
644aef14c8 docs(i18n): correct finite option wording 2026-07-29 16:56:44 +08:00
j-xiang
5bd49b1f0e docs(i18n): address final line audit 2026-07-29 16:53:53 +08:00
Chinesezjc
dffb5c888f test(web): cover the normalized SGR fold and the wide-pair clear
CI's coverage gate rejected `ansi.ts` after the state normalization: the new
fold carries shapes the existing cases never reached.

Added, each expectation checked against a real terminal where the terminal is
the authority — three of my first guesses were wrong and the implementation
was right:

- `48;2;R;G;B` (the extended-background arm and its 4-parameter span), a bright
  foreground and background (`91`/`101`, which resolve to `--dsw-*` tokens
  rather than literal rgb), a `38` with no kind byte, re-opening an attribute
  already in force, and the bare `\x1b[m` reset.
- Clearing a wide pair from the spacer side: `中x\r\bA` shows `A x`, since the
  backspace clamps at column 0 and writing the lead blanks its spacer instead
  of letting the `x` slide left. An erase reaching the lead does the same, so
  `中x\x1b[1K|` shows three blanks before the bar.
2026-07-29 16:48:26 +08:00
Chinesezjc
fdcb45b619 fix(web): bound the SGR state and follow real terminal widths
Nine findings, one critical. Terminal cases verified in a real terminal first.

CRITICAL: cells held the accumulated SGR history, so every state boundary
re-emitted the whole chain — output switching color without a full reset
emitted O(n^2) characters. Measured: 3200 such cells produced 25 MB, and the
reviewer's ~90 KB alternating-color case is well under bash's own output cap.
State is now a normalized record (foreground, background, attribute set) with
one canonical sequence per boundary, so the emitted text is linear in cells;
the 90 KB case parses in 36 ms. That also makes the attribute closers every
chalk-based tool writes actually close: `\x1b[1mbold\x1b[22mplain` leaves the
following write PLAIN, which a real terminal confirms.

Width follows emoji presentation, not the U+2600-U+27BF block: `A✓B` redrawn
with `XY` shows `XYB`, so the check every progress line writes is ONE column.
Taking the block as wide misaligned exactly the output this card exists for.

Writing over either half of a wide pair blanks the other, since a terminal
cannot leave one cell of a two-cell glyph standing.

`line\n\x1b[0m` does not end in a newline as a string yet its last parsed line
holds nothing visible, so the terminator check now reads the parsed lines — it
had added a blank row and inflated the collapse count.

A line with no cursor movement no longer builds a column buffer at all; only
its SGR is folded, so an `ls -R` or a 5k-line log allocates nothing per
character.

The `.terminalDescription` rule had been inserted into an existing grouped
selector, silently giving `.codeBody` description typography and changing its
bottom margin from 4px to 0 — a pre-existing surface this PR does not own.
Split out, `.codeBody`'s margin restored.

Three comments contradicted their code: the fixture's exit-marker line (still
claiming recovery from a marker deliberately removed), `bash-sample`'s header
(still routing a click to the details panel, and calling the consumer's cap the
block's own), and a DetailsPanel comment stacked above the wrong rule. The
ui-primitives README documented only the CR/BS half of the replay, so a reader
would expect `OK0%` where `100%\r\x1b[KOK` renders `OK`.
2026-07-29 16:42:10 +08:00
Chinesezjc
4145cd7075 test(web): cover the cursor replay's remaining branches
CI's coverage gate caught `ansi.ts` at 95.31% branches. My local check had
scoped coverage to that one file, which measures a different test set than
the gate does — the gate is the authority and it was right.

Three branches. Two are now pinned, each verified in a real terminal first:

`ab\r` + U+0301 + `x` shows `xb` — the redraw leaves the cursor at column 0,
so a combining mark has no cell to attach to and the terminal shows nothing
for it. It also revealed that the mark was kept when `cursor` was 0, which is
fixed.

`ab\rX\x1b[31m` then a plain line shows `Xb` unstyled and the next line RED:
the mirror of the reset case, where the scan ends styled while the last cell
is not, so the convergence has to OPEN the run at the line end for it to
reach the following line.

The third was `?? ''` on a `String.split` result, which always yields at
least one element — removed rather than tested, since no input can reach it.
2026-07-29 16:20:01 +08:00
Chinesezjc
b588060b90 fix(web): close a run at the line end and count columns correctly
Eight findings, each terminal case verified in a real terminal first:

`\x1b[32mdone\rok\x1b[0m` then `plain` shows `okne` green and `plain` in the
DEFAULT color. The replay returned the last written cell's state, so a reset
landing after the final write vanished from both the text and the returned
state — and every build tool writes exactly that shape, so the color leaked
onto all later output. The replay now converges to the state the scan ended
in, which is also what it hands to the next line.

`abcd\b\x1b[1K|` shows `   |`: CSI 1K erases THROUGH the cursor column, and
the loop stopped before it. The erase mode also reads only the first
parameter now, since a terminal treats `1;2K` exactly as `1K`.

`éx\rYZ` shows `YZ`: a combining mark takes no column, so it attaches
to the cell already written instead of advancing the cursor and leaving the
`x` standing.

`中x\rA` shows `A x`: overwriting a wide character's lead cell leaves its
spacer as a blank rather than closing the gap, which would shift everything
after it one column left.

The banner lost its span when the gutter became padding — a plain block child
only reaches the content box, so the reserved column was painted in the body
color and the card's top-left radius drawn in it. Invisible in the light
theme, where banner and body share a token; visible in the dark one. The
header now pulls back across the gutter and re-insets by the same amount.

The replay trigger matches the same CSI shape the parser accepts, so a form
like `\x1b[1;2K` can no longer skip its own erase, and `replayLine`'s JSDoc
documents its new parameter and returned pair.

Docs: four places still described the dot as sitting left of the card surface,
which stopped being true when the gutter became the card's own padding, and
two fixture comments still referenced the exit marker that was deliberately
removed.
2026-07-29 16:10:37 +08:00
j-xiang
94b2862e12 Merge remote-tracking branch 'origin/master' into xjt/readme-proofreading-batch-1 2026-07-29 15:47:00 +08:00
Chinesezjc
c87a20b506 Merge remote-tracking branch 'origin/master' into feat/web-terminal-card
# Conflicts:
#	packages/client/ui-conversation/README.i18n.yaml
#	packages/client/ui-conversation/README.md
#	packages/client/ui-conversation/README.zh.md
2026-07-29 15:44:58 +08:00
j-xiang
c44d2cc2b4 docs(i18n): fix proofreading review findings 2026-07-29 15:37:42 +08:00
Chinesezjc
43de478d10 fix(web): model erase-in-line, tab stops, and cross-line SGR
Six findings. Each terminal-semantics case was checked in a real terminal
(tmux, reading back the painted screen) before changing anything:

`100%\r\x1b[KOK` shows `OK`. Modelling the `\r` without its erase left the
previous frame's tail standing — a regression against the old truncate, since
`\r\x1b[K` is the single idiom every spinner and progress bar writes. Erase is
now part of the same replay, in all three parameter forms.

`a\tb\rXY` shows `XY      b`. Counting a tab as one column produced `XYb` and
destroyed the alignment this card exists to hold, so the cursor now advances
by terminal columns: tabs reach the next 8-column stop and a wide character
takes two cells.

`\x1b[31mabc\rX\nnext` paints BOTH lines red. A newline does not reset the
graphic state, so state threads from one replayed line to the next instead of
closing at each line end.

Only `m` accumulates into a cell's style now. Folding cursor and erase
sequences in grew the state string per redraw and emitted boundaries anser
had to discard.

The empty check reads the parsed lines the card renders rather than the raw
text: output that is only escapes or control bytes survives `trim()` yet
parses to nothing, and drew blank rows plus a copy control for invisible
bytes instead of the placeholder.

The gutter is the card's own left padding rather than a margin. Every render
site rewrites `margin` wholesale for its own indent, which silently cancelled
the reservation and let a container clip the dot.

The fixture sample no longer carries an `[exit code: 1]` line: the real bash
presenter consumes that marker precisely because the card shows the exit as
its own pill, so the built-bundle snapshot had pinned a frame showing it
twice — one the product path cannot produce.
2026-07-29 15:36:16 +08:00
imccyu
87c9ab06b3 Merge pull request #878 from deepseek-harness/xtr/dsh-source-launch-tsx-esm
feat(cli): launch dsh source through the tsx ESM hook
2026-07-29 15:35:00 +08:00
j-xiang
599e6edc87 docs(i18n): record proofread README pairs 2026-07-29 15:30:44 +08:00
j-xiang
6061c7f8ed docs(i18n): proofread README translations 181-186 2026-07-29 15:29:39 +08:00
j-xiang
bc7086a087 docs(i18n): proofread README translations 161-180 2026-07-29 15:29:39 +08:00
j-xiang
a37097846b docs(i18n): proofread README translations 141-160 2026-07-29 15:29:38 +08:00
j-xiang
57b01e68d3 docs(i18n): proofread README translations 121-140 2026-07-29 15:29:38 +08:00
j-xiang
f6c8fe4dcb docs(i18n): proofread README translations 101-120 2026-07-29 15:29:38 +08:00
j-xiang
42840394c4 docs(i18n): proofread README translations 81-100 2026-07-29 15:29:38 +08:00
j-xiang
e7c04d5582 docs(i18n): proofread README translations 61-80 2026-07-29 15:29:38 +08:00
j-xiang
fff7f9cb3e docs(i18n): proofread README translations 41-60 2026-07-29 15:29:38 +08:00
j-xiang
90c75be466 docs(i18n): proofread README translations 21-40 2026-07-29 15:29:38 +08:00
j-xiang
333b4bcd30 docs(i18n): proofread README translations 1-20 2026-07-29 15:29:24 +08:00
j-xiang
46e1e86c76 docs(i18n): bind reviewed README terminology 2026-07-29 15:29:03 +08:00
imccyu
4da1026956 Merge branch 'master' into xtr/dsh-source-launch-tsx-esm 2026-07-29 15:29:00 +08:00
imccyu
59ecfac776 Merge pull request #880 from deepseek-harness/feat/agent-action
feat(ui-conversation): implement finalized IconActions with clock for user and assistant messages
2026-07-29 15:17:45 +08:00
07akioni
c8ea9a5204 fix(ui-conversation): share MessageIconActions to clear jscpd clone
User and assistant chrome both rendered copy/branch buttons; one shared
row owns the chrome and keeps clock placement / edit as props.
2026-07-29 15:11:06 +08:00
07akioni
59c0f92cb6 Merge branch 'master' into feat/agent-action 2026-07-29 15:09:04 +08:00
imccyu
c2a757e04c Merge pull request #873 from deepseek-harness/fix/web-details-session-lifecycle
fix(web): close details on Session owner changes
2026-07-29 15:06:26 +08:00
imccyu
f7f51e29dc Merge branch 'master' into fix/web-details-session-lifecycle 2026-07-29 15:02:39 +08:00
Tianyi Cui
c451b63016 Merge pull request #879 from deepseek-harness/agent/fix-copied-worktree-hooks
fix(dev-infra): migrate copied worktree hooks
2026-07-29 14:59:14 +08:00
Tianyi Cui
2e7ac0d7f2 Merge branch 'master' into agent/fix-copied-worktree-hooks 2026-07-29 14:55:36 +08:00
imccyu
66d650e4fb refactor: simplify sidebar logics 2026-07-29 14:52:41 +08:00
07akioni
972b3f3a30 fix(ui-conversation): document writeClipboard @param for export JSDoc gate 2026-07-29 14:47:26 +08:00
Chinesezjc
612b3c7c4e Merge remote-tracking branch 'origin/master' into feat/web-terminal-card
# Conflicts:
#	packages/client/ui-conversation/README.i18n.yaml
2026-07-29 14:45:23 +08:00
Chinesezjc
f378873b22 fix(web): replay cursor movements the way a terminal paints them
Carriage return and backspace only MOVE the cursor; neither erases. Both of
my earlier approximations were wrong, and I checked each case against a real
terminal rather than reasoning about it:

`100%\rOK` shows `OK0%`, not `OK` — the redraw is shorter than the frame
beneath it, so the tail stands. `abc\b` still shows `abc`, not `ab` — a
trailing backspace has nothing to overwrite. `\x1b[31mgone\rkept` paints
`kept` RED, because a carriage return does not reset the graphic state, which
one of my own tests had asserted the opposite of.

Both now replay into a per-line column buffer with SGR state stamped per
column, as a terminal stores it per cell. That gives the partial-overwrite
case its real result too: red `bad`, three backspaces, then `ok` shows `okd`
with the `d` still red, since `ok` reached only two of the three cells.

The presenter description now also renders at every site. An expanded row
draws it itself — the collapsed summary is hidden while open, so otherwise
the description was visible only collapsed, the opposite of "above the card"
— and the details panel draws it above the card as well.

Three of my own tests encoded the wrong semantics and were corrected with
their behavior, and the emit loop's gap-filling arm was removed as
unreachable: `\r` and backspace only move left, so no column can be unwritten.
2026-07-29 14:39:21 +08:00
07akioni
f14ac52901 Merge branch 'master' into feat/agent-action 2026-07-29 14:39:13 +08:00
Tianyi Cui
707bd8bd5d Merge pull request #840 from deepseek-harness/codex/allow-rewrite-pushed-pr-history
docs: allow rewriting pushed PR history
2026-07-29 14:34:07 +08:00
07akioni
4aa1aa4a66 test(web): refresh aria goldens for message IconActions and clocks
Settled history now exposes user/assistant chrome (including date-aware
clocks) in the accessibility tree; collapse clocks via scaffold and update
keyless scenario goldens.
2026-07-29 14:30:09 +08:00
Tianyi Cui
54dfe425d5 Merge branch 'master' into codex/allow-rewrite-pushed-pr-history 2026-07-29 14:29:21 +08:00
07akioni
afab428c0c Merge branch 'master' into feat/agent-action 2026-07-29 14:21:44 +08:00
kingwl
d0393106cc docs: regenerate module graph for the dsh-llm declarations
verify-module-graph caught that the plan-mode/tool-tasks dependency fix
was not reflected in the generated graph.
2026-07-29 13:51:57 +08:00
imccyu
665eadbc1d Merge pull request #572 from deepseek-harness/web-permission-sandbox
feat(web): permission presets and approval answering for the web UI
2026-07-29 13:46:39 +08:00