refactor: frontend consistency pass — OnClose naming, AssetIds param, drop _ prefixes #191

Merged
REDCODE merged 6 commits from feature/frontend-consistency-166 into develop 2026-08-21 00:43:54 +00:00
Collaborator

Closes #166 (frontend consistency pass + null-deref warnings). Part of #155 (area D).

Items 2 (ProfileCropper→ModalFrame) and 4 (CS8602 triage) were already resolved; this PR covers the remaining two.

Changes

Item 1 — Standardize dismiss callbacks on OnClose (commit de8589b)

Renamed the OnClosed parameter to OnClose (matching ModalFrame) in AssetPicker, AlbumAssetPicker, AlbumForm, PersonForm, ProfileCropper; updated all callers (AlbumDetail, Albums, CosplayerDetail, Cosplayers). Renamed the now-colliding private OnClose() methods in AlbumForm/PersonForm to HandleClose.

Item 3a — Align asset-ids parameter naming (commit 0a51ce6)

AlbumForm.AlbumAssetIdsAssetIds (matches PersonForm); updated the AlbumDetail caller.

Item 3b — Drop _ prefix from frontend private fields (commits a893836, 2ea4bb7, 87b7d61)

Swept ~35 .razor/.cs files across Pages, Shared components, and services/code-behind. Convention documented in AGENTS.md (docs commit c2fe80c): no leading _ on private fields in MilkStream.Client.

Deliberately preserved:

  • target="_blank" HTML attribute (not a field).
  • _2 placeholder parameter in Cosplayers.OnLoggedUserChanged (a discard-style unused param, not a field).
  • Middle-underscore names like Register_OnClick (JS interop method names — not word-start).

Collision fixes caught by the compiler

The sweep surfaced three _xx collisions with existing identifiers that were silently self-assigning; fixed and verified by build (0 warnings):

  • PageBuffer.cs ctor: this.keySelector = keySelector;
  • Settings.razor LoadData: this.folders = folders;
  • Jobs.razor SwitchTab: parameter renamed showActivetoActive

Verification

  • dotnet build MilkStream.Client — 0 warnings, 0 errors.
  • Items 2 & 4 already resolved (no build warnings, ProfileCropper on ModalFrame).

Frontend-only ⇒ review by REDCODE.

Closes #166 (frontend consistency pass + null-deref warnings). Part of #155 (area D). Items 2 (ProfileCropper→ModalFrame) and 4 (CS8602 triage) were already resolved; this PR covers the remaining two. ## Changes ### Item 1 — Standardize dismiss callbacks on `OnClose` (commit `de8589b`) Renamed the `OnClosed` parameter to `OnClose` (matching `ModalFrame`) in `AssetPicker`, `AlbumAssetPicker`, `AlbumForm`, `PersonForm`, `ProfileCropper`; updated all callers (`AlbumDetail`, `Albums`, `CosplayerDetail`, `Cosplayers`). Renamed the now-colliding private `OnClose()` methods in `AlbumForm`/`PersonForm` to `HandleClose`. ### Item 3a — Align asset-ids parameter naming (commit `0a51ce6`) `AlbumForm.AlbumAssetIds` → `AssetIds` (matches `PersonForm`); updated the `AlbumDetail` caller. ### Item 3b — Drop `_` prefix from frontend private fields (commits `a893836`, `2ea4bb7`, `87b7d61`) Swept ~35 `.razor`/`.cs` files across Pages, Shared components, and services/code-behind. Convention documented in `AGENTS.md` (`docs` commit `c2fe80c`): no leading `_` on private fields in `MilkStream.Client`. Deliberately preserved: - `target="_blank"` HTML attribute (not a field). - `_2` placeholder parameter in `Cosplayers.OnLoggedUserChanged` (a discard-style unused param, not a field). - Middle-underscore names like `Register_OnClick` (JS interop method names — not word-start). ### Collision fixes caught by the compiler The sweep surfaced three `_x`→`x` collisions with existing identifiers that were silently self-assigning; fixed and verified by build (0 warnings): - `PageBuffer.cs` ctor: `this.keySelector = keySelector;` - `Settings.razor` `LoadData`: `this.folders = folders;` - `Jobs.razor` `SwitchTab`: parameter renamed `showActive` → `toActive` ## Verification - `dotnet build MilkStream.Client` — 0 warnings, 0 errors. - Items 2 & 4 already resolved (no build warnings, `ProfileCropper` on `ModalFrame`). Frontend-only ⇒ review by REDCODE.
Ai_Agent added 6 commits 2026-08-21 00:31:35 +00:00
REDCODE marked the pull request as ready for review 2026-08-21 00:43:49 +00:00
REDCODE merged commit d72448b34b into develop 2026-08-21 00:43:54 +00:00
REDCODE deleted branch feature/frontend-consistency-166 2026-08-21 00:43:54 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MilkyShots/MilkyShots#191