Repository navigation
fix(traffic): keep the tracking snippet inside its dialog - #1206
Merged
Merged
Conversation
The snippet's dialog lays its content out on a grid, and a grid item can't be narrower than its content by default, so the one-line script tag widened the dialog past the screen. The snippet block can now shrink (min-w-0), and the tag wraps inside its box instead of scrolling, so the whole tag shows at any width. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Collaborator
Author
|
@gkhngyk Small layout fix: the snippet tag widened the dialog because a grid item can't shrink below its content; the block now has min-w-0 and the tag wraps in its box. Checked at 1440 px and 375 px. |
7 of 12 tasks
This was referenced Oct 19, 2026
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.
Summary
On AI Traffic, the tracking snippet's dialog (sources strip → Code / Install) let the script tag run past the dialog's edge.
DialogContentis a CSS grid. A grid item's min width isauto, so it can't shrink below its content. The snippet block holds one long, unbreakable<script …>line, and it widened the dialog past the screen.min-w-0, so it can be narrower than the tag.<pre>wraps withwhitespace-pre-wrap break-allinstead ofoverflow-x-auto, so the whole tag is visible inside its box at any width.The same block is used by the open banner, which now wraps the same way.
Related issue
None (user-reported: "the tracking code overflows its box").
Type of change
feat— New featurefix— Bug fixchore— Maintenance / dependenciesdocs— Documentation onlyrefactor— Code change that neither fixes a bug nor adds a featuretest— Adding or updating testsHow to test
scrollWidthequals itsclientWidth), and the page doesn't scroll horizontally.Unit test:
traffic/_snippet-code.test.tsxchecks:Checklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/) — 0 errors, the 6 existing warningsyarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)Also run:
yarn test(199 files, 1667 tests) andyarn build(placeholder env fromci.yml). Checked in the browser at 1440 px and at a phone width. Layout only; colors are unchanged.🤖 Generated with Claude Code