Skip to content

Commit e555cc4

Browse files
committed
Polish responsive UI and skip docs-only builds
1 parent 1db5b48 commit e555cc4

16 files changed

Lines changed: 1006 additions & 345 deletions

‎.github/workflows/ci.yml‎

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,82 @@ concurrency:
1515
cancel-in-progress: true
1616

1717
jobs:
18+
changes:
19+
name: Classify changes
20+
runs-on: ubuntu-24.04
21+
outputs:
22+
docs_only: ${{ steps.classify.outputs.docs_only }}
23+
24+
steps:
25+
- name: Check out source
26+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
27+
with:
28+
fetch-depth: 0
29+
30+
- name: Classify documentation-only changes
31+
id: classify
32+
shell: bash
33+
env:
34+
EVENT_NAME: ${{ github.event_name }}
35+
BEFORE_SHA: ${{ github.event.before }}
36+
BASE_SHA: ${{ github.event.pull_request.base.sha }}
37+
HEAD_SHA: ${{ github.sha }}
38+
run: |
39+
set -euo pipefail
40+
41+
if [[ "$EVENT_NAME" == "workflow_dispatch" ]]; then
42+
echo "docs_only=false" >> "$GITHUB_OUTPUT"
43+
exit 0
44+
fi
45+
46+
if [[ "$EVENT_NAME" == "pull_request" ]]; then
47+
base="$BASE_SHA"
48+
else
49+
base="$BEFORE_SHA"
50+
fi
51+
52+
if [[ -z "$base" || "$base" =~ ^0+$ ]] ||
53+
! git cat-file -e "$base^{commit}" 2>/dev/null; then
54+
echo "docs_only=false" >> "$GITHUB_OUTPUT"
55+
exit 0
56+
fi
57+
58+
mapfile -d '' changed_files < <(
59+
git diff --name-only -z "$base" "$HEAD_SHA"
60+
)
61+
if [[ "${#changed_files[@]}" -eq 0 ]]; then
62+
echo "docs_only=false" >> "$GITHUB_OUTPUT"
63+
exit 0
64+
fi
65+
66+
docs_only=true
67+
for path in "${changed_files[@]}"; do
68+
lowercase_path="${path,,}"
69+
case "$lowercase_path" in
70+
*.md | docs/*)
71+
;;
72+
*)
73+
docs_only=false
74+
break
75+
;;
76+
esac
77+
done
78+
79+
echo "docs_only=$docs_only" >> "$GITHUB_OUTPUT"
80+
81+
documentation:
82+
name: Documentation only
83+
needs: changes
84+
if: needs.changes.outputs.docs_only == 'true'
85+
runs-on: ubuntu-24.04
86+
steps:
87+
- name: Confirm documentation-only change
88+
run: echo "Only Markdown or docs/ files changed; build jobs are skipped."
89+
1890
validate:
1991
name: ${{ matrix.name }}
92+
needs: changes
93+
if: needs.changes.outputs.docs_only != 'true'
2094
runs-on: ${{ matrix.runner }}
2195
timeout-minutes: 30
2296
strategy:
@@ -208,6 +282,8 @@ jobs:
208282
209283
minimum-rust:
210284
name: Minimum Rust 1.88
285+
needs: changes
286+
if: needs.changes.outputs.docs_only != 'true'
211287
runs-on: ubuntu-24.04
212288
timeout-minutes: 15
213289

‎BUILDING.md‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,13 @@ If the local machine cannot run Linux, use GitHub Actions, a Linux VM, or a
109109
Linux host you control. Do not mark the change complete or describe it as
110110
Linux-supported until that validation has actually passed.
111111

112+
The CI workflow classifies every push and pull request before starting the
113+
build matrix. When every changed path is either a Markdown file or is under
114+
`docs/`, CI records a successful documentation-only job and skips the Node,
115+
Rust, Windows, and Linux build jobs. Any source, script, workflow,
116+
configuration, lockfile, or other non-documentation change runs the complete
117+
matrix. A manual `workflow_dispatch` always runs the complete matrix.
118+
112119
Documentation must describe the current source and verified behavior. Check
113120
CLI flags, environment variables, dependency versions, build commands,
114121
package contents, UI labels, platform support, and known limitations instead
@@ -933,13 +940,13 @@ For a disposable manual peer smoke:
933940
1. start a package on an unused port and with an isolated `--state-dir`;
934941
2. open **@cwt** from a running source tab;
935942
3. choose a different ready agent and a disposable reviewer directory that is
936-
not the source directory, then use **Source ready — Prepare handoff** at an
943+
not the source directory, then use **Prepare summary** at an
937944
empty source prompt;
938-
4. verify the preview, then use **Reviewer ready — Send** at an empty reviewer
945+
4. verify the preview, then use **Send to reviewer** at an empty reviewer
939946
prompt;
940947
5. verify a new linked reviewer tab was created in the selected reviewer
941948
directory and the source directory did not change;
942-
6. use **Source ready — Return**, then issue **Recheck** and confirm the same
949+
6. use **Return to source**, then issue **Recheck** and confirm the same
943950
reviewer `terminalId` and `sessionId` remain;
944951
7. close the reviewer and confirm the source is still running;
945952
8. stop the disposable server.

‎OPERATIONS.md‎

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -610,14 +610,14 @@ normal tab, even when a matching agent appears idle.
610610

611611
The operational sequence is:
612612

613-
1. choose the reviewer agent, working folder, and action, then use **Source
614-
ready — Prepare handoff** while the source is at an empty agent prompt;
613+
1. choose the reviewer agent, working folder, and action, then use **Prepare
614+
summary** while the source is at an empty agent prompt;
615615
2. wait for the source agent to submit a bounded handoff;
616-
3. inspect or edit **Preview handoff**;
617-
4. use **Reviewer ready — Send** while the reviewer is at an empty agent
616+
3. inspect or edit **Preview summary**;
617+
4. use **Send to reviewer** while the reviewer is at an empty agent
618618
prompt;
619619
5. wait for **Response ready**;
620-
6. use **Source ready — Return** while the source is at an empty agent prompt;
620+
6. use **Return to source** while the source is at an empty agent prompt;
621621
7. use a follow-up or **Recheck** to retain that same reviewer context.
622622

623623
Concrete example: from a Codex source tab, choose **Verify** with Claude and
@@ -627,8 +627,8 @@ missing Windows/Linux tests.` Inspect the generated handoff before dispatch.
627627
The dedicated reviewer starts in the selected directory without changing any
628628
ordinary tab. Return Claude's response to the same Codex source, then use
629629
**Recheck** for another pass that retains Claude's reviewer context and
630-
working directory. Use **+ New peer** only when a clean reviewer conversation
631-
is intentional.
630+
working directory. Use **+ New reviewer** only when a clean reviewer
631+
conversation is intentional.
632632
It is disabled when session capacity is full, while follow-ups on an existing
633633
reviewer remain available. One reviewer thread retains at most 32 turns; close
634634
it and start a clean peer after reaching that boundary. The broker permits at
@@ -660,8 +660,10 @@ shutdown disables new capabilities and revokes existing ones before releasing
660660
the private listener; an unexpected private-listener exit also stops the
661661
public service.
662662

663-
The readiness-labelled buttons are an explicit operator acknowledgement, not
664-
an inferred state. The corresponding API requests require `sourceReady: true`
663+
**Prepare summary**, **Send to reviewer**, and **Return to source** are an
664+
explicit operator acknowledgement that the named terminal is at an empty
665+
prompt, not an inferred state. The corresponding API requests require
666+
`sourceReady: true`
665667
or `reviewerReady: true`, and delivery is rejected if the PTY generation has
666668
changed. Do not confirm readiness while the CLI is showing a permission,
667669
login, trust, or first-run prompt, or while text is partially entered.
@@ -777,8 +779,9 @@ left to the browser or operating system.
777779
### Mobile keys
778780

779781
Shows or hides the mobile toolbar. Its order begins with Enter and the arrow
780-
keys, followed by Page Up/Down, Ctrl mode, Esc, Tab, Ctrl+C, Ctrl+L, Top, Live,
781-
and Hide.
782+
keys, followed by Esc, Ctrl+C, Tab, Ctrl mode, Page Up/Down, Ctrl+L, Top, Live,
783+
and Hide, so the interrupt keys stay inside the first screenful on a narrow
784+
phone.
782785

783786
- **PgUp/PgDn** moves through xterm's client-side scrollback.
784787
- **Top** moves to the oldest retained client-side line.

‎README.md‎

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,8 @@ does not intercept text typed into xterm, so raw terminal input and Android
402402
IME handling remain unchanged.
403403

404404
1. Select **Review**, **Verify**, **Ask**, or **Handoff**, choose an installed
405-
agent kind and reviewer folder, describe the scope, and use **Source ready
406-
— Prepare handoff** only while the source is at an empty agent prompt. The
405+
agent kind and reviewer folder, describe the scope, and use **Prepare
406+
summary** only while the source is at an empty agent prompt. The
407407
reviewer folder defaults to the source tab's folder; **Change folder**
408408
reuses the normal Favorites, Recent, Browse, and absolute-path picker.
409409
2. The server revalidates that selected directory and creates a fresh
@@ -414,14 +414,14 @@ IME handling remain unchanged.
414414
reviewer tab yourself.
415415
3. The source agent prepares a bounded Markdown handoff through a private
416416
local bridge. The browser shows it for review and optional editing.
417-
4. **Reviewer ready — Send** releases the approved handoff after the dedicated
417+
4. **Send to reviewer** releases the approved handoff after the dedicated
418418
reviewer is at an empty agent prompt.
419-
5. When the response is ready, **Source ready — Return** asks the source agent
419+
5. When the response is ready, **Return to source** asks the source agent
420420
to retrieve it and present the useful conclusion in its existing context.
421421
6. A later **Recheck** or follow-up uses the same live reviewer PTY. **+ New
422-
peer** always creates a clean reviewer context.
422+
reviewer** always creates a clean reviewer context.
423423

424-
A new reviewer also consumes one session slot, so **+ New peer** is disabled
424+
A new reviewer also consumes one session slot, so **+ New reviewer** is disabled
425425
when the configured capacity is full. Existing follow-ups remain enabled
426426
because they reuse their reviewer. The broker retains at most 32 turns in one
427427
reviewer thread; after that, close it and start a clean peer conversation.
@@ -434,10 +434,10 @@ then enter: `Review the current implementation for correctness, security
434434
regressions, and missing Windows/Linux tests.` The source prepares the
435435
handoff; you inspect it before sending. Claude's fresh reviewer runs in the
436436
selected project B directory without modifying an ordinary project B tab.
437-
After Claude submits its bounded response, **Source ready — Return** brings
437+
After Claude submits its bounded response, **Return to source** brings
438438
the result back to that exact Codex conversation. A later **Recheck** keeps
439-
Claude's reviewer context and working directory; **+ New peer** deliberately
440-
starts without that conversation.
439+
Claude's reviewer context and working directory; **+ New reviewer**
440+
deliberately starts without that conversation.
441441

442442
Peer and ordinary non-primary tabs have an accessible `×`. Closing a peer tab
443443
terminates only its dedicated PTY and purges its in-memory thread. A reviewer
@@ -460,8 +460,9 @@ writes an artifact.
460460

461461
This is supervised coordination, not an autonomous scheduler. Generic CLI
462462
TUIs expose no reliable cross-provider "idle" signal, so Preview, Send, Return,
463-
and retry decisions stay explicit. The readiness-labelled buttons are the
464-
operator's acknowledgement; the matching API requests require
463+
and retry decisions stay explicit. **Prepare summary**, **Send to reviewer**,
464+
and **Return to source** are the operator's acknowledgement that the named
465+
terminal is at an empty prompt; the matching API requests require
465466
`sourceReady: true` or `reviewerReady: true`. Delivery is bound to the exact
466467
PTY `sessionId` generation, but the server intentionally does not guess
467468
whether a CLI is showing its normal prompt, a confirmation, or first-run
@@ -1001,7 +1002,8 @@ terminal byte stream.
10011002
xterm.js is configured with:
10021003

10031004
- ANSI/VT parsing and original Codex colors
1004-
- Cascadia Mono/Cascadia Code/Consolas font fallback
1005+
- Cascadia Mono/Cascadia Code/Consolas font fallback, then Roboto Mono, Noto
1006+
Sans Mono, and Droid Sans Mono before generic monospace
10051007
- 10,000 lines of client scrollback by default
10061008
- FitAddon resize using `ResizeObserver`
10071009
- debounced PTY resize messages
@@ -1018,8 +1020,9 @@ so Firefox Quick Find does not replace terminal input. Form fields, dialogs,
10181020
mobile/coarse-pointer input, IME composition, and modified shortcuts keep their
10191021
normal behavior.
10201022

1021-
The mobile toolbar begins with Enter and the arrow keys, followed by Page
1022-
Up/Down, Ctrl mode, Esc, Tab, Ctrl+C, Ctrl+L, Top, Live, and Hide. Its Ctrl mode
1023+
The mobile toolbar begins with Enter and the arrow keys, followed by Esc,
1024+
Ctrl+C, Tab, Ctrl mode, Page Up/Down, Ctrl+L, Top, Live, and Hide, keeping the
1025+
interrupt keys inside the first screenful on a narrow phone. Its Ctrl mode
10231026
converts the next typed ASCII letter to the matching control character, then
10241027
automatically turns off.
10251028

0 commit comments

Comments
 (0)