Repository navigation
Add command line, I/O, and GUI object columns - #31
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
TaskManagerRust/src/pages/processes/mod.rs
Lines 1240 to 1241 in 9bda930
When a user enables an I/O column after rows have already loaded, this replaces active_columns and rebuilds only the headers. Existing entries were never formatted for that previously inactive column, even though their I/O fields were already sampled; update_process_entry formats the cell only when that counter changes, so an idle process can retain a blank cell indefinitely. Mirror apply_options by rebuilding the newly active display columns for every existing entry before refreshing.
AGENTS.md reference: AGENTS.md:L62-L62
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let bytes = usize::from(header.length); | ||
| if bytes > MAX_IMAGE_NAME_BYTES { | ||
| return Err(ERROR_INVALID_DATA); |
There was a problem hiding this comment.
Accept the full Windows command-line length
For a process whose command line exceeds 16,384 UTF-16 code units, this image-name-sized limit rejects an otherwise valid command line as corrupt. Windows command lines can approach 32,767 characters, so the parser must allow up to the UNICODE_STRING length limit, and COMMAND_LINE_MAX_BYTES must also include the UnicodeString header; otherwise the new column incorrectly displays “Not available” for valid long invocations.
AGENTS.md reference: AGENTS.md:L52-L52
Useful? React with 👍 / 👎.
9bda930 to
07ea9c1
Compare
Grow the process column list through an options schema 3 migration that keeps the existing binary fields in place. Sample the new counters on the process worker, and leave a failed row unknown instead of zero. Accept command lines up to the UNICODE_STRING limit of 32,767 code units, and size the query buffer to include the UnicodeString header. Co-authored-by: jameslincn <jameslincn@outlook.sg>
07ea9c1 to
13d98d6
Compare
Summary
Adds the process columns that sit past
ThreadCount: command line, I/O read/write bytes, I/O read/write counts, and GDI/USER object counts.Optionsstays#[repr(C)]. Schema 3 appends the extra column slots after the existing fields, and schema 0–2 blobs migrate without reordering or retyping those fields. Column checks still require a unique image-name primary column, no duplicates, legal sentinels, and valid widths.I/O counters come from the existing
SystemProcessInformationsnapshot. Command line and GDI/USER counts are queried on the process worker, and only for a creation-time-checkedProcIdentity, when those columns are visible. A process that exits during the query keeps its row; the missing value stays unknown (Not available, not zero) and setsrow_error. The UI thread only lays out and paints, and the virtual list formats visible rows.Command lines are accepted up to the
UNICODE_STRINGlimit of 32,767 UTF-16 code units. The query buffer includes theUnicodeStringheader, so a valid long invocation stays visible instead ofNot available.Checks
Ran here, cross-compiling to Windows from Linux (not a device test):
cargo fmt --all -- --checkcargo clippy --all-targets --locked -- -D warningsforx86_64-pc-windows-msvc,i686-pc-windows-msvc, andaarch64-pc-windows-msvccargo check --all-targets --lockedfor those three targetsgit diff --checkcargo testandcargo build --releaseneed a Windows runner. CI Quality and Architecture jobs cover those.