Skip to content

feat(player): redesign the phone player HUD - #885

Closed
Quick104 wants to merge 1 commit into
mainfrom
feat/player-hud-android
Closed

Quick104 wants to merge 1 commit into
mainfrom
feat/player-hud-android

Conversation

@Quick104

@Quick104 Quick104 commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: N/A
Validation tasks: changes #321 C1, C2; changes #323 C1, C3; changes #325 C1; changes #327 C1

Several parts of the phone player's controls were hard to read or use:

  • The Skip Intro and Skip Credits buttons used a translucent black that vanished over a black pillarbox, so their labels looked unboxed.
  • During the credits, nothing said which episode would play next.
  • Holding the phone upright spread the controls over the whole screen, far from the picture.
  • Menu rows were 44–46dp, under the 48dp touch target. Automated checks found 32 undersized targets across the menus, and the subtitle source line ("SRT · Embedded") measured 1.77:1.
  • A running sleep timer had no Off choice.
  • Settings offered both "Picture size" and "Fill the screen" for related choices.

This change redesigns the phone player's controls, menus and skip buttons. On the same states, the checks now find no contrast, target-size or overlap failures.

Approach

  • Skip buttons: a near-opaque plate with a thin outline, and the countdown as a line along its foot.
  • Credits:
    • When the closing credits start and a next episode is lined up, a card names it ("Up next", episode code and title).
    • The card offers Play next episode and Not now. Not now stops the next episode from starting by itself for this title only; the auto-play setting stays as it is.
    • The card says "Starts automatically after the credits" only when an automatic start will actually happen. It doesn't say so after Keep Watching, in a Watch Party, or once the auto-play limit is reached.
    • Earlier credits ranges, for example before a mid-credits scene, keep Skip Credits. Shuffles get no card.
  • Placement: the skip buttons and the card move clear of the controls while they show, and fade while the timeline is dragged.
  • Upright phone: the top bar sits on the picture's top edge, and the timeline and labelled action buttons sit under the picture.
  • Menus:
    • Rows are 48dp, and list fades are softer.
    • Chapters show Starts and Length columns.
    • The sleep timer has an Off row.
    • The tracks sheet's tabs move into its header.
  • Settings: the fill option is now Black bars (Keep black bars, Fill, avoid camera, Fill full width), under a Video heading.
  • Quality: while Auto is held lower after buffering, the row reads Auto with "Adjusted for your connection" under it.

New text comes from the shared catalog: the keys are in Silo-Server/silo-translations#14, and the generated catalog is synced from that branch. One helper in android-shared, inClosingCredits, decides whether a credits range is the closing one, with a unit test.

Phone only. Android TV gets its own pull request; the Apple clients and the web have theirs.

Validation

  • ./gradlew testDebugUnitTest (all modules): pass.
  • Lint (:android-shared:lintDebug :androidApp:lintDebug :androidTvApp:lintDebug :androidApp:lintVitalRelease :androidTvApp:lintVitalRelease): pass, nothing new beyond the baselines. The supply-chain scripts were not run: they need Ruby, which the test machine lacks, and this change touches no build files.
  • :androidApp:assembleDebug builds.
  • Screen states: 12 fixed states, plus 7 added for the skip buttons and the credits card, captured on a Pixel 9 emulator (Android 36) against a dev server with fixed media. Each state is checked for contrast, target size, overlap and clipping, and labels. Before, on the 12 states: 2 contrast, 32 target-size and 1 overlap failures. After, on the same states: none. The added states have 2 contrast results that come from the measurement, not the screen: the elapsed-time label's frame spans the whole timeline row, so the check samples the picture beside it. Over the text itself it measures 18–20:1.
  • Not checked: tablets and foldables (no capture device for them), and translated languages by eye.

Evidence

Evidence: https://evidence.siloserver.org/r/silo-android/pr-885/

Surface and build: Android phone, this branch, on a Pixel 9 emulator (Android 36), landscape and upright.

Risks

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • The Evidence section shows every change a user can see, or says there is none.

