Skip to content

Commit ae6aac8

Browse files
samejrclaude
andcommitted
fix(webapp): don't count the column layout as filters in favorite names
The runs URL now carries cols/sc/hide, and describeFilters counts any param it doesn't recognise, so favoriting a view with customised columns named it "Runs: 3 filters" and added an inflated "+N" to genuinely filtered views. The layout is presentation, not a filter, so it joins NON_FILTER_PARAMS. The three param names were repeated as literals across four files, so they now come from one exported list in the column registry. Reported by Devin on the PR. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 8f09a9d commit ae6aac8

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

apps/webapp/app/components/navigation/favoritePages.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ import { VercelLogo } from "~/components/integrations/VercelLogo";
4545
import { useIsImpersonating } from "~/hooks/useOrganizations";
4646
import { useOptionalUser } from "~/hooks/useUser";
4747
import { type FavoritePage } from "~/services/dashboardPreferences.server";
48+
import { RUN_COLUMN_SEARCH_PARAMS } from "../runs/v3/runColumns";
4849
import { type RenderIcon } from "../primitives/Icon";
4950

5051
export const FAVORITES_ACTION_PATH = "/resources/preferences/favorites";
@@ -366,7 +367,14 @@ function humanizeValue(value: string): string {
366367
}
367368

368369
/** Pagination/UI-state params that never describe what the user filtered. */
369-
const NON_FILTER_PARAMS = [FAVORITE_SEARCH_PARAM, ...PAGINATION_PARAMS, "span"];
370+
const NON_FILTER_PARAMS = [
371+
FAVORITE_SEARCH_PARAM,
372+
...PAGINATION_PARAMS,
373+
"span",
374+
// The runs list stores its column layout in the URL; that's presentation, not a filter,
375+
// so it must not count toward the tally ("Runs: 3 filters" for an unfiltered view).
376+
...RUN_COLUMN_SEARCH_PARAMS,
377+
];
370378

371379
/**
372380
* Summarize a filtered view's search params into a short, selective descriptor for the favorite

apps/webapp/app/components/runs/v3/runColumns.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,12 @@ const SMART_SOURCE_FIELDS: Record<SmartColumnSource, readonly RunSelectField[]>
151151
output: ["output", "outputType"],
152152
};
153153

154+
/**
155+
* The search params the column layout lives in. Exported so callers that reason about the
156+
* runs URL as a whole (e.g. summarising a favorite's filters) can tell layout from filters.
157+
*/
158+
export const RUN_COLUMN_SEARCH_PARAMS = ["cols", "sc", "hide"] as const;
159+
154160
const SMART_REF_PREFIX = "sc";
155161

156162
function smartColumnRef(index: number): string {

0 commit comments

Comments
 (0)