Repository navigation
fix(webview): fill the panel width on the loading screen and every page - #401
Draft
Sanjay Singh (san360) wants to merge 2 commits into
Draft
Sanjay Singh (san360) wants to merge 2 commits into
Sanjay Singh (san360) wants to merge 2 commits into
Conversation
The dashboard stopped at 1200 px (#content max-width, left-aligned), so a wide editor tab or canvas showed an empty band on the right: 528 px at 1920 px and 1168 px at 2560 px on every page, and the loading card sat off-centre. - Remove the #content max-width; the loading screen's tile field is full-bleed (no page padding while it is mounted, also during the ready summary). - Re-lay the tile grid out with a ResizeObserver on its container (rAF coalesced, disconnected when the dashboard replaces the loading screen), so the sidebar's width transition no longer leaves a stale column count. - Drop the page caps on Learning, SDLC, Achievements and the GitHub App pages; the Share tab keeps its 700 px card preview, now centred. - e2e: new full-width spec (1440/1920 fill, share centred, grid relayout without a window resize, no sideways scroll at 560 px); fix the harness GitHub App and flow-state mocks so those pages render. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the full-width dashboard layout changes.
No open issues 🎉
What changed in this PR
Makes the shared dashboard fill wide VS Code panels and Copilot app canvases, removing the empty right-hand band from the loading screen and data pages.
Changes:
- Removes global and page-level width caps, makes loading full-bleed, and keeps Share capped at 700 px and centred.
- Observes loading-container size changes so tiles reflow during sidebar transitions, with cleanup when loading ends.
- Adds layout regression coverage and corrects harness fixtures needed to render affected pages.
| File | Description |
|---|---|
tests/e2e/harness.html |
Corrects GitHub App and flow-state mock response shapes. |
tests/e2e/full-width.spec.ts |
Tests page widths, loading geometry, Share centring, and narrow-panel overflow. |
src/webview/styles.css |
Removes global content and Achievements width caps. |
src/webview/styles-pages.css |
Removes the SDLC cap and centres Share. |
src/webview/styles-loading.css |
Removes content padding while loading remains mounted. |
src/webview/styles-learning.css |
Removes the Learning page width cap. |
src/webview/styles-github-app.css |
Removes the shared GitHub App page width cap. |
src/webview/loading-grid-view.ts |
Adds container resize observation, frame-coalesced layout, and disposal. |
src/webview/loading-grid-view.test.ts |
Covers container resizing, replacement, and observer cleanup. |
src/webview/app.ts |
Disposes the loading grid before navigating to page content. |
changelog.d/401.md |
Documents full-width layouts, tile reflow, and Share centring. |
Review effort: Balanced
Contributor
Author
|
Copilot review round 1 (head b2f0ac7): approval recommended, no findings and no threads, so the review loop stops here. CI verify, CodeQL and dependency review are green. Width decisions (no global cap; Share stays 700 px, centred) are recorded in the description. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
On a wide editor tab or canvas the dashboard left an empty band on the right: the loading screen's tile field stopped at ~1,170 px with the card centred in that area, and every page stopped at the same edge. This PR makes the loading screen and every page fill the panel, in both hosts (the VS Code webview and the Copilot app canvas share
dashboard-shell.tsandstyles.css).Root causes
#content { max-width: 1200px }(left-aligned, from the initial commit). Every page and the loading screen live in#content, so anything wider than 1,200 px + sidebar got an empty band: 528 px at 1,920 px and 1,168 px at 2,560 px on every page; in loading mode (sidebar 0 px) 748 px / 1,388 px, with the card 360 px / 680 px left of centre.window.resize.layoutWorkspaceGrid()sizes rows/columns from the tile field's size, but the field also changes width without a window resize: the sidebar animates its width (280 ms) when loading mode starts and again when it ends during the ready summary. The cap hid this at wide widths; without the cap the grid kept a stale column count. It now uses aResizeObserveron the container (coalesced to one layout per frame,window.resizeonly as a fallback) and is disconnected when the dashboard replaces the loading screen.Design decisions (maintainer)
maintainAspectRatio: falsewith fixed-height containers and card grids useauto-fit/1frtracks, so wider panels add columns or longer axes instead of stretching anything tall. Prose keeps its existingch-based line-length limits (for example 68ch/70ch/90ch descriptions).#content:has(> .load-index) { padding: 0 }, which also covers the ready summary and fade-out after the shell leaves loading mode.#contentat 560 px onmainalready (the panel itself never scrolls sideways; the new spec checks that).Empty space right of the drawn content, per page and width (synthetic e2e harness data, px;
main→ this PR)Measured from painted boxes and text runs inside
#content, after the sidebar transition settles. 28 px is the content padding.At 560 px nothing changes: the sidebar takes 220 px and the cap never applied. The tile grid's column count matched its container at every width after the change (e.g. 54 → 67 columns at 1,920 px). Coding Moments and Data Explorer only show centred empty or error states in the harness (no mock data) and have no page cap. The same measurement on real local data through the canvas host gave the same before/after pattern (every page 528 → 28 px at 1,920 px; loading field 748 → 0 px).
Tests
loading-grid-view.test.ts): the grid re-lays out when its container widens without a window resize, and a replacement container is observed while the old one isn't, with disconnect on dispose. Both fail onmain(expected 24 to be greater than 24; no observer created).full-width.spec.ts, new): at 1,440 and 1,920 px the tile field spans the panel and the card is centred, and every page (16 pages/sub-tabs) reaches the right padding after the sidebar settles; the Share card stays ≤ 700 px and centred; at 1,024 px the grid re-lays out when the sidebar returns without a window resize; at 560 px neither the loading screen nor any page scrolls the panel sideways.delivery/workspacePrCohorts), which also threw before the issue-credits snapshot applied; the flow-state mock lackedsuggestions/overallFlowScore, which crashed Level Up → Learning.Validation
npx vitest run src/webview/loading-grid-view.test.tsmain's grid code)npm run checkmain), spellcheck 0 issues, knip clean, 4,220 tests passed, 5 skippednpm run buildnpm run check-sizedist/extension.js1.86 MB, within 2 MB)E2E_PORT=<free port> npx playwright test tests/e2e/full-width.spec.tsE2E_PORT=<free port> npx playwright test --workers=2(full suite)navigation.spec.ts"page content changes on navigation", a pre-existing timing flake (with--repeat-each=5: this branch 20/20 passed,main16/20)npm run packagethennpm run test:vscode -- --vsix ai-engineer-coach-0.1.0.vsixRelated Issues
None filed; reported directly by a user ("Why is there a blank space on the right? Why isn't it full screen?"), on the loading screen from #393 and on the dashboard pages.
Checklist
npm run checkpasses (typecheck + lint + spellcheck + knip + tests)changelog.d/<PR number>.mdfragment