feat(web): pin Logging/History/Network as a resizable column (#1616)
Add the ability to "pin" the Logging, History, and Network screens into a second column on the right of the InspectorView, so a primary screen and a monitor screen are visible at once (e.g. watch Logs while calling a Tool). - A "pin as column" button on the Logs/History/Network panel toolbars opens the column (shown only when wide + connected). - The column hosts a MonitoringControls tab row (available monitor tabs + close) over the selected embedded screen. Pinning removes the monitor group from the header tab bar; closing (x) returns it. - The divider between the primary area and the column is draggable (pointer + keyboard); width is clamped and persisted. - The split collapses to one column below ~1040px (the ServerListScreen single-card breakpoint) and while disconnected, without discarding the pin preference — it reopens when wide + connected again. State (pinned/tab/width) is view-local and persisted via the existing useLocalStorage pattern, so no new props thread through App and ViewHeader is unchanged (it just receives a filtered tab list). Screens/panels gain an `embedded` mode (fills the parent height, drops the 340px filter sidebar) via a shared EmbeddableScrollArea element. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4ee9bbce0f
commit
081fd789f1
1 changed files with 1728 additions and 241 deletions
|
|
@ -25,6 +25,10 @@ export interface HistoryScreenProps {
|
|||
onSortChange: (next: SortDirection) => void;
|
||||
compact: boolean;
|
||||
onToggleCompact: () => void;
|
||||
/** See LoggingScreen: shows a "pin as column" button when set (#1616). */
|
||||
onPin?: () => void;
|
||||
/** See LoggingScreen: fills the parent height and drops the filter sidebar. */
|
||||
embedded?: boolean;
|
||||
}
|
||||
|
||||
// Search text, method filter, and per-direction visibility — controlled by the
|
||||
|
|
@ -69,6 +73,8 @@ export function HistoryScreen({
|
|||
onSortChange,
|
||||
compact,
|
||||
onToggleCompact,
|
||||
onPin,
|
||||
embedded = false,
|
||||
}: HistoryScreenProps) {
|
||||
const { search, methodFilter, visibleDirections } = ui;
|
||||
|
||||
|
|
@ -101,23 +107,25 @@ export function HistoryScreen({
|
|||
}, [ui, visibleDirections, onUiChange]);
|
||||
|
||||
return (
|
||||
<ScreenLayout>
|
||||
<Sidebar>
|
||||
<SidebarCard>
|
||||
<HistoryControls
|
||||
searchText={search}
|
||||
methodFilter={methodFilter}
|
||||
availableMethods={availableMethods}
|
||||
visibleDirections={visibleDirections}
|
||||
onSearchChange={(value) => onUiChange({ ...ui, search: value })}
|
||||
onMethodFilterChange={(value) =>
|
||||
onUiChange({ ...ui, methodFilter: value })
|
||||
}
|
||||
onToggleDirection={handleToggleDirection}
|
||||
onToggleAllDirections={handleToggleAllDirections}
|
||||
/>
|
||||
</SidebarCard>
|
||||
</Sidebar>
|
||||
<ScreenLayout h={embedded ? "100%" : undefined}>
|
||||
{embedded ? null : (
|
||||
<Sidebar>
|
||||
<SidebarCard>
|
||||
<HistoryControls
|
||||
searchText={search}
|
||||
methodFilter={methodFilter}
|
||||
availableMethods={availableMethods}
|
||||
visibleDirections={visibleDirections}
|
||||
onSearchChange={(value) => onUiChange({ ...ui, search: value })}
|
||||
onMethodFilterChange={(value) =>
|
||||
onUiChange({ ...ui, methodFilter: value })
|
||||
}
|
||||
onToggleDirection={handleToggleDirection}
|
||||
onToggleAllDirections={handleToggleAllDirections}
|
||||
/>
|
||||
</SidebarCard>
|
||||
</Sidebar>
|
||||
)}
|
||||
<HistoryListPanel
|
||||
entries={entries}
|
||||
pinnedIds={pinnedIds}
|
||||
|
|
@ -134,6 +142,8 @@ export function HistoryScreen({
|
|||
onSortChange={onSortChange}
|
||||
compact={compact}
|
||||
onToggleCompact={onToggleCompact}
|
||||
onPin={onPin}
|
||||
embedded={embedded}
|
||||
/>
|
||||
</ScreenLayout>
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue