Deck stats: followers and copies on a deck you're not studying - #334
Merged
Merged
Conversation
The stats bar spent its whole width on a single "551 / Total" on a deck you neither own nor follow. Due, New and Mastered are facts about *your* study of a deck, so `showProgress` hides all three there — correctly, since "442 Due" beside a Follow button promises study you cannot start — leaving one column centred in an empty card. That room now goes to the two facts about the *deck*, which are what you are actually deciding on: Total · Followers · Copies. Both counts were already in the state, from the indexer's distinct-tagger counts for the reserved labels; they were only ever drawn as a caption above the author, which is now shown for an owned or followed deck alone — the bar is carrying it otherwise, and twice is once too many. Each is hidden at zero rather than shown as "0", unchanged from the caption's rule: the indexer answers with nothing when it is behind or unreachable, so a zero would be a lie in both cases, and Total on its own stays the honest fallback. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
iOS had no `showProgress` equivalent, so a stranger's deck showed "0 Due" and "0 Mastered" — the exact claim the Android flag exists to stop. It now takes the same gate, and the same two counts take the room: Total · Followers · Copies. `clonedCount` was populated by the shared ViewModel and read by nothing on this side, so the bridge maps it now. The follower caption is kept for an owned or followed deck only, matching Android. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…deck Two assertions on the foreign-deck screen 26 already opens, and the 2026-09-23 run behind them: the three width classes the three columns have to fit in, and the stub the Copies column needed since no staging deck has a clone yet. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
What
On a deck you neither own nor follow, the statistics bar spent its whole width on a single "551 / Total" — one column centred in an empty card.
showProgresshides Due, New and Mastered there, and that is right: all three are facts about your study of a deck, and "442 Due" beside a Follow button promises study you cannot start. But the room they left went to nothing.It now goes to the two facts about the deck, which are what you are deciding on: Total · Followers · Copies.
551 / Totalalone551 Total · 1 Followers(·N Copieswhen anyone has copied it)Both counts were already in
DeckDetailUiState.Content, from the indexer's distinct-tagger counts for the reserved labels. They were only ever drawn as a caption above the author, which is now shown for an owned or followed deck alone — otherwise the bar is carrying it, and twice is once too many.Each column is hidden at zero rather than shown as "0", unchanged from the caption's rule: the indexer answers with nothing when it is behind or unreachable, so a zero would be a lie in both cases. Total on its own stays the honest fallback.
iOS came along, and gained the gate it never had
StatsBarViewhad noshowProgressequivalent, so a stranger's deck on iOS showed "0 Due" and "0 Mastered" — precisely the claim the Android flag exists to stop. It takes the same gate now, and the same two columns.clonedCountwas populated by the shared ViewModel and read by nothing on the Swift side; the bridge maps it.No shared code changed — this is presentation only.
Verified on a device
emulator-5554, staging, on "Inglês para viajar de avião" (551 cards, not owned, not followed), at all three width classes, because the wide layout's metadata column is the narrowest place the three columns ever land:1080x24001600x2560@ 320dpi (800dp)2560x1600@ 240dpi (1706dp — the two-pane layout, bar in the left column)Three columns fit at every one. The three-column case was driven with the counts stubbed to 128/17, since no staging deck has a clone yet; the stub was reverted and the screen re-driven on the real build before committing.
./gradlew detektAll checkStringPlurals :shared:jvmTest :androidApp:assembleDebugall green.lintSwiftnot runnable on this Linux host — left to CI.Strings
component_stats_bar_followersandcomponent_stats_bar_copies, in all eleven languages on both platforms.Journeys
26-copy-to-edit.xmlgains two assertions — what the bar carries before you follow, and that following swaps it back — andRESULTS.mdrecords the 2026-09-23 run.🤖 Generated with Claude Code