Skip to content

LT-22644: Remove duplicate Master Refresh calls - #1031

Merged
mark-sil merged 1 commit into
mainfrom
LT-22644
Jul 29, 2026
Merged

LT-22644: Remove duplicate Master Refresh calls#1031
mark-sil merged 1 commit into
mainfrom
LT-22644

Conversation

@mark-sil

@mark-sil mark-sil commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

In FwXApp, renamed OnMasterRefresh() to RefreshAllWindows() so that it is not called from the Mediator.

Background:
Six code paths dispatch the MasterRefresh Mediator message in a mode that does not stop at the first handler
(SendMessageToAllNow or BroadcastMessage). In these paths the message was handled twice — once by FwXWindow.OnMasterRefresh() and again by FwXApp.OnMasterRefresh().

The call in FwXApp appears to be unintentional. There was a comment indicating that this class is no longer an xcore colleague and that the method only remains because there were some direct callers. Even though FwXApp is no longer directly a IxCoreColleague, LexTextApp derives from FwXApp and it is a IxCoreColleague, which resulted in the FwXApp.OnMasterRefresh() being called.

Notes:

  • I removed the activeCache code from FwXWindow.OnMasterRefresh() since there has been only one cache per app for the past several years.
  • I think FwXWindow.OnMasterRefresh() and FwXApp.RefreshAllWindows() now only differ because FwXApp overrides ActiveForm(). Possible in a future commit, merge these into one method.

This change is Reviewable

In FwXApp, renamed OnMasterRefresh() to RefreshAllWindows() so
that it is not called from the Mediator.

Background:
Six code paths dispatch the MasterRefresh Mediator message in a
mode that does not stop at the first handler
(SendMessageToAllNow or BroadcastMessage). In these paths the
message was handled twice — once by FwXWindow.OnMasterRefresh() and
again by FwXApp.OnMasterRefresh().

The call in FwXApp appears to be unintentional. There was a comment
indicating that this class is no longer an xcore colleague and that
the method only remains because there were some direct callers.
Even though FwXApp is no longer directly a IxCoreColleague, LexTextApp
derives from FwXApp and it is a IxCoreColleague, which resulted in
the FwXApp.OnMasterRefresh() being called.

Notes:
- I removed the activeCache code from FwXWindow.OnMasterRefresh()
since there has been only one cache per app for the past several years.
- I think FwXWindow.OnMasterRefresh() and FwXApp.RefreshAllWindows()
now only differ because FwXApp overrides ActiveForm(). Possible in a
future commit, merge these into one method.
@github-actions

Copy link
Copy Markdown

NUnit Tests

    1 files  ±0      1 suites  ±0   10m 43s ⏱️ -4s
4 313 tests ±0  4 240 ✅ ±0  73 💤 ±0  0 ❌ ±0 
4 322 runs  ±0  4 249 ✅ ±0  73 💤 ±0  0 ❌ ±0 

Results for commit 99fac1e. ± Comparison against base commit c8f63c5.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 33.04%. Comparing base (c8f63c5) to head (99fac1e).

Files with missing lines Patch % Lines
Src/xWorks/FwXWindow.cs 0.00% 5 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1031   +/-   ##
=======================================
  Coverage   33.04%   33.04%           
=======================================
  Files        1202     1202           
  Lines      278319   278313    -6     
  Branches    37190    37188    -2     
=======================================
  Hits        91969    91969           
+ Misses     158492   158488    -4     
+ Partials    27858    27856    -2     
Files with missing lines Coverage Δ
Src/xWorks/FwXApp.cs 9.09% <ø> (ø)
Src/xWorks/FwXWindow.cs 9.61% <0.00%> (+0.05%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mark-sil
mark-sil merged commit e3ce5ba into main Jul 29, 2026
6 of 7 checks passed
@mark-sil
mark-sil deleted the LT-22644 branch July 29, 2026 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants