Repository navigation
feat(hardware): add Windows collector and split integrated/discrete GPUs - #6
Merged
Merged
Conversation
…d interface The hardware layer previously hard-coded Linux sysfs reads inside machine.ts and live.ts, which broke on Windows (ERR_UNKNOWN_BUILTIN_MODULE / empty topology) and mixed OS concerns. - Add collector.ts defining the HardwareCollector contract plus the shared HwmonDevice/HwmonSource types (moved out of linux.ts). - Add platform.ts as the single entry point that selects the collector for the current OS and re-exports readCpuTopology, readMemoryModules, readHwmon, and readModuleTemps. - Add windows.ts collector using Win32/PowerShell sources for CPU topology and memory modules; add darwin.ts stub so macOS degrades gracefully instead of throwing. - Point live.ts at platform.ts instead of importing linux.ts directly. - Ignore local .adnify/ tooling output.
The UI previously collapsed every controller into a single 'GPU' role, so laptops with both an iGPU and a dGPU only surfaced the integrated adapter, and remote-desktop virtual display drivers polluted the list. - machine.ts: filter out software / remote-desktop display adapters (Sunlogin OrayIdd, DisplayLink, Parsec, ToDesk, IDD, Windows Basic Display, etc.) so only real silicon is reported; refine integrated detection (Onboard bus + iGPU model heuristics) and drop the discrete-first sort now that role is derived downstream. Also backfill P-core max frequency from the package max when deep topology omits it. - parts.ts: add role-aware selectors and a dedicated gpu-discrete PartId; make gpuDetail resolve integrated vs discrete rather than the first controller. - detail.ts: add gpuDiscrete label and discrete-GPU intro copy for both locales. - Overview.tsx / Laptop.tsx / Shell.tsx: consume the role selectors, render a separate discrete-GPU card and focus target, and highlight the correct adapter.
Owner
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.
Summary
Adds first-class Windows hardware collection behind a platform-agnostic collector
interface, and fixes GPU reporting so laptops correctly surface both the integrated
and discrete adapters instead of collapsing them into one entry (and dropping the dGPU).
Type of change
Testing
Tested on Windows (x64). CPU topology, memory modules, and GPU classification were
verified against a live snapshot showing both an integrated GPU and a discrete GPU
present and correctly labelled.
pnpm typecheckpnpm lintpnpm buildChecklist
enandzhinsrc/i18n/src/appandsrc/serverimportssrc/server/**)Related issues