feat: Phase 3 — Event handler wiring & DataBind pattern conversion (GAP-09, GAP-32)#114
Open
csharpfritz wants to merge 7 commits intodevfrom
Open
feat: Phase 3 — Event handler wiring & DataBind pattern conversion (GAP-09, GAP-32)#114csharpfritz wants to merge 7 commits intodevfrom
csharpfritz wants to merge 7 commits intodevfrom
Conversation
…AP-09, GAP-32) Add two critical L1 script transforms that eliminate ~70% of remaining manual migration work: Event Handler Wiring (GAP-32): - Convert-EventHandlerWiring adds @ prefix to On* event attributes in markup - OnClick="Handler" OnClick="@handler" for proper Blazor event binding - Handles all Web Forms event attributes (OnClick, OnTextChanged, OnRowCommand, etc.) - Regex-safe: only targets bare C# identifiers, skips existing @ expressions DataBind Pattern Conversion (GAP-09): - Convert-DataBindPattern transforms DataSource/DataBind() in code-behind - Get-DataBindMap pre-scans code-behind for cross-file markup correlation - Add-DataBindItemsAttribute injects Items="@_fieldName" on matching markup tags - Generates private IEnumerable<object> backing fields with _controlNameData naming Tests: 25/25 L1 tests pass (100%), 618/618 lines match - TC22: DataBind with GridView - TC23: DataBind with multiple controls (GridView + Repeater) - TC24: Event wiring with multiple event types - TC25: Combined DataBind + event wiring - TC20/TC21 updated for @ prefix in expected output Docs: Phase3-EventHandlerWiring.md, Phase3-DataBindConversion.md Skills: CODE-TRANSFORMS.md updated with Phase 3 section Nav: mkdocs.yml updated with Phase 3 section Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Covers the cumulative impact of all three automation phases: - Phase 1: compilation (directives, markup, structure) - Phase 2: runtime (lifecycle, signatures, session shims) - Phase 3: data & events (DataBind conversion, event wiring) Includes before/after comparisons, time savings estimates, test coverage summary, and remaining manual work guidance. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Shallow clones (fetch-depth: 1) cause Nerdbank.GitVersioning to fail because it cannot walk the commit graph to calculate version heights. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Shallow clones (fetch-depth: 1) cause Nerdbank.GitVersioning to fail because it cannot walk the commit graph to calculate version heights. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Strategic shift: L1 PowerShell frozen at Phase 3 (~70% automation). Remaining migration gaps converted to Copilot skills for L2 transforms: - bwfc-session-state: Application/Cache/HttpContext patterns - bwfc-middleware-migration: HttpModule and Global.asax conversion - bwfc-usercontrol-migration: .ascx to component with [Parameter] - Enhanced identity migration skill with Forms Auth guidance - Updated CODE-TRANSFORMS.md with Phase 4 skills section Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Session: 2026-03-30-phase4-skills-and-ci-fix Requested by: Scribe (Orchestration) Changes: - Created session log: 2026-03-30-phase4-skills-and-ci-fix.md - Merged decisions: Added bishop-ci-fix (fetch-depth: 0 for NBGV) - Created Phase 4 skills structure: .ai-team/decisions/inbox/ - Updated agent histories: Bishop (CI fix), Psylocke (Phase 4 skills freeze) - Copied decision inbox files to canonical .ai-team/decisions/inbox/ path Bishop work: Fixed squad-ci.yml NBGV shallow clone issue (PR #114 unblock) Psylocke work: Froze L1 PowerShell at Phase 3, created Phase 4 skills for contextual transforms (session-state, middleware, usercontrol, identity v2) Consolidated decision: L1 script deterministic limit reached (~70%). Remaining 30% migrates to L2 Copilot skills (Phase 4) and L3 developer judgment (Phase 5+).
- Forge's architecture proposal for webforms-to-blazor C# global tool - Sequential pipeline design mapping 41 PS functions to ~30 C# classes - Two public commands: migrate (full project) and convert (single file) - Analysis stays internal (feeds into migrate --report) - 25 L1 test cases become xUnit acceptance tests - Security: no shell-out, no eval, signed NuGet package - AI hook via --use-ai flag for L2 Copilot skill integration Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Summary
Phase 3 of the migration automation initiative, adding two critical L1 script transforms that Forge's analysis identified as eliminating ~70% of remaining manual migration work.
What's New
🎯 Event Handler Wiring (GAP-32) — "Make event binding compile"
Adds
@prefix to event handler attributes in markup so Blazor's Razor compiler resolves method references correctly:Convert-EventHandlerWiringOn[A-Z]*attributes with bare C# identifiers📊 DataBind Pattern Conversion (GAP-09) — "Make data binding work"
Cross-file transform that converts the
DataSource/DataBind()pattern to Blazor's reactiveItemsbinding:Code-behind:
Markup (correlated by control ID):
New functions:
Get-DataBindMap— Pre-scans code-behind for cross-file correlationConvert-DataBindPattern— Code-behind field generation + DataSource/DataBind removalAdd-DataBindItemsAttribute— Markup Items attribute injectionTest Results
25/25 L1 tests pass (100%) — 618/618 lines match
Documentation
docs/Migration/Phase3-EventHandlerWiring.mddocs/Migration/Phase3-DataBindConversion.mdmkdocs.yml— Phase 3 section addedCODE-TRANSFORMS.md— Phase 3 patterns added