Skip to content

Plan Lexical Edit Avalonia migration and add coverage#902

Open
johnml1135 wants to merge 1 commit into
mainfrom
010-advanced-entry-view-phase-1-2
Open

Plan Lexical Edit Avalonia migration and add coverage#902
johnml1135 wants to merge 1 commit into
mainfrom
010-advanced-entry-view-phase-1-2

Conversation

@johnml1135
Copy link
Copy Markdown
Contributor

@johnml1135 johnml1135 commented May 20, 2026

This is the first of a few PRs for the Lexical Edit Avalonia migration.
Focus reviewers on the overall OpenSpec plan and Phase 1/2 characterization tests.

Summary:

  • Adds/reworks migration planning docs.
  • Phase 2 tests around DetailControls/DataTree/morph type launcher/XMLViews reachability/AdvancedEntry Avalonia lifetime and snapshot coverage.
  • Coverage/evidence docs.

Validation evidence:

  • Targeted DetailControls
  • AdvancedEntry Avalonia
  • xWorks
  • full .\test.ps1 -NoBuild -Verbosity minimal
  • git diff --check
  • openspec validate lexical-edit-avalonia-migration --strict

This change is Reviewable

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 20, 2026

NUnit Tests

    1 files  ± 0      1 suites  ±0   8m 11s ⏱️ - 2m 57s
4 235 tests +30  4 164 ✅ +30  71 💤 ±0  0 ❌ ±0 
4 244 runs  +30  4 173 ✅ +30  71 💤 ±0  0 ❌ ±0 

Results for commit ab7e529. ± Comparison against base commit b0bf8a8.

♻️ This comment has been updated with latest results.

@johnml1135 johnml1135 force-pushed the 010-advanced-entry-view-phase-1-2 branch from d4024ed to 7e5569a Compare May 20, 2026 22:24
Add FieldWorks Avalonia migration review skills

Narrow Phase 1-2 Avalonia migration foundation
@johnml1135 johnml1135 force-pushed the 010-advanced-entry-view-phase-1-2 branch from 7e5569a to ab7e529 Compare May 20, 2026 23:27
@johnml1135 johnml1135 marked this pull request as ready for review May 20, 2026 23:28
Copilot AI review requested due to automatic review settings May 20, 2026 23:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR establishes an OpenSpec-based plan for the Lexical Edit → Avalonia migration, and adds Phase 2 characterization tests/evidence to support upcoming seam extractions (DataTree refresh, morph-type launcher logic, XMLViews browse filter reachability, and SliceFactory fallback behavior).

Changes:

  • Adds a comprehensive OpenSpec change set for lexical-edit-avalonia-migration (requirements, design, tasks, coverage/evidence, inventories, manifests, and diagrams).
  • Adds a companion OpenSpec change set for fieldworks-avalonia-shell-migration (requirements/design/tasks/proposal).
  • Adds/extends net48 characterization tests around DataTree refresh behavior, MorphTypeAtomicLauncher data-loss classification, SliceFactory unknown-editor fallback, and XMLViews filter-bar reachability.

Reviewed changes

