Skip to content

Commit ce71111

Browse files
cliffhallclaude
andcommitted
style(HistoryListPanel): match ServerListScreen Export button — rename + default variant
Renames "Export JSON" to "Export" and switches from the subtle ToolbarButton to the same `Button variant="default"` used by ServerListControls so the two Export affordances look identical across screens. Also moves the button to the right of the ListToggle (mirroring the order on the server list screen) and disables it when there are no entries to export. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent ea4058e commit ce71111

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,10 @@ const baseProps = {
6969
};
7070

7171
describe("HistoryListPanel", () => {
72-
it("renders the title and Export JSON button", () => {
72+
it("renders the title and Export button", () => {
7373
renderWithMantine(<HistoryListPanel {...baseProps} entries={[]} />);
7474
expect(screen.getByText("Requests")).toBeInTheDocument();
75-
expect(
76-
screen.getByRole("button", { name: "Export JSON" }),
77-
).toBeInTheDocument();
75+
expect(screen.getByRole("button", { name: "Export" })).toBeInTheDocument();
7876
});
7977

8078
it("renders the empty state when there are no entries", () => {
@@ -134,7 +132,7 @@ describe("HistoryListPanel", () => {
134132
expect(screen.getByText("History (1)")).toBeInTheDocument();
135133
});
136134

137-
it("invokes onExport when Export JSON is clicked", async () => {
135+
it("invokes onExport when Export is clicked", async () => {
138136
const user = userEvent.setup();
139137
const onExport = vi.fn();
140138
renderWithMantine(
@@ -144,7 +142,7 @@ describe("HistoryListPanel", () => {
144142
onExport={onExport}
145143
/>,
146144
);
147-
await user.click(screen.getByRole("button", { name: "Export JSON" }));
145+
await user.click(screen.getByRole("button", { name: "Export" }));
148146
expect(onExport).toHaveBeenCalledTimes(1);
149147
});
150148

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,15 @@ export function HistoryListPanel({
101101
<Group justify="space-between" mb="sm">
102102
<Title order={4}>Requests</Title>
103103
<Group gap="xs">
104-
<ToolbarButton onClick={onExport}>Export JSON</ToolbarButton>
105104
{hasResults && (
106105
<ListToggle
107106
compact={compact}
108107
onToggle={() => setCompact((c) => !c)}
109108
/>
110109
)}
110+
<Button variant="default" onClick={onExport} disabled={!hasResults}>
111+
Export
112+
</Button>
111113
</Group>
112114
</Group>
113115

0 commit comments

Comments
 (0)