Skip to content

fix(collections): match the collection folder rail's card size to the active Home layout - #287

Merged
ghbarker merged 1 commit into
feature/post-refactorfrom
fix/collection-rail-canvas-card-size
Sep 8, 2026
Merged

ghbarker merged 1 commit into
feature/post-refactorfrom
fix/collection-rail-canvas-card-size

Conversation

@ghbarker

@ghbarker ghbarker commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • PR Collection folder rails: reuse Home's actual row widget #282 made the collection folder rail reuse Home's actual BoardCell/CardFocusRise widget, but fed it homeRailPosterWidth — the CLASSIC board's poster-size formula.
  • Canvas, the shipped TV default, sizes its own shelf by a completely different formula (cardH = boardH*0.30 clamped 150-220, cardW = cardH * aspect, 48px padding vs classic's own numbers). So on the default layout, the folder rail used the right widget but still didn't match what the viewer's actual Home renders — matches the "still wrong" report even after Collection folder rails: reuse Home's actual row widget #282.
  • Added canvasRailCardSize (home_rail_metrics.dart), the same formula CanvasStage.build uses, and switched the folder screen to pick between it and the classic formula based on StorageService.tvHomeStyleCached.

Test plan

  • New regression test (collection_folder_canvas_card_size_test.dart) — fails to even compile against the pre-fix code (canvasRailCardSize didn't exist), passes after; covers both the classic and Canvas card sizes
  • Existing collection_folder_screen_test.dart / board_shelf_row_test.dart all still pass
  • flutter analyze clean on changed files
  • dart tool/check_layering.dart — no new violations

… ACTIVE Home layout

PR #282 made the folder rail reuse Home's actual BoardCell/CardFocusRise
widget, but fed it homeRailPosterWidth — the classic board's poster-size
formula. Canvas, the shipped TV default, sizes its own shelf by a
completely different formula (cardH = boardH*0.30 clamped 150-220, then
cardW = cardH * aspect) with different padding grammar, so on the
default layout the folder rail's widget was right but its SIZE still
didn't match what the viewer's actual Home renders.

Added canvasRailCardSize (home_rail_metrics.dart), the same formula
CanvasStage.build uses, and switched the folder screen to pick between
it and the classic formula based on StorageService.tvHomeStyleCached —
so "Rows" reads as this device's actual Home, not just some Home.

Added a regression test that fails to even compile against the pre-fix
code (canvasRailCardSize didn't exist) and passes after, covering both
the classic and Canvas card sizes.
@ghbarker
ghbarker merged commit 2b3dbf4 into feature/post-refactor Sep 8, 2026
3 checks passed
@ghbarker
ghbarker deleted the fix/collection-rail-canvas-card-size branch September 8, 2026 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant