feat(FN-3583): prevent worktree collisions on manual moves and make heartbe

The merge lands five commits: a fix (FN-3583) that preserves non-tool message boundaries when tools are hidden in CLI bundles, plus hardened test coverage for that regression and bundle asset bootstrapping; worktree collision prevention on manual task moves via a new `worktree-names.ts` module and s

Fusion-Task-Id: FN-3583
This commit is contained in:
Fusion
2026-05-06 07:31:42 -07:00
committed by gsxdsm
parent 1100b39cff
commit 9dd8445c96
3 changed files with 70 additions and 13 deletions

View File

@@ -1623,6 +1623,25 @@ describe("AgentLogViewer", () => {
expect(container.querySelector(".agent-log-tool-error")).toBeTruthy();
});
it("keeps the latest non-tool message visible as its own row when tools are hidden", () => {
const entries = [
makeEntry({ text: "Starting plan", type: "text", agent: "executor", timestamp: "2026-01-01T00:00:00Z" }),
makeEntry({ text: "read file", type: "tool", agent: "executor", timestamp: "2026-01-01T00:00:01Z" }),
makeEntry({ text: "Final answer", type: "text", agent: "executor", timestamp: "2026-01-01T00:00:02Z" }),
];
const { container } = render(<AgentLogViewer entries={entries} loading={false} />);
const toggle = container.querySelector("[data-testid='agent-log-tool-output-toggle']") as HTMLButtonElement;
fireEvent.click(toggle);
const textRows = container.querySelectorAll(".agent-log-text");
expect(textRows).toHaveLength(2);
expect(textRows[0].textContent).toContain("Starting plan");
expect(textRows[1].textContent).toContain("Final answer");
expect(container.querySelectorAll(".agent-log-agent-badge")).toHaveLength(2);
expect(container.querySelectorAll(".agent-log-timestamp")).toHaveLength(2);
});
it("does not render any tool log entries when off (only agent text)", () => {
const entries = [
makeEntry({ text: "Read", type: "tool", agent: "executor", detail: "some/path" }),