+ );
+ })}
+
);
}
@@ -276,8 +242,6 @@ function PreviewPane({
);
}
-// Every control lives in `StageTopBar`'s action slot (DESIGN.md -> Pages
-// & Routing) — a page body never floats its own.
export function LibraryPage({
artifacts,
now,
@@ -292,9 +256,6 @@ export function LibraryPage({
previewLoading = false,
previewError = null,
tenantId = null,
- workbenchScope = null,
- scope = "all",
- onScopeChange,
}: {
readonly artifacts: readonly ArtifactSummary[];
readonly now?: number;
@@ -312,18 +273,8 @@ export function LibraryPage({
* new tab" / iframe affordance is simply absent without one (a
* standalone render with no bench tenant, e.g. these page tests). */
readonly tenantId?: string | null;
- /** The workbench the person just came from, if any — drives the
- * "This workbench" pill. `null` when Artifacts was reached with no workbench
- * in view, in which case the lens has nothing to offer and stays hidden. */
- readonly workbenchScope?: { readonly title: string } | null;
- /** Which lens is active: this one workbench's files, or every workbench
- * this bench owns. Uncontrolled callers (tests, standalone renders) get
- * "all" and no toggle, same as every other optional-controlled prop here. */
- readonly scope?: "workbench" | "all";
- readonly onScopeChange?: (scope: "workbench" | "all") => void;
}) {
const [localQuery, setLocalQuery] = useState("");
- const [sort, setSort] = useState("newest");
const [localSelected, setLocalSelected] = useState(null);
const fileInputRef = useRef(null);
@@ -336,9 +287,9 @@ export function LibraryPage({
() =>
sortArtifacts(
onQueryChange === undefined ? filterArtifacts(artifacts, activeQuery) : artifacts,
- sort,
+ "newest",
),
- [artifacts, activeQuery, sort, onQueryChange],
+ [artifacts, activeQuery, onQueryChange],
);
const visibleIds = useMemo(() => visible.map((artifact) => artifact.id), [visible]);
@@ -384,92 +335,14 @@ export function LibraryPage({
: `${artifacts.length} artifacts`
: artifactKindLabel(selectedSummary.kind)
}
- filter={{
- label: "Filter artifacts",
- placeholder: "Filter by name",
- value: activeQuery,
- onChange: setActiveQuery,
- }}
actions={
- <>
- {selectedSummary !== null ? (
- // An action, not a filter. Used to say bare "All", which read
- // as a third scope option next to "All workbenches".
-
- ) : null}
- {workbenchScope !== null && onScopeChange !== undefined ? (
- // Below lg the segmented group is hidden; the overflow menu
- // in this same slot is the way to reach All workbenches.
- <>
-
-
-
-
-
-
-
- >
- ) : null}
-
- {onUpload !== undefined ? (
-
- ) : null}
- >
+ selectedSummary !== null ? (
+ // An action, not a filter. Used to say bare "All", which read
+ // as a third scope option next to "All workbenches".
+
+ ) : undefined
}
/>
{onUpload !== undefined ? (
@@ -497,6 +370,7 @@ export function LibraryPage({