Skip to content

fix(web): stop names reordering restore report lines and "·" sitting alone - #4938

Open
Quick104 wants to merge 2 commits into
mainfrom
fix/restore-report-line-layout
Open

Quick104 wants to merge 2 commits into
mainfrom
fix/restore-report-line-layout

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 report is a web admin page with no client counterpart)

Two lines on a backup restore's Run step report could render out of order or with a stray separator.

  • Item line. In a left-to-right interface, an item's name could reorder the " · Users · Restored" text after it. An Arabic account name ending in "!" showed the "!" against the "·", and a name that carries a right-to-left override reversed the rest of the line ("Restored · sresU · …"). The message formatter isolates values only in right-to-left interfaces, and the name was printed in a plain span.
  • Profile line. When a profile's status was wider than its line (a German "· Wiederhergestellt" at 300 px with a 24 px browser font), it wrapped at the space after its "·" and left the "·" alone on a line.

This change isolates the item's name with <bdi>, as the profile line's name already is, and joins each profile status's "·" to its word with the no-break space the item line already uses.

Approach

Both fixes stay in RestoreRun.tsx. Making the formatter isolate values in left-to-right interfaces would also fix the item line, but it would change the bytes of every left-to-right message, which docs/architecture/i18n.md rules out.

When a profile status is wider than its line, it now breaks inside the word, with the "·" kept on the first part, as the item line already does. It no longer breaks between the "·" and the word.

One edge case is open for the maintainer (review thread S1): in Chromium, when the status column is narrower than about 1.8 em, the Arabic "Left out" status overflows it by up to 11 px, because Chromium won't break right after the no-break space. At those widths the base leaves the "·" alone instead, and the item line already behaves this way. On the real page after main's row wrapper (#4921), the overflow (8.9 px in a 51 px column) stays inside the wrapper's padding, so nothing reaches past the row.

Validation

  • Reproduced both problems on a Silo dev deployment built from main (f465d2d9, this PR's current base), and confirmed both are gone on the same deployment and restore job rebuilt at this branch's head (b23b70d, after main was merged in). An earlier pair on c1e36dc4 and ac47312 measured the same. The report covers three accounts: an Arabic name ending in "!", a name starting with a right-to-left override, and a merged account whose restored profile shows "Restored".
  • Captured English at desktop, tablet, and phone widths, German at 300 px with a 24 px font, and Arabic at desktop and phone widths. Text positions measured from the rendered page match the captures. The Arabic interface renders identically before and after. No console errors.
  • CI passes on b23b70d. Locally on the fix commit: web lint, format check, typecheck, production build, bundle budget, verify-local-paths, and verify-bidi pass; make test-web had 29 failures in four unrelated files (request deadlines, auth refresh, player client context) that also fail on the unfixed base on that host. No test covers this component.

Evidence

Evidence: https://evidence.siloserver.org/r/silo-server/restore-report-line-layout/

Risks

None identified. The change is presentation-only and limited to one web admin component.

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.

Follow-ups

Council review

Rounds: 2 (round 2 after main was merged in), last reviewed b23b70d

Member Round 1 (ac47312) Round 2 (b23b70d)
Sol (gpt-6.2-sol, xhigh) 9/10, S1 (open for the maintainer) 9/10, no new findings
Opus (claude-opus-5-5, high) 9/10, no findings 9/10, no findings
Gemini (gemini-4-neon, xhigh) not run (provider quota reached) 9/10, no findings

Background review: S1 is the only finding; Sol, Opus, and Gemini found nothing else on b23b70d, including in the merge resolution with #4921.

Visual review: 2 rounds on captures from ac47312 (retaken on b23b70d; same measurements)

Member Round 1 Round 2
Sol better, 8/10 better, 8/10
Opus better, 8/10 better, 8/10
Gemini better, 7/10 unavailable (provider quota reached)

Round 2 added right-to-left wrapping at 300 px with a 24 px font, a long account name, and names ending in "!"; those pairs are identical before and after. Answered: a status wider than its line now breaks inside the word, as the item line already did. Pre-existing and left out of this change: the wider gap before a profile line's "·" (the name's end margin, a design call), and narrow-screen issues outside the report lines, which get their own follow-ups.

AI Disclosure

  • Harness: Claude Code in T3 Code
  • Tool(s): Claude Code, T3 Code delegated tasks (Codex, Claude, Antigravity), headless Chromium captures
  • Model(s): claude-opus-5-5 (implementation and code review); gpt-6.2-sol, claude-opus-5-5, gemini-4-neon (visual and background review); claude-sonnet-5-5 (code-review cleanup finder)
  • Involvement: Fully AI-generated. The agent verified it live on a dev deployment; a person has not verified it yet.
  • Adversarial review: a multi-agent code review at high effort found no defects in the diff; it surfaced the Review-step caveat above as a pre-existing defect and a trade-off described under Approach. The plan round was skipped because the fix is two lines that reuse patterns already in the file. The simplify pass changed nothing. See Council review for the visual and background reviews.

🤖 Generated with Claude Code

Note

Fix RTL text issues in restore report lines in RestoreRun.tsx

  • Wraps translated item labels in ReportRow with a bdi element so their text direction is isolated from the surrounding section and outcome text. This stops names from reordering report lines in right-to-left locales.
  • Applies keepSeparatorsWithNext to the translated profile outcome text in AccountReport, so a no-break space keeps the "·" separator with the word it introduces when the line wraps.

Both changes are in RestoreRun.tsx.

Macroscope summarized b23b70d.

…alone

The restore report's item line printed its label in a plain span. In a
left-to-right interface the formatter doesn't isolate message values, so a
right-to-left name or one carrying a direction override reordered the
" · section · outcome" text after it. Render the label in a <bdi>, as the
profile line already does.

A profile's status ("· Restored") sits in an inline block that wrapped at
the ordinary space after its "·" when the status alone was wider than the
line, leaving the "·" on a line of its own. Join it to the word with the
same no-break space the item line already uses.

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

coderabbitai Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 36 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

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: 02a908ed-cbd4-4dad-ab51-cc9a10ba98bf
Commits

Reviewing files that changed from the base of the PR and between f465d2d and b23b70d.

Files selected for processing: 1

  • web/src/pages/admin-backups/RestoreRun.tsx
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@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-21T06:01:57.863461Z b23b70d New commits
🔒 Security Review ✅ Completed 2026-11-21T06:03:54.533025Z b23b70d New commits
ℹ️ 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-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 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 (gpt-6.2-sol, reviewed ac47312)

I found one narrow-layout regression in the Arabic profile status.

? t("web.admin.backups.restore.outcome.created")
: t(outcome.label),
})}
{keepSeparatorsWithNext(

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) — The Arabic “Left out” status can spill into the gutter. At a 315 CSS px viewport with a 45 px root font, I rendered the base and head report rows with the Arabic catalog in Chrome 157. The status had 55.25 px available. The base stayed inside the column, while the no-break space changed the emergency wrap in the head and one glyph extended 6 px into the gutter. The same row stayed contained in Firefox and WebKit.

Keep a breakable space as a fallback for Arabic outcomes, or use a separator layout that keeps the status within its column at this width.

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 in Chromium 153 with the app's Noto Sans Arabic font. With a 36.6 px status font in a 55.25 px column, the start of "مستبعد" overflows by 6 px, and by up to 11.3 px in a 50 px column. Chromium won't make an emergency break right after the no-break space, so "·", the space, and the first letter become the smallest piece it can place. Dropping the isolate characters or using a narrow no-break space gives the same result.

It shows only when the status column is narrower than about 1.8 em (45 to 65 px at that size). In that band the base leaves the "·" alone on a line, which is the bug this PR fixes, and below 45 px the base overflows too. German and Hebrew statuses don't overflow at any width I tried, and the item line on main already joins its "·" the same way. Any join that keeps the "·" with its word has this floor, and removing it brings the lone "·" back, so I'm keeping the change and leaving this thread open for the maintainer to decide.

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

…ne-layout

# Conflicts:
#	web/src/pages/admin-backups/RestoreRun.tsx
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