feat: v2.6.0 — Chat UI composer (+ menu, project files, activity panel, permission mode, Stop), git on a workspace's extra folders (#70), long paste as a file (#68), S3 server mode (experimental)
Chat UI: - Each Claude/Codex session keeps its own chat/terminal view; Settings only sets how new sessions open. - Composer + menu: upload, project files and folders (#54, also dragged from the Files/Changes tree), context files, recent uploads, skills, plugins. - Activity side panel (progress, outputs, files read, uploads, memory, skills, connectors) with a file preview; edited-file counts per turn. - Permission-mode chip (Shift+Tab steps, read back from the pane: server/lib/pane-mode.js, GET|POST /api/run/:id/permission-mode). - Stop (Esc) while the main agent works; the status is checked per agent (with session_id /api/agents ignores its status filter) and re-read every 5 s while Stop shows. - Dropped images shown in the conversation (GET /api/run/drop/:name, the requester's own drop dir), full-size viewer. - A plain-text paste over 5,000 characters is attached as pasted-text.txt, so no prompt reaches tmux/argv limits (#68). Changes panel: every /api/lanes/:id/git* route takes ?source=<lane_sources id> (sourceFolder; ENOSOURCE otherwise) and a folder picker switches the whole panel to a workspace's extra folder (#70). Server mode S3 (one Linux user per account) — experimental, verified with fake sudo plus a P6 managed-settings spike on a test account: - member tmux listing runs in the background (cached, 15 s => unknown); - transcript snapshot copy is async, chunked, temp file + rename; - Express Layer patch only on Express 4; - tmux capturePane/sendKey go to the member's own server. Docs: the multi-user design moved in as docs/plans/server-mode/README.md (the AgentHub-Server repo is gone); S3-PLAN P6 result; LANES/API/openapi.
This commit is contained in:
@@ -2017,6 +2017,70 @@ describe("a session's own worktree (claude --worktree)", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("an extra folder's own repo (?source=)", () => {
|
||||
const { execFileSync } = require("child_process");
|
||||
const gitEnv = Object.fromEntries(
|
||||
Object.entries(process.env).filter(([k]) => !k.startsWith("GIT_"))
|
||||
);
|
||||
const gitIn = (dir, ...args) =>
|
||||
execFileSync("git", ["-C", dir, "-c", "user.name=t", "-c", "user.email=t@t", ...args], {
|
||||
encoding: "utf8",
|
||||
env: gitEnv,
|
||||
});
|
||||
let ws, extra, laneId, otherLaneId, sourceId, fileSourceId;
|
||||
|
||||
before(async () => {
|
||||
const root = fs.realpathSync(fs.mkdtempSync(path.join(os.tmpdir(), "lane-src-git-")));
|
||||
ws = path.join(root, "ws");
|
||||
extra = path.join(root, "extra");
|
||||
for (const dir of [ws, extra]) {
|
||||
fs.mkdirSync(dir);
|
||||
gitIn(dir, "init", "-q", "-b", "main");
|
||||
fs.writeFileSync(path.join(dir, "a.txt"), "a\n");
|
||||
gitIn(dir, "add", ".");
|
||||
gitIn(dir, "commit", "-qm", "init");
|
||||
}
|
||||
laneId = (await request("POST", "/api/lanes", { cwd: ws })).body.lane.id;
|
||||
otherLaneId = (await request("POST", "/api/lanes", { cwd: extra })).body.lane.id;
|
||||
const src = require("../lib/lane-sources");
|
||||
sourceId = src.addFolder(laneId, extra).id;
|
||||
fileSourceId = require("../db")
|
||||
.db.prepare(
|
||||
"INSERT INTO lane_sources (lane_id, kind, path, name, added_at) VALUES (?, 'file', ?, 'f', '2026-10-09T00:00:00Z')"
|
||||
)
|
||||
.run(laneId, path.join(extra, "a.txt")).lastInsertRowid;
|
||||
});
|
||||
|
||||
it("reads and writes git in the extra folder, never falling back", async () => {
|
||||
fs.writeFileSync(path.join(extra, "only-in-extra.txt"), "x\n");
|
||||
const inExtra = await request("GET", `/api/lanes/${laneId}/git/changes?source=${sourceId}`);
|
||||
assert.ok(inExtra.body.files.some((f) => f.path === "only-in-extra.txt"));
|
||||
const facts = await request("GET", `/api/lanes/${laneId}/git?source=${sourceId}`);
|
||||
assert.equal(facts.body.base, "main");
|
||||
const main = await request("GET", `/api/lanes/${laneId}/git/changes`);
|
||||
assert.ok(!main.body.files.some((f) => f.path === "only-in-extra.txt"));
|
||||
const ok = await request("POST", `/api/lanes/${laneId}/git/stage?source=${sourceId}`, {
|
||||
paths: ["only-in-extra.txt"],
|
||||
});
|
||||
assert.equal(ok.status, 200);
|
||||
assert.match(gitIn(extra, "diff", "--cached", "--name-only"), /only-in-extra\.txt/);
|
||||
});
|
||||
|
||||
it("answers ENOSOURCE for a source that is not this workspace's folder", async () => {
|
||||
for (const id of ["nope", "999999", String(fileSourceId)]) {
|
||||
const r = await request("POST", `/api/lanes/${laneId}/git/stage?source=${id}`, {
|
||||
paths: ["only-in-extra.txt"],
|
||||
});
|
||||
assert.equal(r.status, 404, id);
|
||||
assert.equal(r.body.error.code, "ENOSOURCE", id);
|
||||
}
|
||||
// Another workspace's request may not borrow this one's source id.
|
||||
const r = await request("GET", `/api/lanes/${otherLaneId}/git/changes?source=${sourceId}`);
|
||||
assert.equal(r.status, 404);
|
||||
assert.equal(r.body.error.code, "ENOSOURCE");
|
||||
});
|
||||
});
|
||||
|
||||
// The server, not a stale client list, picks the tab and refuses a second pane
|
||||
// on a session one already holds.
|
||||
describe("start: slot auto and a session already live", () => {
|
||||
|
||||
Reference in New Issue
Block a user