fix(webui): preserve file edit stats and left-truncate long paths (#6388)
* fix(webui): preserve file edit stats and truncate paths from start (NAN-332) * fix(webui): remove redundant collapsed diff line totals * fix(webui): include full paths in image edit hints
This commit is contained in:
1 parent
b45048d415
commit
f9257c3548
16 files changed
+160
-46
No files matched your search
@@ -471,7 +471,7 @@ describe("AgentActivityCluster", () => {
|
||||
expect(screen.queryByText("Edited files")).not.toBeInTheDocument();
|
||||
const fileRef = screen.getByTestId("activity-file-reference");
|
||||
expect(fileRef).toHaveTextContent("src/app.tsx");
|
||||
expect(fileRef).toHaveAttribute("aria-label", "src/app.tsx");
|
||||
expect(fileRef).toHaveAttribute("aria-label", "/Users/renxubin/project/src/app.tsx");
|
||||
expect(screen.queryByTestId("activity-header-file-reference")).not.toBeInTheDocument();
|
||||
expect(screen.queryByTestId("file-edit-diff")).not.toBeInTheDocument();
|
||||
for (const diffPair of screen.getAllByTestId("activity-diff-pair")) {
|
||||
@@ -794,8 +794,7 @@ describe("AgentActivityCluster", () => {
|
||||
|
||||
const toggle = screen.getByTestId("file-edit-diff-toggle");
|
||||
expect(toggle).toHaveAttribute("aria-expanded", "false");
|
||||
expect(toggle).toHaveTextContent("Expand changes");
|
||||
expect(toggle).toHaveTextContent("165 lines");
|
||||
expect(toggle).toHaveTextContent(/^Expand changes$/);
|
||||
expect(screen.queryByTestId("file-edit-diff")).not.toBeInTheDocument();
|
||||
expect(screen.queryByText("line-1")).not.toBeInTheDocument();
|
||||
|
||||
@@ -883,8 +882,7 @@ describe("AgentActivityCluster", () => {
|
||||
|
||||
const toggle = screen.getByTestId("file-edit-diff-toggle");
|
||||
expect(toggle).toHaveAttribute("aria-expanded", "false");
|
||||
expect(toggle).toHaveTextContent("View changes");
|
||||
expect(toggle).toHaveTextContent("3 lines");
|
||||
expect(toggle).toHaveTextContent(/^View changes$/);
|
||||
expect(screen.queryByTestId("file-edit-diff")).not.toBeInTheDocument();
|
||||
expect(screen.queryByText("return <New />;")).not.toBeInTheDocument();
|
||||
|
||||
|
||||
Reference in new issue
Block a user