Skip to content

feat(cli): compile page code-behind safely#545

Merged
csharpfritz merged 38 commits intoFritzAndFriends:devfrom
csharpfritz:feature/wingtip-next-features-review
May 8, 2026
Merged

feat(cli): compile page code-behind safely#545
csharpfritz merged 38 commits intoFritzAndFriends:devfrom
csharpfritz:feature/wingtip-next-features-review

Conversation

@csharpfritz
Copy link
Copy Markdown
Collaborator

Summary

  • merge the page runtime shim so \Page\ reuses \WebFormsPageBase\ and \WebFormsPage\ composes the shared head renderer
  • emit compile-safe page code-behind into the generated app while quarantining pages that still contain unsupported Web Forms patterns
  • add explicit BWFC global usings to scaffolded \GlobalUsings.cs\ so local project-reference migrations compile emitted .razor.cs\ files correctly
  • update focused CLI tests and refresh the page/runtime docs
  • capture Wingtip benchmark progression in
    un29,
    un30, and
    un31\ reports

Validation

  • focused CLI tests for scaffolding, pipeline integration, and semantic pattern catalog
  • fresh Wingtip migration benchmarks recorded under \dev-docs/migration-tests/wingtiptoys/run29,
    un30, and
    un31\

Wingtip impact

  • run30 reduced the fresh Wingtip build from 183 errors to 60 by enabling compile-safe page code-behind emission
  • run31 validated the imports fix by collapsing the deduplicated page-type import bucket (\CS0246) from 41 to 7 and exposing the next support-code/semantic failure layers

Merge the page runtime shim, emit compile-safe page code-behind into the generated app, and add explicit BWFC global usings for local project-reference scaffolds. Include focused test updates plus Wingtip run29-run31 reports documenting the benchmark progression.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment on lines +356 to +358
}
}

csharpfritz and others added 15 commits May 6, 2026 10:40
- Add NuGetStaticAssetExtractor service (replaces Migrate-NugetStaticAssets.ps1 shell-out)
- Add EdmxToEfCoreConverter service (replaces Convert-EdmxToEfCore.ps1 shell-out)
- Add MarkupReferencedMemberStubTransform and ValidatorGenericTypeTransform
- Add deprecation warnings to all 4 PS1 scripts
- Update CLI docs for direct adoption
- CLI now has zero runtime PowerShell dependencies
- 506 tests passing

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Run 32 report and screenshots (25/25 tests passing)
- AfterWingtipToys markup and code-behind fixes from gap analysis
- Migration artifacts for WingtipToys

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ntsTransform

- ServerCodeBlockTransform (Order 510): converts <% if/else/foreach %> statement
  blocks to Razor @if/@foreach syntax; sanitizes raw <% %> inside @* *@ comments
- TemplateFieldChildComponentsTransform (Order 620): wraps ItemStyle/HeaderStyle/
  FooterStyle inside TemplateField with <ChildComponents> wrapper for BWFC compat
- Both registered in Program.cs DI and TestHelpers.CreateDefaultPipeline()
- 46 new tests (39 transform + 7 integration), 545 total CLI tests passing

Closes Run 33 gaps #3 and #5.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- L1 migration toolkit run with ServerCodeBlockTransform (Order 510) and
  TemplateFieldChildComponentsTransform (Order 620) — both confirmed working
- Full repair cycle: 266 → 0 build errors
- Implemented CartSessionStore (singleton) + CartService (scoped) with ASP.NET
  Core session-key architecture so cart state survives SSR→circuit transition
- Added Minimal API endpoints /AddToCart and /RemoveFromCart as HTTP 302
  round-trips, making cart mutations testable with Playwright NetworkIdle
- Removed @page directive from AddToCart.razor to resolve ambiguous route conflict
- Run report and 5 screenshots at dev-docs/migration-tests/wingtiptoys/run34/
- Bishop history.md updated with architectural learnings

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Implement CLI fixes for G1, G3, G8, and G10 by normalizing display expressions, rewriting EF6 DbContext constructors, extending ServerShim compatibility, and rewriting HttpUtility calls to WebUtility. Include transform registration updates, source-copy coverage, docs, and regression tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ressions

