From 1619954fadfda66b4acd755f610091a66c94fcd8 Mon Sep 17 00:00:00 2001 From: nntrivi2001 Date: Wed, 7 Oct 2026 15:40:43 +0700 Subject: [PATCH] =?UTF-8?q?fix:=20v2.5.11=20=E2=80=94=20the=20commit=20box?= =?UTF-8?q?=20wraps=20only=20when=20the=20panel=20is=20narrow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The message keeps the row with the commit, Stage all and Unstage all buttons while there is room (a 50/50 split, a full-width panel); in a narrow panel the buttons wrap under it instead of squeezing the message to a few characters. Client 1095/1095 on the committed tree. --- .../src/components/lanes/LaneChangesPanel.tsx | 124 ++++++++++-------- .../lanes/__tests__/LaneChangesPanel.test.tsx | 2 +- docs/LANES.md | 7 +- 3 files changed, 71 insertions(+), 62 deletions(-) diff --git a/client/src/components/lanes/LaneChangesPanel.tsx b/client/src/components/lanes/LaneChangesPanel.tsx index b7b6d63b..318d2d9c 100644 --- a/client/src/components/lanes/LaneChangesPanel.tsx +++ b/client/src/components/lanes/LaneChangesPanel.tsx @@ -2099,13 +2099,15 @@ export function LaneChangesPanel({ {(stagedCount > 0 || toStage.length > 0) && (
- {/* ONE row: message, commit, then the two bulk index moves. */} + {/* One row when there is room; in a narrow panel the buttons + wrap below rather than squeeze the message to a few + characters (its min width is what triggers the wrap). */} {stagedCount > 0 && (
)} - -
)} - {toStage.length > 0 && ( - - )} - {stagedCount > 0 && ( - - )} +
+ {stagedCount > 0 && ( + <> + + + + )} + {toStage.length > 0 && ( + + )} + {stagedCount > 0 && ( + + )} +
)} {/* The work range splits like VS Code's Source Control: what the diff --git a/client/src/components/lanes/__tests__/LaneChangesPanel.test.tsx b/client/src/components/lanes/__tests__/LaneChangesPanel.test.tsx index 8097b718..d20870e6 100644 --- a/client/src/components/lanes/__tests__/LaneChangesPanel.test.tsx +++ b/client/src/components/lanes/__tests__/LaneChangesPanel.test.tsx @@ -1069,7 +1069,7 @@ describe("LaneChangesPanel", () => { expect(screen.getByTestId("lane-file-editor")).toHaveValue("xy"); }); - it("unstages every staged file in one call, on the same row as Stage all and commit", async () => { + it("unstages every staged file in one call, in the same pinned bar as Stage all and commit", async () => { const user = userEvent.setup(); render(); await screen.findByTestId("lane-changes-overview"); diff --git a/docs/LANES.md b/docs/LANES.md index 7589152e..60d9b78f 100644 --- a/docs/LANES.md +++ b/docs/LANES.md @@ -733,9 +733,10 @@ in every panel narrow enough to sit beside a console. **Per-file writes are the panel's, per-repo writes are the git bar's.** Staging one file means nothing unless a commit can take the index as it stands, so the overview grows a commit box the moment anything is staged — above the list and -pinned while it scrolls, on ONE row with a **Stage all** that stages every listed file -the index lacks in one call and an **Unstage all** that unstages every staged one — it sends -`only: "staged"`, never `add -A`, and it is absent with a clean index because +pinned while it scrolls: the message (and its suggest button), the commit button, a **Stage all** that stages every listed file +the index lacks in one call and an **Unstage all** that unstages every staged one — one row when the +panel has room, the buttons wrapping under the message when it is narrow. The commit sends +`only: "staged"`, never `add -A`, and the box is absent with a clean index because there is nothing it could mean. A file you never want committed (a local note, a scratch folder) can be marked **Never stage** (its row's eye-off button, or right-click): **Stage all** and a folder's stage button then skip it, the row is struck through, and the file is drawn orange in the Files tree (`--kept`, apart from the amber of a modified file). The list is kept in this browser per workspace (`agenthub.changes.neverStage.`) and git is never told — nothing is written to the repo, and the file's own Stage still works. It is the dashboard's ONLY commit: the git bar above it has none, so no click can sweep the rest of the tree in with `add -A`. **Discard** is the one irreversible action in the panel: it asks twice in the UI, and the server