Skip to content

fix(dashboard): scrollbar gutter gap and loading state overflow#6189

Draft
dave-hawkins wants to merge 1 commit into
mainfrom
scrollbar-fix
Draft

fix(dashboard): scrollbar gutter gap and loading state overflow#6189
dave-hawkins wants to merge 1 commit into
mainfrom
scrollbar-fix

Conversation

@dave-hawkins
Copy link
Copy Markdown
Collaborator

@dave-hawkins dave-hawkins commented May 14, 2026

What does this PR do?

Fixes two scrollbar glitches in the dashboard app shell.

  • scrollbar-gutter: stable on the main content pane created a permanent gutter on every route, which showed as an empty gap down the right side of pages that don't scroll:

  • LoadingState was h-dvh (full viewport height) but is used as a Suspense fallback inside the content pane, which is shorter than the viewport — so on page load the fallback overflowed the pane and flashed a vertical scrollbar before the real content swapped in.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (refactoring code, technical debt, workflow improvements)
  • Enhancement (small improvements)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Screenshots

Before:

CleanShot 2026-05-14 at 17 02 30@2x

After:

CleanShot 2026-05-14 at 17 03 22@2x

yay - no space!

How should this be tested?

  • On a route that doesn't scroll (e.g. /projects with few projects), confirm there's no empty gap on the right edge of the content area.
  • Hard-refresh dashboard routes and confirm no scrollbar flashes in the content area during load.
  • Confirm the workspace-loading screen and in-page loading fallbacks still fill their space with the spinner centered.

Verified in-browser by measurement: the old h-dvh fallback rendered 665px tall inside a 613px content pane (overflow → scrollbar); the new flex-1 fallback fills the pane exactly (no scrollbar) and keeps the spinner centered. The load-time flash itself was not caught visually — on localhost the Suspense data resolves in under a frame — so the before/after here is measurement-based, not a recording.

Checklist

Required

  • Filled out the "How to test" section in this PR
  • Read Contributing Guide
  • Self-reviewed my own code
  • Commented on my code in hard-to-understand areas
  • Ran pnpm build
  • Ran pnpm fmt
  • Ran make fmt on /go directory
  • Checked for warnings, there are none
  • Removed all console.logs
  • Merged the latest changes from main onto my branch with git pull origin main
  • My changes don't cause any responsiveness issues

Appreciated

  • If a UI change was made: Added a screen recording or screenshots to this PR
  • Updated the Unkey Docs if changes were necessary

Remove scrollbar-gutter: stable from the content pane; it reserved a
permanent gutter, showing as a gap on routes without a scrollbar.

Size LoadingState with flex-1 instead of h-dvh so it fills its
container rather than the viewport. As a Suspense fallback inside the
content pane it was 100dvh tall in a shorter pane, flashing a scrollbar
on load. The standalone usage in (app)/layout is wrapped in an h-dvh
container so it still fills the screen there.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 14, 2026

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

Project Deployment Actions Updated (UTC)
dashboard Ready Ready Preview, Comment May 14, 2026 2:20pm

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 14, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 70501b0b-0289-46c6-b8b8-62b3ae965c4f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch scrollbar-fix

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 and usage tips.

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