Show a landed git result as its own zone beside the leftover work

AI Assisted
This commit is contained in:
jparkerweb committed 2026-11-03 11:15:15 -08:00
1 parent 899359806a
commit 0454bdd19a
6 files changed
+104 -6

No files matched your search

+3 -3
View File
@@ -61,9 +61,9 @@ On the console the page draws the board itself from `state.git`; you never post
2. Run `git.mjs plan <op>` with the action's fields as flags.
3. With `ask: true`: a `confirm` becomes a `confirm` card, posted verbatim (`danger` and `consequences` as given; `files` as a `[{ path, state }]` table where the plan names files). A `card` of kind `switch`, `dirty` or `remote` becomes a `choice` card with exactly its `options`, labeled **Switch and bring them** (`bring`), **Commit first** (`commit-first`) and **Cancel** (`cancel`), or for `remote` one option per remote with `preset` recommended; put git's `reason` in `body` when given. Then wait for the answer. A `remote` pick plans `publish --remote <it>` again and asks its `confirm`.
4. Run the command(s).
5. In ONE post: `{ "reread": true }`, the `git-result` notice (one line: what happened, with short hashes, and after a push or publish the link from `pr-url`), `board: { describe }` when changes remain (a short kebab-case description of them, for the Create prompt), posted with `--wait`.
5. In ONE post: `{ "reread": true }`, the `git-result` notice (one line: what happened, with short hashes, and after a push or publish the link from `pr-url`, plus `op` naming the action that succeeded so the board shows it as the landed zone), `board: { describe }` when changes remain (a short kebab-case description of them, for the Create prompt), posted with `--wait`.
On a non-zero exit, save git's stderr to the session folder, run `classify-error --file <it>`, quote git's error verbatim in the `git-result` notice with `next`, and post `reread` the same way. A Refresh failure posts `reread: { refreshFailed: true }`. An `auth` kind gets a card saying this tool never handles logins, with `next`. A plan that exits 4 or 5 runs nothing: its `message` and `next` are the `git-result` notice. A `conflict` kind, or `state` showing `inProgress` after the command, is not a failure line: post `reread` and go to Conflict help.
On a non-zero exit, save git's stderr to the session folder, run `classify-error --file <it>`, quote git's error verbatim in the `git-result` notice with `next` and no `op`, and post `reread` the same way. A Refresh failure posts `reread: { refreshFailed: true }`. An `auth` kind gets a card saying this tool never handles logins, with `next`. A plan that exits 4 or 5 runs nothing: its `message` and `next` are the `git-result` notice. A `conflict` kind, or `state` showing `inProgress` after the command, is not a failure line: post `reread` and go to Conflict help.
## Actions
@@ -97,7 +97,7 @@ In the terminal the same stops are asked in prose, with the diff printed.
3. **Branch.** On the board, skip this: the page's **You're on main** line already offered it, and its answer arrives as `create` with `then: "commit"`. In the terminal, when `onDefault` (or `detached`) and `hasCommits`, offer one drafted branch name `<type>/<short-description>` (types: feature, fix, chore, docs, refactor, test; `feature/export-csv`). Run any name the person types through `branch-check`, then `plan create`. Skipping is always fine (on a detached HEAD, warn that commits there are easy to lose). When `defaultBranch` is null say why there is no offer.
4. **Read the changes.** `git diff`, `git diff --cached` and the untracked files (an `untracked` path ending in `/` is a folder: list its files with `git ls-files -o --exclude-standard -- <folder>` and stage them by name). If the person staged some files, work from that staged set and leave the rest alone (say what was left). On the board, only the paths the action named, or every changed file on a hand-off. Decide whether the work is one concern or several.
5. **Message.** One concern: draft a subject, or use the argument and skip approval; ask **Yes** / **Edit** / **No**. Several: always suggest whole-file groups, each with a subject, naming any file that mixes concerns and which group took it; ask **Approve** / **Change it** / **One commit instead** (asked even when the subject came as the argument). Name the `sensitive` and `large` files you are leaving out.
6. **Commit.** For each group in order: with more than one group, run `git reset -q` first so only that group is staged; then run `commit-msg.mjs --subject "<s>" --files <a> --files <b>` (`--files` once per path) and its `command` (or `add`, then `commit`). Finish with `git log --oneline -<n>`. On the console post `run: { "event": "git-commits", "id": "<first short hash>", "commits": <n> }` with the `reread` and a `git-result` line naming the hashes, so the board lights Push.
6. **Commit.** For each group in order: with more than one group, run `git reset -q` first so only that group is staged; then run `commit-msg.mjs --subject "<s>" --files <a> --files <b>` (`--files` once per path) and its `command` (or `add`, then `commit`). Finish with `git log --oneline -<n>`. On the console post `run: { "event": "git-commits", "id": "<first short hash>", "commits": <n> }` with the `reread` and a `git-result` line naming the hashes with `op: "commit"`, so the board lights Push.
7. **Push.** In the terminal, stop after committing with a one-line push hint and no push prompt. `commit and push` (or a push the person asks for) runs `plan push` / `plan publish` and asks its `confirm`. A rejected push: report it, suggest Pull, run nothing more.
## Terminal