Skip to content

frontend: use the full viewport width (remove container max-width caps) - #192

Open
ck3mp3r wants to merge 3 commits into
mainfrom
feature/frontend-full-width
Open

ck3mp3r wants to merge 3 commits into
mainfrom
feature/frontend-full-width

Conversation

@ck3mp3r

@ck3mp3r ck3mp3r commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • The Tailwind v4 .container utility capped content on 12 call sites (nav shell, footer, breadcrumb, 9 page containers): max-width 1280px/1536px by breakpoint, leaving 80px gutters at 1440px viewports and 512px at 2560px.
  • Fix is a single unlayered override appended to tailwind/input.css: .container { max-width: none; } — an unlayered rule deterministically wins over every breakpoint rule inside @layer utilities, so one line replaces 12 mechanical class edits with the same rendered result.
  • public/style.css regenerated with the repo pre_build hook (tailwindcss); the committed diff also carries tailwind 4.2.1 -> 4.3.4 output churn from the local toolchain.
  • Drift cleanup: config.js content globs pointed at ./src/frontend/** paths that never existed (and referenced a src/main.rs that is not in the crate); replaced with one repo-root-relative glob over the real source tree. Output verified byte-identical across regeneration. docs/frontend.md tree corrected to match reality (style.css is committed and hook-regenerated, config and input live under tailwind/).

Finding: CI test runner mismatch

  • The CI workflow ran the suite with plain cargo test --workspace (.github/workflows/ci.yaml:30) while the CI shell has installed cargo-nextest since its introduction for a 'JUnit output for CI' purpose that was never used (nix/ci.nix:13) — and the devshell tests script plus the pre-push hook already run cargo nextest run (nix/dev.nix:19). Same test suite, three runner stories.
  • Aligned: ci.yaml now runs nix develop .#ci --command cargo nextest run — nextest runs the full workspace by default (same coverage as cargo test --workspace), so local hook, devshell script, and CI now use one runner.

Validation

  • Usable content width: 1392px at 1440px viewports (was 1232px), 2512px at 2560px (was 1488px); mobile (<640px) unchanged
  • Kanban grid, dialogs/drawers, and print rules unaffected (CSS inspection); rendered and verified by hand via trunk serve
  • Corrected tailwind globs regenerate byte-identical style.css (hook exit 0, zero diff)
  • Pre-push hook: cargo nextest passed on every push in this PR

The Tailwind v4 .container utility capped content at 1280/1536px on 12 call sites, leaving 80px gutters at 1440px viewports and 512px at 2560px. Remove the caps globally by appending an unlayered .container { max-width: none; } override to tailwind/input.css: an unlayered rule deterministically wins over every breakpoint rule inside @layer utilities, so a single line replaces 12 mechanical class edits (same rendered result).

Usable content width: 1392px at 1440px viewports (was 1232px), 2512px at 2560px (was 1488px). Mobile (<640px) unchanged - those breakpoints never applied a cap. The regenerated public/style.css also carries tailwind 4.2.1 -> 4.3.4 output churn from the local toolchain. Rendered and verified by hand via trunk serve.
config.js pointed content globs at ./src/frontend/** paths that never existed anywhere in the repository (and referenced a src/main.rs that does not exist - the crate root is lib.rs). Replace them with one repo-root-relative glob matching the real source tree; output verified byte-identical before and after regeneration via the trunk pre_build hook.

docs/frontend.md claimed style.css is gitignored, listed input.css under public/, and named the config tailwind.config.js; correct the tree to match reality: style.css is committed and regenerated by the pre_build hook, config and input live under tailwind/.
align the CI runner with the runner used everywhere else: the devshell tests script and the pre-push hook already run cargo nextest run (nix/dev.nix:19), and the CI shell has installed cargo-nextest for that exact purpose since its introduction (nix/ci.nix:13, 'JUnit output for CI') - but ci.yaml kept invoking plain cargo test --workspace, leaving the dependency installed and unused and diverging local/CI runner behavior (per-test timeouts, parallel execution, retry semantics). cargo nextest run covers the whole workspace by default, matching cargo test --workspace.
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