Skip to content

fix(web): show unmatched items' type and status in the interface language - #5023

Merged
Quick104 merged 7 commits into
mainfrom
fix/web-unmatched-items-badge-labels-v2
Nov 30, 2026
Merged

Quick104 merged 7 commits into
mainfrom
fix/web-unmatched-items-badge-labels-v2

Conversation

@Quick104

@Quick104 Quick104 commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: N/A
Validation tasks: none (Series — Web admin #1251 and Audiobooks — Web admin #1255 reach this section in C1 and C2, but neither has been run yet)

Other clients: N/A (web admin only; Apple, Android, and Roku have no Unmatched Items screen)

In any interface language other than English, the Unmatched Items section on the Libraries page showed each item's Type and Status as the raw API values: movie, series and the other item types, and unmatched, pending or ambiguous. In German the badges read "movie" and "unmatched" under the German column labels, in the desktop table and in the card layout below 1024 px. This change shows the translated label instead. The values stay English as data.

Approach

  • The Type badge goes through the shared itemTypeLabel helper, which fix(web): show ambiguous root types and confidence in the interface language #4994 also uses for the Ambiguous Roots section. It covers every type this list can return (movie, series, season, episode, audiobook, ebook, manga). A type it doesn't know prints as sent.
  • The Status badge goes through three new keys, web.admin.libraries.unmatched.status.unmatched, .pending and .ambiguous, added in feat(catalog): name the Unmatched Items statuses in the admin's language silo-translations#141 with the make translate pass for every language. The server only sends those three values here; anything else prints as sent.
  • The values used as data stay raw: the Ignore button's movie and series check, the Match dialog's type, and the search.
  • Main's translation pin (2026.11.22-d12da65) already includes the three keys, so this PR no longer changes the pin or the generated locale files.
  • English changes too: the badges now read Movie, Unmatched and so on, capitalized like the column headers around them.
  • In the card layout, the Type badge wraps like the Status badge, so a long translated type (Russian "Электронная книга" with large text on a phone) stays inside the card.

Validation

  • Reproduced and verified live on a dev sandbox, before on this PR's base and after on the fix, with the interface in German: the template's one unmatched item (a movie, status unmatched) showed movie and unmatched before and "Film" and "Nicht zugeordnet" after, in the table at 1440 px and in the cards at 820 and 390 px. The sandbox has no pending or ambiguous items, so those two labels were not seen live; they use the same switch and their keys are in the synced catalog.
  • Rechecked in review on dev deployments built from 0de4011 and the final head 0dec3a5, in German at 1440 px, with two template items set to pending and ambiguous: all three statuses showed translated ("Ausstehend", "Mehrdeutig", "Nicht zugeordnet"). The card wrap was checked in Russian at 320 and 390 px with x-large Text Size: before the fix the ebook badge ran past the card edge, after it the badge wraps.
  • tsc -b, eslint and prettier pass on the change. The admin web tests pass; four timing-sensitive tests on other admin pages timed out on the heavily loaded host and passed when rerun alone. make lint-changed and make verify-local-paths pass.
  • No test added: the change maps fixed values to labels, and the typecheck rejects a missing key.
  • Code review at medium found nothing to change in the diff. Its one note: the section's search still matches only the English type and status values (see Risks).

Evidence: https://evidence.siloserver.org/r/silo-server/unmatched-items-badge-labels/

Risks

  • Searching by a translated type or status (for example "Film") finds nothing, because the server matches the English values. That was true before this change, but the badges used to show the English value to type. Fixing it needs a decision on whether search should match translated labels, so it stays out of this PR.
  • Web admin display only; no API, data or server change.

Follow-ups

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

Ran as a follow-up from #4994's review: one member per round. Plan round skipped as mechanical (root cause shown in the source and live; the fix sits where the values are rendered and follows #4994's pattern; it adds nothing beyond the three catalog keys).

Background review: done, reviewed 46ade8f (no review posted on the PR; the first attempt was cancelled and the retry returned its findings without posting)

Member Round 1
Sol (gpt-6.2-sol, high) 8/10, one low finding

S1 (low): searching for a translated badge ("Film", "Nicht zugeordnet") misses the row, because the server matches the English values. Left open for a decision, as described under Risks.

Maintainer review (after the branch was brought up to date with main):

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

Fixed: the card layout's Type badge wrap (ece7907). Left open for a decision: search by a translated label (see Risks). Pre-existing and tracked: the dialogs' raw type (#5086). The review summary comment has the details.

Visual review: captures from eb80b479

Member Round 1
Sol (gpt-6.2-sol, high) better, 8/10

Answered: every visual finding matched the base or sits outside this change. The view filter cuts "Warten auf Zuordnung" off at 820 px in both captures (#5024). The fixed header covers page actions only at the captured scroll position. The search placeholder clips at phone width (already a #4994 follow-up). The scan timestamps' US format comes from the capture, which sets only the browser language and leaves the default formatting locale on English.

AI Disclosure

  • Harness: Claude Code, run from T3 Code
  • Tool(s): Claude Code; T3 Code delegated reviews (Codex); silo-translations make translate
  • Model(s): claude-opus-5-5 (implementation and translations); gpt-6.2-sol (reviews)
  • Involvement: Fully AI-generated. The agent verified it live on a dev sandbox; a person has not verified it yet.
  • Adversarial review: code review at medium (one finder) changed nothing and noted the English-only search. The plan round was skipped as mechanical, and a simplify pass changed nothing. See Council review for the visual review and the background review.

🤖 Generated with Claude Code

Note

Translate unmatched items' type and status labels in admin UI

  • The unmatched-items table and card layout in UnmatchedItemsSection.tsx now show item-type and status labels in the interface language, via a new statusLabel helper and the existing item-type label helper
  • The statusLabel helper covers the unmatched, pending, and ambiguous statuses; any other status value is shown as the raw string
  • Adds the three status message keys to MessageKey in keys.ts and translated entries across all locale files
  • The card layout's item-type badge now wraps within its available width

Macroscope summarized 0dec3a5.

Quick104 and others added 3 commits November 20, 2026 20:28
Seven backup and restore messages in the web admin chose "it" or "them"
with a plural on a count they never print. In Russian, Ukrainian,
Croatian, Lithuanian and Latvian CLDR's "one" form also covers 21, 31 or
101, and in Slovenian 101, so 21 omitted accounts read "its data is too
large" and the Restore page offered "Show it" for 21 items. The callers
now pass exactAmount(count), and the catalog selects on exactlyOne,
exactlyTwo (for the Slovenian and Arabic dual) or other. English is
unchanged.

docs/architecture/i18n.md and the web i18n README now say when a web
message selects on the exact amount instead of a plural.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Re-pin web translations to silo-translations 2026.11.21-b2f2d7a, which
includes Silo-Server/silo-translations#135, and have the backup warning
toggles use the shared exactAmount() from @/i18n.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uage

The admin Libraries page's Unmatched Items section printed each item's
content type and match status as the raw API values (movie, unmatched,
pending, ambiguous) in both the table and the card layout. The type now
uses the shared item-type labels and the status uses new catalog keys;
a value the client has no label for still shows as sent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@silo-triage silo-triage Bot added the size/XXL 1000–2999 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

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The unmatched-items table and card view now display translated content-type labels and translated labels for the unmatched, pending, and ambiguous statuses. Other status strings remain unchanged.

Changes: Unmatched-item labels

Layer / File(s) Summary
Label translation and rendering
web/src/components/admin/libraries/UnmatchedItemsSection.tsx
The table and card view use translated content-type labels and translated labels for recognized statuses. Unrecognized status strings remain unchanged. The card type badge can wrap long labels.

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

Change: Bug fix

Possibly related issues

  • Silo-Server/silo-server#5086 — The issue reports untranslated item types in Match Item and Split Item dialogs. This PR applies the shared label helper in the unmatched-items view, but does not change those dialogs.

Possibly related PRs

Merge Risk: Minimal · up to febca

The unmatched-items table and cards now show translated item-type and status labels, and long type labels wrap in the card badge. The change is presentational and easy to revert, and no concrete merge-blocking risk remains.

Architecture risk: Low · up to 0de40

The change affects 1 system.

Changed systems: web

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — web (service) was modified; 43 changed files map to changed impact.

Before / after behavior

  • observed — Modified behavior in web/src/components/admin/libraries/UnmatchedItemsSection.tsx: Imports the Translate type and adds statusLabel, which translates unmatched, pending, and ambiguous statuses; other status strings are returned unchanged.
  • observed — Modified behavior in web/src/components/admin/libraries/UnmatchedItemsSection.tsx: The table now displays content types using itemTypeLabel and statuses using statusLabel instead of rendering the raw values.
  • observed — Modified behavior in web/src/components/admin/libraries/UnmatchedItemsSection.tsx: The card layout now uses itemTypeLabel for content types and statusLabel for statuses instead of rendering raw values.
  • observed — Modified behavior in web/src/locales/ar-XB.json: Added pseudo-localized confidence labels for high, low, and medium ambiguous-root confidence.
Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: Unmatched Items type and status badges now display in the interface language. It matches the changeset, which translates the unmatched, pending, and ambiguous status v…
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 on-topic. It explains that the Unmatched Items section on the Libraries page showed raw API values for item Type and Status in non-English interfaces, and that the chan…
Full details: Title check

Explanation

The title names the main change: Unmatched Items type and status badges now display in the interface language. It matches the changeset, which translates the unmatched, pending, and ambiguous status values and item-type labels in UnmatchedItemsSection.tsx. The 73-character length is acceptable for a conventional-commit style title.

Full details: Description check

Explanation

The description is specific and on-topic. It explains that the Unmatched Items section on the Libraries page showed raw API values for item Type and Status in non-English interfaces, and that the change shows translated labels via the shared itemTypeLabel helper and three new status keys. It also covers validation, risks (search still matches English values), and follow-ups, all consistent with the raw summary of UnmatchedItemsSection.tsx changes (translated status labels, itemTypeLabel usage, and wrapping of the card type badge).

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: 1b83bfca-8099-4397-8a90-637287c97bf3
Commits

Reviewing files that changed from the base of the PR and between 0de4011 and febcad7.

Files selected for processing: 1

  • web/src/components/admin/libraries/UnmatchedItemsSection.tsx
Files skipped from review as they are similar to previous changes: 1

  • web/src/components/admin/libraries/UnmatchedItemsSection.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.

@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-23T02:36:16.182773Z febcad7 New commits
🔒 Security Review ✅ Completed 2026-11-23T02:37:41.146934Z febcad7 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 stacked Base is another open PR; merge in stack order named in the body labels Nov 21, 2026
Base automatically changed from fix/backup-restore-count-free-plurals to main November 22, 2026 00:18
@silo-triage silo-triage Bot added size/XXXL 3000+ added + deleted lines (all files); change volume, not priority. and removed size/XXL 1000–2999 added + deleted lines (all files); change volume, not priority. labels Nov 22, 2026
#4741 was squash-merged into main as 5641447, so this branch's copies of
its commits are resolved to main's versions. The web stays pinned to
silo-translations 2026.11.21-06af3eb, which builds on main's b2f2d7a;
the diff against main is now only this PR's change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@silo-triage silo-triage Bot added size/XXL 1000–2999 added + deleted lines (all files); change volume, not priority. and removed size/XXXL 3000+ added + deleted lines (all files); change volume, not priority. labels Nov 22, 2026
@silo-kody

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

<TableCell className="text-sm">{u.library_name}</TableCell>
<TableCell>
<Badge variant="outline">{u.content_type}</Badge>
<Badge variant="outline">{itemTypeLabel(t, u.content_type)}</Badge>

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 medium

Localized badge labels do not match the server-side search values

Searching for a translated badge label returns no matches because ListUnmatchedItems filters only raw English API values. Map localized search terms to API values or extend the search contract to support localized labels.

Prompt for LLM
File web/src/components/admin/libraries/UnmatchedItemsSection.tsx, line 285:

Localized badge labels do not match the server-side search values

Searching for the translated type or status displayed in a badge returns no matching items because `ListUnmatchedItems` filters only the raw English API values. Map localized search terms to the corresponding API values or extend the search contract to support localized labels.

Talk to Kody by mentioning @kody

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

​

​

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 on a dev deployment built from 0de4011: q=Film and q=Ausstehend return nothing, while q=movie and q=pending return the movie and the pending series. The server compares the query with mi.type and the English status (libraries_service.go, ListUnmatchedItems), so it can't match a translated label. That search behavior predates this PR. What's new is that the badge no longer shows the word that works.

Maintainer decision, not a change for the author. Fixing it means teaching search about translated labels: either the web sends the raw type or status when the query matches a translated label exactly, or the endpoint takes explicit type and status filters. Both are outside this PR's display fix, so I've left this thread open for the maintainers.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The mismatch is confirmed, and I agree it merits a maintainer decision rather than a change in this display-focused PR. The search behavior predates the PR, but translated badges make the working English search terms less discoverable.

Would you like me to create a follow-up issue for that decision?

@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.

Review of 0de4011, after bringing the branch up to date with main. The diff against main is now this PR's change alone. One finding on the diff is below, and I'm fixing it on this branch. The search gap is answered in the existing thread on line 285, and the summary comment covers the rest.

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

Translated types such as "Электронная книга" ran past the card edge on
a phone-width screen with large text, because the Type badge kept the
badge's no-wrap default. It now wraps like the Status badge below it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@silo-kody

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

Main now pins silo-translations 2026.11.21-04a2222 with #4994. This
branch keeps 2026.11.21-06af3eb, the next release, which adds only the
Unmatched Items status keys; the locale files are regenerated from it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@silo-triage silo-triage Bot added size/XL 500–999 added + deleted lines (all files); change volume, not priority. and removed size/XXL 1000–2999 added + deleted lines (all files); change volume, not priority. labels Nov 22, 2026
@Quick104

Quick104 commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor Author

Review summary

Reviewed head: febcad7 (after three merges of main and one fix commit). Plain bug fix, not superseded: main still printed the raw values before this PR.

Branch update. The branch was stacked on #4741, which merged as a squash, so it still carried #4741's commits. I merged main in (0de4011), resolving those files to main's versions, then merged it again after #4994 re-pinned main (0dec3a5). Main then reorganized the Libraries page into tabs (#5087) and moved its translation pin to 2026.11.22-d12da65, which already carries this PR's three status keys. I merged main a third time (febcad7): the section keeps main's new embedded prop alongside the translated badges, and the pin and locale files resolve to main's. The diff against main is now only UnmatchedItemsSection.tsx. tsc -b, eslint, prettier, and make lint-changed pass on the merge.

Addressed

  • Card layout Type badge could run past the card edge with long translated types (Russian "Электронная книга" at 320 px with x-large Text Size). Fixed in ece7907 by giving it the same max-w-full whitespace-normal as the Status badge. Checked live before and after the fix.

Left for the maintainers

  • Search by a translated label finds nothing ("Film", "Ausstehend" return no rows; "movie", "pending" do). The server matches the English values. That predates this PR, but the badge no longer shows the word that works. Fixing it needs search to understand translated labels (the web mapping an exact label to the raw value, or explicit type and status filters on the endpoint). Disclosed in the PR's Risks; open in the thread on line 285.

Pre-existing, outside this diff

Validated features. Not run: the review account's token lacks the scope the validation board needs. The PR body says Series and Audiobooks web admin cases #1251 and #1255 reach this section but haven't run.

Verification. A dev deployment built from 0de4011, ece7907, and the final head 0dec3a5, with a German browser at 1440 px: the rows read "Serie / Ausstehend", "Serie / Mehrdeutig", "Film / Nicht zugeordnet" (two template items were set to pending and ambiguous so all three statuses show). The card fix was checked in Russian at 320 and 390 px. tsc -b, eslint, and prettier pass. No test was added; a fixed value-to-label switch has no behavior a test would guard beyond the typecheck on keys. The PR's evidence page still matches: its German captures use short labels that the wrap fix doesn't change.

User manual. Unaffected: the admin docs don't quote these badge values.

Other clients. Web admin only; Apple, Android, and Roku have no Unmatched Items screen.

Translation catalog. Silo-Server/silo-translations#141 is merged and released; main's pin 2026.11.22-d12da65 includes its keys, so this PR no longer changes the pin.

Council (Sol gpt-6.2-sol xhigh, Opus claude-opus-5-5 high, Gemini gemini-4-neon xhigh)

Member Round 1 (0de4011) Round 2 (0dec3a5)
Sol 8/10 8/10
Opus 8.5/10 9/10
Gemini 8/10 9/10

Round 1 found the search gap, the dialog badge, the card wrap (fixed), and the raw types elsewhere. In round 2, Sol raised word-level clipping at an extreme text scale; checked live, the whole card layout collapses at that scale, so it's outside this change.

Fit: 9/10 · Readiness: 8/10 — conditional (assuming CI is green)

Fit: admin pages should read correctly in the admin's language; this reuses the shared type helper, adds three catalog keys, and costs nothing at runtime. Readiness: the change is small and verified live in both layouts; the one open item is the search decision above. If the maintainers accept it as a follow-up, nothing else holds this back.

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

Main's translation pin 2026.11.22-d12da65 already carries the three unmatched status keys, so the pin and generated locale files now match main.

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 23, 2026
@silo-triage silo-triage Bot removed the size/XL 500–999 added + deleted lines (all files); change volume, not priority. label Nov 23, 2026
@Quick104
Quick104 merged commit a4d6cff into main Nov 30, 2026
18 checks passed
@Quick104
Quick104 deleted the fix/web-unmatched-items-badge-labels-v2 branch November 30, 2026 14:32
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. stacked Base is another open PR; merge in stack order named in the body

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant