Repository navigation
fix(WPF): crisp ClearType Trace and byte-accurate selected Frame Interpreter - #44
Conversation
…ith linked raw field groups
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
Here are some automated review suggestions for this pull request.
Reviewed commit: 210b9a4488
ℹ️ 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".
| var headerSize = asdu.Objects.FirstOrDefault(o => o.InformationObjectOffset >= 0)?.InformationObjectOffset; | ||
| if (headerSize is null) | ||
| headerSize = 2 + cotSize + (raw.Count > asduStart + 4 ? 2 : 1); | ||
| var caSize = headerSize.Value - 2 - cotSize; |
There was a problem hiding this comment.
Avoid guessing the common-address width when objects are absent
When an IEC-101 ASDU uses a one-byte common address but has no decoded objects (for example, VSQ=0 or a payload truncated before the first IOA), this fallback infers a two-byte CA from the total frame length, which includes checksum/end bytes. For a one-byte COT and header-only ASDU, the Common address group consequently includes the checksum as its second byte while displaying the decoded one-byte address. Preserve the configured header widths in the decode result, or leave the range unknown when they cannot be determined; total frame length cannot establish CA width.
Useful? React with 👍 / 👎.
| <StackPanel> | ||
| <DockPanel LastChildFill="True"> | ||
| <TextBlock Text="{Binding Title}" FontSize="12.2" FontWeight="Medium" Foreground="{StaticResource Ink900Brush}" Margin="0,0,9,0" DockPanel.Dock="Left" /> | ||
| <TextBlock Text="{Binding Evidence}" FontFamily="Cascadia Mono, Consolas" FontSize="11.3" Foreground="{StaticResource Ink600Brush}" TextWrapping="Wrap" /> |
There was a problem hiding this comment.
Keep the new inspector evidence text in Aptos
The replacement evidence TextBlock introduces an explicit Cascadia Mono/Consolas override where the previous inspector inherited the application font. This violates the root AGENTS.md typography requirement that the UI remain Aptos-only, explicitly including raw hex. Use the Aptos application resource for this new field rather than introducing a monospace override.
AGENTS.md reference: AGENTS.md:L351-L351
Useful? React with 👍 / 👎.
|
|
||
| ## Fix | ||
| - Trace title/meaning rendered in normal AppFont (Segoe UI/Aptos), 12.8/12.2 DIP, 18-DIP lines, darker ink and **Ideal + ClearType**, preserving light ListBox virtualized 1200-row bounded display; raw HEX uses Cascadia Mono/Consolas 11.6 DIP with Ideal + ClearType and no shadow, animation or per-frame additional UI. | ||
| - Inspector uses neutral white background; larger 11.9-12.2 DIP type and simple compact field + HEX + decoded value layout, not a large lecture-style two-column table. |
There was a problem hiding this comment.
Update the required responsive layout policy
This change replaces the inspector's two-column field layout with stacked field/hex/meaning rows and changes trace sizing, but only adds a standalone FAT document. The root AGENTS.md explicitly requires updating docs/RESPONSIVE_LAYOUT_POLICY.md whenever layout changes; that policy is untouched in this commit. Update the canonical policy to describe the revised inspector layout and its bounded scrolling behavior rather than documenting the change only in this dated checklist.
AGENTS.md reference: AGENTS.md:L215-L215
Useful? React with 👍 / 👎.
Field report
Screenshot after PR #43: raw frame interpreter is visually faint/jagged. Trace used tiny 10.5–11.6 DIP monospaced font with explicit TextFormattingMode=Display overriding global Ideal/ClearType; Inspector used generic lecturing text and fabricated "L=105,CA=1,IOA=..." strings as raw evidence chips.
Implemented
Iec101FrameByteInspector.Explainonly on selection, consumes typed FT1.2 + shared ASDU info-object offsets, returns byte-exact spans for envelope, control bits, link address, Type ID, VSQ, COT, CA, every IOA, each information element (value/quality/RTU time), and checksum/end. Unknown/truncated data never disguised as valid. One SSOT produces both clickable raw chips and corresponding linked decoded field rows, replacing fake/address-string raw chips.docs/IEC101_WPF_TEXT_AND_BYTE_INSPECTOR_20261029.md.Guardrails
No polling/FCB/DFC/COM transport changes; passive remains RX-only; no hot-path decoder work. Validate Release Windows/WPF build, code formatting, protocol smoke, full xUnit, package/GUI smoke, CodeQL, dependency/hygiene before merge. CI is NOT proof of real-screen antialiasing at various DPI; FAT on SICAM 1200bps still required.