Repository navigation
Conversation
SergeiAK
force-pushed
the
alphabet-present-letters
branch
from
September 15, 2026 18:22
6549e9b to
4cbf19b
Compare
Contributor
Author
|
Friendly check-in, since this has been open for four weeks and v1.0.9 has shipped in the meantime. |
The bar listed every letter of the UI language, so a Russian library scrolled through 60 letters to reach the 15 that had titles. The library view now counts the items per letter with the same request the pager uses (`nameStartsWith`, `limit=0`, so the server answers with a COUNT and no rows) and hands the bar only the letters with a non-zero count. `#` covers everything sorting before the first real letter, which is where jumping to it lands. Counts run five at a time and are cached per filter; if a filter cannot be counted (`/Persons`) or a request fails, the bar keeps every letter as before. The alphabet still comes from the UI language: the letter string is a resource resolved in the composition, so it follows the per-user UI language on every Android version. While the bar is data-driven, the current-letter highlight looks the letter up in the bar instead of a hardcoded `A`-`Z`, so it works for Cyrillic, Greek and Hebrew locales too; and the per-button focus state in `AlphabetButtons` is keyed on the letters, since they can now change. Favorites, genres, studios and collections keep the full alphabet. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
SergeiAK
force-pushed
the
alphabet-present-letters
branch
from
October 12, 2026 12:18
4cbf19b to
6af817e
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The bar shows every letter of the interface language, whatever the library actually holds. In
English that is 27 entries,
#and the 26 Latin letters. In languages that add their own scripton top of Latin the bar more than doubles: 60 entries in Russian — the same 26 Latin letters plus
33 Cyrillic ones — and 49 in Hebrew.
On my library that plays out like this. Russian interface, 539 movies, 31 of the 60 entries in
use. The bar does not fit on screen, and two thirds of it does nothing: you hold a direction
through letters that lead nowhere.
This change asks the server which letters are in use and shows only those. The counting reuses
the request the grid already pages through, with
nameStartsWith=<letter>andlimit=0, so theserver answers each one with a count and no rows; a letter is kept when its count is not zero.
#stands for everything that sorts before the first real letter, which is where a jump to#lands today.
The counts run five at a time, once, when the grid opens with sort-by-name, and are cached per
filter, so flipping the sort direction or returning to the library does not repeat them.
Presence is deliberately checked with
nameStartsWithinstead of being derived fromnameLessThanoffsets: that way it does not depend on the order ofjump_lettersagreeing withthe server's collation. In
values-ruthe letterЁsits betweenЕandЖ, while the serversorts
ёafterя, so an offset-based check would have declared everything fromЖtoЯempty.
When counting is not possible the bar stays exactly as it is today: a request that cannot be
narrowed by name, a failed count, or a library where none of the listed letters match. The
alphabet itself still comes from the interface language, and the letter string is read in the
composition, so it follows the per-user language on Android versions below 13 as well.
Related issues
Follows up on discussion #1765, where the request was to stop showing letters a library has
no titles for.
Not related to #968: this does not change where a jump lands, only which letters are offered.
Testing
Jellyfin 10.11.11. Two boxes: an Amlogic S905X4 on Android 14 and a Shield Pro 2019 on
Android 11, which covers both the framework and the AppCompat per-app-locale paths.
computed independently against the server, letter for letter, including the gaps at
ЁandЙ, and the LatinK,T,Zthat survive because the server strips leading articles("The Three Flavours Cornetto Trilogy" sorts under
T).# В Л С. Clearing the filter restores the full set.straight back from the cache, with no new requests.
library shows
# K T Z— the English alphabet narrowed to what it has. Checked on Android 11,where the per-app locale comes from AppCompat rather than the framework.
FilterPresentLettersTest).GetArtistsRequest.Cost, measured on my server over LAN: the 60 counts take 72 ms each on average (median 69 ms,
max 148 ms), 4.3 s in total if run one after another, so roughly 0.9 s of wall time at five in
flight. On the Amlogic box over Wi-Fi the pass finished before the grid's first paint in both a
cold start and a warm run: a 20 fps screen recording shows the grid's first frame already
carrying the narrowed bar, so the bar never appears at full length and then jumps.
Scope is library folders, grid and list view — the "Library" and "Collections" tabs both go
through
CollectionFolderView. Favorites, genres and studios keep the full alphabet, sincejumpLettersis an optional parameter onCardGrid. Happy to wire the others the same way.Two things come with the bar being data-driven. The current-letter highlight now looks the
focused item's letter up in the bar instead of mapping through a hardcoded
A–Z, so it worksin Cyrillic, Greek and Hebrew locales; before, the circle sat on
#for every non-Latin title.And
AlphabetButtonskeys its per-buttonFocusRequester/InteractionSourcelists on theletters, since the letters can now change while the composable is alive.
The gain scales with how much of its alphabet a library leaves unused. Of the 31 locales that
define the letter string, 20 carry the plain 27 entries; the rest add a script of their own:
ru60,iw49,sk43, six Nordic and Slavic locales 30–31. Two replace Latin instead ofextending it,
ukwith 34 entries andelwith 25. On a plain English library the trim issmaller but real,
#included. One honest limit: when the titles are in a script the interfacelanguage does not cover, most letters have no items and the bar gets short — those letters were
not useful before either, since they all jump into the same narrow region, but it is a visible
change.
Screenshots
Before, Russian UI: the bar carries all 60 entries and runs past the bottom of the screen.

After: 31 entries, the ones the library actually has.

With a decade filter leaving 4 titles, the bar is

# В Л С.With the app language set to English on the same Cyrillic library, the bar is

# K T Z.AI or LLM usage
The code was written with Claude (Claude Code): the per-letter counting in
CollectionFolderViewModel, therememberJumpLettershelper and the pass-through parameter inCardGrid. I reviewed every line and can explain it. The measurements above were taken on myown devices and cross-checked against my server. This description was drafted with the same
assistant from my notes and then corrected by me.
🤖 Generated with Claude Code