Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions knip.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"src/api/**",
"src/components/ui/**",
"src/config/announcements.ts",
"src/components/shared/BetaFeatureWrapper/BetaFeatureWrapper.tsx",
"src/components/Home/FavoritesSection/FavoritesSection.tsx"
"src/components/shared/BetaFeatureWrapper/BetaFeatureWrapper.tsx"
],
"ignoreDependencies": [
"@radix-ui/react-accordion",
Expand Down
168 changes: 0 additions & 168 deletions src/components/Home/FavoritesSection/FavoritesSection.tsx

This file was deleted.

18 changes: 15 additions & 3 deletions src/components/Home/RunSection/RunSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,18 @@ interface RunSectionProps {
onEmptyList?: () => void;
/** When true, hides the built-in filter UI (used when new filter bar is enabled) */
hideFilters?: boolean;
/** When provided, overrides the URL filter param (e.g. "created_by:me") */
forcedFilter?: string;
/** When provided, limits the number of rows shown (pagination still works per backend page) */
maxItems?: number;
}

export const RunSection = ({ onEmptyList, hideFilters }: RunSectionProps) => {
export const RunSection = ({
onEmptyList,
hideFilters,
forcedFilter,
maxItems,
}: RunSectionProps) => {
const { backendUrl, configured, available, ready } = useBackend();
const navigate = useNavigate();
const { pathname } = useLocation();
Expand All @@ -54,7 +63,7 @@ export const RunSection = ({ onEmptyList, hideFilters }: RunSectionProps) => {
const dataVersion = useRef(0);

// Supports both JSON (new) and key:value (legacy) URL formats
const filters = parseFilterParam(search.filter);
const filters = parseFilterParam(forcedFilter ?? search.filter);
const createdByValue = filters.created_by;

const apiFilterQuery = filtersToFilterQuery(filters);
Expand Down Expand Up @@ -281,7 +290,10 @@ export const RunSection = ({ onEmptyList, hideFilters }: RunSectionProps) => {
</TableRow>
</TableHeader>
<TableBody>
{data.pipeline_runs?.map((run) => (
{(maxItems
? data.pipeline_runs?.slice(0, maxItems)
: data.pipeline_runs
)?.map((run) => (
<RunRow key={run.id} run={run} />
))}
</TableBody>
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useRecentlyViewed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useEffect, useState } from "react";
import { getStorage } from "@/utils/typedStorage";

const RECENTLY_VIEWED_KEY = "Home/recently_viewed";
const MAX_ITEMS = 10;
const MAX_ITEMS = 100;

type RecentlyViewedType = "pipeline" | "run" | "component";

Expand Down
4 changes: 2 additions & 2 deletions src/routes/Dashboard/DashboardFavoritesView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { type FavoriteItem, useFavorites } from "@/hooks/useFavorites";
import { cn } from "@/lib/utils";
import { EDITOR_PATH, RUNS_BASE_PATH } from "@/routes/router";

const PAGE_SIZE = 16;
const PAGE_SIZE = 20;

function getFavoriteUrl(item: FavoriteItem): string {
if (item.type === "pipeline") return `${EDITOR_PATH}/${item.id}`;
Expand All @@ -25,7 +25,7 @@ const FavoriteCard = ({ item }: { item: FavoriteItem }) => {
return (
<Link
to={getFavoriteUrl(item)}
className="group relative flex flex-col gap-2.5 p-3 rounded-lg transition-all shadow-sm hover:shadow-md bg-card border border-border hover:border-foreground/20 no-underline"
className="group relative flex flex-col gap-2.5 p-3 rounded-lg transition-all shadow-sm hover:shadow-md bg-card border border-border hover:border-foreground/20 no-underline overflow-hidden"
>
{/* Remove button */}
<Button
Expand Down
Loading
Loading