Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
0f07d53
feat: add v0.2.0 bootstrap foundation
kefeiqian-microsoft Jul 14, 2026
a9a5243
fix(review): harden bootstrap streaming and git status
kefeiqian-microsoft Jul 14, 2026
3607a0d
feat(git): show pull request status in cwd line
kefeiqian-microsoft Jul 14, 2026
e703b40
feat(git): add pull_request_url to workspace status for PR hyperlink
kefeiqian-microsoft Jul 14, 2026
fb30f9b
feat(tui): render the PR label as a dotted-underline OSC 8 hyperlink
kefeiqian-microsoft Jul 14, 2026
5ac7e1c
feat(tui): open the PR on a plain click of the #3 label
kefeiqian-microsoft Jul 14, 2026
fdeca50
fix(tui): harden the external URL opener against injection and async …
kefeiqian-microsoft Jul 14, 2026
94b3259
feat(xtask): add tui-dev-here to run the source TUI against the curre…
kefeiqian-microsoft Jul 14, 2026
69b7ac9
chore(xtask): route the alias, launcher, and IDE profiles through an …
kefeiqian-microsoft Jul 14, 2026
0bb4546
refactor(git): rename pull_request to read_pull_request for naming co…
kefeiqian-microsoft Jul 14, 2026
82dbbc9
docs(xtask): explain the isolated --target-dir in the xtask alias
kefeiqian-microsoft Jul 14, 2026
2344aef
fix(git): give the gh PR lookup a network-sized timeout
kefeiqian-microsoft Jul 15, 2026
b665225
refactor(backend): defer streaming chat to the provider PR
kefeiqian-microsoft Jul 15, 2026
d7d3252
feat(git): fetch the branch pull request once at bootstrap
kefeiqian-microsoft Jul 15, 2026
9d26b0d
test(backend): drop the unused turnId from the submit round-trip tests
kefeiqian-microsoft Jul 15, 2026
b356b6f
fix(tui): let the hardened backend env find gh auth config
kefeiqian-microsoft Jul 15, 2026
c36abb1
style(test): rustfmt the collapsed message_submit request frame
kefeiqian-microsoft Jul 15, 2026
382007a
fix(tui): keep composer caret visible while scrolling
kefeiqian-microsoft Jul 17, 2026
32371b3
test(tui): cover caret refresh through scroll input
kefeiqian Jul 17, 2026
adf0475
fix(git): drain stdout while polling commands
kefeiqian-microsoft Jul 18, 2026
124317f
test(backend): cover launcher git status cwd
kefeiqian-microsoft Jul 18, 2026
7cf7a53
feat(tui): handle batched mouse input for scrolling
kefeiqian-microsoft Jul 18, 2026
929d118
fix(tui): measure composer text by display width
kefeiqian-microsoft Jul 18, 2026
309ed42
test(tui): clarify backend status expectations
kefeiqian-microsoft Jul 18, 2026
0ceaf17
perf(tui): isolate caret refresh rendering
kefeiqian-microsoft Jul 22, 2026
6b1ca42
refactor(tui): remove unused helper APIs
kefeiqian Jul 23, 2026
ff29be8
test(tui): enforce module architecture boundaries
kefeiqian Jul 23, 2026
60cf2ba
fix(review): harden TUI architecture guard
kefeiqian Jul 23, 2026
b51b520
refactor(tui): separate prompt composer layers
kefeiqian Jul 23, 2026
fa49420
refactor(tui): separate home screen support layers
kefeiqian Jul 23, 2026
673b86d
refactor(tui): move exit summary out of components
kefeiqian Jul 23, 2026
d0c886e
refactor(tui): clear remaining layer exceptions
kefeiqian Jul 23, 2026
df1896a
test(tui): enforce state module responsibilities
kefeiqian Jul 23, 2026
8b47322
fix(review): validate state export origins
kefeiqian Jul 23, 2026
a7018c1
refactor(tui): split composer state responsibilities
kefeiqian Jul 23, 2026
242e182
refactor(tui): split shared UI state responsibilities
kefeiqian Jul 23, 2026
d6bbe13
refactor(tui): organize remaining state domains
kefeiqian Jul 23, 2026
ac38695
fix(tui): keep soft-wrap cursor on the next row
kefeiqian Jul 23, 2026
fd81820
fix(tui): reserve the terminal final column
kefeiqian Jul 23, 2026
989e6e8
fix(tui): pin the initial composer row width
kefeiqian Jul 23, 2026
b7dfd45
docs(research): record Copilot CLI edge evidence gap
kefeiqian Jul 23, 2026
017788c
fix(tui): patch Ink fullscreen cursor baselines
kefeiqian Jul 23, 2026
435a5d8
fix(tui): add a caret row after full prompt lines
kefeiqian Jul 23, 2026
7d4d097
fix(tui): add composer right padding
kefeiqian Jul 23, 2026
404f85d
fix(tui): render seamless composer half-lines
kefeiqian Jul 23, 2026
7281ba2
Revert "fix(tui): render seamless composer half-lines"
kefeiqian Jul 23, 2026
7dc53fc
fix(tui): adapt surface borders for Terminal.app
kefeiqian Jul 23, 2026
9b8154f
fix(tui): support modified Enter in Ghostty
kefeiqian Jul 23, 2026
c9eaa92
fix(tui): avoid fullscreen repaints in WezTerm
kefeiqian Jul 26, 2026
9038402
feat(tui): add mouse selection and clipboard actions
kefeiqian Jul 26, 2026
9daeabc
test(tui): cover startup-locked caret positioning
kefeiqian Jul 26, 2026
6a53db1
test(tui): verify startup input lock
kefeiqian Jul 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
[alias]
xtask = "run -p xtask --"
# Build and run xtask in a private `target/xtask` dir, isolated from the
# workspace `target/`. On Windows a running exe is locked, so sharing `target/`
# would let a concurrent `cargo build` or `cargo xtask` cause "Access is denied
# (os error 5)" relink failures. The isolation is set via this `--target-dir`
# flag (not the CARGO_TARGET_DIR env var) so it does NOT leak into the nested
# cargo builds xtask itself spawns (e.g. packaging), which must still use the
# workspace `target/`.
xtask = "run -p xtask --target-dir target/xtask --"
2 changes: 1 addition & 1 deletion .run/xtask_blog_build.run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="xtask: blog-build" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="command" value="run -p xtask -- blog-build" />
<option name="command" value="xtask blog-build" />
<option name="workingDirectory" value="$PROJECT_DIR$" />
<method v="2" />
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion .run/xtask_blog_install.run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="xtask: blog-install" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="command" value="run -p xtask -- blog-install" />
<option name="command" value="xtask blog-install" />
<option name="workingDirectory" value="$PROJECT_DIR$" />
<method v="2" />
</configuration>
Expand Down
16 changes: 13 additions & 3 deletions .run/xtask_blog_preview.run.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="xtask: blog-preview" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="command" value="run -p xtask -- blog-preview" />
<option name="workingDirectory" value="$PROJECT_DIR$" />
<configuration default="false" name="xtask: blog-preview" type="ShConfigurationType">
<option name="SCRIPT_TEXT" value="" />
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
<option name="SCRIPT_PATH" value="$PROJECT_DIR$/scripts/xtask.ps1" />
<option name="SCRIPT_OPTIONS" value="blog-preview" />
<option name="INDEPENDENT_SCRIPT_WORKING_DIRECTORY" value="true" />
<option name="SCRIPT_WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="INDEPENDENT_INTERPRETER_PATH" value="false" />
<option name="INTERPRETER_PATH" value="C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe" />
<option name="INTERPRETER_OPTIONS" value="-ExecutionPolicy Bypass -File" />
<option name="EXECUTE_IN_TERMINAL" value="true" />
<option name="EXECUTE_SCRIPT_FILE" value="true" />
<envs />
<method v="2" />
</configuration>
</component>
16 changes: 13 additions & 3 deletions .run/xtask_blog_serve.run.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="xtask: blog-serve" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="command" value="run -p xtask -- blog-serve" />
<option name="workingDirectory" value="$PROJECT_DIR$" />
<configuration default="false" name="xtask: blog-serve" type="ShConfigurationType">
<option name="SCRIPT_TEXT" value="" />
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
<option name="SCRIPT_PATH" value="$PROJECT_DIR$/scripts/xtask.ps1" />
<option name="SCRIPT_OPTIONS" value="blog-serve" />
<option name="INDEPENDENT_SCRIPT_WORKING_DIRECTORY" value="true" />
<option name="SCRIPT_WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="INDEPENDENT_INTERPRETER_PATH" value="false" />
<option name="INTERPRETER_PATH" value="C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe" />
<option name="INTERPRETER_OPTIONS" value="-ExecutionPolicy Bypass -File" />
<option name="EXECUTE_IN_TERMINAL" value="true" />
<option name="EXECUTE_SCRIPT_FILE" value="true" />
<envs />
<method v="2" />
</configuration>
</component>
16 changes: 13 additions & 3 deletions .run/xtask_blog_serve_en.run.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="xtask: blog-serve-en" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="command" value="run -p xtask -- blog-serve-en" />
<option name="workingDirectory" value="$PROJECT_DIR$" />
<configuration default="false" name="xtask: blog-serve-en" type="ShConfigurationType">
<option name="SCRIPT_TEXT" value="" />
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
<option name="SCRIPT_PATH" value="$PROJECT_DIR$/scripts/xtask.ps1" />
<option name="SCRIPT_OPTIONS" value="blog-serve-en" />
<option name="INDEPENDENT_SCRIPT_WORKING_DIRECTORY" value="true" />
<option name="SCRIPT_WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="INDEPENDENT_INTERPRETER_PATH" value="false" />
<option name="INTERPRETER_PATH" value="C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe" />
<option name="INTERPRETER_OPTIONS" value="-ExecutionPolicy Bypass -File" />
<option name="EXECUTE_IN_TERMINAL" value="true" />
<option name="EXECUTE_SCRIPT_FILE" value="true" />
<envs />
<method v="2" />
</configuration>
</component>
2 changes: 1 addition & 1 deletion .run/xtask_blog_typecheck.run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="xtask: blog-typecheck" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="command" value="run -p xtask -- blog-typecheck" />
<option name="command" value="xtask blog-typecheck" />
<option name="workingDirectory" value="$PROJECT_DIR$" />
<method v="2" />
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion .run/xtask_fixture_prepare_react_complex.run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="xtask: fixture-prepare-react-complex" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="command" value="run -p xtask -- fixture-prepare-react-complex" />
<option name="command" value="xtask fixture-prepare-react-complex" />
<option name="workingDirectory" value="$PROJECT_DIR$" />
<method v="2" />
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion .run/xtask_fixture_prepare_react_simple.run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="xtask: fixture-prepare-react-simple" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="command" value="run -p xtask -- fixture-prepare-react-simple" />
<option name="command" value="xtask fixture-prepare-react-simple" />
<option name="workingDirectory" value="$PROJECT_DIR$" />
<method v="2" />
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion .run/xtask_help.run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="xtask: help" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="command" value="run -p xtask -- help" />
<option name="command" value="xtask help" />
<option name="workingDirectory" value="$PROJECT_DIR$" />
<method v="2" />
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion .run/xtask_package.run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="xtask: package" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="command" value="run -p xtask -- package" />
<option name="command" value="xtask package" />
<option name="workingDirectory" value="$PROJECT_DIR$" />
<method v="2" />
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion .run/xtask_package_release.run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="xtask: package-release" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="command" value="run -p xtask -- package-release" />
<option name="command" value="xtask package-release" />
<option name="workingDirectory" value="$PROJECT_DIR$" />
<method v="2" />
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion .run/xtask_set-version.run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="xtask: set-version" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="command" value="run -p xtask -- set-version" />
<option name="command" value="xtask set-version" />
<option name="workingDirectory" value="$PROJECT_DIR$" />
<method v="2" />
</configuration>
Expand Down
27 changes: 13 additions & 14 deletions .run/xtask_tui_dev.run.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="xtask: tui-dev" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="buildProfileId" value="dev" />
<option name="command" value="run -p xtask -- tui-dev" />
<option name="workingDirectory" value="file://$PROJECT_DIR$" />
<configuration default="false" name="xtask: tui-dev" type="ShConfigurationType">
<option name="SCRIPT_TEXT" value="" />
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
<option name="SCRIPT_PATH" value="$PROJECT_DIR$/scripts/xtask.ps1" />
<option name="SCRIPT_OPTIONS" value="tui-dev" />
<option name="INDEPENDENT_SCRIPT_WORKING_DIRECTORY" value="true" />
<option name="SCRIPT_WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="INDEPENDENT_INTERPRETER_PATH" value="false" />
<option name="INTERPRETER_PATH" value="C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe" />
<option name="INTERPRETER_OPTIONS" value="-ExecutionPolicy Bypass -File" />
<option name="EXECUTE_IN_TERMINAL" value="true" />
<option name="EXECUTE_SCRIPT_FILE" value="true" />
<envs />
<option name="emulateTerminal" value="true" />
<option name="channel" value="DEFAULT" />
<option name="requiredFeatures" value="true" />
<option name="allFeatures" value="false" />
<option name="withSudo" value="false" />
<option name="buildTarget" value="REMOTE" />
<option name="backtrace" value="SHORT" />
<option name="isRedirectInput" value="false" />
<option name="redirectInputPath" value="" />
<method v="2" />
</configuration>
</component>
</component>
17 changes: 17 additions & 0 deletions .run/xtask_tui_dev_here.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="xtask: tui-dev-here" type="ShConfigurationType">
<option name="SCRIPT_TEXT" value="" />
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
<option name="SCRIPT_PATH" value="$PROJECT_DIR$/scripts/xtask.ps1" />
<option name="SCRIPT_OPTIONS" value="tui-dev-here" />
<option name="INDEPENDENT_SCRIPT_WORKING_DIRECTORY" value="true" />
<option name="SCRIPT_WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="INDEPENDENT_INTERPRETER_PATH" value="false" />
<option name="INTERPRETER_PATH" value="C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe" />
<option name="INTERPRETER_OPTIONS" value="-ExecutionPolicy Bypass -File" />
<option name="EXECUTE_IN_TERMINAL" value="true" />
<option name="EXECUTE_SCRIPT_FILE" value="true" />
<envs />
<method v="2" />
</configuration>
</component>
2 changes: 1 addition & 1 deletion .run/xtask_tui_install.run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="xtask: tui-install" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="command" value="run -p xtask -- tui-install" />
<option name="command" value="xtask tui-install" />
<option name="workingDirectory" value="$PROJECT_DIR$" />
<method v="2" />
</configuration>
Expand Down
25 changes: 12 additions & 13 deletions .run/xtask_tui_prod.run.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="xtask: tui-prod" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="buildProfileId" value="dev" />
<option name="command" value="run -p xtask -- tui-prod" />
<option name="workingDirectory" value="file://$PROJECT_DIR$" />
<configuration default="false" name="xtask: tui-prod" type="ShConfigurationType">
<option name="SCRIPT_TEXT" value="" />
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
<option name="SCRIPT_PATH" value="$PROJECT_DIR$/scripts/xtask.ps1" />
<option name="SCRIPT_OPTIONS" value="tui-prod" />
<option name="INDEPENDENT_SCRIPT_WORKING_DIRECTORY" value="true" />
<option name="SCRIPT_WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="INDEPENDENT_INTERPRETER_PATH" value="false" />
<option name="INTERPRETER_PATH" value="C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe" />
<option name="INTERPRETER_OPTIONS" value="-ExecutionPolicy Bypass -File" />
<option name="EXECUTE_IN_TERMINAL" value="true" />
<option name="EXECUTE_SCRIPT_FILE" value="true" />
<envs />
<option name="emulateTerminal" value="true" />
<option name="channel" value="DEFAULT" />
<option name="requiredFeatures" value="true" />
<option name="allFeatures" value="false" />
<option name="withSudo" value="false" />
<option name="buildTarget" value="REMOTE" />
<option name="backtrace" value="SHORT" />
<option name="isRedirectInput" value="false" />
<option name="redirectInputPath" value="" />
<method v="2" />
</configuration>
</component>
2 changes: 1 addition & 1 deletion .run/xtask_tui_test.run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="xtask: tui-test" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="command" value="run -p xtask -- tui-test" />
<option name="command" value="xtask tui-test" />
<option name="workingDirectory" value="$PROJECT_DIR$" />
<method v="2" />
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion .run/xtask_tui_typecheck.run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="xtask: tui-typecheck" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="command" value="run -p xtask -- tui-typecheck" />
<option name="command" value="xtask tui-typecheck" />
<option name="workingDirectory" value="$PROJECT_DIR$" />
<method v="2" />
</configuration>
Expand Down
18 changes: 13 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,12 @@ For the nested TUI package, prefer Cargo-facing xtask commands instead of runnin
cargo xtask tui-install
cargo xtask tui-typecheck
cargo xtask tui-test
cargo xtask tui-dev # run the TUI from TypeScript source against a workspace fixture
cargo xtask tui-prod # package the standalone kqode binary and run it from the workspace
cargo xtask tui-dev # run the TUI from TypeScript source against a workspace fixture
cargo xtask tui-dev-here # run the TUI from TypeScript source against the terminal cwd
cargo xtask tui-prod # package the standalone kqode binary and run it from the workspace
```

`tui-dev` and `tui-prod` both run against a workspace fixture; seed one first with `cargo xtask fixture-prepare-react-simple` (or `fixture-prepare-react-complex`) to skip the interactive fixture prompt.
`tui-dev` and `tui-prod` both run against a workspace fixture; seed one first with `cargo xtask fixture-prepare-react-simple` (or `fixture-prepare-react-complex`) to skip the interactive fixture prompt. Use `tui-dev-here` through `scripts/xtask.sh`/`scripts/xtask.ps1` from another project directory when source-mode TUI should see that directory as its cwd.

For the Docusaurus blog/docs site under `blog/`, prefer Cargo-facing xtask commands instead of running package-manager commands directly:

Expand All @@ -57,7 +58,14 @@ cargo xtask blog-serve-en
cargo xtask blog-preview
```

