Add ListToggle and built-in search filtering to ResourceControls, move Export/Clear buttons to HistoryListPanel

ResourceControls now manages its own search state internally and filters
all three accordion sections (URIs, Templates, Subscriptions) by name
and URI. Added ListToggle to expand/collapse all sections. Moved Export
JSON and Clear All buttons from HistoryControls sidebar to the
HistoryListPanel header for better proximity to the data they act on.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
cliffhall 2026-04-01 19:24:11 -04:00
commit a68933464b
3 changed files with 80 additions and 69 deletions

View file

@ -48,8 +48,6 @@ export function HistoryScreen({
onMethodFilterChange={(value) =>
setMethodFilter(value || undefined)
}
onClearAll={onClearAll}
onExport={onExport}
/>
</SidebarCard>
</Sidebar>
@ -58,6 +56,8 @@ export function HistoryScreen({
pinnedEntries={pinnedEntries}
searchText={searchText}
methodFilter={methodFilter}
onClearAll={onClearAll}
onExport={onExport}
/>
</ScreenLayout>
);

View file

@ -13,8 +13,6 @@ const meta: Meta<typeof ResourcesScreen> = {
component: ResourcesScreen,
parameters: { layout: "fullscreen" },
args: {
searchText: "",
onSearchChange: fn(),
onRefreshList: fn(),
onSelectUri: fn(),
onSelectTemplate: fn(),

View file

@ -47,8 +47,6 @@ export interface ResourcesScreenProps {
selectedResource?: SelectedResource;
selectedTemplate?: SelectedTemplate;
listChanged: boolean;
searchText: string;
onSearchChange: (text: string) => void;
onRefreshList: () => void;
onSelectUri: (uri: string) => void;
onSelectTemplate: (uriTemplate: string) => void;
@ -92,8 +90,6 @@ export function ResourcesScreen({
selectedResource,
selectedTemplate,
listChanged,
searchText,
onSearchChange,
onRefreshList,
onSelectUri,
onSelectTemplate,
@ -110,8 +106,6 @@ export function ResourcesScreen({
templates={templates}
subscriptions={subscriptions}
listChanged={listChanged}
searchText={searchText}
onSearchChange={onSearchChange}
onRefreshList={onRefreshList}
onSelectUri={onSelectUri}
onSelectTemplate={onSelectTemplate}