Copilot reviewed 50 out of 50 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
openspec/changes/lexical-edit-avalonia-migration/view-inventory.md Inventories legacy Lexical Edit surfaces and migration risks.
openspec/changes/lexical-edit-avalonia-migration/tasks.md Tracks phased migration tasks and coverage gates.
openspec/changes/lexical-edit-avalonia-migration/specs/lexical-edit-view-definition/spec.md Defines requirements for typed view-definition + XML import boundary.
openspec/changes/lexical-edit-avalonia-migration/specs/lexical-edit-parity-automation/spec.md Defines layered parity automation requirements (UIA2 + headless + semantic snapshots).
openspec/changes/lexical-edit-avalonia-migration/specs/lexical-edit-font-decommissioning/spec.md Defines Graphite/font decommissioning requirements and evidence gates.
openspec/changes/lexical-edit-avalonia-migration/specs/lexical-edit-avalonia-migration/spec.md Defines end-to-end phased migration requirements and completion gates.
openspec/changes/lexical-edit-avalonia-migration/specs/avalonia-validation/spec.md Requires validation seam + Avalonia-native validation presentation.
openspec/changes/lexical-edit-avalonia-migration/specs/avalonia-undo-redo/spec.md Requires domain-authoritative undo/redo with leaf-local control undo permitted.
openspec/changes/lexical-edit-avalonia-migration/specs/avalonia-ui-scheduler/spec.md Requires a thin UI scheduling seam for non-view layers.
openspec/changes/lexical-edit-avalonia-migration/specs/avalonia-lifetime/spec.md Requires a thin lifetime/dialog seam for non-view layers.
openspec/changes/lexical-edit-avalonia-migration/specs/avalonia-edit-sessions/spec.md Requires FieldWorks-owned edit-session boundaries for migration.
openspec/changes/lexical-edit-avalonia-migration/specs/avalonia-command-focus/spec.md Requires a FieldWorks-owned command/focus bridge for global behavior.
openspec/changes/lexical-edit-avalonia-migration/specs/architecture/ui-framework/winforms-patterns/spec.md Adds seam/automation expectations for WinForms DetailControls refactors.
openspec/changes/lexical-edit-avalonia-migration/specs/architecture/ui-framework/views-rendering/spec.md Extends render verification requirements with semantic snapshots and audits.
openspec/changes/lexical-edit-avalonia-migration/specs/architecture/testing/test-strategy/spec.md Requires layered UI migration tests and explicit coverage plans.
openspec/changes/lexical-edit-avalonia-migration/specs/architecture/interop/native-boundary/spec.md Requires elimination/classification of native render interop for completed regions.
openspec/changes/lexical-edit-avalonia-migration/seam-recommendations.md Records recommended seam directions and pivot triggers.
openspec/changes/lexical-edit-avalonia-migration/region-manifest.md Defines proposed migrated-region manifest shape and enablement gates.
openspec/changes/lexical-edit-avalonia-migration/proposal.md Describes goals/scope/non-goals and migration approach.
openspec/changes/lexical-edit-avalonia-migration/phase2-execution-evidence.md Summarizes Phase 2 characterization coverage added and remaining gaps.
openspec/changes/lexical-edit-avalonia-migration/override-fixtures.md Plans override fixture families and typed-IR assertions/diagnostics needs.
openspec/changes/lexical-edit-avalonia-migration/migration-map.md Maps Speckit sources into OpenSpec destinations.
openspec/changes/lexical-edit-avalonia-migration/graphite-decommissioning.md Documents Graphite/native rendering inventory and default-path policy.
openspec/changes/lexical-edit-avalonia-migration/design.md Consolidates architecture decisions, risks, and phase sequencing.
openspec/changes/lexical-edit-avalonia-migration/coverage-map.md Coverage map for DataTree/SliceFactory/launchers/XMLViews and seams.
openspec/changes/lexical-edit-avalonia-migration/avalonia-validation.md Plan for validation model, tests, and phase gates.
openspec/changes/lexical-edit-avalonia-migration/avalonia-undo-redo.md Plan for undo/redo routing, tests, and phase gates.
openspec/changes/lexical-edit-avalonia-migration/avalonia-ui-scheduler.md Plan for UI-thread marshalling seam and required tests.
openspec/changes/lexical-edit-avalonia-migration/avalonia-lifetime.md Plan for deterministic disposal and navigation/close semantics.
openspec/changes/lexical-edit-avalonia-migration/avalonia-edit-sessions.md Plan contrasting current prototype sessions vs proposed seam contract.
openspec/changes/lexical-edit-avalonia-migration/avalonia-command-focus.md Plan for local vs shell-phase command/focus behavior.
openspec/changes/lexical-edit-avalonia-migration/architecture-diagrams.md Mermaid diagrams of current state, seams, testing layers, and target architecture.
openspec/changes/lexical-edit-avalonia-migration/.openspec.yaml Declares spec-driven schema metadata for the change.
openspec/changes/fieldworks-avalonia-shell-migration/tasks.md Shell migration task plan and dependencies.
openspec/changes/fieldworks-avalonia-shell-migration/specs/fieldworks-avalonia-shell-migration/spec.md Defines requirements for typed shell composition and Avalonia default shell.
openspec/changes/fieldworks-avalonia-shell-migration/proposal.md Describes shell migration rationale/scope and decommissioning goals.
openspec/changes/fieldworks-avalonia-shell-migration/design.md Decisions and migration sequencing for shell/windowing replacement.
openspec/changes/fieldworks-avalonia-shell-migration/.openspec.yaml Declares spec-driven schema metadata for the change.
Src/xWorks/xWorksTests/BulkEditBarTests.cs Adds XMLViews filter-bar reachability “smoke substitute” baseline helper + test.
Src/Common/Controls/DetailControls/MorphTypeAtomicLauncher.cs Extracts morph-type data-loss classification into flag enum + helper methods.
Src/Common/Controls/DetailControls/DetailControlsTests/SliceFactoryTests.cs Adds test pinning unknown-editor fallback to MessageSlice + AccessibleName.
Src/Common/Controls/DetailControls/DetailControlsTests/MorphTypeAtomicLauncherTests.cs Adds characterization tests for DataTree refresh edge + morph-type data-loss logic.
Src/Common/Controls/DetailControls/DetailControlsTests/DataTreeTests.cs Adds semantic slice baseline assertion helper and Cf/Bib baseline test.
.github/skills/fieldworks-winforms-to-avalonia-migration/SKILL.md Adds migration review skill guidance for plans/tests/seams/parity.
.github/skills/fieldworks-uia2-parity-testing/SKILL.md Adds guidance for UIA2 vs headless automation and parity evidence.
.github/skills/fieldworks-semantic-render-parity/SKILL.md Adds guidance for semantic snapshot discipline and render evidence.
.github/skills/fieldworks-migration-scope-review/SKILL.md Adds guidance for scope splits and evidence/claim alignment in large PRs.
.github/skills/fieldworks-managed-netfx-review/SKILL.md Adds guidance for net48 vs net8 boundary hygiene and validation.
.github/skills/fieldworks-avalonia-ui/SKILL.md Adds guidance for Avalonia module review, tests, and parity claims.
.github/instructions/avalonia.instructions.md Adds repo guidance for building/testing/preview-hosting Avalonia modules.