Running two or more `cargo xtask` commands at once fails on Windows: `cargo xtask` expands to `cargo run -p xtask`, which relinks the shared `target\debug\xtask.exe` on each call, and a long-running command keeps that executable locked so the next call cannot replace it (os error 32, or os error 5 on the remove step). To run long-lived or multiple commands in parallel, use the launcher, which builds once then runs a per-invocation copy under `target/debug/xtask-run/`:
`cargo xtask` is parallel-safe on Windows: the alias builds and runs xtask in a private `target\xtask` directory (separate from the workspace `target\`), so ordinary fast commands never relink a binary another `cargo xtask` or a `cargo build --workspace` is holding. Run fast commands normally, including concurrently:

```powershell
cargo xtask tui-typecheck
cargo xtask blog-build
```

The long-running servers (`blog-serve`, `blog-serve-en`, `blog-preview`, `tui-dev`, `tui-dev-here`, `tui-prod`) hold the binary for their whole session, so run those through the launcher — it builds once, then runs a per-invocation copy under `target\xtask\debug\xtask-run\`, leaving the canonical binary free to relink:

```powershell
./scripts/xtask.ps1 blog-serve # Windows (PowerShell)
Expand All @@ -67,7 +75,7 @@ Running two or more `cargo xtask` commands at once fails on Windows: `cargo xtas
./scripts/xtask.sh blog-serve # macOS/Linux
```

Keep xtask command modules as thin wrappers around reusable implementation modules. When adding or renaming an xtask command, add a matching checked-in IDE run profile under `.run/` using the `xtask: <command>` naming pattern.
Keep xtask command modules as thin wrappers around reusable implementation modules. When adding or renaming an xtask command, add a matching checked-in IDE run profile under `.run/` using the `xtask: <command>` naming pattern, with its Cargo command routed through the `xtask` alias (`xtask <command>`) so IDE runs inherit the private-dir isolation.

## Architecture

Expand Down
13 changes: 9 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ cargo xtask tui-install # install nested TUI dependencies
cargo xtask tui-typecheck # type-check the TUI (tsc --noEmit)
cargo xtask tui-test # run TUI tests (vitest)
cargo xtask tui-dev # run the TUI from a throwaway fixture workspace
cargo xtask tui-dev-here # run the TUI from source against the current cwd
```

### Documentation site
Expand All @@ -85,10 +86,14 @@ cargo xtask blog-preview

### Windows note

Running two or more `cargo xtask` commands at once fails on Windows, because each
call relinks the shared `target\debug\xtask.exe` and a long-running command keeps
it locked. To run long-lived or multiple commands in parallel, use the launcher,
which builds once and then runs a per-invocation copy:
`cargo xtask` is parallel-safe on Windows: the alias builds and runs xtask in a
private `target\xtask` directory, separate from the workspace `target\`, so a
fast command never relinks a binary another process is holding. Run fast
commands normally, including in parallel. The long-running servers
(`blog-serve`, `blog-serve-en`, `blog-preview`, `tui-dev`, `tui-dev-here`,
`tui-prod`) hold the binary for their whole session, so run those through the
launcher, which builds once and then runs a per-invocation copy that leaves the
canonical binary free:

```powershell
./scripts/xtask.ps1 blog-serve # Windows (PowerShell)
Expand Down
11 changes: 8 additions & 3 deletions CONTRIBUTING.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ cargo xtask tui-install # 安装内嵌 TUI 的依赖
cargo xtask tui-typecheck # 对 TUI 做类型检查(tsc --noEmit)
cargo xtask tui-test # 运行 TUI 测试(vitest)
cargo xtask tui-dev # 在一次性 fixture 工作区中运行 TUI
cargo xtask tui-dev-here # 从源码运行 TUI,并使用当前终端目录作为 cwd
```

### 文档站点
Expand All @@ -84,9 +85,13 @@ cargo xtask blog-preview

### Windows 注意事项

在 Windows 上同时运行两个或更多 `cargo xtask` 命令会失败,因为每次调用都会重新
链接共享的 `target\debug\xtask.exe`,而长时间运行的命令会一直锁定它。若要并行运行
长时命令或多个命令,请使用启动器,它只构建一次,然后运行每次调用独立的副本:
在 Windows 上,`cargo xtask` 已可并行运行:别名会把 xtask 构建并运行在私有的
`target\xtask` 目录中(与工作区的 `target\` 分开),因此快速命令不会去重新链接
其他进程正在占用的可执行文件。快速命令可以照常运行,也可以并行运行。长时间运行的
服务器命令(`blog-serve`、`blog-serve-en`、`blog-preview`、`tui-dev`、
`tui-dev-here`、`tui-prod`)会在整个会话期间占用该可执行文件,因此请通过启动器
运行它们——启动器只构建一次,然后运行每次调用独立的副本,从而让规范可执行文件
保持可被重新链接:

```powershell
./scripts/xtask.ps1 blog-serve # Windows(PowerShell)
Expand Down
Loading
Loading