Skip to content

fix(web): show restore item and account names in full in narrow rows - #4715

Merged
Quick104 merged 5 commits into
mainfrom
fix/restore-item-name-truncation
Nov 21, 2026
Merged

Quick104 merged 5 commits into
mainfrom
fix/restore-item-name-truncation

Conversation

@Quick104

@Quick104 Quick104 commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: N/A
Validation tasks: none

Other clients: N/A (the backup restore screen exists only in web admin)

On the backup restore Choose step, an item or account row cut its name off mid-character, with no ellipsis, whenever the row was narrow. That happens on a phone, and on a 1024–1280 px desktop window, where the list sits between the admin sidebar and the restore summary. The text beside the name shrank to a few letters, and an admin account that merges into an existing one showed no name at all, so an admin couldn't tell which item a row was. This change shows the whole name in a narrow row and ends a shortened name in "…" in a wide one.

The name sat in the shared Label, which is display: flex. truncate can't draw an ellipsis on a flex box, so the text was hard-clipped. The row also gave the name only 60% (45% for accounts) of whatever the checkbox, state tag, and chevron left. On the account row, the admin badge, profile count, and merge status switched on by viewport width, so they also showed where the list was narrow.

Approach

  • Each item and account row now lays itself out by its own width rather than the viewport's, because the admin sidebar and restore summary take a different share of the page at each size.
  • In a row narrower than 42rem, the name sits above its detail line and wraps, so it shows in full. It breaks after dots and underscores before it breaks inside a word, using the helper the settings table already uses, which now keeps version numbers like 0.2.3 whole. The detail line stays on one line and ends in "…".
  • From 42rem up, the row keeps its one-line layout, and a name that doesn't fit ends in "…". Chromium breaks at <wbr> even under white-space: nowrap, so a one-line row hides those break points.
  • The account row's admin badge, profile count, and merge status follow the row's width too. When they're hidden, the row's details show the merge status and admin role, as they already did on a phone.

Two related problems that looked the same before this change are left out and being fixed separately: an email in a right-to-left contact line ends in "…" at its start, and a long profile name overflows the expanded profile list. A third, a name capped at 60% when nothing sits beside it, changes these same lines, so it waits for this PR in #4718.

Validation

  • Reproduced on a Silo dev deployment built from main: a backup holding a plugin, a home section, a user, and an admin account with two profiles, then the plugin uninstalled, the section and user deleted, and one of the admin's profiles removed. On main at 360 px the rows read silo.theintrodl, Recently Release and maximiliana.va with no "…". At 1024 px the merging admin row showed no name and its tag ran past the edge.
  • On this branch, with the same data: every name shows in full at 360, 390, 640, 1024, 1180 and 1280 px. At 768 and 1440 px the rows keep their one-line layout, and the one name that doesn't fit (the merging admin's) ends in "…". Also checked in German and Arabic at 360 and 1024 px, with keyboard focus on a stacked row, and with the merging admin's details open, which show its merge status and admin role. The page doesn't scroll horizontally at any of these widths.
  • Web lint, format check, build, and bundle budget pass. Web tests pass except 29 in four API, auth and player files, which fail the same way on main on the test machine.
  • No test added: this is CSS layout, which the jsdom tests don't lay out. The before-and-after captures are the check.

Evidence

Before-and-after captures of the Plugins, Home sections and Users rows at each width above, in English, German and Arabic, with keyboard focus, and for the merging admin account.

Evidence: https://evidence.siloserver.org/r/silo-server/restore-item-name-ellipsis/

Risks

  • Rows narrower than 42rem are taller, so a long restore list scrolls further on phones and on 1024–1280 px desktop windows.
  • Each row is now a CSS container (container-type: inline-size). Restore lists aren't virtualized, and nothing inside a row is positioned outside it.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • Each test this pull request adds meets "Decide what to test" in CONTRIBUTING.md.
  • The Evidence section shows every change a user can see, or how I checked a change nobody sees.

Council review

Plan round: Sol, Opus, and Gemini reviewed the plan before any code. Sol showed that default home sections are titled Recently Released Episodes in <library>, so names can differ only at the end, and the stacked name now wraps instead of truncating. Gemini showed that at 1024 px the list column is as narrow as a phone, so rows switch on their own width rather than the viewport. Opus found the plan minimal and dropped one class.

Background review: 1 round, reviewed 59f437e

Member Round 1
Sol (gpt-6.2-sol, xhigh) 7/10
Opus (claude-opus-5-5, high) 8/10
Gemini (gemini-4-neon, xhigh) 7/10

