feat: add device search - #395
Conversation
|
@alectimison-maker is attempting to deploy a commit to the Meshtastic Team on Vercel. A member of the Team first needs to authorize it. |
📝 WalkthroughWalkthroughThe change adds a localized ChangesDevice search
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
actor User
participant DeviceSearch
participant Device
participant matchesDeviceSearch
User->>DeviceSearch: Enter search query
DeviceSearch->>Device: Update searchQuery through v-model
Device->>matchesDeviceSearch: Match query against each device
matchesDeviceSearch-->>Device: Return matching devices
Device-->>User: Render filtered device list
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
components/Device.vueESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox. components/DeviceSearch.vueESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox. utils/deviceSearch.test.tsESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
utils/deviceSearch.test.ts (1)
18-26: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winTest each searchable field independently.
The fixture uses
RAK4631for bothhwModelSlugandplatformioTarget. It does not definekeyorvariant. The current cases cannot detect removal of these fields fromsearchableValues.Add distinct cases for
hwModelSlug,platformioTarget,key, andvariant.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@utils/deviceSearch.test.ts` around lines 18 - 26, Update the parameterized test around matchesDeviceSearch to use distinct query values that independently match hwModelSlug, platformioTarget, key, and variant. Extend the fixture with unique key and variant values if needed, ensuring each searchable field is covered without reusing RAK4631 for multiple fields.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@utils/deviceSearch.test.ts`:
- Around line 18-26: Update the parameterized test around matchesDeviceSearch to
use distinct query values that independently match hwModelSlug,
platformioTarget, key, and variant. Extend the fixture with unique key and
variant values if needed, ensuring each searchable field is covered without
reusing RAK4631 for multiple fields.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 6bd299b1-d71c-46dd-897a-6820e69ee7fe
📒 Files selected for processing (4)
components/Device.vuecomponents/DeviceSearch.vueutils/deviceSearch.test.tsutils/deviceSearch.ts
Description
Adds search to the device-selection modal so users can filter the hardware catalogue by display name, PlatformIO target, hardware slug, architecture, variant, or vendor tag.
The search field uses the existing translated device-selection label and theme tokens, so this change does not touch the protected Crowdin locale files.
Closes #309
Type of Change
Testing
Validation performed:
pnpm test:run— 14 files, 166 tests passedpnpm build— passedpnpm eslint components/DeviceSearch.vue utils/deviceSearch.ts utils/deviceSearch.test.ts— passed4631,Seeed, and no-match filtering, a 44px input target, and no unhandled page errorscomponents/Device.vuehas 158 pre-existing lint findings onmain; the modified file reports the same count.Hardware Model Acceptance Policy
No hardware models or protected files are changed by this PR.
Summary by CodeRabbit
New Features
Tests