Skip to content

Commit d82088f

Browse files
Audit PR comments: strip migration framing, doc markers, and absence notes
Comment-only pass over the PR's added/changed code comments against the revised review standard. No behavior change. - Migration phase/stage framing stripped: "Phase N", "Stage N", "MSA-port Stage N", "Phase-1 §19b Stage N", "DATA-SAFETY (Phase 1, test a)" and similar temporal-position/future-stage prefixes and dividers; surviving behavior text kept and re-evaluated, comments with only process removed. - Internal-doc and section markers removed: design/skill .md filenames (winforms-free-lexeme-editor.md, canonical-view-definition-design.md, dialog-ownership.md, native-views-audit.md, etc.) and pointers into them (§19a-§19g, §20.x, §8.3, D1/D3, F-1/F-7, LE-4, T-rubric tags, "task N.N", "(6.3/B8)", "(B7)", "19i.x"). Genuine WHY rewritten self-contained. LT-##### Jira refs preserved. - Absence/stale narration deleted or rephrased to current fact ("no longer forces read-only" -> "does not force read-only"; "replacement for the old detached DTO mapping" clause dropped). - Creation-process / forward-work removed ("is deferred", "once other tools are wired", "before a second region reuses this", review-cleanup notes). - Legacy temporal framing trimmed to plain current behavior; legacy parity WHY (naming the legacy equivalent) kept. - String literals, code identifiers (e.g. Phase1FollowUpSurfaceTools), and pre-existing legacy comments left untouched. Build: build.ps1 -SkipNative -BuildTests -> 0 errors, 0 warnings. Tests: FwAvaloniaTests 634 (633 pass / 1 skip); FwAvaloniaDialogsTests 298/298. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent f409b5a commit d82088f

185 files changed

