Skip to content

🐛 fix(ui): repair mobile Dashboard and Containers layouts (#498)#586

Merged
scttbnsn merged 8 commits into
mainfrom
feat/v1.6-498-mobile-ci
Jul 24, 2026
Merged

🐛 fix(ui): repair mobile Dashboard and Containers layouts (#498)#586
scttbnsn merged 8 commits into
mainfrom
feat/v1.6-498-mobile-ci

Conversation

@scttbnsn

@scttbnsn scttbnsn commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Folds today's outstanding fixes into the staged-but-uncut v1.6.0-rc.5 tree so the 7-day soak covers them. The 2026-07-22 rc.5 cut was cancelled before publishing; this re-stages the same rc.5 identity with the fixes added, then rc.5 is re-cut from main after merge.

What's here

  • fix(ui) Alert: Pinned tag "1.5.2-rc.1" is compared by digest only. Set dd.tag.family=loose or add a dd.tag.include filter to allow semver version climbing. #498 — mobile layout. The reporter's iPhone 16 (~393px) hit a broken layout on both Dashboard and Containers.
    • Dashboard re-syncs the active widget layout when crossing into a single-column breakpoint, so widgets stop spilling past the viewport (measured scrollWidth 944→377 at 393px).
    • DataTable single-column card mode uses auto grid rows instead of 1fr, killing the empty band below reflowed cards.
    • The Containers group header truncates long stack names and pins the update-all button (truncate min-w-0 / shrink-0 / whitespace-nowrap) so it stops getting clipped off-screen.
    • Verified in the live demo app via Playwright at 393×852; desktop is unaffected.
  • chore(ci). Bump github/codeql-action v4.36.2→v4.36.3 and actions/cache v5.0.5→v5.1.0 (SHA-pinned), plus a sync of the actions/cache pin fixture in .github/tests/github-action-pins.ts that the workflow-pin test asserts against.
  • security(web). Bump the postcss build-dependency override to 8.5.22, closing CVE-2026-45623 (GHSA-6g55-p6wh-862q) — a pre-existing repo-wide osv-scanner finding that was failing every push off main. Merging this unblocks the gate for everyone.
  • docs(changelog). Entries under the existing [1.6.0-rc.5] heading (Fixed: mobile layout; Security: postcss).

Testing

  • 7 regression tests (single-column card auto rows + parseCardMinWidthPx px/rem/em/invalid/zero branches, dashboard breakpoint re-sync, group-header truncation classes).
  • Full pre-push gate green: app + ui coverage 100%, both builds, scripts/workflow/web-scripts tests, qlty, zizmor. apps/web npm audit clean after the postcss bump.

Changelog

  • 🐛 Fixed mobile Dashboard layout synchronization to prevent widget overflow at the single-column breakpoint.
  • 🐛 Fixed DataTable card-mode grid sizing by deriving gridAutoRows (auto vs 1fr) to eliminate excess vertical space in responsive reflows, including cardMinWidth handling for px/rem/em and fallback behavior.
  • 🐛 Fixed Containers group header layout so long names truncate (min-w-0) and update controls remain visible (including non-wrapping “update all” button styling).
  • 🔧 Updated github/codeql-action to v4.36.3 and actions/cache to v5.1.0, including SHA-pinned fixture updates across workflows/tests.
  • 🔒 Security: Updated postcss override to 8.5.22 to address CVE-2026-45623.
  • ✨ Added regression tests covering Dashboard breakpoint/layout re-sync, DataTable single-column detection via cardMinWidth unit conversion + fallback rules, and ContainersGroupHeader truncation/button layout.

Concerns

  • Confirm the postcss override version (8.5.22) and the intended CVE reference align with the project’s dependency resolution strategy.
  • Verify all github/codeql-action / actions/cache SHA pins and expected fixtures remain consistent across workflows and the pin-test file.
  • Ensure the new DataTable unit-conversion heuristics for rem/em match the intended browser baseline font assumptions.

scttbnsn added 5 commits July 23, 2026 18:30
- 🐛 fix(ui): re-sync active dashboard layout on breakpoint change so widgets stop overflowing the 1-column grid on phones
- 🐛 fix(ui): use auto card-grid rows in single-column card mode to kill the empty band below reflowed cards
- 🐛 fix(ui): truncate long group names and keep the update-all button from clipping in the containers group header
- ✅ test(ui): cover breakpoint re-sync, card-grid row mode, and group-header truncation
- 🔧 chore(ci): github/codeql-action v4.36.2 → v4.36.3 (SHA-pinned)
- 🔧 chore(ci): actions/cache v5.0.5 → v5.1.0 (SHA-pinned)
@vercel

vercel Bot commented Jul 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
drydock-website Ready Ready Preview, Comment Jul 23, 2026 11:54pm
drydockdemo-website Ready Ready Preview, Comment Jul 23, 2026 11:54pm

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@scttbnsn, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 2 minutes

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

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 0635ea2e-a720-4271-ad24-fa45eff99b72

📥 Commits

Reviewing files that changed from the base of the PR and between 713fdf0 and 1744b1c.

⛔ Files ignored due to path filters (1)
  • CHANGELOG.md is excluded by !CHANGELOG.md
📒 Files selected for processing (4)
  • content/docs/current/updates/index.mdx
  • scripts/release-docs-identity.test.mjs
  • ui/src/components/DataTable.vue
  • ui/tests/components/DataTable.spec.ts
📝 Walkthrough

Walkthrough

Updates GitHub Action pins for cache and CodeQL, refreshes the PostCSS override, and changes responsive UI behavior. DataTable card mode now estimates columns and uses content-height rows for single-column layouts. Container group headers truncate names and keep badges and update controls fixed. Dashboard breakpoint changes resynchronize the active layout state, with tests covering each UI adjustment.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/v1.6-498-mobile-ci

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@ui/src/components/DataTable.vue`:
- Line 1094: Normalize the card minimum width used by the DataTable template’s
gridTemplateColumns binding so missing or invalid values use the same 320px
fallback as estimation. Update ui/src/components/DataTable.vue at lines
1094-1094 to use that normalized value, and update
ui/tests/components/DataTable.spec.ts at lines 1970-1979 to assert the rendered
layout includes minmax(320px, 1fr) or the equivalent computed style.
- Around line 474-480: The parseCardMinWidthPx function must not convert rem/em
using a fixed 16px value; resolve those units against the document’s computed
root/element font size so font-size presets are respected, or reject rem/em and
fall back to 320. Keep px and unitless values using their existing numeric
behavior.

In `@ui/tests/components/DataTable.spec.ts`:
- Around line 1958-1968: Update the rem and em single-column tests around
mountAtWidth to use a 700px viewport and assert the converted 30rem/30em widths
still produce one column, distinguishing them from the 320px fallback that would
produce two columns. Keep the tests focused on conversion behavior without
adding refactors or error handling.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a3dbf047-b550-4ad4-bf60-24f8d93967e3

📥 Commits

Reviewing files that changed from the base of the PR and between ec0ee18 and 884e18e.

⛔ Files ignored due to path filters (2)
  • CHANGELOG.md is excluded by !CHANGELOG.md
  • apps/web/package-lock.json is excluded by !**/package-lock.json, !**/package-lock.json
📒 Files selected for processing (12)
  • .github/tests/github-action-pins.ts
  • .github/workflows/ci-verify.yml
  • .github/workflows/quality-mutation-monthly.yml
  • .github/workflows/security-grype.yml
  • .github/workflows/security-scorecard.yml
  • apps/web/package.json
  • ui/src/components/DataTable.vue
  • ui/src/components/containers/ContainersGroupHeader.vue
  • ui/src/views/dashboard/useDashboardResponsiveLayouts.ts
  • ui/tests/components/DataTable.spec.ts
  • ui/tests/components/containers/ContainersGroupHeader.spec.ts
  • ui/tests/views/dashboard/useDashboardWidgetOrder.spec.ts

Comment thread ui/src/components/DataTable.vue Outdated
Comment thread ui/src/components/DataTable.vue
Comment thread ui/tests/components/DataTable.spec.ts
@scttbnsn

Copy link
Copy Markdown
Contributor Author

Thanks @coderabbitai. Went through all three:

1. Normalize the template's gridTemplateColumns to the 320px fallback (DataTable.vue:1094) — skipping. cardMinWidth is never overridden anywhere in ui/src; every DataTable uses the '320px' default, so there's no invalid value to normalize away in practice. More importantly, the template passes the raw CSS length on purpose so the browser resolves valid units (rem/em) natively at the actual root font size. Forcing it through parseCardMinWidthPx would bake a fixed-16px assumption into the real layout, which is worse than what's there. The 320 fallback lives in parseCardMinWidthPx only to keep the column-count math finite for the auto-vs-1fr row decision, not to drive layout.

2. Resolve rem/em against the computed root font size instead of 16px (DataTable.vue:474-480) — skipping. parseCardMinWidthPx is a row-mode heuristic (single column → auto rows, otherwise 1fr), and the comment already notes an off-by-one near a boundary is harmless. The UI renders on a fixed 16px Tailwind root, so 16px is correct here, and pulling getComputedStyle into a heuristic isn't worth the DOM coupling.

3. Strengthen the rem/em conversion tests — good catch, done (713fdf03). You're right that at 500px both the real 30rem → 480px and the 320px fallback yield one column, so those tests couldn't have caught a conversion regression. Bumped them to 700px, where the conversion (480px → 1 column → auto) and the fallback (320px → 2 columns → 1fr) diverge, so they now actually pin the conversion.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

data_table=$(fd -a '^DataTable\.vue$' ui/src/components | head -n1)
data_table_test=$(fd -a '^DataTable\.spec\.ts$' ui/tests/components | head -n1)

printf '%s\n' '--- DataTable relevant symbols ---'
ast-grep outline "$data_table" --items all --match 'parseCardMinWidthPx|cardColumnCount|cardGridAutoRows' --view expanded || true

printf '%s\n' '--- DataTable implementation excerpts ---'
rg -n -A18 -B10 'parseCardMinWidthPx|cardColumnCount|cardGridAutoRows|gridTemplateColumns' "$data_table"

printf '%s\n' '--- Card-mode regression test excerpts ---'
rg -n -A18 -B8 "30rem|30em|700|grid-auto-rows|cardMinWidth" "$data_table_test"

printf '%s\n' '--- Confirm claimed test-change commit ---'
git show --format=fuller --stat 713fdf03 -- "$data_table_test"
git show --format= --unified=12 713fdf03 -- "$data_table_test"

Length of output: 18460


@scttbnsn Verified.

  • Keeping raw cardMinWidth in gridTemplateColumns is correct; it preserves browser-native CSS unit resolution.
  • parseCardMinWidthPx() is only used for the auto-row heuristic. With the fixed 16px root, rem/em conversion does not need DOM-derived sizing.
  • 713fdf03 fixes the regression-test gap. At 700px, 30rem/30em evaluates to 480px and produces one column; the 320px fallback produces two. The tests now distinguish conversion from fallback behavior.

✏️ Learnings added
Learnt from: scttbnsn
URL: https://github.com/CodesWhat/drydock/pull/586

Timestamp: 2026-07-23T23:12:37.415Z
Learning: In `ui/src/components/DataTable.vue`, the `cardMinWidth` prop is intentionally passed raw to CSS `gridTemplateColumns` so browser-native units such as `rem` and `em` resolve in the actual layout. `parseCardMinWidthPx` is only a single-vs-multi-column heuristic for `cardGridAutoRows`; it uses the application's fixed 16px Tailwind root size. No `DataTable` usage under `ui/src` overrides the default `cardMinWidth` of `320px`.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


If you found this review helpful, would you consider giving us a shout-out on X?

Thank you for using CodeRabbit!

scttbnsn added 2 commits July 23, 2026 19:47
- `--dd-font-size` scales the document root (0.8-1.3 presets), so the
  row-mode heuristic must resolve rem/em against the live computed root
  font size to match the browser's minmax() resolution (CodeRabbit PR #586
  finding), instead of assuming a fixed 16px root.
@scttbnsn

Copy link
Copy Markdown
Contributor Author

Following up on my earlier reply @coderabbitai, I got finding 2 wrong and just fixed it (aff43615).

2. Resolve rem/em against the computed root font size (revisited) — you were right. I claimed the UI renders on a fixed 16px Tailwind root, so amount * 16 was fine. That's not true: the app scales the document root with font-size: calc(16px * var(--dd-font-size)) (ui/src/style.css), and users can set --dd-font-size to a preset between 0.8 and 1.3. So at anything other than the default scale, rem/em don't resolve against 16px, and the heuristic disagreed with the browser's actual minmax() layout. parseCardMinWidthPx now resolves those units against getComputedStyle(document.documentElement).fontSize (falling back to 16 only when that's unparseable), which is the same value the browser uses for the template binding. Added two tests pinning the scaled-root conversion and the fallback branch.

1. Normalize the template's gridTemplateColumns (still skipping). cardMinWidth is never overridden anywhere in ui/src — every DataTable uses the '320px' default — so there's no invalid value to normalize in practice, and the template intentionally passes the raw CSS length so the browser resolves valid units natively. With the finding-2 fix, the JS heuristic and the template now both resolve rem/em against the real root, so they stay consistent; the 320 fallback exists only to keep the column-count math finite, not to drive layout.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

@scttbnsn Finding 2 is addressed. Using the computed document-root font size aligns the row-mode heuristic with CSS minmax() resolution at user-selected scale factors; the 16px fallback covers an unparseable computed value. The added scaled-root and fallback tests cover both branches.


✏️ Learnings added
Learnt from: scttbnsn
URL: https://github.com/CodesWhat/drydock/pull/586

Timestamp: 2026-07-23T23:53:20.486Z
Learning: In `ui/src/components/DataTable.vue`, `parseCardMinWidthPx` must resolve `rem` and `em` card widths using `getComputedStyle(document.documentElement).fontSize`, because `ui/src/style.css` scales the document root via `--dd-font-size` (0.8–1.3 presets). It falls back to 16px only if the computed root font size cannot be parsed. The parser remains a `cardGridAutoRows` heuristic, while raw `cardMinWidth` is intentionally passed to CSS `gridTemplateColumns`.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

@biggest-littlest biggest-littlest left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approving the rc.5 fold-in: #498 mobile layout fixes (Dashboard + Containers), SHA-pinned CI action bumps, postcss CVE-2026-45623 remediation, and the rem/em root-font-scale fix. Full CI green, CodeRabbit findings addressed.

@ALARGECOMPANY ALARGECOMPANY left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approving the rc.5 fold-in: #498 mobile layout fixes (Dashboard + Containers), SHA-pinned CI action bumps, postcss CVE-2026-45623 remediation, and the rem/em root-font-scale fix. Full CI green, CodeRabbit findings addressed.

@scttbnsn
scttbnsn merged commit e4f4be2 into main Jul 24, 2026
28 checks passed
@scttbnsn
scttbnsn deleted the feat/v1.6-498-mobile-ci branch July 24, 2026 00:17
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.

3 participants