feat: add checkout selectors on hardware page#1904
Open
gustavobtflores wants to merge 3 commits into
Open
Conversation
db1a452 to
d6051f2
Compare
e62fd2c to
4cb4128
Compare
4cb4128 to
8313347
Compare
There was a problem hiding this comment.
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 on lines
+223
to
+227
| ORDER BY | ||
| qr.tree_name ASC, | ||
| branch_latest_start_time DESC, | ||
| qr.latest_start_time DESC | ||
| """ |
Contributor
Author
There was a problem hiding this comment.
Kind of a design decision for now, we may look into optimized approaches later on
8313347 to
6595cd4
Compare
…date hardware-by-revision path cache duration
6595cd4 to
ce60bfc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allows the user to select a specific tree/branch/commit on the hardware page to filter data