Opus's round-1 review raised two findings that also happen on main; both are in #4718. Sol's S1 (a checkbox named with a stray space in one-line rows) and the narrow-row half of S2 (a long username running past the details) landed after this PR merged, in #4734; the wide-row half of S2 is in #4718, and S3 didn't hold on the real build. Gemini's G4 (an ellipsis splitting when a name wraps) is fixed in #4734; G1 and G2 match main and are in #4718; G3 describes main's unchanged starter-pack gate.

Visual review: 2 rounds, captures from ffe3f0e (the two later commits change nothing a capture shows)

Member Round 1 Round 2
Sol better, 8/10 better, 8/10
Opus better, 7/10 better, 8/10
Gemini better, 6/10 better, 8/10

Fixed: names breaking inside a word; one-line rows at 450–670 px of row width hiding the end of a name; the account row's extras squeezing its name beside the sidebar; a one-line name wrapping at its break points in Chromium. Answered: the clipped focus ring, the "shifted" and "dimmer" checkbox were crop artifacts, and the checkbox is pixel-identical before and after. The Arabic email cut at its start, the English "Custom filter" in other languages, and "New account" beside the "New" tag look the same on main; the first two are being fixed separately. Open: in a one-line row at 1440 px, a merging admin's name still ends in "…" (it was cut on main too), and a narrow account row shows the admin role and merge status only in its details.

AI Disclosure

  • Harness: Claude Code in T3 Code
  • Tool(s): Claude Code and its review subagents; T3 Code delegated tasks for the council (Codex, Claude, Antigravity); Playwright (headless Chromium) for captures
  • Model(s): claude-opus-5-5 (implementation, captures, code review); claude-sonnet-5-5 (code-review cleanup finder and validation check); gpt-6.2-sol, claude-opus-5-5, gemini-4-neon (plan, visual, and background reviews)
  • Involvement: Fully AI-generated. The agent verified it live on a dev deployment; a person has not verified it yet.
  • Adversarial review: code review at xhigh (three finders, a validation check, a sweep, and a re-review of the follow-up commits) found the account row's viewport-keyed extras, the small name cap in mid-width rows, a "Starter pack" label that an intermediate commit hid, and a setting-key break point the version-number rule removed; all four are fixed. It also found two older problems on the same screen, which are being fixed separately. A plan round and a two-round visual review ran, and the simplify pass changed nothing; see Council review.

🤖 Generated with Claude Code

Note

Fix restore row label wrapping in narrow admin backups rows

  • Updates BreakableKey in RestoreRows.tsx to insert break points after underscores and after dots only when the next character is not a digit, so version numbers stay attached to the name
  • Makes each ItemRow a container query: label and secondary text stack and the label wraps at narrow widths; at the @2xl breakpoint they return to a single row with a truncated label

Macroscope summarized 59f437e.

Quick104 and others added 5 commits November 20, 2026 17:58
On the backup restore Choose step, an item or account row put its name in
the shared Label, which is a flex box, so `truncate` cut the name off with
no ellipsis. In a narrow row (a phone, or the list beside the admin sidebar
and restore summary at about 1024 px) the name was also capped at 60% (45%
for accounts) of a small column, leaving a few letters of name and status.

Each row is now a container. Below 28rem the name wraps above the status,
so names that differ only at the end, such as per-library home sections,
stay apart. Wider rows keep the one-line layout, and an over-long name now
ends in an ellipsis.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…hare

Rows now share one line only from 42rem of row width, and the account
row's admin badge, profile count and merge status (and an item's starter
pack label) follow the row's width instead of the viewport. Beside the
admin sidebar and restore summary these extras squeezed an account name
to nothing; the details still show the status and admin role.

A wrapped name breaks after its dots and underscores, keeping version
numbers whole, through the helper the settings table already uses.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Chromium breaks at <wbr> even under white-space: nowrap, so the dotted
name breaks added for narrow rows split a wide row's truncated name onto
two lines. A one-line row now hides them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The label has no copy in the details panel, so following the row width
hid it on desktop widths where the list sits beside the restore summary.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The version-number guard applied to underscores too, so a key such as
allow_4k_transcode lost a break point in the settings table. Only a dot
before a digit stays unbroken now. The account row's comment also names
where the profile count goes when the row is narrow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-triage silo-triage Bot added the size/S 0–49 added + deleted lines (all files); change volume, not priority. label Nov 21, 2026
@silo-kody

silo-kody Bot commented Nov 21, 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 21, 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-21T00:36:31.636835Z 59f437e PR opened
🔒 Security Review ✅ Completed 2026-11-21T00:43:20.097356Z 59f437e 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 21, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Restore backup item and account rows now use breakable labels and container-query layouts. The layout changes how labels, contact details, and account status indicators appear at different row widths.

Changes: Restore row layout

