Skip to content

LT-22642: Make reversal configuration switching update the view - #1107

Merged
thejambi merged 3 commits into
mainfrom
bugfix/LT-22642
Aug 25, 2026
Merged

LT-22642: Make reversal configuration switching update the view#1107
thejambi merged 3 commits into
mainfrom
bugfix/LT-22642

Conversation

@thejambi

@thejambi thejambi commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Quick Summary

Switching between two reversal configurations of the same writing
system left the view and the pane bar label unchanged, and choosing a
configuration in the Configure Reversal Index dialog left the label,
the dropdown checkmark and the entry list disagreeing.

The two properties describing the current reversal are kept in sync
across a many-to-one mapping: the index guid comes from the
configuration's writing system, so two configurations of one writing
system select the same index.

Arm m_updateContentLater only when the index actually changes.
Otherwise no clerk reload follows, ActiveClerkSelectedObject never
arrives, and the deferred UpdateContent never runs.

Validate the configuration against ReversalIndexGuid rather than the
clerk's current entry, which can still belong to the index being left
during a reload, so an explicit choice survives.

Sync the guid in RefreshAllContent. The Configure dialog saves the
chosen configuration without broadcasting, so nothing else points the
guid at the index it names.

Co-Authored-By: Claude Opus 5 noreply@anthropic.com

CI-ready checklist

  • Commit messages follow .github/commit-guidelines.md.
  • Builds & tests pass locally (or I've run the CI-style build via build.ps1, test.ps1, or MSBuild).
  • If this is core-developer AI-assisted work, I followed Docs/workflows/ai-pr-workflow.md and ran pr-preflight or the equivalent branch-readiness review before requesting review.
  • For any Src/** folders touched, corresponding AGENTS.md files are updated or explicitly confirmed still accurate.
  • I have considered all comments from an AI code reviewer (such as [Devin]https://app.devin.ai/review/sillsdev/FieldWorks/pull/####)

Notes for reviewers (optional)


This change is Reviewable

Zachary Burnham and others added 3 commits August 19, 2026 16:17
Gitlint's B5 rule rejects a body under 20 characters. The guidelines listed
the other body rules but not this one, so a short body failed CI with no
documented reason.
Switching between two reversal configurations of the same writing
system left the view and the pane bar label unchanged, and choosing a
configuration in the Configure Reversal Index dialog left the label,
the dropdown checkmark and the entry list disagreeing.

The two properties describing the current reversal are kept in sync
across a many-to-one mapping: the index guid comes from the
configuration's writing system, so two configurations of one writing
system select the same index.

Arm m_updateContentLater only when the index actually changes.
Otherwise no clerk reload follows, ActiveClerkSelectedObject never
arrives, and the deferred UpdateContent never runs.

Validate the configuration against ReversalIndexGuid rather than the
clerk's current entry, which can still belong to the index being left
during a reload, so an explicit choice survives.

Sync the guid in RefreshAllContent. The Configure dialog saves the
chosen configuration without broadcasting, so nothing else points the
guid at the index it names.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

NUnit Tests

    1 files  ±0      1 suites  ±0   10m 52s ⏱️ -21s
5 861 tests +5  5 780 ✅ +5  81 💤 ±0  0 ❌ ±0 
5 870 runs  +5  5 789 ✅ +5  81 💤 ±0  0 ❌ ±0 

Results for commit 643d4bb. ± Comparison against base commit 17cdfba.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 56.09756% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 38.35%. Comparing base (17cdfba) to head (643d4bb).

Files with missing lines Patch % Lines
Src/xWorks/XhtmlDocView.cs 52.63% 8 Missing and 10 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1107   +/-   ##
=======================================
  Coverage   38.34%   38.35%           
=======================================
  Files        1507     1507           
  Lines      350586   350617   +31     
  Branches    40294    40298    +4     
=======================================
+ Hits       134432   134475   +43     
+ Misses     186927   186912   -15     
- Partials    29227    29230    +3     
Files with missing lines Coverage Δ
Src/FdoUi/ReversalIndexEntryUi.cs 47.36% <100.00%> (+15.93%) ⬆️
Src/xWorks/XhtmlDocView.cs 7.67% <52.63%> (+1.54%) ⬆️

... and 4 files with indirect coverage changes

🚀 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.

@thejambi
thejambi marked this pull request as ready for review August 25, 2026 14:15

@mark-sil mark-sil left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mark-sil reviewed 3 files and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on thejambi).

@thejambi
thejambi merged commit b8f5463 into main Aug 25, 2026
9 checks passed
@thejambi
thejambi deleted the bugfix/LT-22642 branch August 25, 2026 17:43
thejambi added a commit that referenced this pull request Aug 25, 2026
* Document the minimum commit body length gitlint enforces

Gitlint's B5 rule rejects a body under 20 characters. The guidelines listed
the other body rules but not this one, so a short body failed CI with no
documented reason.

* Merge remote-tracking branch 'origin/main' into bugfix/LT-22642

* Fix LT-22642: Make reversal configuration switching update the view

Switching between two reversal configurations of the same writing
system left the view and the pane bar label unchanged, and choosing a
configuration in the Configure Reversal Index dialog left the label,
the dropdown checkmark and the entry list disagreeing.

The two properties describing the current reversal are kept in sync
across a many-to-one mapping: the index guid comes from the
configuration's writing system, so two configurations of one writing
system select the same index.

Arm m_updateContentLater only when the index actually changes.
Otherwise no clerk reload follows, ActiveClerkSelectedObject never
arrives, and the deferred UpdateContent never runs.

Validate the configuration against ReversalIndexGuid rather than the
clerk's current entry, which can still belong to the index being left
during a reload, so an explicit choice survives.

Sync the guid in RefreshAllContent. The Configure dialog saves the
chosen configuration without broadcasting, so nothing else points the
guid at the index it names.

Co-Authored-By: Zachary Burnham <zachary_burnham@sil.org>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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