feat: add motherboard information retrieval and dashboard integration#1081
Conversation
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Pull request overview
Adds motherboard + BIOS information to the hardware monitoring pipeline and surfaces it in the dashboard/clipboard export, extending the existing “SysInfo” aggregate.
Changes:
- Introduces a
MotherboardInfomodel and threadsSysInfo.motherboardthrough backend collection and frontend state. - Implements motherboard retrieval on Windows via WMI and adds placeholder implementations on Linux/macOS.
- Adds a new “Motherboard” dashboard tile, selector entry, and clipboard export section, plus i18n labels.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/rspc/bindings.ts | Updates generated TS types to include MotherboardInfo and SysInfo.motherboard. |
| src/lang/en.json | Adds English UI strings for motherboard fields. |
| src/lang/ja.json | Adds Japanese UI strings for motherboard fields. |
| src/features/hardware/hooks/useHardwareInfoAtom.ts | Initializes SysInfo atom with motherboard: null. |
| src/features/hardware/hooks/useHardwareInfoAtom.test.ts | Updates expected SysInfo shape to include motherboard. |
| src/features/hardware/dashboard/types/dashboardItem.ts | Adds "motherboard" to available dashboard items. |
| src/features/hardware/dashboard/hooks/useSortableDashboard.ts | Adds "motherboard" to default sortable dashboard order. |
| src/features/hardware/dashboard/hooks/useExportToClipboard.ts | Appends motherboard section to clipboard export output. |
| src/features/hardware/dashboard/components/DashboardItems.tsx | Adds MotherboardDataInfo table component. |
| src/features/hardware/dashboard/components/DashboardItemSelector.tsx | Adds “Motherboard” to the visibility dropdown labels. |
| src/features/hardware/dashboard/Dashboard.tsx | Registers motherboard tile + icon and integrates it into rendering/filtering. |
| src-tauri/src/services/motherboard_service.rs | Adds service entry point to fetch motherboard info via platform abstraction. |
| src-tauri/src/services/mod.rs | Exposes the new motherboard service module. |
| src-tauri/src/services/hardware_service.rs | Collects motherboard info in parallel and includes it in SysInfo. |
| src-tauri/src/platform/windows/motherboard.rs | Adds Windows motherboard fetcher using spawn_blocking WMI query. |
| src-tauri/src/platform/windows/mod.rs | Wires MotherboardPlatform into WindowsPlatform. |
| src-tauri/src/platform/traits.rs | Introduces MotherboardPlatform and extends Platform to include it. |
| src-tauri/src/platform/macos/mod.rs | Adds MotherboardPlatform impl returning “not implemented”. |
| src-tauri/src/platform/linux/mod.rs | Adds MotherboardPlatform impl returning “not implemented”. |
| src-tauri/src/models/hardware.rs | Adds MotherboardInfo struct and SysInfo.motherboard. |
| src-tauri/src/infrastructure/providers/windows/wmi_provider.rs | Implements WMI queries for baseboard + BIOS and formats WMI datetime. |
Co-authored-by: Copilot <[email protected]>
| const { init } = useHardwareInfoAtom(); | ||
| const [dashboardItemMap, setDashboardItemMap] = useTauriStore< | ||
| DashboardItemType[] | ||
| >("dashboardItem", ["cpu", "gpu", "memory", "storage", "network", "process"]); | ||
| >("dashboardItem", [ | ||
| "cpu", | ||
| "gpu", | ||
| "memory", | ||
| "storage", | ||
| "network", | ||
| "process", | ||
| "motherboard", | ||
| ]); |
There was a problem hiding this comment.
dashboardItem order is persisted via Tauri Store. For existing users with an older stored array (without the new "motherboard" key), the dashboard will never render the motherboard card because rendering iterates dashboardItemMap only. Consider adding a small migration step (e.g., on load) to append any missing dashBoardItems into dashboardItemMap and persist the updated array.
| impl MotherboardPlatform for MacOSPlatform { | ||
| fn get_motherboard_info( | ||
| &self, | ||
| ) -> Pin< | ||
| Box< | ||
| dyn Future<Output = Result<crate::models::hardware::MotherboardInfo, String>> | ||
| + Send | ||
| + '_, | ||
| >, | ||
| > { | ||
| Box::pin(async { | ||
| Err("get_motherboard_info is not implemented for MacOSPlatform".to_string()) | ||
| }) | ||
| } | ||
| } |
There was a problem hiding this comment.
On macOS/Linux the new get_motherboard_info stub always returns Err("...not implemented..."), which will be logged as an error by collect_hardware_info every time hardware info is fetched. If "unsupported" is an expected state, consider representing it as Ok(None) (e.g., change the trait to return Result<Option<MotherboardInfo>, String>) or avoid logging this specific error at error level to reduce noisy logs.
| impl MotherboardPlatform for LinuxPlatform { | ||
| fn get_motherboard_info( | ||
| &self, | ||
| ) -> Pin< | ||
| Box< | ||
| dyn Future<Output = Result<crate::models::hardware::MotherboardInfo, String>> | ||
| + Send | ||
| + '_, | ||
| >, | ||
| > { | ||
| Box::pin(async { | ||
| Err("get_motherboard_info is not implemented for LinuxPlatform".to_string()) | ||
| }) | ||
| } |
There was a problem hiding this comment.
On Linux the new get_motherboard_info stub always returns Err("...not implemented..."), which will be logged as an error by collect_hardware_info every time hardware info is fetched. If "unsupported" is an expected state, consider representing it as Ok(None) (e.g., change the trait to return Result<Option<MotherboardInfo>, String>) or avoid logging this specific error at error level to reduce noisy logs.
No description provided.