feat(ui): density toggle + readability/compact polish (LC-194) #240

Merged
nrupard merged 1 commit from feat/lc-194-density-polish into main 2026-05-27 22:05:21 +02:00
Owner

The concrete, testable core of the visual-polish pass: a persisted comfortable/compact density toggle (the named AC) mirroring the LC-191 theme infrastructure, plus a readability baseline.

What lands

  • Per-user density: users.density column (auth migration 0026, parallel to users.theme) - comfortable (default/NULL) / compact; threaded through UserRecord/User + set_user_density + User::density_or_default. 0026 added to the 22 hand-rolled auth-pool test files.
  • No-flash: base.html bootstrap also sets data-density from the lc-density cookie / localStorage (default comfortable) before paint; exposes window.__lcSetDensity for instant apply.
  • Cross-device sync: the resolve_locale middleware cookie-sync is refactored into one sync helper that stamps both lc-theme and lc-density from the saved prefs.
  • Settings -> Appearance: a density picker (Comfortable/Compact) in the same form as theme - one save persists both. settings-density / density-* keys in en + es.
  • Compact CSS (main.css): [data-density="compact"] tightens non-follow-up message rows (py-2 rows; follow-ups are py-0 and excluded via :not, so no template edit) and inter-block markdown spacing.
  • Readability baseline: body line-height: 1.5 + antialiasing, app-wide.

Remaining LC-194 polish (continuing)

Larger-text setting; deeper sidebar / enclave-switcher hierarchy refinement; empty-state copy + illustrations; a formal elevation/shadow-token system. The density toggle + readability baseline are the bounded, testable slice; the rest is open-ended visual work to layer on.

Verification

just test + just test-saas green (the routes_uploads failure under concurrent load is the documented flake - passes 12/12 run isolated; unrelated to this change). cargo fmt --all clean; i18n_catalog gate passes.

The concrete, testable core of the visual-polish pass: a persisted **comfortable/compact density toggle** (the named AC) mirroring the LC-191 theme infrastructure, plus a readability baseline. ## What lands - **Per-user density**: `users.density` column (auth migration 0026, parallel to `users.theme`) - `comfortable` (default/NULL) / `compact`; threaded through `UserRecord`/`User` + `set_user_density` + `User::density_or_default`. 0026 added to the 22 hand-rolled auth-pool test files. - **No-flash**: `base.html` bootstrap also sets `data-density` from the `lc-density` cookie / localStorage (default comfortable) before paint; exposes `window.__lcSetDensity` for instant apply. - **Cross-device sync**: the `resolve_locale` middleware cookie-sync is refactored into one `sync` helper that stamps **both** `lc-theme` and `lc-density` from the saved prefs. - **Settings -> Appearance**: a density picker (Comfortable/Compact) in the same form as theme - one save persists both. `settings-density` / `density-*` keys in en + es. - **Compact CSS** (`main.css`): `[data-density="compact"]` tightens non-follow-up message rows (`py-2` rows; follow-ups are `py-0` and excluded via `:not`, so no template edit) and inter-block markdown spacing. - **Readability baseline**: body `line-height: 1.5` + antialiasing, app-wide. ## Remaining LC-194 polish (continuing) Larger-text setting; deeper sidebar / enclave-switcher hierarchy refinement; empty-state copy + illustrations; a formal elevation/shadow-token system. The density toggle + readability baseline are the bounded, testable slice; the rest is open-ended visual work to layer on. ## Verification `just test` + `just test-saas` green (the `routes_uploads` failure under concurrent load is the documented flake - passes 12/12 run isolated; unrelated to this change). `cargo fmt --all` clean; `i18n_catalog` gate passes.
feat(ui): density toggle + readability/compact polish (LC-194)
All checks were successful
check-secrets / Nosey parker (push) Successful in 6s
check-secrets / TruffleHog (push) Successful in 7s
check-secrets / Kingfisher (push) Successful in 8s
check-secrets / Nosey parker (pull_request) Successful in 6s
check-secrets / Kingfisher (pull_request) Successful in 7s
check-secrets / TruffleHog (pull_request) Successful in 10s
Create release / Create release from merged PR (pull_request) Has been skipped
Check / clippy + fmt + tests (pull_request) Successful in 4m16s
b4f0e8c51a
The headline, testable piece of the visual-polish pass: a persisted comfortable/compact density toggle, mirroring the LC-191 theme infra, plus a readability baseline.

- users.density column (auth migration 0026, parallel to users.theme): "comfortable" (default/NULL) / "compact"; threaded through UserRecord/User + set_user_density + User::density_or_default; 0026 added to the 22 hand-rolled auth-pool test files.
- base.html bootstrap: also sets data-density no-flash from the lc-density cookie / localStorage (default comfortable); exposes window.__lcSetDensity for instant apply.
- resolve_locale middleware: the cookie-sync is refactored into one `sync` helper that stamps both lc-theme and lc-density from the saved prefs (cross-device).
- Settings -> Appearance: density picker (Comfortable/Compact) in the same form as theme; one save persists both. settings-density / density-* keys in en + es.
- main.css: [data-density="compact"] tightens non-follow-up message rows (py-2 rows; follow-ups are py-0 and excluded via :not, so no template change) and inter-block markdown spacing. Plus a readability baseline (body line-height 1.5 + antialiasing).

Remaining LC-194 polish (tracked as continuing): larger-text setting, deeper sidebar/enclave-switcher hierarchy refinement, empty-state copy + illustrations, and a formal elevation/shadow-token system.

just test + just test-saas green (routes_uploads' documented concurrent-load flake passes 12/12 isolated); cargo fmt --all clean; i18n_catalog gate passes.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
nrupard deleted branch feat/lc-194-density-polish 2026-05-27 22:05:21 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/lets-chat!240
No description provided.