Skip to content

fix(hub-ui): prevent popup dock rails from scrolling out of view - #360

Open
SaKaNa-Y wants to merge 1 commit into
devframes:mainfrom
SaKaNa-Y:fix/hub-ui-popup-scroll-containment
Open

fix(hub-ui): prevent popup dock rails from scrolling out of view#360
SaKaNa-Y wants to merge 1 commit into
devframes:mainfrom
SaKaNa-Y:fix/hub-ui-popup-scroll-containment

Conversation

@SaKaNa-Y

@SaKaNa-Y SaKaNa-Y commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Problem

In the popup dock, opening an ungrouped dock entry such as UnoCSS before switching to Vite+ → Vite or Rolldown → Modules Graph → Graph can scroll the entire layout left and move the primary dock rail out of view. Opening Graph directly does not reproduce the same overflow. The standalone viewer uses the same DockStandalone component and is also affected.

Inactive iframe panes retain their previous dimensions. Adding the 48px group sidebar narrows the active content viewport, while the previously opened pane remains 48px wider. That pane's overflow reaches the outer grid, where overflow: hidden still permits programmatic scrolling. Graph's node-centering scrollIntoView() can then scroll the dock layout along with the graph.

Fix

Use overflow: clip on the outer DockStandalone grid and its sized content viewport. The content boundary contains retained panes, and the outer boundary keeps the dock rails anchored. Iframe state, retained dimensions, and scrolling inside each panel are preserved.

This extends the containment approach used for edge mode in #220 and #255 to the layout shared by popup and standalone views. The change is limited to two class edits in DockStandalone.vue.

Verification

  • pnpm lint — passed.
  • pnpm knip — passed.
  • pnpm test — 128 test files passed; 1457 tests passed, 9 skipped.
  • pnpm typecheck — passed.
  • pnpm build — passed.
  • Chrome reproduction before the fix: the standalone grid had clientWidth=1210, scrollWidth=1258, and changed from scrollLeft=0 to 48 after opening Graph.
  • Chrome verification with the rebuilt Hub UI against the same Vite DevTools playground: the standalone grid remained at scrollLeft=0 with no horizontal overflow after UnoCSS → Vite Graph and List → Graph. The inactive iframe retained its wider dimensions, and list content still scrolled internally.
  • Popup verification: UnoCSS → Vite+ → an existing Rolldown build session → Modules Graph retained both dock rails in view.

The browser regression was checked interactively; no new automated browser test was added.

Retained iframe panes can remain wider than the active viewport after a
group sidebar appears. Their overflow lets Graph node centering scroll
the outer DockStandalone grid and move the primary dock rail offscreen.

Clip the outer grid and sized content viewport to contain retained panes
and prevent programmatic scrolling of the dock layout while preserving
iframe state and internal panel scrolling.
@coldtea-pr-lens

coldtea-pr-lens Bot commented Sep 5, 2026

Copy link
Copy Markdown

◈ PR Lens

🟢 +0 new · 🟠 ~1 changed · 🔴 -0 removed · 0 flows · 1 file · commit ea61460


Architecture

Architecture diagram for devframes/devframe at ea61460

1 component touched across 3 lanes.

Open full size


Data flow

No data-flow sequence changed in this PR.


Drill down
Client Runtimes & UI — 1 component
🟡 CHANGED Dock UI & Web Component

Renders standalone and embedded dock interfaces with overflow clipping on view containers.


View

  • Architecture lens
  • Data flow lens
  • Expand every detail
  • Show unchanged neighbours

Tip

Would you rather run it from CI on a key of your own? Add .github/workflows/pr-lens.yml with coldteadotai/pr-lens/packages/action@v0 and a model key in your repository secrets, say GEMINI_API_KEY. The Action asks Gemini by default, or OpenAI and any endpoint speaking /chat/completions through its provider input.

🪧 More tips
  • Run PR Lens on your own machine: npx skills add coldteadotai/pr-lens installs the agent skill. Then tell your coding agent: "Diagram the change you just made with PR Lens and attach it to the pull request."
  • Draw a diff before it is even a pull request: npx @coldtea/pr-lens-cli analyze --base origin/main reads the diff with your own model key, and npx @coldtea/pr-lens-cli render .pr-lens/graph.json draws the same lenses on your machine.
  • The boxes under View are live. Tick Architecture lens or Data flow lens to choose which diagrams appear, or Expand every detail to open every drill-down at once. The comment redraws in place a few seconds later.
  • Show unchanged neighbours lists the components this change did not touch alongside the ones it did, so the drill-down shows what the changed code sits next to.
  • GitHub will not let you zoom an image in a comment. The link under each diagram opens it full size on a page of its own, where you can.
  • The CLI's render picks up .github/pr-lens.yml automatically and applies your corrections (renames, exclusions, lane pins) at draw time.
  • PR Lens is free for open source. A star on the repository is what keeps it going.
  • Push a new commit and the whole comment re-renders for the new head. An older run never overwrites a newer one, so a slow render cannot put a stale diagram back.
  • The diagrams follow your GitHub theme, so dark mode gets the dark render and light mode the light one, and the moving dots show this pull request's data in motion.

◈ Rendered by PR Lens · crafted with ❤️ by the Coldtea team · Come say hi on Discord

@vercel

vercel Bot commented Sep 5, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
devframe Skipped Skipped Sep 5, 2026 3:53am UTC

@SaKaNa-Y

SaKaNa-Y commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

This PR fixes the remaining issue with the Vite and Rolldown module graphs in popup mode that I mentioned in vitejs/devtools#521. Popup mode now works as expected in my testing.

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