AI Disclosure

  • Harness: Claude Code, running in T3 Code
  • Tool(s): Claude Code; Codex CLI (design reviews)
  • Model(s): claude-opus-5-5 (implementation, code review, design reviews); gpt-6.1-sol (design reviews)
  • Involvement: Fully AI-generated at the maintainer's request. The maintainer chose between design options; the result is not yet human verified.
  • Adversarial review: a code review of the rebased diff (claude-opus-5-5) reported 8 findings, all fixed, and the on-device capture found one more (the card over the scrub preview), also fixed. Screenshots of every state were scored by claude-opus-5-5 and gpt-6.1-sol across several rounds.

🤖 Generated with Claude Code

Note

Redesign the phone player HUD with portrait docking, Up Next credits card, and restyled chrome

  • Reworks PlayerControls.kt so portrait layouts with a fitted picture dock controls around it; narrow layouts show labelled action tiles and compact transport controls instead of compact icon-only pills
  • Adds a credits Up Next card during closing credits in PlayerOverlay.kt, backed by an armed auto-start StateFlow and per-item decline tracking in PlayerViewModel.kt
  • Restyles shared player chrome in PlayerChrome.kt: near-black plate, 44dp row height, countdown lines replacing full-surface progress fills, and a scroll thumb in player menus
  • Simplifies the progress bar by removing the scrub-start tick and seek-delta bubble; renames the letterbox setting to Black Bars and makes the sleep timer's Off a selectable row
  • Risk: PlayerActionPill drops its compact parameter and formatSeekDelta is removed — callers relying on compact pills or seek-delta formatting must update; chrome hides fully while scrubbing via scrubChromeAlpha

Macroscope summarized 8e24374.

@silo-triage silo-triage Bot added the size/XXL 1000–2999 added + deleted lines (all files); change volume, not priority. label Nov 11, 2026
@silo-kody

silo-kody Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T23:28:12.175731Z 8e24374 PR opened
🔒 Security Review ✅ Completed 2026-11-11T23:29:16.137478Z 8e24374 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Explain Change →

Walkthrough

The player UI adds an end-credits Up Next card and changes playback controls, overlays, progress display, and player sheets. The Android string catalogs add corresponding localized labels and playback diagnostics. Generated translation revision identifiers also change.

Changes: Player playback flow

Layer / File(s) Summary
Credits Up Next behavior
android-shared/src/androidMain/kotlin/.../MarkerSkipTarget.kt, android-shared/src/androidUnitTest/kotlin/.../MarkerSkipTargetTest.kt, androidApp/src/androidMain/kotlin/.../PlayerViewModel.kt, androidApp/src/androidMain/kotlin/.../IntroAutoSkipBanner.kt, androidApp/src/androidMain/kotlin/.../PlayerOverlay.kt
The player detects closing credits and tracks whether the Up Next card was declined for the current item. The overlay can show the next-episode card when its conditions are met, and the card exposes optional play-next and dismiss actions.
Playback controls and overlay layout
androidApp/src/androidMain/kotlin/.../PlayerControls.kt, androidApp/src/androidMain/kotlin/.../PlayerOverlay.kt, androidApp/src/androidMain/kotlin/.../PlayerScreen.kt, androidApp/src/androidMain/kotlin/.../PlayerProgressBar.kt, androidApp/src/androidMain/kotlin/.../PlayerChrome.kt, androidApp/src/androidMain/kotlin/.../PlayerNoticeOverlay.kt, androidApp/src/androidMain/kotlin/.../IntroAutoSkipBanner.kt, androidApp/src/androidMain/kotlin/.../PlayerMenu.kt
Controls use picture aspect for portrait docking and report clearance to the overlay. Narrow action layouts use icon-and-label tiles. Scrubbing, progress-bar chapter gaps, countdown lines, loading controls, menu scroll indicators, and fade behavior also change.
Player sheets and menu interactions
androidApp/src/androidMain/kotlin/.../ChaptersSheet.kt, androidApp/src/androidMain/kotlin/.../TracksSheet.kt, androidApp/src/androidMain/kotlin/.../PlaybackQualitySheet.kt, androidApp/src/androidMain/kotlin/.../PlayerSettingsSheet.kt, androidApp/src/androidMain/kotlin/.../SleepTimerSheet.kt
The chapter sheet adds aligned start and length headings. The track selector moves into the panel header when audio tracks are available. The quality label, black-bars setting labels, and sleep timer selection rows change.

Localized player resources

Layer / File(s) Summary
Generated Android string resources
android-shared/src/androidMain/res/values*/strings_catalog.xml, .silo-translations, android-shared/silo-locales.properties
The generated catalogs add localized labels for credits, chapters, buffering quality, playback delivery and diagnostics, technical details, and black-bar options. The generator revision changes in the translation metadata and catalog comments.

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant PlayerOverlay
  participant MarkerSkipTarget
  participant PlayerViewModel
  participant CreditsUpNextCard
  PlayerOverlay->>MarkerSkipTarget: Check whether playback is in closing credits
  PlayerOverlay->>PlayerViewModel: Read episode, shuffle, decline, and auto-start state
  PlayerOverlay->>CreditsUpNextCard: Display card when its conditions are met
  CreditsUpNextCard->>PlayerViewModel: Submit decline or play-next action
Loading

Possibly related issues

  • Silo-Server/silo-android issue 848: The PR changes closing-credits detection, but does not add the requested Ask, Auto, and Off setting.
  • Silo-Server/silo-android issue 349: The PR changes the chapter sheet and sleep timer behavior covered by the audiobook validation cases.
  • Silo-Server/silo-android issue 321: The PR changes marker skip behavior and the closing-credits helper used by the phone skip flow.
Merge Risk: Moderate · up to 8e243

The new end-credits "Play next episode" card is largely replaced by the full-screen Up Next screen in normal playback, so the headline feature does not behave as designed. A declined card can also reappear when playback ends. Resolve or consciously accept these before merging; the layout issues are minor.

Security architecture risk: Low · up to 8e243

The new next-episode action reuses existing playback controls and preserves Watch Party authority. No material security regression was established in the inspected paths, but incomplete coverage and unverified state restoration leave some uncertainty.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The inspected new action affects the current player's resolved next episode through the existing playback-session handoff. The card does not supply a new destination or credential to the advancement method; that method reads the next content identity from current playback state.

Trust Boundaries and Controls

  • observed — Marker timing determines card eligibility, while room authority remains checked at the playback-action boundary. Closing-credits metadata therefore does not itself authorize local advancement in a Watch Party.

Resilience and Maintainability Implications

  • observed — The existing transition gate binds a handoff to a content identity and an expected media-mount token. It rejects duplicate begins and mismatched first-frame completion, preserving protection against stale callbacks for the new caller.
Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "feat(player): redesign the phone player HUD" matches the main change. The PR redesigns the Android phone player controls, skip buttons, credits up-next card, menus, and settings labels. The…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description is specific and related to the changeset. It explains the phone player HUD redesign: skip button plates, the Up Next credits card with Play next episode and Not now actions, portrait d…
Full details: Title check

Explanation

The title "feat(player): redesign the phone player HUD" matches the main change. The PR redesigns the Android phone player controls, skip buttons, credits up-next card, menus, and settings labels. The title is specific and concise, and it follows a conventional commit style.

Full details: Description check

Explanation

The description is specific and related to the changeset. It explains the phone player HUD redesign: skip button plates, the Up Next credits card with Play next episode and Not now actions, portrait docking of controls, 48dp menu rows, chapter Starts and Length columns, the sleep timer Off row, the Black bars settings rename, and reduced Auto quality labelling. It also covers the inClosingCredits helper with its unit test, the shared translation catalog, validation results, and risks. These match the file summaries, which cover PlayerChrome, PlayerControls, PlayerOverlay, IntroAutoSkipBanner, PlayerViewModel, SleepTimerSheet, and the string catalogs.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

LocaleFormat.codeNumber(next.seasonNumber),
LocaleFormat.codeNumber(next.episodeNumber),
),
next.title?.takeIf { it.isNotBlank() },

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

kody code-review Kody Rules medium

Joined episode title lacks bidirectional isolation

Mixed-script titles and punctuation in next.title can render in the wrong order next to the episode code. Apply bidirectional isolation before joining the title to the season and episode caption.

Kody rule violation: Isolate joined bidirectional text without hiding its paragraph direction

Prompt for LLM
File androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/IntroAutoSkipBanner.kt, line 222:

Joined episode title lacks bidirectional isolation

Isolate the episode title before joining it to the season and episode caption. Without bidirectional isolation, mixed-script titles and punctuation can render in the wrong order next to the episode code.

Kody rule violation: [Isolate joined bidirectional text without hiding its paragraph direction](https://kodus.siloserver.org/settings/code-review/1247142403/kody-rules/2154882e-6f3e-47b0-81fa-38b5c542cacd?teamId=ba9922fc-c0ea-4cf8-87bb-9d4f42ffc73e)

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.

​

​

Comment on lines +663 to +665
val creditsUpNext = state.nextEpisode?.takeIf {
it.isEpisode && state.shuffle == null && !state.creditsUpNextDeclined &&
inClosingCredits(state.position, state.markerTimeline)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

kody code-review Bug high

The credits card is suppressed during normal playback

During normal playback, onApproachingEnd sets showUpNext before the card can render, hiding the episode information and actions. Coordinate the Up Next trigger with the card so it remains visible during credits.

Prompt for LLM
File androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerOverlay.kt, lines 663-665:

The credits card is suppressed during normal playback

During normal playback, crossing the closing-credits boundary invokes `onApproachingEnd`, which sets `showUpNext` before this card can render, so the new episode information and actions appear only when playback enters credits without crossing that boundary. Coordinate the existing Up Next trigger with this card so it remains visible during ordinary credits playback.

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.

​

​

@macroscopeapp

macroscopeapp Bot commented Nov 11, 2026

Copy link
Copy Markdown

The PR describes Pixel 9 phone captures and says tablet and foldable captures were unavailable. These changes also run in the phone app on tablets and foldables, so evidence is incomplete for:

  • Player HUD, controls, progress bar, and portrait docking (PlayerControls.kt, PlayerOverlay.kt, PlayerProgressBar.kt): Android tablet and foldable folded/open. Please add before-and-after captures of matching states on each; include a recording for scrubbing and the animated docking/countdown behavior.
  • Closing-credits Up Next card and skip prompts (IntroAutoSkipBanner.kt, PlayerOverlay.kt): Android tablet and foldable folded/open. Please add before-and-after captures of matching states and a recording of the countdown and card actions.
  • Player menus, chapters, tracks, sleep timer, quality, and settings (ChaptersSheet.kt, TracksSheet.kt, SleepTimerSheet.kt, PlaybackQualitySheet.kt, PlayerSettingsSheet.kt, PlayerMenu.kt): Android tablet and foldable folded/open. Please add before-and-after captures of the same sheets and data on each.

The evidence page should cover the Android phone, tablet, and foldable both folded and open. Android TV is not reached by the changed UI paths.

Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness.

Posted via Macroscope — Visible change evidence

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6656f272-f01e-42f7-8d70-fb958fccdac0
Commits

Reviewing files that changed from the base of the PR and between c2ad874 and 8e24374.

Files selected for processing: 26

  • .silo-translations
  • android-shared/silo-locales.properties
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/video/MarkerSkipTarget.kt
  • android-shared/src/androidMain/res/values-ar/strings_catalog.xml
  • android-shared/src/androidMain/res/values-b+zh+Hans/strings_catalog.xml
  • android-shared/src/androidMain/res/values-de/strings_catalog.xml
  • android-shared/src/androidMain/res/values-es/strings_catalog.xml
  • android-shared/src/androidMain/res/values-fr/strings_catalog.xml
  • android-shared/src/androidMain/res/values-ja/strings_catalog.xml
  • android-shared/src/androidMain/res/values-pt-rBR/strings_catalog.xml
  • android-shared/src/androidMain/res/values/strings_catalog.xml
  • android-shared/src/androidUnitTest/kotlin/org/siloserver/silo/common/player/video/MarkerSkipTargetTest.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/ChaptersSheet.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/IntroAutoSkipBanner.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlaybackQualitySheet.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerChrome.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerControls.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerMenu.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerNoticeOverlay.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerOverlay.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerProgressBar.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerScreen.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerSettingsSheet.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerViewModel.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/SleepTimerSheet.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/TracksSheet.kt

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Comment on lines +622 to +623
(maxWidth / 2 - PlayerTransportWidth / 2 - BottomEndSlotControlsGap - BottomEndSlotEnd - endInset)
.coerceIn(CreditsUpNextCardMinWidth, CreditsUpNextCardMaxWidth)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Minor · Functional Correctness · Quick win

Keep the credits card clear of the landscape transport.

At a 640dp landscape width with no end inset, this calculation leaves 149dp beside the centered transport. The 200dp minimum can place a long-title card from x=416dp across the transport’s right edge at x=455dp. The card can cover part of the forward-skip control while controls are visible. Cap its width to the available side space and allow the actions to wrap, or move the card above the transport.

Comment on lines +663 to +665
val creditsUpNext = state.nextEpisode?.takeIf {
it.isEpisode && state.shuffle == null && !state.creditsUpNextDeclined &&
inClosingCredits(state.position, state.markerTimeline)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Major · Functional Correctness · Heavy lift

Supported by static analysis

Script executed:

rg -n 'onApproachingEnd|showUpNext|upNextCreditsStart|fun onPositionChanged|inClosingCredits' androidApp/src/androidMain/kotlin android-shared/src/androidMain/kotlin
sed -n '640,705p' androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerOverlay.kt

Repository: Silo-Server/silo-android

Length of output: 13935


Script executed:

cat -n androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerViewModel.kt | sed -n '3330,3362p'
cat -n androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerViewModel.kt | sed -n '6190,6270p'

Repository: Silo-Server/silo-android

Length of output: 6551


The inline credits card is shadowed on a normal credits crossing.

Outside a room, the credits crossing sets showUpNext = true in commitApproachingEnd. The card block requires !state.showUpNext, so the card does not render. The full-screen Up Next screen replaces it at the credits start. The card's "Play next episode" and "Not now" actions then appear only in narrower cases, such as a room session.

The inspected code does not show whether the full-screen transition should start at the credits start or at a later point. Choose one of these:

  • If the full-screen screen should start at the credits start, remove the card from this flow, or keep the card only where it is still reachable.
  • If the card should remain visible through the credits, track its presentation separately from showUpNext. Start the full-screen transition only at the intended later point.

Comment on lines +6338 to +6339
dismissUpNext()
_uiState.update { it.copy(creditsUpNextDeclinedFor = it.contentId) }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Minor · Functional Correctness · Quick win

Keep the credits card dismissed when playback ends.

If the viewer selects “Not now,” dismissUpNext() sets autoAdvanceHandled = true. At STATE_ENDED, onApproachingEnd() then sets showUpNext = true without checking creditsUpNextDeclined. The full-screen Up Next card reappears for the item that the viewer declined. Suppress that end-of-playback reopen for a declined item.

onClose = { controller.dismiss() },
titleSlot = if (audioTracks.isNotEmpty()) {
{
PlayerSegmentedControl(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Minor · Functional Correctness · Quick win

Supported by static analysis

Script executed:

# Inspect panel constraints and tab typography without executing repository code.
ast-grep outline androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerMenu.kt --items all
ast-grep outline androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerChrome.kt --match 'PlayerType|PlayerDisc|PlayerSegmentedControl'

rg -n -C3 'widthIn|width\(|requiredWidth|sizeIn|screenWidthDp' \
  androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerMenu.kt

rg -n -C3 'Segment|fun PlayerDisc' \
  androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerChrome.kt

rg -n 'name="player_tracks_(subtitles|audio)"' \
  android-shared/src/androidMain/res/values/strings_catalog.xml \
  android-shared/src/androidMain/res/values-de/strings_catalog.xml \
  android-shared/src/androidMain/res/values-fr/strings_catalog.xml

Repository: Silo-Server/silo-android

Length of output: 7982


Script executed:

# Header layout, Close reservation, and the segmented control body.
cat -n androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerChrome.kt | sed -n '320,440p'

# TracksSheet call site and how the segmented control is placed in the header.
cat -n androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/TracksSheet.kt | sed -n '60,140p'

# Panel width constraints in sheet and docked presentations.
cat -n androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerMenu.kt | sed -n '184,290p'

Repository: Silo-Server/silo-android

Length of output: 15069


Keep the tab count visible when the segment text grows.

The Subtitles/Audio control now sits in the header beside the Close disc. Each segment has a fixed weighted width. Its label and count have no overflow handling, so the default clip applies. When the label and count together exceed the segment width, which can happen at enlarged text sizes in a narrow panel, the count is cut off.

Let the label shrink with an ellipsis so that the count keeps its natural width:

Suggested fix

Apply this to the label Text in PlayerSegmentedControl. Give it Modifier.weight(1f, fill = false) and overflow = TextOverflow.Ellipsis, while the count keeps its natural width.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XXL 1000–2999 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant