Skip to content

feat: add checkout selectors on hardware page#1904

Open
gustavobtflores wants to merge 3 commits into
kernelci:mainfrom
gustavobtflores:feat/hardware-revision-selector
Open

feat: add checkout selectors on hardware page#1904
gustavobtflores wants to merge 3 commits into
kernelci:mainfrom
gustavobtflores:feat/hardware-revision-selector

Conversation

@gustavobtflores
Copy link
Copy Markdown
Contributor

@gustavobtflores gustavobtflores commented May 15, 2026

Allows the user to select a specific tree/branch/commit on the hardware page to filter data

@gustavobtflores gustavobtflores force-pushed the feat/hardware-revision-selector branch 2 times, most recently from db1a452 to d6051f2 Compare May 15, 2026 17:52
@gustavobtflores gustavobtflores self-assigned this May 19, 2026
@gustavobtflores gustavobtflores added enhancement New feature or request Backend Most or all of the changes for this issue will be in the backend code. Frontend Most or all of the changes for this issue will be in the frontend code. labels May 19, 2026
@gustavobtflores gustavobtflores force-pushed the feat/hardware-revision-selector branch 4 times, most recently from e62fd2c to 4cb4128 Compare May 20, 2026 02:43
@gustavobtflores gustavobtflores marked this pull request as ready for review May 20, 2026 12:02
@gustavobtflores gustavobtflores requested a review from Copilot May 20, 2026 12:02
@gustavobtflores gustavobtflores force-pushed the feat/hardware-revision-selector branch from 4cb4128 to 8313347 Compare May 20, 2026 12:06
@gustavobtflores gustavobtflores changed the title feat/hardware revision selector feat: add tree/branch/revision selectors on hardware page May 20, 2026
@gustavobtflores gustavobtflores changed the title feat: add tree/branch/revision selectors on hardware page feat: add checkout selectors on hardware page May 20, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a hardware “revision selector” flow so the hardware listing can be filtered by a specific tree/repo/branch/commit, wiring new backend endpoints to a new selector UI and persisting the selection in URL search params.

Changes:

  • Introduces backend APIs for (1) available hardware selectors (tree/branch/revision) and (2) hardware listing filtered by a selected revision.
  • Adds frontend selection state/resolution utilities plus a new selector UI (comboboxes) integrated into the hardware table header.
  • Extends router search schemas + querystring minification to persist tree/repo/branch/commit selection in the URL.

Reviewed changes

Copilot reviewed 22 out of 23 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
dashboard/src/utils/search.ts Adds minified query param keys for revision selection fields.
dashboard/src/types/hardware.ts Adds selector/selection TypeScript types for the new APIs and UI state.
dashboard/src/types/general.ts Extends SearchParamsKeys with selection-related search params.
dashboard/src/routes/_main/hardware/v2/route.tsx Allows revision selection fields in the v2 hardware route search schema.
dashboard/src/routes/_main/hardware/route.tsx Allows revision selection fields in the v1 hardware route search schema.
dashboard/src/pages/Hardware/hardwareTableUtils.ts Extracts hardware-details link search-building logic (dropping selection params).
dashboard/src/pages/Hardware/HardwareTable.tsx Integrates selector UI into table header and supports a configurable empty-state message id.
dashboard/src/pages/Hardware/hardwareSelection.ts Adds selection encode/decode + “resolve latest valid selection” helper logic.
dashboard/src/pages/Hardware/HardwareRevisionSelectors.tsx New tree/branch/revision combobox selector UI component.
dashboard/src/pages/Hardware/HardwareListingPageV2.tsx Switches v2 listing to selector-driven fetching and URL-updating handlers.
dashboard/src/locales/messages/index.ts Adds i18n strings for selector labels and revision-specific empty/reset messaging.
dashboard/src/components/ui/popover.tsx Adds Radix popover UI primitive wrapper used by the combobox UI.
dashboard/src/components/ui/command.tsx Adds cmdk-based command UI primitive wrapper used by the combobox UI.
dashboard/src/api/hardware.ts Adds hooks to fetch selectors and fetch listing-by-revision.
dashboard/pnpm-lock.yaml Locks newly added @radix-ui/react-popover and cmdk dependencies.
dashboard/package.json Adds @radix-ui/react-popover and cmdk dependencies.
backend/kernelCI_app/views/hardwareSelectorsView.py New selectors endpoint view (sanitizes raw DB rows into response model).
backend/kernelCI_app/views/hardwareByRevisionView.py New listing-by-revision endpoint view.
backend/kernelCI_app/urls.py Adds new API routes and extends cache wrapper to accept per-route timeout.
backend/kernelCI_app/typeModels/hardwareSelectors.py Pydantic models for selectors endpoint params/response.
backend/kernelCI_app/typeModels/hardwareListingByRevision.py Pydantic models for listing-by-revision endpoint params.
backend/kernelCI_app/tests/unitTests/url_patterns_test.py Adds URL pattern test for the new selectors route.
backend/kernelCI_app/queries/hardware.py Adds SQL queries for selectors and listing-by-revision.
Files not reviewed (1)
  • dashboard/pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread backend/kernelCI_app/urls.py Outdated
Comment on lines +223 to +227
ORDER BY
qr.tree_name ASC,
branch_latest_start_time DESC,
qr.latest_start_time DESC
"""
Copy link
Copy Markdown
Contributor Author

@gustavobtflores gustavobtflores May 20, 2026

Choose a reason for hiding this comment

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

Kind of a design decision for now, we may look into optimized approaches later on

Comment thread dashboard/src/pages/Hardware/HardwareListingPageV2.tsx Outdated
Comment thread dashboard/src/components/ui/popover.tsx Outdated
Comment thread dashboard/src/components/ui/command.tsx Outdated
@gustavobtflores gustavobtflores force-pushed the feat/hardware-revision-selector branch from 8313347 to 6595cd4 Compare May 20, 2026 13:29
@gustavobtflores gustavobtflores force-pushed the feat/hardware-revision-selector branch from 6595cd4 to ce60bfc Compare May 20, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backend Most or all of the changes for this issue will be in the backend code. enhancement New feature or request Frontend Most or all of the changes for this issue will be in the frontend code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants