feat(webui): simplify automation management and unify disclosure motion
Replace the dense automation workspace with a calm list and on-demand details, show current linked-chat titles, and remember manual system-task expansion preferences. Reuse disclosure transitions across expandable controls, preserve drafts and focus through closing, and release large diffs after their exit animation. Refs NAN-116
This commit is contained in:
1 parent
90b889394f
commit
1640784d45
37 files changed
+1746
-721
No files matched your search
@@ -848,7 +848,7 @@ describe("AgentActivityCluster", () => {
|
||||
}
|
||||
});
|
||||
|
||||
it("keeps long file edit diffs collapsed until opened", () => {
|
||||
it("keeps long file edit diffs lazy and releases them after closing", async () => {
|
||||
localStorage.setItem(
|
||||
"nanobot-webui.settings-preferences",
|
||||
JSON.stringify({ fileEditDisplayMode: "diff" }),
|
||||
@@ -917,10 +917,20 @@ describe("AgentActivityCluster", () => {
|
||||
"Show 5 more lines",
|
||||
);
|
||||
|
||||
const content = document.getElementById(toggle.getAttribute("aria-controls")!)!;
|
||||
let finish!: () => void;
|
||||
const finished = new Promise<void>((resolve) => { finish = resolve; });
|
||||
Object.defineProperty(content, "getAnimations", { value: () => [{ finished }] });
|
||||
fireEvent.click(toggle);
|
||||
|
||||
expect(toggle).toHaveAttribute("aria-expanded", "false");
|
||||
expect(content).toHaveAttribute("data-state", "closed");
|
||||
expect(content).toHaveAttribute("inert");
|
||||
expect(screen.getByTestId("file-edit-diff")).toBeInTheDocument();
|
||||
await act(async () => { finish(); });
|
||||
expect(screen.queryByTestId("file-edit-diff")).not.toBeInTheDocument();
|
||||
fireEvent.click(toggle);
|
||||
expect(screen.getByText("line-160")).toBeInTheDocument();
|
||||
expect(screen.queryByText("line-161")).not.toBeInTheDocument();
|
||||
} finally {
|
||||
localStorage.removeItem("nanobot-webui.settings-preferences");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user