Skip to content

Feat/2052/ab comparison custom filters - #2069

Merged
felipebergamin merged 5 commits into
kernelci:mainfrom
profusion:feat/2052/ab-comparison-custom-filters
Sep 2, 2026
Merged

Feat/2052/ab comparison custom filters#2069
felipebergamin merged 5 commits into
kernelci:mainfrom
profusion:feat/2052/ab-comparison-custom-filters

Conversation

@felipebergamin

Copy link
Copy Markdown
Member

Implement the free-form filters for AB Comparison page.

Visual reference

Gravacao_de_tela_20260825_174432.webm

@felipebergamin
felipebergamin force-pushed the feat/2052/ab-comparison-custom-filters branch from dec4bd4 to b985a83 Compare August 26, 2026 20:27
@felipebergamin
felipebergamin marked this pull request as ready for review August 27, 2026 19:05

@alanpeixinho alanpeixinho left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small comments. Seems great.

const isDuplicate = value.some(pair => pair.from === from && pair.to === to);
const canAdd = from !== undefined && to !== undefined && !isDuplicate;

const addPair = (): void => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: might be interesting to clear the from to dropdowns when adding.

<div className="flex flex-col gap-3">
<div className="text-dim-gray flex items-center gap-1 text-sm">
<FormattedMessage id="filter.tableFilter" />
<TooltipIcon

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we still need a tooltip, now that the custom filters show the explicit rules?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, I don't think so.

Comment thread dashboard/src/utils/treeCompareDiff.ts Outdated
}

/** Drop invalid/duplicate pairs; keep first-seen order. */
export function normalizeStatusPairs(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: cant we just expose parse and serialize, and just call those internally?
Ignore if it makes no sense.

@@ -0,0 +1,134 @@
import type { JSX } from 'react';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are those .stories. files running in prod?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, they are for storybook.
you can run storybook with pnpm storybook install and open http://localhost:6006/

you will see a like a demo for the components. But they run on dev env only.

@felipebergamin
felipebergamin force-pushed the feat/2052/ab-comparison-custom-filters branch 2 times, most recently from d27448a to 79ce986 Compare September 1, 2026 19:36
…tories

Introduce the From/To status pair form so Tree Compare can replace change-type chips with exact (from → to) filters, and expose it in Storybook for isolated UI review.

Part of kernelci#2052

Signed-off-by: Felipe Bergamin <felipebergamin@profusion.mobi>
Replace URL change-type filters with exact From/To pairs, keep the old chips as shortcuts that add or remove those pairs, and persist the active list in the URL.

Part of kernelci#2052

Signed-off-by: Felipe Bergamin <felipebergamin@profusion.mobi>
Use URL statusPair when present so shared links stay exact, and fall back to the last edited list in localStorage when the param is omitted.

Closes kernelci#2052

Signed-off-by: Felipe Bergamin <felipebergamin@profusion.mobi>
Part of kernelci#2052

Signed-off-by: Felipe Bergamin <felipebergamin@profusion.mobi>
@felipebergamin
felipebergamin force-pushed the feat/2052/ab-comparison-custom-filters branch from 79ce986 to 4ad2901 Compare September 2, 2026 18:03
PASS→PASS was classified as newPass, so the New passes chip added it. Treat same-status pairs as unchanged except FAIL→FAIL.
@felipebergamin
felipebergamin added this pull request to the merge queue Sep 2, 2026
Merged via the queue into kernelci:main with commit cc9e3eb Sep 2, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants