feat(lanes): split panes on one lane, in-place file editing, hunk review bar
- Split view: every pane shows the selected lane, each in its own tmux session (`slot` 0-3 on POST /api/lanes/:id/start; slot 0 stays the lane's `run_id`, slots 1-3 are `agenthub-lane-<id>-<slot>`). A pane's Active runs hides what the other panes show; stop/reset/remove kill every slot. No per-pane lane picker any more. - Whole-file editor: PUT /api/lanes/:id/git/file (lane-file-write.js) with the read path's guards, existing text files only, and a baseSha stale check (409 ESTALE). A file it cannot take says why. - Per-hunk review bar under each hunk's last changed line: prev/next, "n of N", Undo, Keep. Review diffs no longer nest their own scroll box (unless windowed), so navigation moves the one real scroller. - Files tree lists untracked-not-ignored files and colours entries by git status (M/U/A/D/R), folders holding changes get a dot. - Changes panel: Unstage all on the single commit/Stage-all row; sizes Narrow (30%) / Medium / Full screen, no 70/30. - Lane card: the needs-you banner is gone (the strip tile keeps it).
This commit is contained in:
@@ -458,6 +458,33 @@ describe("listCommits / readFileAt / listPaths / listTree", () => {
|
||||
await assert.rejects(() => listTree(LANE, { subdir: "../.." }), { code: "EBADPATH" });
|
||||
});
|
||||
|
||||
it("lists untracked-but-not-ignored files and marks what changed, folders included", async () => {
|
||||
write(LANE, "src/main.ts", "m\n");
|
||||
write(LANE, ".gitignore", "*.log\n");
|
||||
gc(LANE, "add", "-A");
|
||||
gc(LANE, "commit", "-qm", "src");
|
||||
write(LANE, "a.txt", "modified\n");
|
||||
write(LANE, "new.txt", "fresh\n");
|
||||
write(LANE, "gen/deep/out.txt", "wholly untracked folder\n");
|
||||
write(LANE, "noise.log", "ignored\n");
|
||||
|
||||
const root = await listTree(LANE, {});
|
||||
const by = Object.fromEntries(root.entries.map((e) => [e.name, e]));
|
||||
assert.equal(by["a.txt"].status, " M");
|
||||
assert.equal(by["new.txt"].status, "??");
|
||||
assert.equal(by["keep.txt"].status, undefined);
|
||||
assert.equal(by["noise.log"], undefined, "an ignored file stays out of the tree");
|
||||
assert.equal(by.gen.changed, true);
|
||||
assert.equal(by.src.changed, undefined);
|
||||
|
||||
// Inside a folder git reports only as "gen/": still untracked, still marked.
|
||||
const deep = await listTree(LANE, { subdir: "gen/deep" });
|
||||
assert.equal(deep.entries[0].status, "??");
|
||||
const all = await listTreeAll(LANE);
|
||||
assert.equal(all.levels["gen"][0].changed, true);
|
||||
assert.deepEqual(all.levels[""], root.entries);
|
||||
});
|
||||
|
||||
it("reads every level of the tree in one pass, grouped like listTree", async () => {
|
||||
write(LANE, "src/api/x.ts", "x\n");
|
||||
write(LANE, "src/main.ts", "m\n");
|
||||
|
||||
Reference in New Issue
Block a user