Layer / File(s) Summary
Breakable labels in item rows
web/src/pages/admin-backups/RestoreRows.tsx
BreakableKey is exported and inserts break opportunities after underscores and dots not followed by digits. ItemRow uses the component and stacks labels with secondary text at narrower container widths; at @2xl, labels are capped at 60%, truncated, and hide break opportunities.
Account row layout
web/src/pages/admin-backups/RestoreUsers.tsx
Account labels use BreakableKey. Account details stack below @2xl; at @2xl and above, name and contact details align inline, and status indicators appear inline. Expanded details show merge status and administrator text below @2xl.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related PRs

Suggested labels: bug

Merge Risk: Minimal · up to 59f43

This change makes restore item and account names wrap at narrow widths and truncate at wide widths. It is a presentation-only change, so the likelihood of user impact is low and it looks ready to merge.

Security architecture risk: Minimal · up to 59f43

This change adjusts restore-row layout and label wrapping. Selection controls remain unchanged, and administrator and merge information remains available through expandable details. No introduced architecture-level security risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: restore item and account names are shown in full in narrow rows. It matches the changeset, which adds container-query layouts for BreakableKey name wrapping in Restore…
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 relevant to the changeset. It explains the problem (narrow restore rows clipping names without an ellipsis), the cause (flex-box Label, fixed width percentages, viewpor…
Full details: Title check

Explanation

The title names the main change: restore item and account names are shown in full in narrow rows. It matches the changeset, which adds container-query layouts for BreakableKey name wrapping in RestoreRows.tsx and RestoreUsers.tsx. The 'fix(web):' prefix is conventional and the title is specific.

Full details: Description check

Explanation

The description is specific and relevant to the changeset. It explains the problem (narrow restore rows clipping names without an ellipsis), the cause (flex-box Label, fixed width percentages, viewport-keyed badges), and the approach (container-query layout, wrapping after dots and underscores while keeping version numbers whole, and hiding wbr break points in one-line rows). It also lists validation steps, risks, and the affected files, which match the raw summary of RestoreRows.tsx and RestoreUsers.tsx.

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
Recent 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: f73265d0-f9b7-47bb-aa9b-ed19e6a3331c
Commits

Reviewing files that changed from the base of the PR and between 0d649bd and 59f437e.

Files selected for processing: 2

  • web/src/pages/admin-backups/RestoreRows.tsx
  • web/src/pages/admin-backups/RestoreUsers.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

@silo-triage silo-triage Bot added bug Something isn't working impact: polish Annoyance, cosmetic, or nice-to-have priority: P2 Limited scope, workaround exists, or polish triaged High-confidence review completed; does not mean fixed, validated, or accepted for release. labels Nov 21, 2026

@Quick104 Quick104 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Adversarial review (claude-opus-5-5, reviewed 59f437e)

The change fixes the reported problem: the block Label gets an ellipsis back, and row-width container queries replace the viewport breakpoints that hid the account name at 1024 px. I checked tailwind-merge 3.5.0 on the merged Label classes. block replaces the base flex, leading-none drops out as before, and the @2xl:/@max-2xl: classes don't conflict. No nested component uses an unnamed container query that the new per-row @container would capture, and no row child is positioned in a way that layout containment would change. No current setting key has a dot before a digit, so the BreakableKey regex change leaves SettingsDiff as it was.

Two findings. Both come from main.

O1 is on RestoreRows.tsx line 289 (inline comment).

O2 (nit, pre-existing): SameRow still caps the name at 60% at every width. SameRow (RestoreRows.tsx, the "match this server" list) keeps max-w-[60%] shrink-0 truncate with the secondary beside the name. In a 360 px viewport the list sits in a bordered box with px-3 inside the ps-5 section. Each name gets roughly 170 px whenever a secondary exists, and on that list home sections and collections always get one (rowSecondary(item, names, true) adds the library name). The PR's reason for wrapping ItemRow names applies here: per-library section titles differ only at the end. These rows show an ellipsis, so the visible break from the report doesn't occur, but an admin checking which items match can't tell two such names apart without hovering. Repair: give SameRow the same @container column layout, or file it as a follow-up. I estimated these widths from the class list and didn't measure them in a browser.

I also looked at whether BreakableKey is needed in the rows. With @max-2xl:wrap-anywhere alone, a dotted plugin ID or username would only break mid-token when the token is wider than the name column. The longest plugin IDs in the repo, such as silo.watchprovider.simkl, come close to that width at 360 px. Keeping it is a reasonable polish call, and I'm not raising it as a finding.

This review was generated automatically by claude-opus-5-5 (Claude Code).

@Quick104 Quick104 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Adversarial review (gpt-6.2-sol, reviewed 59f437e)

Three findings are attached to the affected lines.

Automated review by gpt-6.2-sol.

title={item.label}
className={cn(
"max-w-[45%] shrink-0 truncate text-sm font-medium",
"block shrink-0 text-sm font-medium @max-2xl:wrap-anywhere @2xl:max-w-[45%] @2xl:truncate @2xl:[&_wbr]:hidden",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

S3 (P3) — Wrapped labels crowd Arabic diacritics. The pinned tailwind-merge 3.5.0 retains the shared leading-none when text-sm follows. Chromium computes a 14 px line height for 14 px text and 17.5 px for 17.5 px text at Extra Large. In a 235 px row with a multiline Arabic label, the marks from adjacent lines crowd one another. An explicit 1.5 line height separated them in the same fixture. Set a larger line height on the wrapped labels in both row types.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This one doesn't hold on the real build. Running the repository's cn (tailwind-merge 3.5.0) on the Label's classes plus the row's drops leading-none, because the row's text-sm comes after it. On a dev deployment, the rendered label's class list has no leading-none, and Chromium computes a 20 px line height for its 14 px text, the normal text-sm ratio, which scales with the text size setting. The fixture probably merged the classes another way. Leaving this open in case a capture shows otherwise.

🤖 Claude Code (claude-opus-5-5)

@Quick104 Quick104 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Adversarial review (gemini-4-neon, reviewed 59f437e)

Verified against the checkout: Label (web/src/components/ui/label.tsx) is flex, tailwind-merge 3.5.0 drops flex (for block) and leading-none (for the trailing text-sm), Tailwind 4.2.1 compiles @max-2xl:wrap-anywhere and @2xl:[&_wbr]:hidden against the 42rem default --container-2xl, AccountRow's inline extras and panel fallbacks pair on @2xl, and no other caller of ItemRow/AccountRow/BreakableKey or Label + truncate exists in web/src/.

Three findings are attached inline (G1, G2, G4); one falls outside the diff hunks and is listed below (G3).

G3 (Medium): Keeping "Starter pack" on sm:inline (web/src/pages/admin-backups/RestoreRows.tsx:301-305) squeezes 1024 px rows and still hides the label on phones

Reverting template_collection's "Starter pack" span from @2xl:inline back to sm:inline avoids hiding it on 1024–1280 px desktop widths, but leaves both the narrow-desktop squeeze and the missing phone fallback unresolved.

  • Trigger: A template_collection row at 1024 px desktop width (sm is active while collections rows inside LibraryGroupRows are 348 px wide and inside BlockedGroupRows are 356 px wide), or at phone width (< 640 px) when item.collection?.local_id is set.
  • Impact: At 1024 px, the shrink-0 "Starter pack" span sits inline beside <StateTag> and <RowDisclosure> inside a 348–356 px row. On a blocked row (356 px), fixed siblings take ~240 px in English ("Starter pack" + "Can't restore"), ~292 px in German ("Starterpaket" + "Nicht wiederherstellbar"), and ~327 px in French ("Pack de démarrage" + "Restauration impossible"), leaving ~116 / ~64 / ~29 px for [Label + secondary], where @max-2xl:wrap-anywhere wraps the title into a narrow vertical column. On phones (< 640 px), "Starter pack" stays hidden with no fallback: rowSecondary returns "your changes to it" for existing starter packs (restoreGroups.ts:333-334) and hasItemDetails does not open a details panel for clean new ones (RestoreRows.tsx:179-190), so admins cannot tell a modified starter pack from a custom collection.
  • Evidence: web/src/pages/admin-backups/RestoreRows.tsx:301-305 uses hidden shrink-0 text-[11px] sm:inline inside a row whose layout switches on @container (@2xl).
  • Suggested repair: Switch the inline span back to @2xl:inline and show "Starter pack" inside the stacked text column below @2xl (for example, as a @2xl:hidden muted cue beside or below secondary). That keeps it visible at phone width without squeezing 348–356 px desktop rows.

Automated review by Gemini 4 Neon (gemini-4-neon).

@Quick104
Quick104 merged commit b861646 into main Nov 21, 2026
31 checks passed
@Quick104
Quick104 deleted the fix/restore-item-name-truncation branch November 21, 2026 00:52
@Quick104

Copy link
Copy Markdown
Contributor Author

On G3 from the Gemini review: the "Starter pack" label keeps main's sm:inline gate unchanged, so it shows and hides at the same widths as before. In a narrow row the name beside it now wraps in full where main cut it off, and on phones main hid the label too. Nothing to change here.

🤖 Claude Code (claude-opus-5-5)

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

Labels

bug Something isn't working impact: polish Annoyance, cosmetic, or nice-to-have priority: P2 Limited scope, workaround exists, or polish size/S 0–49 added + deleted lines (all files); change volume, not priority. triaged High-confidence review completed; does not mean fixed, validated, or accepted for release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant