Skip to content

Commit 6f54233

Browse files
cliffhallclaude
andcommitted
chore(logging): remove Copy All button from LogStreamPanel
Export now produces the same JSON the Copy All button used to dump to the clipboard, so the button is redundant. History and Network panels have no equivalent — dropping Copy All also brings Logs into parity. Removes the prop from LogStreamPanel + LoggingScreen + InspectorView + App.tsx, and updates the matching tests/stories. Tests now assert the button is *not* in the document so a future re-introduction would have to update the assertion deliberately. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 49c1150 commit 6f54233

10 files changed

Lines changed: 6 additions & 47 deletions

File tree

clients/web/src/App.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,6 @@ function App() {
936936
onSetLogLevel={onSetLogLevel}
937937
onClearLogs={onClearLogs}
938938
onExportLogs={onExportLogs}
939-
onCopyAllLogs={todoNoop}
940939
onClearHistory={onClearHistory}
941940
onExportHistory={onExportHistory}
942941
onReplayHistory={todoNoop}

clients/web/src/components/groups/LogStreamPanel/LogStreamPanel.stories.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const meta: Meta<typeof LogStreamPanel> = {
2121
},
2222
autoScroll: true,
2323
onToggleAutoScroll: fn(),
24-
onCopyAll: fn(),
2524
onClear: fn(),
2625
onExport: fn(),
2726
},

clients/web/src/components/groups/LogStreamPanel/LogStreamPanel.test.tsx

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ const baseProps = {
4545
visibleLevels: allVisible,
4646
autoScroll: true,
4747
onToggleAutoScroll: vi.fn(),
48-
onCopyAll: vi.fn(),
4948
onClear: vi.fn(),
5049
onExport: vi.fn(),
5150
};
@@ -57,8 +56,8 @@ describe("LogStreamPanel", () => {
5756
expect(screen.getByRole("button", { name: "Clear" })).toBeInTheDocument();
5857
expect(screen.getByRole("button", { name: "Export" })).toBeInTheDocument();
5958
expect(
60-
screen.getByRole("button", { name: "Copy All" }),
61-
).toBeInTheDocument();
59+
screen.queryByRole("button", { name: "Copy All" }),
60+
).not.toBeInTheDocument();
6261
});
6362

6463
it("renders log entries when provided", () => {
@@ -150,14 +149,6 @@ describe("LogStreamPanel", () => {
150149
expect(onExport).toHaveBeenCalledTimes(1);
151150
});
152151

153-
it("invokes onCopyAll when Copy All is clicked", async () => {
154-
const user = userEvent.setup();
155-
const onCopyAll = vi.fn();
156-
renderWithMantine(<LogStreamPanel {...baseProps} onCopyAll={onCopyAll} />);
157-
await user.click(screen.getByRole("button", { name: "Copy All" }));
158-
expect(onCopyAll).toHaveBeenCalledTimes(1);
159-
});
160-
161152
it("invokes onToggleAutoScroll when the auto-scroll checkbox is clicked", async () => {
162153
const user = userEvent.setup();
163154
const onToggleAutoScroll = vi.fn();

clients/web/src/components/groups/LogStreamPanel/LogStreamPanel.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ export interface LogStreamPanelProps {
1919
visibleLevels: Record<LoggingLevel, boolean>;
2020
autoScroll: boolean;
2121
onToggleAutoScroll: () => void;
22-
onCopyAll: () => void;
2322
onClear: () => void;
2423
onExport: () => void;
2524
}
@@ -64,7 +63,6 @@ export function LogStreamPanel({
6463
visibleLevels,
6564
autoScroll,
6665
onToggleAutoScroll,
67-
onCopyAll,
6866
onClear,
6967
onExport,
7068
}: LogStreamPanelProps) {
@@ -97,13 +95,6 @@ export function LogStreamPanel({
9795
>
9896
Export
9997
</Button>
100-
<Button
101-
variant="default"
102-
onClick={onCopyAll}
103-
disabled={entries.length === 0}
104-
>
105-
Copy All
106-
</Button>
10798
</Group>
10899
</Group>
109100
{filteredEntries.length > 0 ? (

clients/web/src/components/screens/LoggingScreen/LoggingScreen.stories.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ const meta: Meta<typeof LoggingScreen> = {
1515
onExport: fn(),
1616
autoScroll: true,
1717
onToggleAutoScroll: fn(),
18-
onCopyAll: fn(),
1918
},
2019
};
2120

clients/web/src/components/screens/LoggingScreen/LoggingScreen.test.tsx

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ const baseProps = {
1111
onExport: vi.fn(),
1212
autoScroll: true,
1313
onToggleAutoScroll: vi.fn(),
14-
onCopyAll: vi.fn(),
1514
};
1615

1716
describe("LoggingScreen", () => {
@@ -45,24 +44,13 @@ describe("LoggingScreen", () => {
4544
expect(onClear).toHaveBeenCalledTimes(1);
4645
});
4746

48-
it("invokes onCopyAll when Copy All is clicked", async () => {
49-
const user = userEvent.setup();
50-
const onCopyAll = vi.fn();
51-
const entries = [
52-
{ receivedAt: new Date(), params: { level: "info" as const, data: "x" } },
53-
];
54-
renderWithMantine(
55-
<LoggingScreen {...baseProps} entries={entries} onCopyAll={onCopyAll} />,
56-
);
57-
await user.click(screen.getByRole("button", { name: "Copy All" }));
58-
expect(onCopyAll).toHaveBeenCalledTimes(1);
59-
});
60-
61-
it("disables Clear / Export / Copy All when there are no entries", () => {
47+
it("disables Clear / Export when there are no entries", () => {
6248
renderWithMantine(<LoggingScreen {...baseProps} />);
6349
expect(screen.getByRole("button", { name: "Clear" })).toBeDisabled();
6450
expect(screen.getByRole("button", { name: "Export" })).toBeDisabled();
65-
expect(screen.getByRole("button", { name: "Copy All" })).toBeDisabled();
51+
expect(
52+
screen.queryByRole("button", { name: "Copy All" }),
53+
).not.toBeInTheDocument();
6654
});
6755

6856
it("toggles a single level on level button click", async () => {

clients/web/src/components/screens/LoggingScreen/LoggingScreen.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ export interface LoggingScreenProps {
1313
onExport: () => void;
1414
autoScroll: boolean;
1515
onToggleAutoScroll: () => void;
16-
onCopyAll: () => void;
1716
}
1817

1918
const ALL_LEVELS_VISIBLE: Record<LoggingLevel, boolean> = {
@@ -63,7 +62,6 @@ export function LoggingScreen({
6362
onExport,
6463
autoScroll,
6564
onToggleAutoScroll,
66-
onCopyAll,
6765
}: LoggingScreenProps) {
6866
const [filterText, setFilterText] = useState("");
6967
const [visibleLevels, setVisibleLevels] =
@@ -99,7 +97,6 @@ export function LoggingScreen({
9997
visibleLevels={visibleLevels}
10098
autoScroll={autoScroll}
10199
onToggleAutoScroll={onToggleAutoScroll}
102-
onCopyAll={onCopyAll}
103100
onClear={onClear}
104101
onExport={onExport}
105102
/>

clients/web/src/components/views/InspectorView/InspectorView.stories.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,6 @@ const meta: Meta<typeof InspectorView> = {
350350
onSetLogLevel: fn(),
351351
onClearLogs: fn(),
352352
onExportLogs: fn(),
353-
onCopyAllLogs: fn(),
354353
onClearHistory: fn(),
355354
onExportHistory: fn(),
356355
onReplayHistory: fn(),

clients/web/src/components/views/InspectorView/InspectorView.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ function makeProps(
7979
onSetLogLevel: vi.fn(),
8080
onClearLogs: vi.fn(),
8181
onExportLogs: vi.fn(),
82-
onCopyAllLogs: vi.fn(),
8382
onClearHistory: vi.fn(),
8483
onExportHistory: vi.fn(),
8584
onReplayHistory: vi.fn(),

clients/web/src/components/views/InspectorView/InspectorView.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,6 @@ export interface InspectorViewProps {
199199
onSetLogLevel: (level: LoggingLevel) => void;
200200
onClearLogs: () => void;
201201
onExportLogs: () => void;
202-
onCopyAllLogs: () => void;
203202

204203
onClearHistory: () => void;
205204
onExportHistory: () => void;
@@ -270,7 +269,6 @@ export function InspectorView({
270269
onSetLogLevel,
271270
onClearLogs,
272271
onExportLogs,
273-
onCopyAllLogs,
274272
onClearHistory,
275273
onExportHistory,
276274
onReplayHistory,
@@ -453,7 +451,6 @@ export function InspectorView({
453451
onExport={onExportLogs}
454452
autoScroll={autoScroll}
455453
onToggleAutoScroll={() => setAutoScroll((prev) => !prev)}
456-
onCopyAll={onCopyAllLogs}
457454
/>
458455
</ScreenStage>
459456
<ScreenStage active={activeTab === "History"}>

0 commit comments

Comments
 (0)