Skip to content

feat(discovery): expose search sources across GTK, TUI and Web - #281

Merged
pitill0 merged 2 commits into
mainfrom
feat/issue-275-discovery-source-ui
Oct 23, 2026
Merged

pitill0 merged 2 commits into
mainfrom
feat/issue-275-discovery-source-ui

Conversation

@pitill0

@pitill0 pitill0 commented Oct 23, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #275.

Expose the existing station discovery sources consistently across all three FluxTuner interfaces: GTK, TUI and Web.

Users can explicitly select between:

  • Radio Browser — remote station discovery (default).
  • Local — stations from the current local library/profile.
  • All sources — combined remote and local discovery.

The existing Radio Browser search behavior remains the default for backward compatibility.

Implementation

GTK

  • Add a discovery-source dropdown to the search toolbar.
  • Route local and combined searches through a dedicated desktop discovery adapter.
  • Invalidate pending results and clear stale selections when switching sources.
  • Preserve active playback during source changes.

TUI

  • Add a source selector alongside the existing search filters.
  • Provide styling for all six bundled themes.
  • Implement generation-based invalidation to prevent stale search results from replacing newer views.
  • Avoid cancelling Textual event-processing tasks during source changes or navigation.

Web

  • Add a source selector to the search form and API.
  • Preserve the existing Radio Browser search and diagnostic behavior.
  • Enforce authenticated user and profile isolation for local discovery.
  • Handle partial availability when combined discovery encounters remote failures.
  • Abort pending browser requests and invalidate obsolete results when switching sources.

Core

  • Introduce a desktop discovery adapter using worker-owned, read-only SQLite connections.
  • Avoid implicit profile creation and cross-thread SQLite connection sharing.

Validation

  • 1,615 tests passed.
  • Ruff lint and formatting checks passed.
  • Mypy passed across 107 source files.
  • JavaScript syntax validation passed.
  • Python compilation passed.
  • Git whitespace checks passed.
  • Manual smoke testing completed for GTK, TUI and Web.

Additional regression coverage includes source selection, stale-result handling, TUI concurrency, SQLite connection lifecycle, authenticated Web discovery and profile isolation.

Compatibility and scope

  • Radio Browser remains the default discovery source.
  • No database schema changes or migrations.
  • No additional runtime dependencies.
  • Existing playback behavior remains unchanged.

Merge checklist

  • Implementation complete
  • Local test suite passing
  • Static analysis and formatting passing
  • GTK, TUI and Web smoke tests completed
  • GitHub CI passing
  • Final PR review

Add Radio Browser, Local and All source selectors to all three interfaces.

Use read-only, worker-owned SQLite connections for desktop discovery and enforce authenticated user/profile isolation in Web searches.

Invalidate stale search results without cancelling Textual event tasks. Add regression coverage for selectors, concurrency and data isolation.

Closes #275
@pitill0 pitill0 self-assigned this Oct 23, 2026
@pitill0 pitill0 added the enhancement New feature or request label Oct 23, 2026
Avoid pytest collection failures on headless CI runners while retaining GTK discovery coverage on supported systems.
@pitill0
pitill0 merged commit df83961 into main Oct 23, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add discovery-source selection to GTK, TUI and Web

1 participant