Comment on lines +404 to +415
internal IReadOnlyList<FilterReachabilityRow> GetFilterReachabilityBaseline()
{
return m_filterBar.ColumnInfo.Select((fsi, index) => new FilterReachabilityRow(
index,
GetColumnLabel(fsi.Spec),
fsi.Combo.Name,
fsi.Combo.Enabled,
fsi.Combo.IsDisposed,
fsi.Combo.FindStringExact("Show All") >= 0,
fsi.Combo.FindStringExact("Filter for...") >= 0,
fsi.Combo.FindStringExact("Choose...") >= 0)).ToList();
}
Comment on lines +557 to +564
[Test]
public void FilterBar_HeaderAndFilterControlsExposeReachableBaseline()
{
var baseline = m_bv.GetFilterReachabilityBaseline();
var lexemeForm = baseline.Single(row => row.HeaderLabel == "Lexeme Form");
var morphType = baseline.Single(row => row.HeaderLabel == "Morph Type");

Assert.That(lexemeForm.FocusOrder, Is.LessThan(morphType.FocusOrder));
Comment on lines +319 to +323
private static bool InvokeIsStemType(IMoMorphType morphType)
{
var launcher = new MorphTypeAtomicLauncher();
return (bool)GetIsStemTypeMethod().Invoke(launcher, new object[] { morphType });
}
Comment on lines +398 to +411
var method = GetPrivateMethod("IsStemType");
Assert.That(method, Is.Not.Null, "Morph type swap extraction depends on IsStemType semantics.");
return method;
}

private static MethodInfo GetPrivateMethod(string methodName)
{
var method = typeof(MorphTypeAtomicLauncher).GetMethod(
methodName,
BindingFlags.Instance | BindingFlags.NonPublic);
Assert.That(method, Is.Not.Null, "Morph type swap extraction depends on {0} semantics.", methodName);
return method;
}

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.

2 participants