Lines changed: 1086 additions & 1163 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Src/Common/Controls/DetailControls/DetailControlsTests/DataTreeDisposalCharacterizationTests.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,11 @@ namespace SIL.FieldWorks.Common.Framework.DetailControls
1313
{
1414
/// <summary>
1515
/// Characterization tests that lock down the CURRENT disposal, event-unsubscription, focus, and
16-
/// accessibility behavior of <see cref="DataTree"/> and <see cref="Slice"/> BEFORE the Avalonia
17-
/// refactor (task 2.7 of lexical-edit-avalonia-migration). These protect the refactor: an Avalonia
18-
/// adapter selected by the two-adapter flag must preserve this observable behavior.
16+
/// accessibility behavior of <see cref="DataTree"/> and <see cref="Slice"/>. The Avalonia editors
17+
/// that replace these controls must preserve this observable behavior.
1918
///
2019
/// They assert observable behavior only (IsDisposed, no-throw after Dispose, AccessibleName,
21-
/// focus order) so they remain robust across the refactor rather than pinning private internals.
20+
/// focus order) so they remain robust rather than pinning private internals.
2221
/// </summary>
2322
[TestFixture]
2423
public class DataTreeDisposalCharacterizationTests : MemoryOnlyBackendProviderRestoredForEachTestTestBase

Src/Common/Controls/DetailControls/DetailControlsTests/DataTreeReshowTimingTests.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,10 @@
1515
namespace SIL.FieldWorks.Common.Framework.DetailControls
1616
{
1717
/// <summary>
18-
/// Task 2.13 (refresh-after-edit path): measures the legacy DataTree's re-show cost — a second
19-
/// <c>ShowObject</c> on the live tree after a model edit, which exercises the slice-reuse
20-
/// (ObjSeqHashMap) refresh path RecordEditView drives on record navigation and refresh. Numbers
21-
/// accumulate into the same <c>Output/RenderBenchmarks/datatree-timings.json</c> artifact the
22-
/// entry-open baselines use and feed region-manifest §5.
18+
/// Measures the legacy DataTree's re-show cost — a second <c>ShowObject</c> on the live tree after
19+
/// a model edit, which exercises the slice-reuse (ObjSeqHashMap) refresh path RecordEditView drives
20+
/// on record navigation and refresh. Numbers accumulate into the same
21+
/// <c>Output/RenderBenchmarks/datatree-timings.json</c> artifact the entry-open baselines use.
2322
/// </summary>
2423
[TestFixture]
2524
public class DataTreeReshowTimingTests : MemoryOnlyBackendProviderRestoredForEachTestTestBase

Src/Common/Controls/DetailControls/DetailControlsTests/DataTreeUndoRedoCharacterizationTests.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@ namespace SIL.FieldWorks.Common.Framework.DetailControls
1414
{
1515
/// <summary>
1616
/// Characterization tests that lock down the CURRENT undo/redo transaction behavior for the
17-
/// editor-replacement candidate fields shown by <see cref="DataTree"/> (task 2.6 of
18-
/// lexical-edit-avalonia-migration). They assert on the LCModel source of truth and the action
19-
/// handler's undo/redo state, which is framework-neutral: the Avalonia editors must commit through
20-
/// the same fenced LCModel transactions (see avalonia-edit-sessions / avalonia-undo-redo) and
21-
/// therefore reproduce exactly these undo/redo results.
17+
/// editor-replacement candidate fields shown by <see cref="DataTree"/>. They assert on the LCModel
18+
/// source of truth and the action handler's undo/redo state, which is framework-neutral: the
19+
/// Avalonia editors must commit through the same fenced LCModel transactions and therefore
20+
/// reproduce exactly these undo/redo results.
2221
///
2322
/// Pattern: the test base opens an ambient undo task during setup; we close it with
2423
/// <c>m_actionHandler.EndUndoTask()</c>, then make discrete undoable edits via

Src/Common/Controls/DetailControls/DetailControlsTests/RenderFailureArtifactBundlerTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
namespace SIL.FieldWorks.Common.Framework.DetailControls
1010
{
1111
/// <summary>
12-
/// Tests for <see cref="RenderFailureArtifactBundler"/> (task 2.5): on a failed render/parity
13-
/// verification, the bundler must gather the available artifacts and a summary into one
14-
/// CI-discoverable folder, and must be a no-op for a passing result.
12+
/// Tests for <see cref="RenderFailureArtifactBundler"/>: on a failed render/parity verification,
13+
/// the bundler must gather the available artifacts and a summary into one CI-discoverable folder,
14+
/// and must be a no-op for a passing result.
1515
/// </summary>
1616
[TestFixture]
1717
public class RenderFailureArtifactBundlerTests

Src/Common/Framework/MainWindowDelegate.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -680,14 +680,13 @@ public bool ShowStylesDialog(string paraStyleName, string charStyleName,
680680
GetStyleNames(ActiveView as SimpleRootSite, EditingHelper.CurrentSelection.Selection,
681681
ref paraStyleName, ref charStyleName);
682682
}
683-
// PARITY §19g: the Styles dialog (FwStylesDlg) is NOT migrated to the Avalonia dialog
683+
// PARITY: the Styles dialog (FwStylesDlg) is NOT migrated to the Avalonia dialog
684684
// kit. It hosts an IVwRootSite/SimpleRootSite (the live style PREVIEW pane renders through the
685685
// Views engine — see the activeViewSite argument and the GetStyleNames selection walk above), which
686-
// the dialog-kit hard rule (dialog-conversion.md §0) explicitly routes to the document engine
687-
// (Stage 9), not this hand-authored MVVM kit. §19c ships named-style APPLY over a
688-
// host-supplied style list (the common "set this run's style" path); authoring/managing the styles
689-
// themselves needs the Views-engine preview and stays on the legacy WinForms dialog below until
690-
// Stage 9.
686+
// the dialog-kit hard rule explicitly routes to the document engine,
687+
// not this hand-authored MVVM kit. Named-style APPLY over a
688+
// host-supplied style list (the common "set this run's style" path) is available; authoring/managing the styles
689+
// themselves needs the Views-engine preview and stays on the legacy WinForms dialog below.
691690
using (FwStylesDlg stylesDlg = new FwStylesDlg(activeViewSite,
692691
Cache, ActiveStyleSheet, (vc == null) ? false : vc.RightToLeft,
693692
Cache.ServiceLocator.WritingSystems.AllWritingSystems.Any(ws => ws.RightToLeftScript),

Src/Common/FwAvalonia/AvaloniaDialogHost.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace SIL.FieldWorks.Common.FwAvalonia
1414
/// <summary>
1515
/// Reusable host that shows an Avalonia dialog body (a <c>UserControl</c>) inside a WinForms-owned
1616
/// modal <see cref="Form"/> during coexistence — the turn-key piece for the MVVM dialog kit. Because
17-
/// Avalonia modal windows are not supported while WinForms owns the message loop (dialog-ownership.md),
17+
/// Avalonia modal windows are not supported while WinForms owns the message loop,
1818
/// the dialog body is hosted in a WinForms modal window owned by the caller's form; the view-model
1919
/// closes it by raising <see cref="IDialogViewModel.CloseRequested"/> (no windowing in the VM).
2020
///
@@ -54,8 +54,8 @@ public static class AvaloniaDialogHost
5454
if (dialogBody == null) throw new ArgumentNullException(nameof(dialogBody));
5555
if (viewModel == null) throw new ArgumentNullException(nameof(viewModel));
5656

57-
// Modal hosting + Avalonia share the single WinForms UI thread / message loop during coexistence
58-
// (dialog-ownership.md). Showing a modal Form or touching Avalonia controls off that thread is a
57+
// Modal hosting + Avalonia share the single WinForms UI thread / message loop during coexistence.
58+
// Showing a modal Form or touching Avalonia controls off that thread is a
5959
// re-entrancy/cross-thread bug; fail fast rather than corrupt the message loop. The owner control
6060
// (when supplied) is the WinForms host whose thread we must be on.
6161
if (owner is Control ownerControl && ownerControl.InvokeRequired)
@@ -68,7 +68,7 @@ public static class AvaloniaDialogHost
6868
// roomy Fluent defaults. Applied here (the single dialog chokepoint) so new dialogs inherit it.
6969
CompactDialogStyles.Apply(dialogBody);
7070

71-
// dialog-ownership.md: remember the WinForms focus so it returns to the owner after close.
71+
// Remember the WinForms focus so it returns to the owner after close.
7272
var priorFocus = Form.ActiveForm?.ActiveControl;
7373

7474
try
@@ -97,7 +97,7 @@ public static class AvaloniaDialogHost
9797
FwAvaloniaPlatform.GuardHeadlessEmbed(host);
9898
form.Controls.Add(host);
9999

100-
// A11Y-03 (legacy WinForms parity): focus the first input when the dialog opens so a
100+
// Legacy WinForms parity: focus the first input when the dialog opens so a
101101
// keyboard / screen-reader user lands in a field, not on an unfocused window (and, with
102102
// the per-view TabIndex, not on the OK/Cancel strip). Done on Shown so the hosted Avalonia
103103
// content is realized. Best-effort: a no-op if nothing qualifies (never throws).
@@ -238,7 +238,7 @@ public static void ApplySizing(
238238

239239
/// <summary>
240240
/// Focuses the first keyboard-focusable INPUT inside <paramref name="dialogBody"/> so a dialog opens
241-
/// with the caret in its first field (legacy WinForms parity; A11Y-03). Buttons (OK/Cancel/Help) are
241+
/// with the caret in its first field (legacy WinForms parity). Buttons (OK/Cancel/Help) are
242242
/// never the initial focus — initial focus belongs to an input, and Enter/Escape already activate the
243243
/// default/cancel buttons. Returns the control it focused, or null if none qualifies. Factored out
244244
/// (like <see cref="ApplySizing"/> / <see cref="WireClose"/>) so the selection contract is unit-testable

Src/Common/FwAvalonia/AvaloniaRegionHostControl.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@
1212
namespace SIL.FieldWorks.Common.FwAvalonia
1313
{
1414
/// <summary>
15-
/// Reusable WinForms host for an Avalonia region surface (Stage 2.1: generalized out of
16-
/// <see cref="LexicalEditHostControl"/> so a second region host does not re-derive the in-process
17-
/// net48 plumbing). Owns Avalonia bootstrap, the <see cref="WinFormsAvaloniaControlHost"/>, the
18-
/// companion-control strip, the WinForms/Avalonia directional-key interop, focus-safe content
19-
/// swapping, context menus, and the message/clear states. Region-specific projection (building the
20-
/// region view) belongs to the derived class via <see cref="SetRegionContent"/>.
15+
/// Reusable WinForms host for an Avalonia region surface. Owns Avalonia bootstrap, the
16+
/// <see cref="WinFormsAvaloniaControlHost"/>, the companion-control strip, the WinForms/Avalonia
17+
/// directional-key interop, focus-safe content swapping, context menus, and the message/clear
18+
/// states. Region-specific projection (building the region view) belongs to the derived class
19+
/// via <see cref="SetRegionContent"/>.
2120
/// </summary>
2221
public abstract class AvaloniaRegionHostControl : System.Windows.Forms.UserControl
2322
{
@@ -76,7 +75,7 @@ protected void SetHostContent(Avalonia.Controls.Control content)
7675
protected Avalonia.Controls.Control CurrentContent => Host.Content as Avalonia.Controls.Control;
7776

7877
/// <summary>
79-
/// §19d: the current hosted Avalonia content (public accessor), so the product host can resolve the
78+
/// The current hosted Avalonia content (public accessor), so the product host can resolve the
8079
/// surface's <c>TopLevel</c>/<c>IStorageProvider</c> for the managed file picker the picture media
8180
/// seam uses. Null when no content is shown.
8281
/// </summary>

Src/Common/FwAvalonia/CompactDialogStyles.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public static class CompactDialogStyles
3434
/// <summary>Min height for compact line controls (buttons/combos/text boxes), vs the Fluent ~32px floor.
3535
/// Genuine WinForms line controls run 20-23px, but that falls below the ~24px desktop pointer-target
3636
/// accessibility floor, so 24 is used instead (see the note on <c>DialogMinControlHeight</c> in
37-
/// DialogTheme.axaml and the "Dialog spacing tokens" note in style-system.md).
37+
/// DialogTheme.axaml).
3838
/// Mirrors <c>DialogMinControlHeight</c> in DialogTheme.axaml.</summary>
3939
public const double LineControlMinHeight = 24.0;
4040

0 commit comments

Comments
 (0)