Skip to content

fix(test-details): preserve test origin in hardware links - #2223

Merged
nuclearcat merged 1 commit into
kernelci:mainfrom
nuclearcat:fix/2000/hardware-link-origin
Nov 9, 2026
Merged

nuclearcat merged 1 commit into
kernelci:mainfrom
nuclearcat:fix/2000/hardware-link-origin

Conversation

@nuclearcat

Copy link
Copy Markdown
Member

The Hardware and Compatibles links on Test Details omit the test origin. Following a TI result can therefore open hardware details with unrelated default filters and show no results.

Both links now set the existing testOrigin URL filter from test.test_origin. This uses the current hardware route's filter format and lets checkout/build origins remain unrestricted, since a TI test can belong to a Maestro build. The component change adds six lines and removes two.

Closes #2000.

Validation

  • Production build and TypeScript checks passed.
  • ESLint passed with no warnings for both changed files.
  • All 168 Vitest tests passed.
  • Four Playwright tests passed, covering both links, TI and Maestro test origins, mismatched checkout origins, direct links, stale URL filters, new tabs, copied URLs, and reloads.
  • The TI regression test fails on the original component: the request contains Maestro checkout/build filters instead of the TI boot/test origin filters.

The browser tests mock API responses and verify the actual hardware-summary request body. They do not verify backend result counts. The screenshot in the PR comment uses fixture data.

Reproduce

From dashboard/, run pnpm install --frozen-lockfile and pnpm exec playwright install chromium if needed.

  1. Start the frontend with VITE_API_BASE_URL=http://127.0.0.1:5173 pnpm dev --host 127.0.0.1 --port 5173.
  2. In another terminal, run PLAYWRIGHT_TEST_BASE_URL=http://127.0.0.1:5173 pnpm e2e test-hardware-links.spec.ts. No backend is needed for these tests.
  3. With a working API, open a TI test and follow both Hardware and Compatibles links. Each destination URL should contain df%7Cto%7Cti=true. The summary request should contain filter_boot.origin: ["ti"] and filter_test.origin: ["ti"], without default checkout/build origin filters. Copy the URL into a fresh tab and reload it; the filters should persist.

Date-window behavior is unchanged. The original July test still exists in production, but its July hardware_status entry is absent, so forcing the old July window remains outside this fix. Production currently runs the older origin-based route; this PR targets current main and should be deployed with its filter changes.

Set the test-origin filter on Hardware and Compatibles links so cross-origin
results do not inherit unrelated checkout and build defaults. Cover new tabs,
shared URLs, stale search state, and reloads with browser regression tests.

Closes kernelci#2000
Assisted-by: Codex

Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
@nuclearcat

Copy link
Copy Markdown
Member Author

Visual evidence from the local frontend with deterministic TI test data. Both Hardware and Compatibles links include df%7Cto%7Cti=true. I followed the compatible link into a new tab and confirmed that URL.

The four Playwright checks also verify the resulting boot/test origin filters in the hardware-summary request, including copied URLs and reloads. This screenshot is not a production-results check.

Test Details with TI Hardware and Compatibles links

@nuclearcat
nuclearcat added this pull request to the merge queue Nov 9, 2026
Merged via the queue into kernelci:main with commit b456903 Nov 9, 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.

Wrong link to compatibles

2 participants