Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
3e1b282
Milestone 21: ListView bugfix, theming, FormView, ModelErrorMessage (…
csharpfritz Mar 2, 2026
70feccc
Milestone 22: WingtipToys Migration Tooling Pipeline (#413)
csharpfritz Mar 3, 2026
1f925d1
feat: WingtipToys full feature migration EF Core, Cart, Checkout, Ad…
csharpfritz Mar 3, 2026
2c57ec1
feat: ListView CRUD fixes + 3-skill migration toolkit (#415)
csharpfritz Mar 3, 2026
1a49ffb
benchmark: WingtipToys migration benchmark run with verification (#416)
csharpfritz Mar 4, 2026
4628354
fix: post-benchmark cleanup UiStyle debug spam, comparison screensho…
csharpfritz Mar 4, 2026
7cf107a
fix: await async OnClick handlers and prevent TextBox value loss (#418)
csharpfritz Mar 4, 2026
07631b6
feat: migration script enhancements, integration test gaps, docs reor…
csharpfritz Mar 4, 2026
d648d03
docs(ai-team): event handler investigation session log and decisions
csharpfritz Mar 4, 2026
426d290
feat: add On-prefix EventCallback aliases for Web Forms migration com…
csharpfritz Mar 4, 2026
396ef84
docs(ai-team): event handler alias implementation session
csharpfritz Mar 4, 2026
031a9de
fix: add AddHttpContextAccessor() to WingtipToys Program.cs
csharpfritz Mar 5, 2026
208a309
fix: render @context in ListView GroupTemplate and LayoutTemplate
csharpfritz Mar 5, 2026
bc115c9
fix: use OnParametersSetAsync for category filtering in ProductList
csharpfritz Mar 5, 2026
fab7e71
docs(ai-team): update migration skill with runtime gotchas
csharpfritz Mar 5, 2026
64392d2
Register IHttpContextAccessor via reflection in AddBlazorWebFormsComp…
csharpfritz Mar 5, 2026
f6fbf5a
Add Service Registration documentation
csharpfritz Mar 5, 2026
f6135ba
docs(ai-team): GridView gap analysis and migration directive
csharpfritz Mar 5, 2026
961a101
Add BWFC control preservation verification to migration pipeline
csharpfritz Mar 5, 2026
4913d5c
Document control preservation verification in migration guide
csharpfritz Mar 5, 2026
b073855
Add BWFC control preservation rules to distributable migration-toolkit
csharpfritz Mar 5, 2026
37795bc
docs(ai-team): Log control preservation toolkit session and merge dec…
csharpfritz Mar 5, 2026
95dcb04
Fix preservation check false positives and unconvertible page detection
csharpfritz Mar 5, 2026
a27d5d6
feat: WingtipToys migration Run 7 benchmark
csharpfritz Mar 5, 2026
d1d4c68
docs(ai-team): log Run 7 migration session and merge decisions
csharpfritz Mar 5, 2026
de78981
feat: Add GetRouteUrl to WebFormsPageBase for zero-change migration
csharpfritz Mar 5, 2026
17aa4ee
fix: Add auth services for AuthorizeView in Run7WingtipToys
csharpfritz Mar 5, 2026
16b88fb
fix: Flag auth service requirements when LoginView converts to Author…
csharpfritz Mar 5, 2026
dae3c84
fix: Add CSS stylesheet links and UseStaticFiles to Run7WingtipToys
csharpfritz Mar 5, 2026
9d63448
fix: Correct image paths in Run7WingtipToys to match wwwroot structure
csharpfritz Mar 5, 2026
edc93da
fix: Improve migration script scaffolding
csharpfritz Mar 5, 2026
55c8c58
fix: Implement AddToCart page in Run7WingtipToys
csharpfritz Mar 5, 2026
5f857bd
feat: Run 8 WingtipToys migration benchmark (Layer 1 + Layer 2)
csharpfritz Mar 5, 2026
c6d1152
docs: Run 8 benchmark report
csharpfritz Mar 5, 2026
9041807
docs(ai-team): Log Run 8 benchmark session
csharpfritz Mar 5, 2026
742b783
fix: ShoppingCart uses BWFC GridView instead of plain HTML table
csharpfritz Mar 5, 2026
0beeab1
docs: update migration skills with BWFC control preservation rules
csharpfritz Mar 5, 2026
8b17e14
fix: add LoginView and LoginStatus to navbar in MainLayout
csharpfritz Mar 5, 2026
88e27df
docs(ai-team): Log Run 8 GridView fix session, merge decisions
csharpfritz Mar 5, 2026
b2b6e03
docs: rewrite migration skills with BWFC-first priority
csharpfritz Mar 5, 2026
19ca30f
docs(ai-team): Add Psylocke (Skills Engineer) and Bishop (Migration T…
csharpfritz Mar 5, 2026
68a27ef
docs(ai-team): Log LoginView redesign session, merge decisions
csharpfritz Mar 5, 2026
eb148e0
docs(ai-team): Merge LoginStatus redesign decision
csharpfritz Mar 5, 2026
9fa710e
docs(ai-team): Summarize Forge history (13KB -> 10KB)
csharpfritz Mar 5, 2026
847d4fc
refactor(login-controls): Delegate LoginView and LoginStatus to Autho…
csharpfritz Mar 5, 2026
aecedbf
Wire P0 EventCallbacks into data components
csharpfritz Mar 5, 2026
1005387
feat(events): Add P0 event handlers Repeater, DataList, GridView, De…
csharpfritz Mar 5, 2026
2db2fb1
docs(ai-team): Log P0 event handler session, merge decisions
csharpfritz Mar 5, 2026
36a0601
feat(events): Implement P1 event handler improvements
csharpfritz Mar 5, 2026
333980a
docs(ai-team): Log P1 event handler session
csharpfritz Mar 5, 2026
035a1d1
Fix build errors in Run9WingtipToys stub pages
csharpfritz Mar 5, 2026
cefe536
feat: Run 9 WingtipToys migration benchmark report
csharpfritz Mar 5, 2026
fca603c
docs: Run 9 WingtipToys benchmark report
csharpfritz Mar 5, 2026
21ff75f
docs(ai-team): Log Run 9 migration session, merge decisions
csharpfritz Mar 5, 2026
b8bd66f
docs(ai-team): Squad Places enlistment and first engagement
csharpfritz Mar 5, 2026
de4730e
docs(ai-team): Log Squad Places community engagement session
csharpfritz Mar 5, 2026
43ef08b
docs(ai-team): Add Squad Places engagement session log
csharpfritz Mar 5, 2026
90eacbd
fix(migration): Layer 1 script bugs ItemType, stubs, base classes, v…
csharpfritz Mar 5, 2026
5c1fce5
docs: Bishop Cycle 1 history and decisions
csharpfritz Mar 5, 2026
190e04b
feat: Run 10 WingtipToys migration benchmark
csharpfritz Mar 5, 2026
f1ee010
docs: update Bishop history and decisions for Run 10
csharpfritz Mar 5, 2026
62a374b
docs: Run 10 WingtipToys benchmark report
csharpfritz Mar 5, 2026
2c26d05
fix(migration): Cycle 2 - enum conversions, booleans, expressions, Im…
csharpfritz Mar 5, 2026
f77e5cd
docs(ai-team): log Cycle 1 Run 10 session, merge 5 inbox decisions
csharpfritz Mar 5, 2026
d323539
fix(migration): Strip ItemType/TItem when SelectMethod provides type …
csharpfritz Mar 5, 2026
709d8c2
feat: Run 11 WingtipToys migration benchmark
csharpfritz Mar 5, 2026
d98e3e8
docs: Update Bishop history and decisions for Run 11
csharpfritz Mar 5, 2026
49b556b
docs: Run 11 WingtipToys benchmark report
csharpfritz Mar 5, 2026
b48b25b
fix(migration): Cycle 3 - mock auth service gen, enum conversions, he…
csharpfritz Mar 5, 2026
d3ab609
docs(ai-team): log Cycle 2 Run 11 session, merge inbox decisions
csharpfritz Mar 5, 2026
afa0f82
fix(migration): Account route prefix and CSS bundle expansion
csharpfritz Mar 5, 2026
d693805
feat: Run 12 WingtipToys migration (partial - Cycle 3 with mock auth)
csharpfritz Mar 5, 2026
0f51336
feat: Run 12 WingtipToys migration benchmark
csharpfritz Mar 5, 2026
7b88cd3
docs: Update Bishop history and decisions for Run 12
csharpfritz Mar 5, 2026
989a2bb
test: Add WingtipToys Playwright acceptance tests
csharpfritz Mar 5, 2026
45fca18
docs(ai-team): Log docs reorganization proposal session
csharpfritz Mar 6, 2026
e59dd32
docs: Reorganize documentation for audience separation
csharpfritz Mar 6, 2026
e0fe898
chore: consolidate dev documentation into dev-docs folder
csharpfritz Mar 6, 2026
7703e42
docs(ai-team): Log folder consolidation session
csharpfritz Mar 6, 2026
585c33e
Fix Layer 2 migration: rewrite all remaining code-behinds to Blazor C…
csharpfritz Mar 6, 2026
adff133
Fix AfterWingtipToys to pass all 14 acceptance tests
csharpfritz Mar 6, 2026
d549432
docs(ai-team): Log Run 7 WingtipToys migration session
csharpfritz Mar 6, 2026
4772881
feat: Run 7 WingtipToys migration - 14/14 acceptance tests pass
csharpfritz Mar 6, 2026
16f188c
docs(ai-team): Run 7 skill improvements and BWFC recommendations
csharpfritz Mar 6, 2026
4208e7d
docs(ai-team): Summarize Bishop history, archive older entries
csharpfritz Mar 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
133 changes: 91 additions & 42 deletions .ai-team/agents/beast/history.md

Large diffs are not rendered by default.

48 changes: 48 additions & 0 deletions .ai-team/agents/bishop/charter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Bishop — Migration Tooling Dev

> The pipeline builder who turns migration methodology into runnable tools.

## Identity

- **Name:** Bishop
- **Role:** Migration Tooling Dev
- **Expertise:** PowerShell scripting, migration pipeline design, CLI tooling, ASP.NET Web Forms analysis, Blazor project scaffolding, automated code transformation
- **Style:** Systematic, thorough, end-to-end thinker. Builds tools that work reliably on real-world Web Forms apps, not just demos.

## What I Own

- The `migration-toolkit/` directory: scripts, methodology, checklists, control coverage
- `bwfc-migrate.ps1` and supporting migration scripts
- Migration pipeline design — the end-to-end flow from .aspx input to Blazor output
- Migration checklist and methodology documentation
- Control coverage tracking (CONTROL-COVERAGE.md)
- Packaging the migration toolkit for external consumption

## How I Work

- I maintain and extend the migration scripts that automate Web Forms → Blazor conversion
- I ensure scripts correctly preserve BWFC controls (never flatten to raw HTML)
- I test scripts against real Web Forms apps (like the WingtipToys sample)
- I track which Web Forms controls are covered by BWFC and update CONTROL-COVERAGE.md
- I design the migration pipeline: analyze → transform → validate → report
- I write PowerShell that's robust on Windows, handles edge cases, and produces clear output

## Boundaries

**I handle:** Migration scripts, pipeline tooling, methodology docs, checklists, control coverage tracking, toolkit packaging.

**I don't handle:** Component implementation (Cyclops), Copilot skills/prompts (Psylocke), documentation site (Beast), sample apps (Jubilee), or component tests (Rogue). I build the tools that orchestrate the migration, not the components themselves.

**When I'm unsure:** I say so and suggest who might know.

## Collaboration

Before starting work, run `git rev-parse --show-toplevel` to find the repo root, or use the `TEAM ROOT` provided in the spawn prompt. All `.ai-team/` paths must be resolved relative to this root — do not assume CWD is the repo root (you may be in a worktree or subdirectory).

Before starting work, read `.ai-team/decisions.md` for team decisions that affect me.
After making a decision others should know, write it to `.ai-team/decisions/inbox/bishop-{brief-slug}.md` — the Scribe will merge it.
If I need another team member's input, say so — the coordinator will bring them in.

## Voice

Pragmatic about tooling. Thinks about the developer who'll actually run these scripts on their legacy app at 11 PM. Every migration step should be automatable, every error message should be actionable, every output should be verifiable. Cares about the whole pipeline, not just individual transforms.
77 changes: 77 additions & 0 deletions .ai-team/agents/bishop/history-archive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Bishop History Archive

> Older entries moved here by Scribe during history summarization.

<!-- Archived 2026-03-06 by Scribe — covers Run 9 through Run 11, Cycles 1-2 -->

### 2025-07-25: Run 9 WingtipToys Migration Benchmark

- **Result:** Build succeeded — 0 errors, 0 warnings (Run9-specific)
- **Pipeline:** Layer 0 (0.66s) → Layer 1 (4.49s, 667 ops) → Layer 2 (~45min) → Build (6.13s, 7 attempts)
- **Output:** 35 .razor, 46 .cs, 79 wwwroot, 28 routable pages, 173 BWFC control instances (23 unique types)
- **Layer 1 bugs found:**
- `ItemType→TItem` conversion is wrong for GridView/ListView/FormView/DetailsView (they use `ItemType`, only DropDownList uses `TItem`)
- Validators missing type params: RequiredFieldValidator needs `Type="string"`, CompareValidator needs `InputType="string"`
- No `BlazorWebFormsComponents.Validations` using added to `_Imports.razor`
- **Layer 2 patterns:**
- `@inherits WebFormsPageBase` in `_Imports.razor` conflicts with `: ComponentBase` in code-behinds — must remove `: ComponentBase`
- Layout files need `: LayoutComponentBase` explicitly
- Stub page cleanup (17/35 files) is the largest Layer 2 effort — unconverted event handlers, ControlToValidate refs, `<% %>` expressions
- `AddHttpContextAccessor()` must come BEFORE `AddBlazorWebFormsComponents()` in Program.cs

Team update (2026-03-05): Run 9 BWFC review APPROVED (98.9% preservation). 2 findings: ImageButtonimg in ShoppingCart (P0), HyperLink dropped in Manage (P2). 3 Layer 1 script bugs documented (ItemType conversion, validator type params, missing Validations using). decided by Forge, Bishop

### Cycle 1 Fixes Applied (Bishop)

- **P0-1 (ItemType→TItem):** Fixed. Regex now uses `(<(?:DropDownList|ListBox|...)\b[^>]*?)\bItemType=` with Singleline flag so only list controls get TItem. Data controls (GridView, ListView, FormView, DetailsView, DataGrid, DataList, Repeater) retain ItemType. Handles multi-line tags.
- **P0-2 (Smart stub):** Fixed. Removed the early `return` that skipped transforms for Account/Checkout pages. All markup now gets full Layer 1 transforms. Only code-behinds are stubbed (minimal partial class + TODO banner). New `New-StubCodeBehind` function added.
- **P0-3 (Base class stripping):** Fixed. `Copy-CodeBehind` now strips `: Page`, `: System.Web.UI.Page`, `: UserControl`, `: MasterPage` base classes and `using System.Web.*` directives before copying. Avoids CS0263 conflicts with `@inherits WebFormsPageBase`.
- **P1-1 (Validator type params):** Fixed. New `Add-ValidatorTypeParameters` function injects `Type="string"` into RequiredFieldValidator/RegularExpressionValidator/RangeValidator and `InputType="string"` into CompareValidator. Uses negative lookahead to skip tags that already have the attribute.
- **P1-4 (ImageButton warning):** Fixed. `Test-BwfcControlPreservation` now emits a specific warning when source has `asp:ImageButton` and output contains `<img>` tags, flagging silent OnClick event handler loss.

### 2025-07-25: Run 10 WingtipToys Migration Benchmark

- **Result:** Build succeeded — 0 errors, 0 warnings, 3 build attempts (down from 7 in Run 9)
- **Pipeline:** Layer 0 (0.91s) → Layer 1 (3.35s, 673 ops) → Layer 2 (~25min) → Build (~13s, 3 attempts)
- **Output:** 35 .razor, 44 .cs, 79 wwwroot, 28 routable pages, 172 BWFC control instances (26 unique types)
- **P0/P1 fixes validated:** All 5 fixes confirmed working — ItemType correct on data controls, smart stubs fully transform Account/Checkout markup, base class stripping works, validator type params injected, ImageButton warning active.
- **Remaining Layer 2 issues discovered:**
- TextMode/Display/SetFocusOnError enum values not converted by Layer 1 (TextMode="Email" should be TextMode="TextBoxMode.Email"). Candidate for P2 fix.
- Empty DropDownList (no Items) can't infer TItem — must be specified explicitly.
- ManageLogins page uses `Microsoft.AspNet.Identity.UserLoginInfo` as ItemType — needs simplification to stub.
- Stub page cleanup still ~60% of Layer 2 effort despite P0-2 fix.

### Cycle 2 Fixes Applied (Bishop) — Script-Only (P1/P2)

- **P1-1 + P1-2 + P2-5 (Convert-EnumAttributes):** New function converts Web Forms string enum values to C# enum types. TextMode→TextBoxMode (5 values), Display→@ValidatorDisplay (3 values), GridLines→@GridLines (4 values). Called after Add-ValidatorTypeParameters in the pipeline. Eliminates ~34 manual fixes per run.
- **P1-3 (Boolean normalization):** New `Convert-BooleanAttributes` function uses regex `(?<==")True(?=")` and `(?<==")False(?=")` to lowercase PascalCase boolean attribute values. Prevents subtle C# case-sensitivity build errors.
- **P1-4 (ControlToValidate stripping):** Added `ControlToValidate` and `ValidationGroup` to `$StripAttributes` list. Both are Web Forms-only attributes with no Blazor equivalent.
- **P2-3 (ImageButton FAIL):** Elevated ImageButton→img detection in `Test-BwfcControlPreservation` from ⚠️ WARNING to ❌ FAIL. Stronger signal for Layer 2 to preserve `<ImageButton>` component.
- **P2-4 (Server-side expression cleanup):** Added pre-pass in `ConvertFrom-Expressions` that detects `<%:` / `<%=` expressions referencing `Request`, `Session`, `Server`, `Response`, `ProviderName`, `SuccessMessage`, `OpenID_*`, `ManageMessage`. These are wrapped in `@* TODO: Server-side expression *@` Razor comments instead of `@(Variable)` which won't compile.

Team update (2026-03-06): Forge reviewed Run 10 preservation: 92.7% (164/177), below 95% threshold. 3 gaps: CheckoutReview DetailsView missing (9 controls), ManageLogins still stub (3 controls), ShoppingCart ImageButton flattened (1 control). Fixing all 3 reaches 97.7%. Layer 1 bugs consolidated into single decision (ItemType, validators, base class). decided by Forge

Team update (2026-03-05): User directive from Jeff stop emitting ItemType/TItem when data source exists (SelectMethod, Items, etc.). Blazor generic type inference handles it. Eliminates #1 recurring build failure class. decided by Jeffrey T. Fritz

### Cycle 2 Fix: ItemType/TItem Stripping with Data Source (Bishop)

- **Remove-ItemTypeWithDataSource:** New function in bwfc-migrate.ps1 that strips ItemType/TItem attributes when SelectMethod is present on the same tag. Runs before ConvertFrom-SelectMethod in the pipeline. Handles both attribute orderings (ItemType before/after SelectMethod) and both attribute names (ItemType and TItem). Eliminates the #1 recurring build failure class — redundant type parameters.

### 2025-07-25: Run 11 WingtipToys Migration Benchmark

- **Result:** Build succeeded — 0 errors, 0 warnings, 4 build attempts (down from 7 in Run 9, comparable to 3 in Run 10)
- **Pipeline:** Layer 0 (skipped — scan script parse error) → Layer 1 (~3.5s, 354 ops) → Layer 2 (~20min) → Build (~4.4s, 4 attempts)
- **Output:** 32 .razor, 32 .cs, 79 wwwroot, 28 routable pages, 178 BWFC control instances (26 unique types)
- **All 3 P0 gaps from Run 10 closed:**
- P0-1: CheckoutReview DetailsView — fully preserved with OrderShipInfo stub model, 9 BWFC controls recovered
- P0-2: ShoppingCart ImageButton — preserved as `<ImageButton>` with OnClick→NavigateTo wiring
- P0-3: ManageLogins — full ListView + Button + PlaceHolder preserved with UserLoginInfo stub model
- **New capabilities:**
- ItemType/TItem stripping when SelectMethod present (Layer 1 script fix)
- AdminPage fully functional with EF Core CRUD (add/remove products)
- Stub model pattern: create lightweight model classes when original types unavailable (UserLoginInfo, OrderShipInfo)
- **BWFC preservation rate:** ~100% (178/178 controls in output have BWFC components)

📌 Team update (2025-07-25): Forge reviewed Run 11 preservation: 98.9% (176/178 adjusted) — APPROVED. All 3 P0 gaps from Run 10 CLOSED. 1 minor gap: HyperLink conditional visibility in Manage.razor. Cycle 3 priorities shift to functional code-behinds (Login/Register per Jeff's directive). — decided by Forge

📌 Team update (2025-07-25): Jeff directive — Login and Register pages must have functional code-behinds, not just BWFC markup. Mock auth service required. — decided by Jeffrey T. Fritz
91 changes: 91 additions & 0 deletions .ai-team/agents/bishop/history.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Project Context

- **Owner:** Jeffrey T. Fritz
- **Project:** BlazorWebFormsComponents — Blazor components emulating ASP.NET Web Forms controls for migration
- **Stack:** C#, Blazor, .NET, ASP.NET Web Forms, bUnit, xUnit, MkDocs, Playwright
- **Created:** 2026-02-10

## Project Learnings (from import)

- The migration-toolkit lives at `migration-toolkit/` and contains: scripts/, skills/, METHODOLOGY.md, CHECKLIST.md, CONTROL-COVERAGE.md, QUICKSTART.md, README.md, copilot-instructions-template.md
- Primary migration script: `migration-toolkit/scripts/bwfc-migrate.ps1` — handles Layer 1 (automated transform)
- Layer 2 (agent-driven implementation) is where BWFC control replacement failures occur — agents replace asp: controls with plain HTML
- Test-BwfcControlPreservation in bwfc-migrate.ps1 validates that BWFC controls are preserved post-transform
- Test-UnconvertiblePage uses path-based patterns (Checkout\, Account\) and content patterns (SignInManager, UserManager, etc.)
- Sample migration targets: WingtipToys (before/after samples in samples/ directory)
- Run7 is the current gold standard: `samples/Run7WingtipToys/`
- The BWFC library has 110+ components covering Web Forms controls
- Migration must preserve all asp: controls as BWFC components — never flatten to raw HTML

## Core Context

<!-- ⚠ Summarized 2026-03-06 by Scribe — covers Run 9 through Run 11, Cycles 1-2. Originals in history-archive.md -->

**Run 9-11 benchmark progression:** Build attempts 7→3→4, Layer 2 time 45→25→20 min, BWFC instances 173→172→178, preservation 98.9%→92.7%→98.9%. All runs 0 errors, 0 warnings. 28 routable pages, ~32 .razor, ~79 wwwroot throughout.

**Cycle 1 fixes (5 items):** P0-1 ItemType→TItem regex (only list controls get TItem, data controls retain ItemType). P0-2 smart stubs (all markup gets L1 transforms, only code-behinds stubbed). P0-3 base class stripping (`: Page`/`: UserControl`/`: MasterPage` removed). P1-1 validator type params (Type="string"/InputType="string" auto-injected). P1-4 ImageButton warning in Test-BwfcControlPreservation.

**Cycle 2 fixes (6 items):** Convert-EnumAttributes (TextMode→TextBoxMode, Display→@ValidatorDisplay, GridLines→@GridLines). Boolean normalization (True/False → true/false). ControlToValidate/ValidationGroup stripping. ImageButton detection escalated to FAIL. Server-side expression cleanup (Request/Session/Server wrapped in TODO comments). Remove-ItemTypeWithDataSource (strips ItemType/TItem when SelectMethod present).

**Key Layer 2 patterns:** `@inherits WebFormsPageBase` conflicts with `: ComponentBase` — must remove explicit base. Layout files need `: LayoutComponentBase`. `AddHttpContextAccessor()` before `AddBlazorWebFormsComponents()`. Stub model pattern for unavailable types (UserLoginInfo, OrderShipInfo). Stub page cleanup ~60% of L2 effort.

## Learnings

### Cycle 3 Fixes Applied (Bishop) — Script + Auth Services

- **P0.3 (Mock Auth Service Generation):** New `Add-MockAuthService` function in bwfc-migrate.ps1 auto-generates `Services/MockAuthService.cs` (in-memory user store with email/password) and `Services/MockAuthenticationStateProvider.cs` (Blazor auth state provider with login/logout) when Account/Login.aspx is detected in source. Eliminates manual auth scaffolding in Layer 2.
- **P0.1+P0.2 (Program.cs Auth Injection):** `New-ProjectScaffold` now accepts `$HasIdentityPages` parameter and conditionally adds `AddScoped<MockAuthService>()`, `AddScoped<MockAuthenticationStateProvider>()`, `AddCascadingAuthenticationState()`, and `AddAuthorization()` to Program.cs template.
- **P1.4 (LogoutAction Enum):** Added LogoutAction enum conversions: Redirect, RedirectToLoginPage, Refresh → `@LogoutAction.{Value}`.
- **P1.4 (BorderStyle Enum):** Added BorderStyle enum conversions: None, NotSet, Dotted, Dashed, Solid, Double, Groove, Ridge, Inset, Outset → `@BorderStyle.{Value}`.
- **P1.3 (Visible Attribute):** New `Convert-VisibleAttribute` function strips `Visible="true"` (default value), preserves `Visible="false"` for BWFC components.
- **P2.2 (Hex Color Escaping):** New `Convert-HexColors` function escapes hex color values like `BorderColor="#efeeef"` to `BorderColor="@("#efeeef")"` to prevent C# preprocessor directive interpretation in Razor.

### 2026-03-05: Run 12 WingtipToys Migration Benchmark

- **Result:** Build succeeded — 0 errors, 0 warnings, 2 build attempts (best ever — down from 4 in Run 11)
- **Pipeline:** Layer 1 (~3.5s, 365 ops) → Layer 2 (~15min) → Build (~3s, 2 attempts)
- **Output:** 32 .razor, 32 .cs, 79 wwwroot, 28 routable pages, 184 BWFC control instances (27 unique types)
- **Auth services fully functional (P0 complete):**
- Login.razor.cs: Injects MockAuthenticationStateProvider + MockAuthService, calls LoginAsync, NavigateTo "/" on success
- Register.razor.cs: Calls CreateUserAsync, auto-login on success, NavigateTo "/Account/Login"
- MockAuthService: In-memory user store (admin@wingtiptoys.com / Pass@word1 default)
- LoginStatus: Preserved as BWFC component on MainLayout with `LogoutAction="@LogoutAction.Redirect"`
- Login/Register markup uses `@bind-Text` for TextBox → code-behind field binding
- **Layer 1 script improvements (6 new features):**
- Mock auth service generation (conditional on Account/Login.aspx)
- Program.cs auth injection (conditional)
- LogoutAction + BorderStyle enum conversions
- Visible attribute handling (strip true, preserve false)
- Hex color escaping for Razor safety
- **BWFC preservation rate:** ~100% (184 instances, 27 unique types — up from 178/26 in Run 11)
- **LinkButton newly preserved:** 3 instances (ManageLogins, Checkout pages) — previously flattened

📌 Team update (2026-03-05): Run 12 BENCHMARK complete. All quality gates passed: 0 build errors, ≤3 attempts (2), auth functional, 184 BWFC instances (≥178), ~100% preservation. First run with functional Login/Register. — decided by Bishop

### Fresh Layer 1 Migration Run (Bishop) — AfterWingtipToys

- **Date:** Run executed against cleared `samples/AfterWingtipToys/`
- **Script:** `bwfc-migrate.ps1` with `-Path samples/WingtipToys/WingtipToys -Output samples/AfterWingtipToys`
- **Execution time:** 3.33 seconds
- **Transforms applied:** 366
- **Files processed:** 32 Web Forms files
- **Static files copied:** 80
- **Items needing review:** 46 (14 CodeBlock, 1 ContentPlaceHolder, 2 ControlPreservation, 15 EventHandler, 1 LoginView-Auth, 4 RegisterDirective, 9 SelectMethod)
- **Output:**
- 35 .razor files, 35 .cs files, 80 wwwroot files, 152 total files
- Scaffold: WingtipToys.csproj ✓, Program.cs ✓, _Imports.razor ✓, Components/App.razor ✓, Components/Routes.razor ✓
- Layout: MainLayout.razor + Site.MobileLayout.razor in Components/Layout/
- Auth: Services/MockAuthService.cs + MockAuthenticationStateProvider.cs auto-generated (Account/Login.aspx detected)
- Pages: 10 root pages, 15 Account pages, 6 Checkout pages, 1 Admin page
- **Observations:**
- Task spec listed `-SourcePath`/`-DestinationPath`/`-ProjectName` params — actual params are `-Path`/`-Output` (no ProjectName). Script auto-detects project name from directory.
- App.razor lives at `Components/App.razor` (Blazor Web App convention), not project root. Task verification should check there.
- ControlPreservation flagged Site.Master: 1 `<PlaceHolder>` lost (5 asp: tags in → 4 BWFC tags out). Known issue from prior runs.
- 0 errors during script execution. Clean run.

Team update (2026-03-06): Layer 2 conventions established Button OnClick uses EventArgs (not MouseEventArgs), code-behind class names must match .razor filenames exactly, use EF Core wildcard versions for .NET 10, CartStateService replaces Session, GridView needs explicit TItem decided by Cyclops


Team update (2026-03-06): Forge produced 8 script improvement recommendations (S1-S8) assigned to Bishop S1: @inherits WebFormsPageBase in _Imports.razor, S2: AddHttpContextAccessor in Program.cs, S3: : Page : WebFormsPageBase, S4: @using Enums, S5: Page_Load rename, S6: Cookie auth scaffold, S7: src~/action~ URL conversion, S8: Stub base class. Recommended Cycle 1: S1+S2+S3+S4 decided by Forge
Team update (2026-03-06): LoginView is native BWFC migration script must stop converting to AuthorizeView. Strip asp: prefix only, preserve template names decided by Jeffrey T. Fritz, Forge
Team update (2026-03-06): WebFormsPageBase is the canonical base class for all migrated pages (not ComponentBase). All agents must use WebFormsPageBase decided by Jeffrey T. Fritz
Loading
Loading