Skip to content

fix(profile): let the web profiling page follow the browser window size - #467

Merged
kalvinnchau merged 1 commit into
mainfrom
peon/profile-resize
Sep 30, 2026
Merged

kalvinnchau merged 1 commit into
mainfrom
peon/profile-resize

Conversation

@kalvinnchau

@kalvinnchau kalvinnchau commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Problem

bin/just web profile opens Chrome, but the app stays at a fixed size inside the window and ignores window resizing.

scripts/profile-dev.mjs created its page with browser.newPage(), which applies Playwright's default emulated 1280x720 viewport. The window resizes; the page inside it does not.

Change

Open the profiling page with viewport: null so it tracks the real window size.

Evidence

  • Headed Chrome, window resized over CDP (Browser.setWindowBounds), reading innerWidthxinnerHeight:

    page options window 900x700 window 1500x900
    default 1280x720 1280x720
    { viewport: null } 900x613 1500x813
  • bin/just web profile --network --trace run by Kalvin against a live relay with this change: the app follows the window.

  • node --test tests/integration/profile-dev.test.mjs: 35 pass, 0 fail.

  • biome check scripts/profile-dev.mjs: clean.

Not covered

No regression test added. The profile-dev suite drives a fake browser, so a test could only assert that the option is passed, not that the page resizes.

The profiler opened its page with Playwright's default emulated 1280x720 viewport, so the app stayed that size no matter how the Chrome window was resized. Disable viewport emulation so the page tracks the window.

Co-authored-by: peon <9ac6794b000690b7e814eb1805ad32405d0bec7d52838de3a86cf967565dacc0@buzz.block.builderlab.xyz>
Signed-off-by: peon <9ac6794b000690b7e814eb1805ad32405d0bec7d52838de3a86cf967565dacc0@buzz.block.builderlab.xyz>
@kalvinnchau
kalvinnchau requested review from a team, comp615 and wesbillman as code owners September 30, 2026 18:53
@kalvinnchau
kalvinnchau merged commit 6b4816d into main Sep 30, 2026
63 of 70 checks passed
@kalvinnchau
kalvinnchau deleted the peon/profile-resize branch September 30, 2026 19:43
cynfria pushed a commit that referenced this pull request Sep 30, 2026
…followup

* origin/main:
  Group inventory by community and use compact rows outside the current community (#290)
  chore: enable Cmd+R reload in production builds (#468)
  ci: run playwright jobs in the pinned docker image (#469)
  fix(profile): let the web profiling page follow the browser window size (#467)
  Let plugin pages publish NIP-AR artifacts and embed the host thread view (#434)

Signed-off-by: Tree Trunks <6ba22921d9dc2ad0aa6ecdf63787ddd24726e266d866da31af69f2e4e146ace5@buzz.block.builderlab.xyz>
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.

2 participants