Simple dotted identifiers (Item.ProductName) now emit @Item.ProductName
Complex expressions (method calls, operators) still emit @(expr)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…surface stubs

G1: Remove String.Format from DisplayExpressionTransform negative lookahead
    so format expressions become @(String.Format(...)) instead of leaking as raw <%#:

G2: Add ScriptManagerStripTransform (Order 255) that removes asp:ScriptManager,
    webopt:bundlereference, and Scripts.Render PlaceHolder blocks from master pages

G4: Add CompileSurfaceStubTransform that detects pages with Identity/external API
    references and emits build-safe stubs, preserving originals in migration-artifacts

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add explicit migration skill rules that forbid replacing BWFC data controls with manual HTML, and update the CLI migration pipeline to keep ListView, FormView, GridView, Repeater, and related templates on BWFC components. Preserve ItemType, add template Context="Item" normalization, and keep query-bound pages on SelectMethod wrappers so generated markup stays valid for BWFC controls.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- FormView: establish CurrentItem during OnParametersSet() so SSR
  renders item content on first request
- SessionShim: handle raw string session values consistently for
  cross-request persistence

Discovered during WingtipToys migration benchmark Run 39.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
25/25 acceptance tests passing. BWFC data controls preserved:
- ProductList uses ListView (not manual HTML)
- ProductDetails uses FormView (not manual HTML)
- ShoppingCart uses GridView (not manual HTML)

Total time: 38:34. Gaps found: FormView SSR first-render,
SessionShim string round-trip, acceptance-path runtime wiring.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Run 35: 25/25 tests, 17:34 total
Run 36: 25/25 tests, 10:12 total (best time)
Run 37: 25/25 tests, 18:39 total
Run 38: 25/25 tests, 21:22 total

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- FormView: verify CurrentItem set during OnParametersSet for SSR
- SessionShim: verify string and object values round-trip correctly

Prevents regression of bugs discovered in WingtipToys Run 39.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
RuntimeDetector scans source for EF contexts, session usage, and
Identity pages. ProgramCsEmitter generates matching Program.cs
service registrations and middleware.

Reusable across all Web Forms migrations, not WingtipToys-specific.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
cut.Find("span").GetAttribute("style").ShouldContain("width:500px");
}

[Fact]
csharpfritz and others added 12 commits May 7, 2026 13:08
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Session: Scribe memory consolidation (2026-05-07T12:43)
Decisions merged: 19 inbox files (14026 bytes total)
Orchestration log: bishop-run40 entry
Session log: run40-benchmark entry
Bishop history: summarized from 23915 → 2833 bytes

