Repository navigation
Replace the StatusPanel property broadcasts with direct window calls - #1185
Merged
Merged
Conversation
The StatusPanelRecordNumber, StatusPanelMessage and StatusPanelProgress properties carried the record number, the record message and the parser progress to the main window's status bar: a setter stored the property with the broadcast flag, the xCore Mediator queued an OnPropertyChanged item, and after the current action the window copied the property value into the panel whose id is the name without its StatusPanel prefix. Nothing else listened to those three names, and nothing read their values. The window now exposes SetStatusPanelText(panelId, text), and the setters call it with the panel id from Main.xml (RecordNumber, Message, Progress). The StatusPanel branch in XWindow.OnPropertyChanged is gone, and the three properties are not stored any more. The text appears when the setter runs instead of when the Mediator queue drains after the action; the status bar exists from window initialization, every setter runs on the UI thread, and none of them is re-entered, so no caller depended on the delay. A panel id with no panel is ignored, which also covers windows built without a status bar. DialogFilterStatus went through the same setter but is not a panel: the Concordance dialog reads it from the PropertyTable to show its own filter state. It keeps a plain property set without the broadcast, which no handler ever received. A direct call is also simpler than moving these properties to Pub/Sub with delayed execution: each setter can already reach the window, so no subscription, scope or end-of-action delivery is needed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1185 +/- ##
==========================================
+ Coverage 39.49% 39.51% +0.01%
==========================================
Files 1537 1537
Lines 354392 354387 -5
Branches 41058 41059 +1
==========================================
+ Hits 139974 140031 +57
+ Misses 185044 184983 -61
+ Partials 29374 29373 -1
🚀 New features to boost your workflow:
|
thejambi
approved these changes
Oct 14, 2026
thejambi
left a comment
Contributor
There was a problem hiding this comment.
@thejambi reviewed 7 files and all commit messages, and made 1 comment.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on mark-sil).
6 of 16 tasks
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.
Start here:
Src/XCore/xWindow.cs, the newSetStatusPanelTextand theOnPropertyChangedbranch it replaces.The record number, record message and parser progress texts in the status bar now reach their panels through one direct window call. A setter used to store
StatusPanelRecordNumber,StatusPanelMessageorStatusPanelProgresswith the broadcast flag, and the window copied the value into the panel after the Mediator queue drained. Those three properties are gone. Nothing else read them or listened to them. It is a direct call, not Pub/Sub, because every setter can already reach the window.What could break: timing. The text now appears when the setter runs, not after the current action. The status bar exists from window initialization, every setter runs on the UI thread, and none re-enters, so nothing relied on the delay. A panel id with no panel is ignored.
Where to look
XWindow.SetStatusPanelTextand the deleted default branch ofXWindow.OnPropertyChanged.RecordClerk.ResetStatusBarPanel: itsDialogFilterStatuscaller is not a panel. The Assign Analysis dialog reads that property, so it keeps a plain set without the broadcast no handler received.ParserListener.UpdateStatusPanelProgressruns on every Idle and timer tick.StatusBarPanel.Textignores identical text.GeneratedHtmlViewer.Initclears the record-number panel the same way.Not here: the Filter, Sort and ParsingDev panels, which
RecordClerkalready sets through their panel objects, and every other PropertyTable broadcast.Verification:
build.ps1with both hygiene gates is clean. xCoreTests (3 new), xWorksTests, xCoreInterfacesTests and ParserUITests all pass; counts are in the evidence section below. Manual steps:Next: approve, or tell me what to change.
Reading this a year from now -- start here
No research or working files were on this branch, so nothing was deleted from the tree. This record carries the reasoning that does not fit in the code: why one window method replaced three property broadcasts, what was checked before they were removed, and what the change leaves alone.
Decisions, and why
XWindow, not on theIxWindowinterface. That interface serves code that does not reference xCore, and all three setters reference it.GetWindow() as XWindowwith a null-conditional call.GetValue<T>("window")throws when the property holds another type, and one test fixture stores a plainFormthere. The test windowMockFwXWindowbuilds no status bar, so the call has to tolerate a missing panel.CheckDisposedin the method.ShutDownPart1clears the panel map before it disposes the panels, so a call on a closing window finds nothing and returns. The Mediator behaved the same way onceProcessMessageswas false.DialogFilterStatuskeeps a plain property set.RecordClerk.UpdateFilterStatusBarPanelstores it while the dialog'sIgnoreStatusPanelflag is set, andConcordanceDlgreads it as it builds its browse view. The broadcast flag goes false because no handler matched that name.Paths not taken
RecordClerkalready does for the Filter, Sort and ParsingDev panels. It needs no new method. The window method adds one public member and keeps the panel map, whichXWindowclears before it disposes the panels, private to the window.PublishAtEndOfAction. It keeps today's timing at the cost of a subscriber, a scope and a new event, for a window the setter can already call. Nothing depends on the delay.Surprising findings
DialogFilterStatuslooks like a dead panel write because no panel has that id, butConcordanceDlgreads it.StatusBarPanel.Textskips its redraw when the new text equals the current text, checked in the installed framework's IL. The progress text can therefore be set on every Idle without the PropertyTable's change check.ConcordanceDlg.BrowseViewer_FilterChangedfrom the added filter of the last column event. Clearing one of two column filters clears the label while the other filter still applies. The main window's Filter panel uses the combined filter, throughRecordClerk.UpdateFilterStatusBarPanel.Deferred, and what would unblock it
Every other PropertyTable broadcast keeps today's delivery, queued until after the current action. Each one needs its own check of who listens and whether anything depends on the delay.
Evidence
build.ps1 -CommentHygiene -TokenHygieneNot run: the other test projects and the full suite.
git grepfor the StatusPanel names andDialogFilterStatusover Src, DistFiles and TestLangProj leaves theIgnoreStatusPanelflag, which is a different property and untouched, the namesSetStatusPanelTextandUpdateStatusPanelProgress, and theDialogFilterStatussetter and reader.ParserListenerdrives its progress from aSystem.Windows.Forms.Timerand from the Idle event published byXWindow.SynchronizedOnIdleTime. It unsubscribes from Idle and stops the timer when it is disposed.RecordClerksets the record number and message insideSelectedRecordChanged, which updates the WinForms record bar in the same call, so the call already needs the UI thread.Preflight review details
Code Review Summary
Branch: claude/pubsub-status-panels-1822e2
Base: main
Date: 2026-10-14
Review model: Claude Sonnet 5.5 (preflight passes); Claude Fable 5.1 (the earlier code-review pass over the same diff)
Files changed: 7 (1 commit)
Overview
The branch replaces the StatusPanelRecordNumber, StatusPanelMessage and StatusPanelProgress property broadcasts with a direct call on the main window,
XWindow.SetStatusPanelText(panelId, text), and deletes theStatusPanelbranch ofXWindow.OnPropertyChangedthat they fed. Three setters changed:RecordClerk.ResetStatusBarPanel,ParserListener.UpdateStatusPanelProgressandGeneratedHtmlViewer.Init. The fourthResetStatusBarPanelcaller setsDialogFilterStatus, which no panel has; the Assign Analysis dialog reads it, so that caller keeps a plain property set without the broadcast.The analysis found no Critical or Important issue. Every claim in the commit was checked against the code: the only listener for the three names was the removed branch, and nothing in Src, DistFiles or TestLangProj reads their values.
Contract/API Changes
XWindow.SetStatusPanelText(string panelId, string text). Unknown or null ids are ignored.XWindow.OnPropertyChangedno longer reacts to names starting withStatusPanel, and the three properties are no longer stored in the PropertyTable.DialogFilterStatusis set with the broadcast flag false; no handler matched that name.RecordClerk.ResetStatusBarPanelnow takes a panel id; its constantStatusBarRecordNumberholdsRecordNumber.Findings
Critical - Must address before merge
None.
Important - Should address before merge
None.
Minor - Consider
(kept: the panel map is cleared before the panels are disposed, so a call on a closing window finds nothing and returns, as the dropped Mediator items did; throwing from a parser timer tick during close would be worse)SetStatusPanelTextdoes not call CheckDisposed like other public xWindow membersA second way to reach a status panel now exists beside the panel objects RecordClerk reads from the PropertyTable for Filter, Sort and ParsingDev(kept: one window method keeps the panel map private to XWindow; the alternative is recorded in the PR)The removed prefix branch let any PropertyTable holder set a panel's text(informational: no such setter exists in Src)Panel ids are string literals in three files(kept: same as the existing Filter, Sort and ParsingDev literals; an unknown id is ignored by design)Required Validation / Evidence
Run on the committed tree, all passing:
.\build.ps1 -CommentHygiene -TokenHygiene -StartedBy agent: both gates clean, build succeeded..\test.ps1 -CommentHygiene -TokenHygiene -SkipNative -StartedBy agent -TestProject xCoreTests: 20 passed (3 new).-NoBuildand-TestProject xWorksTests: 1777 passed, 2 skipped, 0 failed. The log carries a TearDown note fromUnitOfWorkService.DisposeinLexiconFirstSliceEditContextEdgeCaseTests; it is not a failed test and the code is untouched here.-TestProject xCoreInterfacesTests: 19 passed.-TestProject ParserUITests: 16 passed.Manual: the author confirmed step 5 (Grammar Sketch clears the record-number panel) and exercised step 6 (the dialog's filter label). Steps 1 to 4 are written into the PR for the reviewer or tester and are not recorded here as performed.
Not run: the other test projects and the full suite.
Positive Observations
StatusBarPanel.Textcompares with the current text before redrawing (checked in the installed framework), so setting the progress text on every tick costs nothing when it has not changed.Interview Notes
ConcordanceDlg.BrowseViewer_FilterChangedis untouched here.In-Review Quality Check
No changes during preflight. The two fixes above were made in the code-review pass before the commit.
Suggested Review Focus
XWindow.SetStatusPanelTextand the deleted default branch ofXWindow.OnPropertyChangedRecordClerk.ResetStatusBarPanelcallers and theDialogFilterStatuscallerParserListener.UpdateStatusPanelProgresssetting text on every tick🤖 Generated with Claude Code
This change is