Repository navigation
Publish JumpToRecord at once from three detail-pane handlers - #1241
Merged
Merged
Conversation
Three WinForms detail-pane handlers now publish JumpToRecord to their own window, so the window's active clerk selects the record before the handler returns. Until now each queued it with the Mediator's BroadcastMessageUntilHandled, which ran after the handler had returned and offered the jump to every colleague of the window. The three senders are ReversalPOSMenuHandler's OnMoveReversalPOS and OnMergeReversalPOS, and Slice.InsertObject, which jumps to a new sub-item that got no slice under the inserting one. The jump can run at once because nothing in these handlers needs it to be late. The reversal handlers do nothing after it, and in Slice.InsertObject the clerk's part of the jump touches no slice, so the focus step that follows is unaffected. What the unit of work left queued, the detail pane's postponed refresh, does not depend on the jump, and the clerk's display of the record it jumped to stays queued behind it, as before. When a filter hides the target, the clerk's prompt to turn the filter off now opens inside the handler, so the two reversal handlers publish as their last step. Slice.InsertObject tested the broadcast's result, which was always false; that test is gone and the focus step after it runs as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1241 +/- ##
==========================================
+ Coverage 40.55% 40.70% +0.14%
==========================================
Files 1559 1567 +8
Lines 356164 356900 +736
Branches 41607 41754 +147
==========================================
+ Hits 144436 145263 +827
+ Misses 182425 182306 -119
- Partials 29303 29331 +28
🚀 New features to boost your workflow:
|
thejambi
approved these changes
Nov 11, 2026
thejambi
left a comment
Contributor
There was a problem hiding this comment.
@thejambi reviewed 3 files and all commit messages, and made 1 comment.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on mark-sil).
This was referenced Nov 11, 2026
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.
Three WinForms detail-pane handlers now publish JumpToRecord to their own window, so the window's active clerk selects the record before the handler returns. Until now each queued it with the Mediator's BroadcastMessageUntilHandled, which ran after the handler had returned and offered the jump to every colleague of the window.
The three senders are ReversalPOSMenuHandler's OnMoveReversalPOS and OnMergeReversalPOS, and Slice.InsertObject, which jumps to a new sub-item that got no slice under the inserting one.
The jump can run at once because nothing in these handlers needs it to be late. The reversal handlers do nothing after it, and in Slice.InsertObject the clerk's part of the jump touches no slice, so the focus step that follows is unaffected. What the unit of work left queued, the detail pane's postponed refresh, does not depend on the jump, and the clerk's display of the record it jumped to stays queued behind it, as before.
When a filter hides the target, the clerk's prompt to turn the filter off now opens inside the handler, so the two reversal handlers publish as their last step. Slice.InsertObject tested the broadcast's result, which was always false; that test is gone and the focus step after it runs as before.
Reviewer notes
Start here:
Src/Common/Controls/DetailControls/Slice.cs,InsertObject-- the one sender with code after the jump; the twoReversalEntryPOS.cschanges are the same swap with nothing after it.The unknown: what does an immediate jump change? The only Pub/Sub subscriber is
RecordClerk.JumpToRecordViaPublisher, which acts only in the window's active clerk, and both ends are scoped to the main window.Slice.InsertObjectreaches the publish only when the new object got no slice under the inserting slice. The clerk then either re-shows the record that owns the new object (IndexOfParentOf) or, in a list whose sub-items are records, selects it. Either way it touches no slice before the focus loop runs.Where to look.
OnMoveReversalPOS/OnMergeReversalPOS: nothing follows the publish, and manual testing covered both answers.Slice.InsertObject: the removedifwas dead, soreturn insertionPosition;never ran; the focus loop is unchanged.Deliberately not here.
ReversalIndexEntryMenuHandler.OnMoveReversalindexEntrystays on the Mediator. In Lexicon > Reversal Indexes the previewXhtmlDocViewis a High-priority Mediator colleague, so the broadcast reaches itsOnJumpToRecordbefore the clerk, and that handler sets the flag that regenerates the preview. With only the clerk subscribed, a move between entries on the same preview page left the preview stale. It converts once the doc view's JumpToRecord handling moves to Pub/Sub for all senders.Verification.
build.ps1 -CommentHygiene -TokenHygiene: 0 warnings, 0 errors.SliceInsertJumpTests: the jump arrives before the insert returns, reaches only its own window, and queues nothing on the Mediator. It fails with main's broadcast restored.No Jira ticket: Pub/Sub work gets none.
Next: approve, or tell me what to change.
Preflight review details
Code Review Summary
Branch: claude/pubsub-jump-slice-menu-senders-4b88f2
Base: origin/main (merge base 4e0ba82; merges cleanly with c6cd25f)
Date: 2026-11-11
Review model: Claude Opus 5.5
Files changed: 3 (1 commit)
Overview
Part of retiring the xCore Mediator: three deferred
BroadcastMessageUntilHandled("JumpToRecord")senders become an immediate, window-scoped
Publisher.Publish. They areReversalPOSMenuHandler.OnMoveReversalPOSandOnMergeReversalPOS(Lists > Reversal IndexCategories) and
Slice.InsertObject, which jumps to a new sub-item that got no slice under theinserting slice. The only subscriber is
RecordClerk.JumpToRecordViaPublisher, which acts only inthe window's active clerk.
ReversalIndexEntryMenuHandler.OnMoveReversalindexEntrywas converted and then put back on theMediator. In Lexicon > Reversal Indexes the preview
XhtmlDocViewis a High-priority Mediatorcolleague, so the broadcast reaches its
OnJumpToRecordbefore the clerk. That handler sets theflag that regenerates the preview, so with only the clerk subscribed, a move between entries on
the same preview page left the preview stale (seen in manual testing).
Contract/API Changes
None. No public members change;
Slice.InsertObjectkeeps its return value (the removedreturn insertionPosition;branch was unreachable because the broadcast always returned false).Findings
Critical - Must address before merge
None.
Important - Should address before merge
OnMoveReversalindexEntrystays on the Mediator)Minor - Consider
The filter prompt now opens inside the handler(the two reversal handlers publish as their last step; manual steps A5 and A6 covered both prompt answers)Slice.InsertObject runs its focus loop after an immediate jump(the clerk's part touches no slice; the prompt is unreachable there because the new object's owner chain contains the current record)The two reversal handlers have no automated test(author's decision: they open a modal dialog first, and extracting methods only for a test was rejected; manual run A covers them)Required Validation / Evidence
./build.ps1 -CommentHygiene -TokenHygiene -BuildTests -SkipNative: clean, 0 warnings../test.ps1targeted:SliceInsertJumpTests1/1; LexEdDllTests~Reversal20/20;DetailControls
SliceTests|DataTreeTests|DataTreeCommandAdapterTests27 passed, 1 skipped;xWorks menu-authority, menu-execution, edit-context and navigation fixtures 109/109.
SliceInsertJumpTestsfails with main's broadcast restored.including the current one, the filter prompt with both answers, two windows; Insert > Etymology
from Citation Form in Lexicon Edit; Insert Reversal Subentry. All passed.
Jira: none, per the standing rule that Pub/Sub work gets no tickets.
Positive Observations
and queues nothing on the Mediator.
Interview Notes
MoveCategory/MergeCategory/MoveEntryfor testability.
OnMoveReversalindexEntryon the Mediator until the doc view'sJumpToRecord handling is converted for all senders together.
this branch.
Suggested Review Focus
Slice.InsertObject.🤖 Generated with Claude Code
This change is