Changes:
- Created .squad/decisions/decisions.md (17503 bytes, all decisions consolidated)
- Created .squad/orchestration-log/2026-05-07T12-43-bishop-run40.md (2125 bytes)
- Created .squad/log/2026-05-07T12-43-run40-benchmark.md (1399 bytes)
- Updated .squad/agents/bishop/history.md (summarized, 2833 bytes)
- Updated .squad/agents/colossus/history.md (Run 40 team update appended)
- Deleted .squad/decisions/inbox/* (19 files)
- No deduplication conflicts found

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Session: 2026-05-07-template-emission-fix
Requested by: Bishop (via Scribe)

Changes:
- Merged 1 inbox decision: GridView ItemType propagation + ListView context normalization
- Created orchestration log: bishop-template-emission-fix
- Created session log: template-emission-fix
- Updated Bishop history with transform learnings
- Updated Colossus history with cross-agent notification
- CLI tests: 598 → 603 passing (+5 for template emission fixes)
- Commit 1bdbb1f validated in orchestration log
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Session: 2026-05-07-scribe-memory-consolidation
Requested by: Copilot CLI

Changes:
- Merged 4 inbox files to decisions.md
- Deleted merged inbox files
- Deduplicated team decisions
- Created 4 orchestration log entries (bishop-23, bishop-22, bishop-21, rogue-1)
- Updated 6 agent history files with team update
- No history summarization needed (all < 15KB)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Run 42 validates quarantine allowlist, static file middleware, and SSR
antiforgery fixes from Run 41. Key results:
- 25/25 acceptance tests passing
- 96% first-pass rate (24/25, only auth redirect needed repair)
- 22:00 total time (54% faster than Run 41's 47:54)
- Build: 87 initial errors → 0 in single repair round
- Quarantine correctly scoped to Admin, Checkout, PayPal pages only

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…tion rules

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Reorder samples/ in project structure by increasing complexity
- Mark WingtipToys as current benchmark focus
- Add Migration Benchmark Progression table (WingtipToys → ContosoUniversity → DepartmentPortal)
- Note that DepartmentPortal is the most sophisticated future target

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
csharpfritz and others added 5 commits May 8, 2026 10:50
Session: 2026-05-08-g3-g4-fixes
Requested by: Jeff

Changes:
- Merged inbox decision: Update Copilot migration instructions with CLI and toolkit guidance
- Created orchestration log for Bishop spawn (G3/G4 CLI fixes)
- Created session log for memory tracking
- Cleared decisions/inbox/
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- G3: Auth redirect scaffold with POST-based LoginHandler/RegisterHandler
- G4: RequiredFieldValidator type inference (TextBox→string)
- Build repair: 86→0 errors in 2 rounds
- Runtime fixes: SQL Server→SQLite, seed data, route aliasing, cart page
- New gaps identified: G5 (db provider), G6 (route aliasing), G7 (redirect page quarantine)
- 6 screenshots captured, full report at dev-docs/migration-tests/wingtiptoys/run43/

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… (23/25)

- FormView: added DataItem parameter that wraps single item into Items
  collection, fixing empty rendering for single-record data binding
- Content: added ShouldRenderInline fallback for SSR mode (no MasterPage)
- Run 44 benchmark: 23/25 acceptance tests passing (92%)
- All 2904 BWFC unit tests pass across net8.0/net9.0/net10.0
- Updated AfterWingtipToys sample with latest migration output

Remaining failures:
- UpdateCartQuantity: BoundField renders read-only (needs TemplateField)
- RegisterAndLogin: Auth flow timeout (not BWFC-related)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment on lines +28 to +35
if (value != null)
{
Items = new[] { value };
}
else
{
Items = null;
}
csharpfritz and others added 5 commits May 8, 2026 13:05
…n & session log

Session: 2026-05-08-templatefield-fix
Requested by: Copilot

Changes:
- Merged bishop-g3-g4-fixes.md, bishop-g6-g7-fixes.md into decisions.md (2 files)
- Wrote orchestration log for CLI TemplateField transform fix (Run 44 regression)
- Wrote brief session log for decision merge
- decisions.md now 51,720 bytes (scheduled archival next session)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…erved

- CLI correctly preserves TemplateField columns (verified: not a CLI bug)
- L2 repair maintains TemplateField with editable inputs in ShoppingCart
- All 3 TemplateField columns (Quantity/TextBox, Item Total/calc, Remove/CheckBox) intact
- Added CLI TemplateField preservation tests (627 CLI tests passing)
- 25/25 Playwright acceptance tests pass including cart quantity update
- Total runtime: ~14 minutes

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
WingtipToys acceptance tests require SQL Server and are benchmark tests,
not CI tests. They should only run locally via src/WingtipToys.AcceptanceTests.

- Remove ProjectReference to AfterWingtipToys from AfterBlazorServerSide.Tests.csproj
- Remove WingtipToysAcceptanceTests.cs and WingtipToysPlaywrightFixture.cs
- Keep standalone src/WingtipToys.AcceptanceTests/ for local benchmarks

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
All 11 Squad workflows (squad-ci, squad-docs, squad-heartbeat,
squad-insider-release, squad-issue-assign, squad-label-enforce,
squad-preview, squad-promote, squad-release, squad-triage,
sync-squad-labels) now only trigger via workflow_dispatch.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@csharpfritz csharpfritz merged commit a8cec12 into FritzAndFriends:dev May 8, 2026
2 checks passed
@csharpfritz csharpfritz deleted the feature/wingtip-next-features-review branch May 8, 2026 23:33
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