Remove dead and unused code #16

Merged
clayschaad merged 1 commit from remove-dead-code into main 2026-10-30 21:46:11 +00:00
Owner

Sweep for dead and unused code (types, members, components, CSS, JS, assets, packages, DI registrations, compiler/IDE warnings).

Removed

  • CSS: Bootstrap template leftovers — NavMenu.razor.css (whole file), MainLayout.razor.css (all but #blazor-error-ui), button/form/error-boundary rules in app.css; copied Fluent demo rules in BankTransactions.razor.css
  • Bootstrap: only bootstrap.min.css (+ map) is loaded; 42 other files (8.5 MB, incl. all JS) removed
  • Credit-card statement import (never wired into the Blazor UI; would also have failed at runtime because CsvHelper isn't shipped): FileService.ImportCreditCardStatementFile, ViewService.MatchCreditCardTransactionsAsync, ISettingsService.GetCreditCardStatementPath, DataFolders.CreditCard, DI registrations for ICreditCardStatementService/IPdfParsingService, the FreeSpire.PDF package
  • CSV export GetTransactionListCsvAsync (only called from tests) and its 3 tests
  • Split predefinitions: model, interface, repository, DI registration and the SplitPredefinitions.json entry in the JSON editor (files on disk untouched)
  • Unused members: TrySetYear, GetUploadPath (+ DataFolders.Uploads; uploads only ever go to temp files), GetClasses
  • 7 unused usings, two unread Plotly @ref fields, unused parameters in ViewService, unused repository in FileService

Fixed along the way

  • Home.razor.css → PendingBookings.razor.css: the pending-bookings table moved into PendingBookings in "PR U-10" and its styles (column widths, borders, header) stopped applying, because scoped CSS only reaches its own component

Testing

  • Build without warnings; dotnet test 157 passed (4 tests of removed code dropped)
  • Visual regression: computed styles of every element on all 16 pages identical to main (baseline built in a separate worktree)
  • Smoke test: all pages load without browser or server errors (DI still resolves)
  • CLAUDE.md updated

🤖 Generated with Claude Code

Sweep for dead and unused code (types, members, components, CSS, JS, assets, packages, DI registrations, compiler/IDE warnings). ## Removed - **CSS**: Bootstrap template leftovers — `NavMenu.razor.css` (whole file), `MainLayout.razor.css` (all but `#blazor-error-ui`), button/form/error-boundary rules in `app.css`; copied Fluent demo rules in `BankTransactions.razor.css` - **Bootstrap**: only `bootstrap.min.css` (+ map) is loaded; 42 other files (8.5 MB, incl. all JS) removed - **Credit-card statement import** (never wired into the Blazor UI; would also have failed at runtime because `CsvHelper` isn't shipped): `FileService.ImportCreditCardStatementFile`, `ViewService.MatchCreditCardTransactionsAsync`, `ISettingsService.GetCreditCardStatementPath`, `DataFolders.CreditCard`, DI registrations for `ICreditCardStatementService`/`IPdfParsingService`, the `FreeSpire.PDF` package - **CSV export** `GetTransactionListCsvAsync` (only called from tests) and its 3 tests - **Split predefinitions**: model, interface, repository, DI registration and the `SplitPredefinitions.json` entry in the JSON editor (files on disk untouched) - **Unused members**: `TrySetYear`, `GetUploadPath` (+ `DataFolders.Uploads`; uploads only ever go to temp files), `GetClasses` - 7 unused usings, two unread Plotly `@ref` fields, unused parameters in `ViewService`, unused repository in `FileService` ## Fixed along the way - `Home.razor.css` → `PendingBookings.razor.css`: the pending-bookings table moved into `PendingBookings` in "PR U-10" and its styles (column widths, borders, header) stopped applying, because scoped CSS only reaches its own component ## Testing - Build without warnings; `dotnet test` 157 passed (4 tests of removed code dropped) - Visual regression: computed styles of every element on all 16 pages identical to `main` (baseline built in a separate worktree) - Smoke test: all pages load without browser or server errors (DI still resolves) - CLAUDE.md updated 🤖 Generated with [Claude Code](https://claude.com/claude-code)
clayschaad added 1 commit 2026-10-30 21:46:10 +00:00
- CSS: drop the Bootstrap template leftovers (NavMenu.razor.css, most of
  MainLayout.razor.css, button/form rules in app.css) and the copied
  Fluent demo rules in BankTransactions.razor.css.
- Bootstrap: keep only bootstrap.min.css (+ map); 42 unused files removed.
- Credit-card statement import, never wired into the Blazor UI: service
  methods, GetCreditCardStatementPath, DI registrations for
  ICreditCardStatementService/IPdfParsingService, FreeSpire.PDF.
- CSV export (GetTransactionListCsvAsync), only called from tests.
- Split predefinitions: model, repository and the JSON editor entry.
- Unused members: TrySetYear, GetUploadPath (+ DataFolders.Uploads),
  GetClasses; unused usings, fields and parameters.
- Home.razor.css -> PendingBookings.razor.css: the pending-bookings table
  moved there in "PR U-10" and had lost its styling since.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
clayschaad merged commit 1697517200 into main 2026-10-30 21:46:11 +00:00
clayschaad deleted branch remove-dead-code 2026-10-30 21:46:11 +00:00
clayschaad referenced this pull request from a commit 2026-10-30 21:46:11 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: clayschaad/AccountingNext#16
No description provided.