Address code-review findings (Rust + JS + PS) toward 10/10 - #11
Merged
Conversation
Rust backend:
- atomic.rs: replace non-atomic stale-lock takeover (stale-check + remove_file
+ create_new) with PID-liveness-gated atomic rename-to-tombstone, so a slow
but still-living writer is no longer robbed of its lock.
- common.rs: drop speculative Win11 build 26200 ('25H2'), add 22000 RTM.
- inventory.rs: clamp implausible ageYears (<0, >30y, NaN/Inf) to None instead
of producing absurd 'Gerät alt (-5 Jahre)' displays.
- merge.rs/assignments.rs: extract effective_display() helper to dedupe the
'user_display vempty -> fall back to user' logic across three call sites.
- merge.rs: drop redundant .clone() of bios/win11 via as_ref().
- overview.rs: single-pass accumulation of status tallies, dept map, and RAM
buckets (previously nine separate scans).
- commands.rs: avoid full Vec clone in the AD-fallback path.
- config.rs: control_dir_for no longer falls back to a relative Path::new('')
for single-segment data_dir inputs.
- upgrade.rs: document inclusive minRamGB boundary.
Frontend:
- Fix counter drift: dashboard 'Upgrade' tag now uses o.upgradeNeeded (the same
definition the inventory segment and nav badge use) instead of o.status.upgrade.
- Row highlight uses ViewModel.isUpgradeCandidate instead of status==='upgrade',
so stale-with-reason devices in the Upgrade filter are visually promoted
rather than dimmed.
- view-model.js: locale-aware collation (numeric:true, de) — umlaut surnames and
hostnames like 'WS-AB-2' vs 'WS-AB-10' now sort correctly; drop unused sortValue.
- Search input debounced (150ms, mirroring the AD modal); refresh button guarded
against double-clicks; Escape closes the topmost layer (modal before drawer).
- Drawer foot moved out of drawer-body (previously nested inside, scrolling with
the body instead of staying sticky).
- Dedupe DEFAULT_THRESHOLDS into shared.js; mock.js cpuClockMhz now derives from
realistic per-PC clock values; mock set_assignment returns device, activating
the optimistic UI path.
- __TAURI__ now read at call time, not snapshotted once at load.
- dev-server.js adds X-Content-Type-Options/X-Frame-Options/Referrer-Policy.
PowerShell:
- Get-AdUsers.ps1: force UTF-8 output (no BOM) so umlauts survive the
Rust/serde_json parse; dispose SearchResultCollection; drop dead null check.
- Invoke-Inventory.ps1: prefer DNSHostName over NetBIOS short name; sum slotsTotal
across all Win32_PhysicalMemoryArray instances; add MSFT_PhysicalDisk fallback via
root\Microsoft\Windows\Storage before relying on the unreliable model-string
regex; clamp implausible ageYears; document LastLoggedOnUser and win11 TPM/
SecureBoot preflight semantics; write logs as UTF-8 without BOM.
- Remove-StaleInventory.ps1: per-file try/catch so a single locked file no longer
aborts the cleanup sweep; reject non-integer or out-of-range schemaVersion.
All CI gates remain green: cargo fmt --check, cargo clippy -D warnings (33 tests),
node --check, and the shared golden-vector parity tests.
zerox80
force-pushed
the
fix/review-2026-07-01
branch
from
July 1, 2026 20:23
0772237 to
2d76eaa
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.
Comprehensive follow-up to the manual code review. All CI gates stay green:
ode --test\ -> 5 passed, 0 failed (golden-vector parity intact)
Summary by area
Rust backend
Frontend
PowerShell
ull-check on the env-var cast.
oot\Microsoft\Windows\Storage\ before falling back to the unreliable model-string regex; clamp implausible ageYears; documented \LastLoggedOnUser\ reliability and \win11\ (TPM/SecureBoot) preflight semantics; logs written as UTF-8 without BOM.
Verification
\
cd app/src-tauri && cargo fmt --all -- --check && cargo test --all && cargo clippy --all-targets -- -D warnings
cd app && node --check src/shared.js && node --check src/view-model.js && node --check src/app.js && node --check src/app-panels.js && node --check src/mock.js && node --check dev-server.js && node --test tests/upgrade-parity.test.js tests/view-model.test.js
\
All green.