Skip to content

♻️ Remove UIController delegation wrappers#250

Merged
msgerbush merged 3 commits into
mainfrom
refactor/phase-2-uicontroller-cleanup
May 7, 2026
Merged

♻️ Remove UIController delegation wrappers#250
msgerbush merged 3 commits into
mainfrom
refactor/phase-2-uicontroller-cleanup

Conversation

@Gudsfile
Copy link
Copy Markdown
Owner

@Gudsfile Gudsfile commented May 4, 2026

Closes #220

Summary

  • Remove wrapper methods in UIController that did nothing but delegate to LibraryUIPageBuilder, SettingsUIPageBuilder, and SonosUIPageBuilder (were useful as a transition)
  • Route handlers now call page builders directly
  • Move the wrapper-level tests to a dedicated test_library_page_builder.py
  • Extract walk_components test helper into a shared conftest fixture
  • Replace __anext__() workaround with the anext() builtin (since we're using Python 3.11+)

Extracting equivalent dedicated tests for settings and sonos page builders is a follow-up item (those tests were not directly affected by removing the controller wrappers).

Test plan

  • All tests pass (uv run --extra ui pytest)

@Gudsfile Gudsfile self-assigned this May 4, 2026
@Gudsfile Gudsfile marked this pull request as ready for review May 5, 2026 21:38
Base automatically changed from refactor/phase-1-discstore-migration to main May 7, 2026 15:03
Copy link
Copy Markdown
Collaborator

@msgerbush msgerbush left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks for making it easy to review 👍

Gudsfile added 3 commits May 7, 2026 11:05
Routes now call library_pages, settings_pages, and sonos_pages directly.
Wrapper-focused tests moved to tests/…/ui_pages/test_library_page_builder.py.
@msgerbush msgerbush force-pushed the refactor/phase-2-uicontroller-cleanup branch from 642c492 to 959d198 Compare May 7, 2026 15:05
@msgerbush msgerbush merged commit 3e6c6e6 into main May 7, 2026
6 checks passed
@msgerbush msgerbush deleted the refactor/phase-2-uicontroller-cleanup branch May 7, 2026 15:06
msgerbush added a commit that referenced this pull request May 7, 2026
Follows #250

## Summary
- Extract all page rendering assertions from `test_ui_controller.py`
into dedicated page builder test files
- `test_ui_controller.py` now only tests HTTP routing and handler
behaviour
- Settings, Sonos, and library page builder tests are now fully isolated
in `ui_pages/`

## Test plan
- `uv run --extra ui pytest`
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.

Remove Transitional UIController Wrapper Methods

2 participants