Skip to content

fix(web): keep restore line markers on the first line when the text wraps - #4680

Merged
Quick104 merged 1 commit into
mainfrom
fix/restore-never-restored-icon
Nov 20, 2026
Merged

Quick104 merged 1 commit into
mainfrom
fix/restore-never-restored-icon

Conversation

@Quick104

@Quick104 Quick104 commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: N/A
Validation tasks: none

Other clients: N/A (no other client has the backup restore screen; it is web admin only)

On the backup restore "Choose" step, two rows put a marker in front of text that can wrap: the lock icon before "Settings that belong to this server are never restored." and the amber dot before each blocked group, such as "1 can't be restored — they need to be installed from a plugin catalog first". Both rows centered the marker on the whole text block, so when the text wrapped the marker sat between the two lines instead of beside the first one. A blocked group's reason wraps at phone width, and the never-restored line wraps on phones narrower than about 390 px and in longer translations.

This change keeps each marker level with the first line, however many lines the text wraps to. Rows that fit on one line don't move.

Approach

Both rows in RestoreChoose.tsx align to the top, and each marker drops by half the gap between one line and the marker (mt-[calc((1lh-0.875rem)/2)] for the 14 px lock, mt-[calc((1lh-0.375rem)/2)] for the 6 px dot). Because the offset follows the line height, a one-line row keeps the position items-center gave it at every Silo text scale and at browser font sizes up to the point where the marker gets taller than the line (about 22 px); past that the marker stays centered on the text and the row is a few pixels shorter. A fixed mt-0.5 would drift off center at a larger root font size.

Validation

  • Reproduced on a dev deployment built from main: with a backup whose plugin was uninstalled afterwards, the blocked group's dot sat 10.5 px below the first line at 393 px, and the lock sat the same distance off at 360 px.
  • After the fix, on the same deployment and data: every wrapped marker sits at the same offset as a one-line row (+0.75 px from the first line's glyph center) at 320, 360 and 393 px, at a 20 px browser font size, at Silo's x-large text scale (including a three-line wrap), in German, and in Arabic right to left. One-line rows on tablet and desktop keep the same position and height.
  • Web lint, format:check, build and budget:check pass. vitest run has 29 failures in four files unrelated to this component (request deadline, auth core, player client context, player auth refresh), which also fail on main on the same Node 26 host. No unit test renders this component.

Evidence

Evidence: https://evidence.siloserver.org/r/silo-server/restore-choose-icon-first-line/

Follow-ups

  • Blocked-group messages use plural wording for a single item ("1 can't be restored — they need…"); their singular forms in the translation catalog repeat the plural. That copy fix runs separately.
  • At phone width a restore item row cuts the item's name off mid-character with no ellipsis, because the shared Label is a flex container and truncate's ellipsis doesn't apply to it. That fix runs separately.
  • The disclosure button's chevron and the restart notice's badge on the same screen center between wrapped lines too. That fix runs separately.

Risks

None identified. The change is two class lists on one screen.

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

Rounds: 1, last reviewed 92f9fc8

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

Answered: Sol's S1 and Gemini's G1 (one-line rows get a few pixels shorter once the browser font is large enough for the marker to outgrow the line) are confirmed; the Approach states the limit. Gemini's repair, a one-line box around each marker, is ready as a follow-up change. Gemini's G2 and G3 (the disclosure chevron and the restart badge have the same wrapped-line problem) predate this change and run as a follow-up; G4 (a fixed icon margin in the omitted-accounts warning) is folded into it as optional. Opus found nothing.

Visual review: 2 rounds, captures from 92f9fc8

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

Fixed: retook the open-state captures once the chevron settles, with nothing focused, and added the three-line, German, Arabic right-to-left, opened-list and keyboard-focus captures the reviewers asked for. Answered: the other findings (orphaned words, the section chip strip, the disclosure button's touch target, indent and focus ring, the desktop rail) were present before this change and sit outside the two changed rows. The singular "1 can't be restored — they need…" copy and the clipped item names are the follow-ups above.

AI Disclosure

  • Harness: Claude Code in T3 Code
  • Tool(s): Claude Code; T3 Code delegated tasks for the council (Codex, Claude, Antigravity)
  • Model(s): claude-opus-5-5 (implementation); gpt-6.2-sol, claude-opus-5-5, gemini-4-neon (council)
  • Involvement: Fully AI-generated; a maintainer reviews it before merge
  • Adversarial review: code review at high (three finders) replaced fixed margins with line-height-based ones, so one-line rows stay centered at larger font sizes; the plan round was skipped because the fix is mechanical; a simplify pass found nothing to change. Council results are in the Council review section above.

🤖 Generated with Claude Code

…raps

On the restore "choose" screen, the never-restored line's lock icon and
each blocked group's amber dot were centered on the whole text block. When
the text wraps (a blocked group's reason at phone width, the never-restored
line on narrower phones and in longer translations), the marker sat
between the lines. Align both rows to the top and drop each marker by half
the gap between one line and the marker, so it centers on the first line.
A one-line row keeps the position items-center gave it, at any root font
size.

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 20, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 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-20T22:40:08.040650Z 92f9fc8 PR opened
🔒 Security Review ✅ Completed 2026-11-20T22:41:56.454070Z 92f9fc8 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.

@silo-kody

silo-kody Bot commented Nov 20, 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 ❌

@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The restore selection page changes the alignment of the blocked-group title and never-restored-settings label. It also adds vertical offsets to the status dot and lock icon.

Changes: Restore Choose alignment

Layer / File(s) Summary
Align labels and icons
web/src/pages/admin-backups/RestoreChoose.tsx
The blocked-group title and status dot, and the never-restored-settings label and lock icon, now use start alignment. The dot and icon receive vertical offset classes.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Possibly related PRs

Merge Risk: Minimal · up to 92f9f

This change only adjusts how the lock icon and status dot align with wrapped text on the restore Choose step. It has no data or behavioral impact and is low risk to merge.

Security architecture risk: Minimal · up to 92f9f

The change adjusts status-marker positioning on the backup restore screen without changing restore behavior, permissions, or data handling. No introduced or worsened architecture-level security risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the change: restore line markers (the lock icon and amber dot) stay on the first line when the text wraps, in the backup restore Choose step. It matches the raw summary and the PR obje…
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 states the problem (lock icon and amber dot misaligned with the first line when text wraps in the backup restore Choose step), the approach (top alignment with line-height-based marker…
Full details: Title check

Explanation

The title names the change: restore line markers (the lock icon and amber dot) stay on the first line when the text wraps, in the backup restore Choose step. It matches the raw summary and the PR objectives, and it is specific enough for a teammate scanning history. The title is 73 characters, which is slightly long but acceptable.

Full details: Description check

Explanation

The description states the problem (lock icon and amber dot misaligned with the first line when text wraps in the backup restore Choose step), the approach (top alignment with line-height-based marker offsets in RestoreChoose.tsx), the validation performed, and follow-ups. It is directly related to the changeset, so the check passes.

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: b08532b7-6db8-426b-bd07-34ee57a23917
Commits

Reviewing files that changed from the base of the PR and between 66b836f and 92f9fc8.

Files selected for processing: 1

  • web/src/pages/admin-backups/RestoreChoose.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 labels Nov 20, 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 (gpt-6.2-sol, reviewed 92f9fc8)

One low-severity finding, below. Wrapped English and right-to-left Arabic rows kept the marker on the first line in a Chromium fixture built from the pinned markup and Tailwind CSS; Tailwind emits valid calc() declarations, and the lh unit is supported at Tailwind v4's browser minimums. The change is confined to the web admin, with no API, server, Jellyfin or other-client impact. Score: 8/10.

Posted for the reviewer by the /silo run, because the reviewer's own GitHub connection failed. Written by gpt-6.2-sol (Codex) in T3 Code.

<span className="text-muted-foreground flex items-center gap-1.5 text-[13px]">
<Lock aria-hidden="true" className="size-3.5 shrink-0" />
<span className="text-muted-foreground flex items-start gap-1.5 text-[13px]">
<Lock aria-hidden="true" className="mt-[calc((1lh-0.875rem)/2)] size-3.5 shrink-0" />

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.

S1 · Low: one-line rows shift at very large browser font sizes.

Trigger: the browser's default font size set to 32 px with Silo's text scale at Default. The lock (size-3.5, rem-based) grows to 28 px while the label's line stays at 19.5 px (fixed text-[13px]), so this margin resolves to −4.25 px.

Impact: the lock stays centered on the text, but the label's flex box gets shorter. In the fixture the lock and the disclosure beside it moved up 2.125 px; at a 440 px row width, with the label on one line, both moved up 4.25 px. The amber dot shows the same effect at a 64 px root size.

Suggested repair: make the label's line height at least the marker's height, then compute the offset from those two values.

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.

Confirmed the mechanism, keeping the code. The margin goes negative only once the 14 px lock (0.875rem) is taller than the 19.5 px line the fixed 13 px text gets. That takes a browser default font above about 22 px; Chrome's largest preset (24 px) gives −0.75 px. Past that point the lock still sits centered on the text, and it overflows into the row's py-2 padding, which grows with the root size too, so nothing overlaps or clips. The visible difference from items-center is a row a few pixels shorter. Raising the label's line height to the marker's height would change the text's own spacing at every size to fix a few pixels at sizes no preset reaches, so I'm leaving it. The PR body now says the one-line position holds while the marker fits within a line.

🤖 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 92f9fc8)

Checked against the pinned diff (66b836f82a...92f9fc8f1e) and repository source:

  • Tailwind v4 output & browser targets: Valid. Tailwind v4 (4.2.1) compiles the arbitrary calc values with valid operator spacing and LightningCSS simplifies them to calc(.5lh - .1875rem) and calc(.5lh - .4375rem). CSS lh support (Chrome/Edge 109+, Safari/iOS Safari 16.4+, Firefox 120+) covers Tailwind v4's target floor (Chrome 111+, Safari 16.4+, Firefox 128+) and is already used in Preflight and EpisodeCardCaption.tsx.
  • RTL, flex-wrap, and scope: RTL flow, logical padding, and the parent flex-wrap items-center row behave as expected (<span> uses flex-basis: auto, so Disclosure breaks to its own flex line before the text wraps). No API, server, Jellyfin, or native client surface is affected, and skipping a unit test fits CONTRIBUTING.md.

One inline finding (G1) is attached to RestoreChoose.tsx:331. Three additional findings on the same Choose screen sit outside the diff hunks:

G2 (Medium) — Disclosure keeps the same wrapped-marker bug on LibraryGroupRows and SameRows, plus chevron shrinking and centered wrapped text

  • Location: web/src/pages/admin-backups/Disclosure.tsx:7,33 (rendered directly on this screen at web/src/pages/admin-backups/RestoreChoose.tsx:239-249 and web/src/pages/admin-backups/RestoreChoose.tsx:304-306)
  • Trigger: Narrow phone widths (320–360px), x-large text scale, or longer translations on:
    • LibraryGroupRows (RestoreChoose.tsx:239-249), which renders a library name (or "Artwork and branding" / German "Bilder und Branding" / Arabic "الصور الفنية والعلامة التجارية") plus restorable state counts (stateCountsText) inside <Disclosure>.
    • SameRows (RestoreChoose.tsx:304-306), which renders web.admin.backups.restore.choose.sameLabel (e.g. German "{count_text} stimmen mit diesem Server überein", Romanian "{count_text} de elemente corespund acestui server" — 49 chars) inside <Disclosure>.
  • Impact: DISCLOSURE (Disclosure.tsx:7) uses inline-flex items-center without text-start, and <ChevronDown> (Disclosure.tsx:33) lacks shrink-0. When the label wraps, the chevron centers between the lines (the same misalignment this PR fixes on the adjacent rows), shrinks horizontally under flex pressure, and <button>'s UA text-align: center (not reset by Tailwind v4 Preflight) centers the wrapped lines. In LibraryGroupRows, {name} and the counts <span> are separate non-wrapping flex items, so each wraps inside its own narrow column.
  • Evidence: Disclosure.tsx:6-37, RestoreChoose.tsx:239-249,304-306, and locale entries in web/src/locales/{de,ro,bg,ar}.json.
  • Suggested repair: Change DISCLOSURE to inline-flex items-start gap-1 text-start, wrap <ChevronDown className="size-3.5 ..." /> in <span aria-hidden="true" className="flex h-[1lh] shrink-0 items-center"> (so it tracks both text-xs and LibraryGroupRows's text-[13px]), and keep LibraryGroupRows's {name} and counts inside one inline-flowing <span>.

G3 (Low) — Expanded ItemRow restart notice on the Choose screen still uses flex items-center

  • Location: web/src/pages/admin-backups/RestoreRows.tsx:223-227
  • Trigger: Opening an item with restart_required: true on the Choose screen inside its ps-7 indented details container at phone width (320–393px), x-large text scale, or longer locales (e.g. German "Neustart" + "Wird nach einem Neustart wirksam.", Finnish "Uudelleenkäynnistys" + "Tulee voimaan uudelleenkäynnistyksen jälkeen.").
  • Impact: <p className="text-muted-foreground flex items-center gap-2 text-xs"> vertically centers <RestartBadge /> between wrapped lines instead of keeping it beside the first line.
  • Evidence: RestoreRows.tsx:223-227, RestartBadge.tsx:19-20, and web/src/locales/{en,de,fi}.json.
  • Suggested repair: Switch the <p> to items-start and wrap the sentence in <span className="border border-transparent py-0.5"> (matching RestartBadge's border py-0.5 text-xs metrics) so line 1 aligns with the badge on single-line rows and wrapped lines flow below it.

G4 (Low) — OmittedAccounts's Headline in the sibling bottom slot still uses the fixed mt-0.5 offset

  • Location: web/src/pages/admin-backups/BackupWarningDetails.tsx:32-34 (rendered at web/src/pages/admin-backups/RestoreChoose.tsx:614-620)
  • Trigger: Viewing the Choose screen with omitted accounts at a larger browser root font size (20px+).
  • Impact: OmittedAccounts sits in the exact same SectionBlock bottom slot ternary as NeverRestored (RestoreChoose.tsx:614-620) and renders the same flex items-start gap-1.5 text-[13px] layout with a size-3.5 icon, but still uses mt-0.5 — the fixed offset this PR replaced on NeverRestored because it drifts at larger root font sizes (2px vs 2.75px at 16px root; 2.5px vs 1.0px at 20px root). Already uses items-start, so wrapped lines do not misalign between lines.
  • Evidence: BackupWarningDetails.tsx:30-37, RestoreChoose.tsx:614-620, and web/src/app.css:732-756,851-854.
  • Suggested repair: Apply the same 1lh-based first-line alignment (<span aria-hidden="true" className="flex h-[1lh] shrink-0 items-center">) to Headline's TriangleAlert icon so both bottom notices behave consistently.

Written by Gemini 4 Neon (gemini-4-neon) in Antigravity via T3 Code.

<span className="text-muted-foreground flex items-center gap-1.5 text-[13px]">
<Lock aria-hidden="true" className="size-3.5 shrink-0" />
<span className="text-muted-foreground flex items-start gap-1.5 text-[13px]">
<Lock aria-hidden="true" className="mt-[calc((1lh-0.875rem)/2)] size-3.5 shrink-0" />

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.

G1 (Low) — mt-[calc((1lh-0.875rem)/2)] turns negative above a 22.3 px browser root font size, diverging from items-center on one-line rows

  • Trigger: Browser default font size above 22.29px (e.g. Chrome's built-in "Very large" setting at 24px, or 200% browser text sizing at 32px), at default, large (> 22.19px), or x-large (> 22.11px) Silo text scale.
  • Impact: The PR claims a one-line row keeps the exact position items-center gave it at any browser font size, but once 0.875rem > 1lh, margin-top becomes negative (-0.75px at 24px root, -1.035px at 24px + x-large, -4.25px at 32px root). That pulls the lock icon above the <span>'s top border box and shortens the <span>'s flex cross-size (20.25px vs 21px at 24px root; 23.75px vs 28px at 32px root). On a one-line row beside the text-xs Disclosure button (1rem tall), the parent items-center shifts both lock and text upward relative to Disclosure (-0.375px at 24px root; -2.125px at 32px root, where the lock extends -0.125px above the flex row). Both markers (:270 and :331) also repeat size-1.5/size-3.5 as hardcoded 0.375rem/0.875rem literals instead of reading --spacing.
  • Evidence: web/src/app.css:732-756 scales rem with the browser root font size (html { font-size: 100% / 112.5% / 125% }), whereas web/src/app.css:851-854 scales .text-[13px] only by --ui-text-scale-factor in px (calc(13px * var(--ui-text-scale-factor)) !important). With Tailwind Preflight's inherited line-height: 1.5, 1lh stays fixed at 19.5px / 21.84px / 24.18px regardless of browser root size, so 0.875rem overtakes 1lh just above the 20px root size tested.
  • Suggested repair: Wrap each marker in a 1lh-tall flex slot instead of subtracting a hardcoded rem size in margin-top:
    <span aria-hidden="true" className="flex h-[1lh] shrink-0 items-center">
      <Lock className="size-3.5" />
    </span>
    (and the same wrapper around the size-1.5 dot at :270). That removes negative margins, keeps one-line rows symmetrically centered against Disclosure even when 0.875rem > 1lh, avoids duplicating 0.375rem/0.875rem, and avoids resolving 1lh directly on the <svg> element.

@Quick104
Quick104 merged commit 4d6d1b5 into main Nov 20, 2026
25 checks passed
@Quick104
Quick104 deleted the fix/restore-never-restored-icon branch November 20, 2026 22:55
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant