Skip to content

fix(web): size audiobook grid rows for square covers - #4276

Merged
Quick104 merged 1 commit into
mainfrom
fix/audiobook-square-poster-grid
Nov 15, 2026
Merged

Quick104 merged 1 commit into
mainfrom
fix/audiobook-square-poster-grid

Conversation

@Quick104

@Quick104 Quick104 commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: N/A
Validation tasks: none

Other clients: Apple not checked yet, parity issue to follow if its audiobook grid has the same gap; Android not checked yet, parity issue to follow if affected; Roku N/A (audiobooks are outside the first Roku release)

On the web app's audiobook Books grid, every row has a band of empty space under the covers. The grid calculates row height for 2:3 portrait posters, but audiobook covers are square. Rows can grow when cards need more room, but they never shrink, so each row keeps about 60px of empty space at desktop width. This change sizes rows for square covers in audiobook grids.

Approach

useGridLayout now takes the poster's height-to-width ratio instead of always using 1.5. ItemGrid has a new posterAspect prop ("portrait" or "square"). It sets that ratio and also gives the loading skeletons the matching shape. Portrait stays the default, so other grids don't change.

LibraryBrowse passes square for audiobook libraries. Catalog passes it when the catalog is filtered to audiobooks, because that view had the same gap. Mixed views keep portrait rows, which still fit square covers.

The change is web-only. It doesn't touch the server or the API.

Validation

  • Typecheck (tsc -p tsconfig.app.json): pass
  • ESLint and Prettier on touched files: pass
  • Vitest for the grid, the grid layout hook, and the library browse page (5 files, 41 tests): pass
  • Manual check of an audiobook library's Library tab (Books) at 1600px and 390px wide, before and after: at 1600px, the grid cell went from 255px tall to 195px

Evidence

Evidence: https://evidence.siloserver.org/r/silo-server/audiobook-square-grid/

Surface and build: web app, audiobook library Library tab (Books), desktop (1600px) and mobile (390px) widths. Built from 2c75783 plus this change, using the Vite dev frontend against a development server.

Risks

None identified. Grids that don't pass posterAspect keep the 2:3 row height they had before.

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.

AI Disclosure

  • Harness: Claude Code
  • Tool(s): Claude Code
  • Model(s): claude-opus-5-5
  • Involvement: Fully AI-generated, human verified
  • Adversarial review: n/a

Note

Add square poster aspect to ItemGrid for audiobook covers

Audiobooks have square covers, but the grid sized rows for 2:3 portrait posters, leaving gaps and mismatched skeletons.

  • ItemGrid accepts a new posterAspect prop (portrait or square) in ItemGrid.tsx, defaulting to portrait. Skeletons use the matching aspect class.
  • useGridLayout accepts a posterRatio (poster height / width) in useGridLayout.ts, defaulting to 1.5, and uses it to estimate row height.
  • CatalogResults and LibraryBrowse pass square for audiobook scopes and library types.
  • Behavioral Change: non-audiobook grids are unchanged; the new props default to the prior portrait/1.5 behavior.

Macroscope summarized 560af0e.

- Add a posterAspect prop to ItemGrid and pass it through as the useGridLayout poster ratio, so rows of square covers no longer leave 2:3 poster height empty below them
- Make loading skeletons use the same aspect as the grid's posters
- Use square posters in audiobook library browse and the audiobook catalog scope
@coderabbitai

coderabbitai Bot commented Nov 15, 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 10 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: 87f6c3c3-4e08-4f7e-85d2-78425aac221d
Commits

Reviewing files that changed from the base of the PR and between d8fd3e9 and 560af0e.

Files selected for processing: 4

  • web/src/components/ItemGrid.tsx
  • web/src/hooks/useGridLayout.ts
  • web/src/pages/Catalog.tsx
  • web/src/pages/LibraryBrowse.tsx
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@silo-triage silo-triage Bot added the size/S 0–49 added + deleted lines (all files); change volume, not priority. label Nov 15, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 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-15T04:06:16.683725Z 560af0e PR opened
🔒 Security Review ✅ Completed 2026-11-15T04:08:13.849479Z 560af0e 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 15, 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 ❌

@Quick104
Quick104 merged commit 436d253 into main Nov 15, 2026
17 of 18 checks passed
@Quick104
Quick104 deleted the fix/audiobook-square-poster-grid branch November 15, 2026 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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