Skip to content

Fix Xbox shell focus, search, and library filter navigation#98

Merged
dfederm merged 1 commit into
dfederm:mainfrom
CyberoniOntoni:feature/xbox-shell-focus
Jun 23, 2026
Merged

Fix Xbox shell focus, search, and library filter navigation#98
dfederm merged 1 commit into
dfederm:mainfrom
CyberoniOntoni:feature/xbox-shell-focus

Conversation

@CyberoniOntoni

@CyberoniOntoni CyberoniOntoni commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Rebased onto current main (single commit, 29 files, +936/−76). Builds on merged #93 (controller shell), #97 (packaging), and #100 (CancellableLoad).

Adds a persistent shell search bar with suggestions and a full Search results page, fixes Xbox focus crashes and library filter controller navigation, and hardens item-details loading.

Follow-up: OSK dismiss (B) auto-selecting the first suggestion is fixed separately in #101 (merge after this PR).

Shell search

  • AutoSuggestBox in MainPage with debounced suggestions (ShellSearchViewModel)
  • Search page for full query results (SearchViewModel)
  • SelectSuggestion consolidates suggestion pick (cancel in-flight fetch, clear field, navigate)
  • NavigateToSearch reloads results when already on Search with the same query
  • Search.OnNavigatingFrom cancels in-flight loads
  • Async item resolution for suggestion navigation (NavigationManager.NavigateToItemAsync)
  • CollectionNavigation routes collection folders to library views (single type→kind/title mapping)
  • Nav menu clears selection while on Search (no stale highlight)

Xbox focus fixes

  • Search is not auto-focused on page navigation; MainPage toggles IsTabStop instead of invalid FocusState.Unfocused (fixes Xbox 0xc000027b crash)
  • Up from Home first row redirects focus to search via TrySetNewFocusedElement (SectionNavigationBehavior + TrapAtTop)
  • Library filter XYFocusRight moved to code-behind (dynamic focus chain when filters are active)
  • Search field cleared after navigating to an item

Load cancellation (#100 integration)

  • ItemDetailsViewModel and SearchViewModel use CancellableLoad (not manual version counters)
  • CancellableLoad.CancelAsync() added for ItemDetails.OnNavigatingFrom
  • ItemDetailsViewModel resets display state on reload; null-safe media-source bindings

Test plan

  • Search not auto-focused on page navigation; Up from Home focuses search
  • Search suggestions navigate to item details without crash
  • Re-submitting the same search query reloads results
  • Nav menu has no stale highlight while on Search
  • Opening Movies from Home no longer crashes (0xc000027b)
  • Library filter toolbar D-pad navigation works with/without active filters
  • Release x64 build passes (0 warnings, 0 errors)

@CyberoniOntoni CyberoniOntoni force-pushed the feature/xbox-shell-focus branch from ad47b6c to c1f7bd0 Compare June 23, 2026 02:22
@CyberoniOntoni CyberoniOntoni marked this pull request as draft June 23, 2026 02:24
@CyberoniOntoni CyberoniOntoni changed the title Fix Xbox shell focus and library filter navigation Fix Xbox shell focus, search, and library filter navigation Jun 23, 2026
@CyberoniOntoni CyberoniOntoni force-pushed the feature/xbox-shell-focus branch from c1f7bd0 to 5a9c293 Compare June 23, 2026 10:49
@CyberoniOntoni

Copy link
Copy Markdown
Contributor Author

There's going to be a follow-up PR after #101 (which fixes search panel behavior), with a bugfix for a seek bar (control bar) not autohiding during playback.

@dfederm dfederm merged commit 8150da3 into dfederm:main Jun 23, 2026
2 checks passed
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.

2 participants