Skip to content

fix(playground): improve Compare response scrolling and copy actions - #13317

Merged
diegosouzapw merged 2 commits into
diegosouzapw:release/v3.8.51from
ventulus95:fix/playground-compare-vertical-scroll
Sep 18, 2026
Merged

diegosouzapw merged 2 commits into
diegosouzapw:release/v3.8.51from
ventulus95:fix/playground-compare-vertical-scroll

Conversation

@ventulus95

Copy link
Copy Markdown
Contributor

Summary

  • constrain the Compare grid and flex height chain so every model response body owns its vertical overflow while preserving the horizontal layout
  • keep the model name, status, metrics, and actions outside the scrolling response body
  • cover long-response independent scrolling and user-controlled streaming follow behavior in Playwright
  • add a per-model copy action beside the remove action, including disabled and success states
  • remove the Compare component tests from the Vitest exclusion list so the regression suite actually runs

Root cause

The response body already used overflow-y-auto, but its grid/flex ancestors did not consistently allow shrinking. Without min-h-0 through the height chain and a bounded grid row, the response content expanded the panel instead of producing an internal scroll area.

Before the fix, browser measurements showed clientHeight === scrollHeight === 4308 for long output even though computed overflow was auto.

Validation

  • Compare component Vitest suite: 20 tests passed
  • focused Playwright tests in system Google Chrome: 2 tests passed
    • long responses scroll independently while headers and metrics stay fixed
    • streaming does not force the user back to the bottom after scrolling up
  • npm run lint: passed with only the existing suppression notice
  • npm run typecheck:core: passed
  • Prettier and git diff --check: passed
  • repository pre-commit checks passed for both commits

Fixes #13316

@diegosouzapw

Copy link
Copy Markdown
Owner

Thanks for this — the copy-to-clipboard addition on individual Compare columns is a nice,
well-tested UX improvement (reusing the existing useCopyToClipboard hook is exactly right).
Heads up though: the scrolling half of this PR (the min-h-0/overflow changes to
CompareColumn.tsx and CompareTab.tsx) was already fixed and merged separately in #13532, and
the vitest.config.ts exclusion-list hunk is also already gone on the current tip (via #13204).
Could you rebase onto release/v3.8.51 so the diff narrows down to just the copy-button feature
and its test? That should resolve the current merge conflict too. Full credit for the feature is
yours either way — just want to avoid double-applying/reverting the already-merged scroll fix.

@ventulus95
ventulus95 force-pushed the fix/playground-compare-vertical-scroll branch from 74c12f6 to 6a18966 Compare September 15, 2026 14:48
@ventulus95

Copy link
Copy Markdown
Contributor Author

Done — I rebased the branch onto the latest release/v3.8.51 and removed the already-merged scrolling and Vitest configuration changes. The diff is now limited to the per-column copy action and its unit tests. Thanks for the guidance!

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
@diegosouzapw

Copy link
Copy Markdown
Owner

Thanks @ventulus95 — merging via the release merge-train. Validated in local merge-train (merge-train-20260918-120911-suite.log) on the devbox @ train tip 8c305709478b7052fb981a75852bbf88fe3a959d with the sibling PRs of this batch: typecheck:core, file-size, complexity, cognitive-complexity, changelog-integrity green; changed-area node:test 310/311 (the single red, hard-lease inventory, reproduces on the pure release tip) + vitest green (fast parity mode — full suite ran today on the tip via the base-red and 3b trains). Merged --admin per merge-gates §4/§7.

@diegosouzapw
diegosouzapw merged commit a9c62ba into diegosouzapw:release/v3.8.51 Sep 18, 2026
3 checks passed
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…iegosouzapw#13317)

* feat(playground): copy individual compare responses

* docs(changelog): add fragment for Compare column copy-to-clipboard

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>

---------

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
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.

fix: Playground Compare response panels should scroll independently

2 participants