Repository navigation
P0 Events: indexed 100-row history, immutable event numbers and full passive ledger drain - #165
Conversation
| var take = (int)Math.Min(EventHistoryPagination.PageSize, | ||
| _eventHistoryCeiling - start); | ||
| var page = await Task.Run(() => journal.ReadAfter(start, take)); | ||
| if (generation != _eventHistoryGeneration || !_eventHistoryMode || |
| catch (Exception ex) when (ex is IOException or InvalidDataException or | ||
| ObjectDisposedException or JsonException) | ||
| { | ||
| if (generation != _eventHistoryGeneration || !_eventHistoryMode) return; |
| _directory = Path.Combine(Path.GetTempPath(), "ArSee", "EventHistory", | ||
| Guid.NewGuid().ToString("N")); |
| _directory = Path.Combine(Path.GetTempPath(), "ArSee", "EventHistory", | ||
| Guid.NewGuid().ToString("N")); | ||
| Directory.CreateDirectory(_directory); | ||
| _dataPath = Path.Combine(_directory, "events.bin"); |
| Guid.NewGuid().ToString("N")); | ||
| Directory.CreateDirectory(_directory); | ||
| _dataPath = Path.Combine(_directory, "events.bin"); | ||
| _indexPath = Path.Combine(_directory, "events.idx"); |
Codex Review Summary: ✅ CompletedThis 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: c32ff2e280
ℹ️ 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".
| while (!_passiveLedgerReadFailed && | ||
| _passiveLedgerCursor < session.GetProcessEventProgress().IndexedObjects) |
There was a problem hiding this comment.
Drain pending previews independently of the process-event cursor
When capture finishes with no outstanding indexed process events, this loop performs no final refresh—even if frame previews, GI milestones, controls, or latest-point updates are still queued. For example, a final GI termination or command response received after the last timer tick does not advance IndexedObjects, so it remains unpresented when the timer is stopped in finally. The previous unconditional refresh passes handled this case; retain a final preview reconciliation independently of the process-ledger drain.
AGENTS.md reference: AGENTS.md:L447-L447
Useful? React with 👍 / 👎.
| Frame = frame, | ||
| TypeId = TypeId, | ||
| TypeName = TypeName, | ||
| CauseOfTransmission = Cot, | ||
| CauseName = CauseName, |
There was a problem hiding this comment.
Preserve decoded protocol details in historical frame snapshots
For active IEC-101/104 events whose original frame has rolled out of _protocolTraceStore, “Open original frame” falls back to this restored evidence object. The snapshot restores neither AsduDetails/InformationObjectDetails nor APCI, typed quality, and cause details; parsing the FT1.2 envelope does not restore those IEC-101 fields, and IEC-104 is not decoded here at all. Consequently, PopulateFrameProperties receives a null ASDU and hides the information-object table, while the historical inspector loses the original quality and protocol flags. Preserve the decoded details, or enough recorded decoder configuration and object identity to reconstruct them faithfully.
AGENTS.md reference: AGENTS.md:L23-L23
Useful? React with 👍 / 👎.
| </ContextMenu> | ||
| </DataGrid.ContextMenu> | ||
| <DataGrid.Columns> | ||
| <DataGridTextColumn Header="#" Binding="{Binding EventNumber}" Width="67" MinWidth="57" ElementStyle="{StaticResource GridCellNoWrapText}" /> |
There was a problem hiding this comment.
Update the WPF acceptance probe for the inserted event column
Adding this column moves “State / value” from index 2 to index 3, but RunObservationUiAcceptanceProbeAsync still requires RelayEventGrid.Columns[2] to be a DataGridTemplateColumn bound to OperatorValue (MainWindow.ObservationAcceptance.cs:1033–1035). Index 2 is now the “Signal” text column, so the probe throws and the executable exits with status 1. The release workflow explicitly runs this probe in .github/workflows/release-package.yml:292–295, blocking release packaging. Update the assertion alongside the column change, preferably locating the column by identity rather than position.
AGENTS.md reference: AGENTS.md:L32-L32
Useful? React with 👍 / 👎.
Field motivation
Siemens field simulation observed >1,000 events while ArSee's Event Log only displayed the most recent 420. A bounded WPF grid is not a protocol receive limit; operators need to inspect event #1 through #2,000+ without a giant DataGrid or a false data-loss claim.
Implementation
Tests / acceptance
New deterministic 60/500/2,150 record indexed paging, frame/source provenance, bounds and explicit capacity failure regression tests. Windows Release/xUnit/WPF smoke will run on exact PR head before merge.
Integration
Base master 0cedf88 includes #164 vendor TI135. Concurrent IEC101 engine #145 remains separate, untouched. Do not merge until CI green and review findings resolved.