Commit ae505ca
feat(cli): migration benchmark speedups — reduce L2 repair time (FritzAndFriends#553)
* feat(cli): migration benchmark speedups — reduce L2 repair time
Five CLI improvements targeting the biggest L2 time sinks identified in
WTT Run 87 and CU Run 24:
1. Fix quarantine over-triggering: Remove System.Configuration from
LegacyHelperStubTransform trigger regex. BWFC provides a
ConfigurationManager shim, so files using it should not be stubbed.
2. ConfigurationManager ambiguity: Use a using alias to disambiguate
between BlazorWebFormsComponents.ConfigurationManager and
Microsoft.Extensions.Configuration.ConfigurationManager in .NET 10.
Strip comments before detecting usage to avoid matching TODO text.
3. AJAX Toolkit auto-wiring: Add AjaxToolkitRuntimeSignalDetector that
detects <ajaxToolkit: prefixes, adds project reference to
BlazorAjaxToolkitComponents, injects @using into _Imports.razor,
and adds using directive to code-behind for component ref fields.
4. GridView paging EventArgs mapping: Map GridViewPageEventArgs,
DetailsViewPageEventArgs, FormViewPageEventArgs, and
ListViewPageEventArgs to BWFC's PageChangedEventArgs.
5. System.Data.SqlClient detection: Add SqlClientRuntimeSignalDetector
that adds the System.Data.SqlClient NuGet package when usage is
detected in source files.
Test results: 841 passing, 0 failing.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat(cli): Add CU migration automation transforms and home page detection
- DataSourceParameterBindingTransform: Detects ref?.DataSource = expr pattern
in OnInitializedAsync, refactors to backing field + markup parameter binding
- StaticItemsParameterBindingTransform: Detects ref?.StaticItems.Add() in OnInit,
refactors to ListItemCollection backing field + parameter binding
- DefaultPageRuntimeSignalDetector: Detects Default/Home/Index.aspx for root redirect
(skips redirect when PageDirectiveTransform already adds @page '/')
- PageDirectiveTransform: Add /Home to home page detection (joins Default/Index)
- DbContextInstantiationTransform: Preserve original variable names instead of
generating _camelCase names from type (minimizes code rewrites)
- ProgramCsEmitter: Emit app.MapGet('/') redirect for non-standard home pages
- Update tests to match new variable name preservation behavior
All 841 CLI tests pass.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: per-page WebFormsForm wrapping and Button type=button default
- Add PageFormWrapperTransform (Order 930) that wraps all page content
in <WebFormsForm> to replicate Web Forms form behavior
- Change Button.UseSubmitBehavior default from true to false so buttons
don't accidentally submit forms (type='button' instead of 'submit')
- Update ActionPagesSemanticPattern to handle AntiforgeryToken in
inert-markup detection
- Update all component tests for new Button default type
- Regenerate L1 expected test data with WebFormsForm wrapping
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: handle null DataSource gracefully and add EnableCaching to AutoCompleteExtender
- DataBoundComponent.GetDataSource() now returns empty collection for null
instead of throwing InvalidOperationException
- AutoCompleteExtender gains EnableCaching parameter (real AJAX Toolkit property)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: add name attribute to DropDownList for form POST support
DropDownList now renders a 'name' attribute on the <select> element,
matching TextBox behavior. Uses the FormNamingContext cascading parameter
for proper Web Forms-compatible UniqueID generation within GridView rows.
This enables DropDownList values to be submitted via standard HTML form POST,
which is required for static SSR scenarios.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(samples): CU L2 repair — form POST for Add/Delete, StaticItems binding
Students page:
- Replaced WebFormsForm with native <form> for static SSR form handling
- Added ID to TextBox components for name attribute generation
- Added ID to DropDownList for form POST of selected course
- Replaced CommandField Delete with TemplateField submit buttons
- Added [SupplyParameterFromForm] properties for insert/delete POST data
- Insert and Delete now work via standard form POST (no JS/interactivity)
Other pages:
- Removed lowercase id= from BWFC components (CLI bug workaround)
- Added StaticItems parameter binding for Courses/Students dropdowns
- Added @page /Home dual route and PageTitle
- Fixed DbContext constructor and EF model configurations
Result: 37/40 acceptance tests pass (3 About page failures are pre-existing
data issue with duplicate enrollment date dictionary key)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(samples): WTT Run 91 L2 repairs — 26/26 acceptance tests pass
Fixes applied after L1 migration (647 transforms, 0 errors):
- Added missing 'using WingtipToys.Logic' to Account pages and PayPalFunctions
- Fixed stale 'actions' variable reference in ShoppingCart.razor.cs
- Fixed ExceptionUtility.cs static method using instance field
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(samples): CU Run 28 L2 repairs — 35/40 acceptance tests pass
L1 migration: 5 files, 139 transforms, 0 errors.
L2 repairs:
- Removed duplicate Enrollmet_Logic from Models/ (kept BLL version)
- Passed injected DbContext to BLL constructors
- Converted Students/About GridViews from SelectMethod to Items binding
- Fixed AutoCompleteExtender ID attribute (component doesn't support it)
- Fixed About page duplicate dictionary key on enrollment dates
- Converted Students form to native POST with SupplyParameterFromForm
- Added Clear button as form submit action
- Added database seed data for initial population
- Fixed DropDownList StaticItems binding for courses
- Added /Home dual route
Remaining 5 failures: Students GridView data join (needs enrollments in DB),
AddNewStudent form, Clear button, DetailsView search, About GridView columns.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* test: update L1 transform test expectations for new transforms
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(samples): CU Run 29 L2 repairs — 40/40 acceptance tests pass
Fixes:
- Fix DetailsView search to support single-word queries (search by
first OR last name contains, not just exact first+last match)
- Fix form field names: SupplyParameterFromForm names now match
rendered name attributes with tabAddStud$ prefix from naming container
- Remove premature _studentData_DataSource = null that wiped search results
- Add second department (Mathematics) to seed data for dropdown test
- Fix Enrollmet_Logic to use client-side evaluation for GroupBy query
(prevents EF Core translation issues with ToShortDateString)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* benchmark: WTT Run 92 (26/26) + CU Run 29 (40/40) — both 100% pass
WingtipToys Run 92:
- L1: 24s, 647 transforms, 0 errors
- L2: 3 fixes (missing usings, variable name, static field)
- Result: 26/26 acceptance tests pass
ContosoUniversity Run 29:
- L1: 7s, 139 transforms, 0 errors
- L2: Build repair (19 errors) + runtime fixes (form POST, seed, search)
- Result: 40/40 acceptance tests pass
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat(cli): add ServiceConstructorWiring + ButtonToSubmit transforms
- ServiceConstructorWiringTransform (Order 108): converts new BllClass()
instantiations in page code-behind to [Inject] DI properties
- ButtonToSubmitTransform (Order 945): converts <Button> to <input submit>
inside plain <form method=post> (excludes WebFormsForm pages)
- Registered in both Program.cs and TestHelpers.cs
- All 841 CLI tests pass
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(samples): CU Run 30 + WTT Run 93 — both 100% pass
CU: 40/40 tests (L1 6.3s, 143 transforms, 1 build error after L1)
WTT: 26/26 tests (L1 9.3s, 647 transforms, 4 build errors after L1)
New ServiceConstructorWiringTransform eliminated BLL constructor
manual fixes — classes auto-injected via DI.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat(cli): reduce L2 errors — fix Include scoping, duplicate classes, dead code, namespace usings
- EagerLoadNavigationTransform: add 'Key' to NonNavPropertyNames exclusion list,
scope Strategy 3 (LINQ query syntax) includes to only nav props actually accessed
in the specific query statement (prevents spurious .Include(x => x.Student) on
unrelated DbSets)
- SourceFileCopier: detect same-name classes across different namespaces (Models/
vs BLL/) and skip the Models copy to prevent CS0104 ambiguity
- EventHandlerSignatureTransform: fix call sites when method signature changes from
(object sender, EventArgs e) to (EventArgs e) — updates internal calls too
- DeadControlTreeCodeTransform (NEW, Order 710): comments out Web Forms control-tree
access patterns (Table.Rows, TableRow.Cells, Controls[]) that can't compile in Blazor
- ItemsAddToDataSourceTransform (NEW, Order 715): converts foreach+Items.Add() loops
to DataSource assignment pattern
- ProjectNamespaceUsingTransform (NEW, Order 102): adds using directives for project
sub-namespaces (Logic/, BLL/, Services/) to source files
- ProjectScaffolder: auto-detect sub-namespace directories and add @using to _Imports.razor
- DbContextInstantiationTransform: replace references to removed variable names with
the injected field name (fixes 'actions' → 'usersShoppingCart' rename)
Results: CU builds with 0 errors from CLI (was 14). WTT down to 1 error (was 4).
All 841 CLI tests pass.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: Add Wizard component for multi-step navigation
Implements the ASP.NET Web Forms Wizard control as a Blazor component:
- Wizard and WizardStep components with table-based HTML output
- WizardStepType enum (Auto, Start, Step, Finish, Complete)
- WizardNavigationEventArgs with Cancel support
- Navigation buttons auto-determined by step position
- Sidebar with step titles and clickable navigation
- AllowReturn support (skips steps on Previous)
- FinishDestinationPageUrl/CancelDestinationPageUrl
- Style properties: NavigationButtonStyle, SideBarStyle, HeaderStyle, StepStyle
- Templates: HeaderTemplate, SideBarTemplate
- Events: OnNextButtonClick, OnPreviousButtonClick, OnFinishButtonClick,
OnCancelButtonClick, OnActiveStepChanged, OnSideBarButtonClick
- bUnit tests covering navigation, events, and visibility
- Sample page and MkDocs documentation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* docs: Enhance Wizard documentation and expand live sample page
- Expand docs/NavigationControls/Wizard.md with full property tables,
events reference, WizardStepType enum details, navigation behavior,
AllowReturn mechanics, and 5 progressive usage examples
- Expand sample page with 6 demo scenarios: basic wizard, no sidebar,
AllowReturn restriction, cancel button, custom button text, and
header template
- Add Wizard to ComponentList.razor and ComponentCatalog.cs for
navigation discovery
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(tests): update Playwright selectors for Button type='button' default
The Button component's UseSubmitBehavior was changed to default to false
(commit db21ba2), rendering <input type='button'> instead of
<input type='submit'>. Update all Playwright test selectors to match
both type='button' and type='submit' to fix 5 CI failures.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent b5b813e commit ae505ca
262 files changed
Lines changed: 7470 additions & 2843 deletions
File tree
- dev-docs/migration-tests
- contosouniversity
- run25
- images
- run26
- run29
- wingtiptoys
- run88
- images
- run89
- run92
- samples
- AfterBlazorServerSide.Tests
- AfterBlazorServerSide
- Components/Pages
- ControlSamples/Wizard
- AfterContosoUniversity
- BLL
- Models
- migration-artifacts
- codebehind
- compile-surface
- AfterWingtipToys
- Account
- Admin
- Checkout
- Components
- Layout
- Logic
- Models
- migration-artifacts
- codebehind
- Account
- Admin
- Checkout
- compile-surface
- Logic
- Models
- src
- BlazorAjaxToolkitComponents
- BlazorWebFormsComponents.Cli
- Io
- Scaffolding
- SemanticPatterns
- Transforms
- CodeBehind
- Directives
- Markup
- BlazorWebFormsComponents.Test
- BaseWebFormsComponent
- Button
- DataList
- FormView
- GridView
- Repeater
- Wizard
- BlazorWebFormsComponents
- DataBinding
- Enums
- tests/BlazorWebFormsComponents.Cli.Tests
- TestData/expected
- TransformUnit
- Transforms/CodeBehind
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| 141 | + | |
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
| |||
Lines changed: 153 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
Lines changed: 60 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
Lines changed: 96 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
0 commit comments