Repository navigation
Tighten Download for Mac divider padding - #7257
Conversation
Pull the split-button divider closer to the caret across both sizes. Default: caret zone px-2.5 -> px-2, download zone pr-3 -> pr-[11px]. Small: caret zone px-2 -> pl-1.5 pr-2, download zone pr-2.5 -> pr-2. Layout only; no copy or behavior change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthrough
ChangesDownload Button Padding Overrides
DownloadButtonDebug Preview Page
Estimated code review effort: 3 (Moderate) | ~25 minutes 🚥 Pre-merge checks | ✅ 25✅ Passed checks (25 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR tightens the "Download for Mac" split-button spacing and fixes a Safari-only hover jump by removing CSS transitions from the hover tint and caret opacity. Padding is moved from Tailwind arbitrary-value classes to a per-size
Confidence Score: 5/5Safe to merge — changes are purely visual padding adjustments and a deliberate transition removal to fix a Safari rendering bug, with no behavioral or copy changes. The diff only touches horizontal padding values and removes CSS transition properties. The PILL_PADDING constant is a pure immutable config, inline styles are handled correctly (React appends px to unitless numeric length values), and the transition removal is intentional and well-documented to address a confirmed Safari compositing-layer bug. No new strings, no logic changes, no accessibility regressions. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[DownloadButton render] --> B{size === 'sm'?}
B -- yes --> C[pad = PILL_PADDING.sm]
B -- no --> D[pad = PILL_PADDING.default]
C --> E[downloadStyle inline px]
D --> E
C --> F[caretStyle inline px]
D --> F
E --> G{onConfirmationPage?}
G -- yes --> H[a href=macHref style=downloadStyle]
G -- no --> I[Link href=macHref style=downloadStyle]
H --> J[Divider div]
I --> J
J --> K[Menu.Trigger style=caretStyle - no transition-colors - no transition-opacity on caret SVG]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[DownloadButton render] --> B{size === 'sm'?}
B -- yes --> C[pad = PILL_PADDING.sm]
B -- no --> D[pad = PILL_PADDING.default]
C --> E[downloadStyle inline px]
D --> E
C --> F[caretStyle inline px]
D --> F
E --> G{onConfirmationPage?}
G -- yes --> H[a href=macHref style=downloadStyle]
G -- no --> I[Link href=macHref style=downloadStyle]
H --> J[Divider div]
I --> J
J --> K[Menu.Trigger style=caretStyle - no transition-colors - no transition-opacity on caret SVG]
Reviews (8): Last reviewed commit: "Remove /debug tuner and padOverride prop..." | Re-trigger Greptile |
Give the rounded pill its own backing layer via [transform:translateZ(0)]. Safari does not clip the zones' `transition-colors` hover tint to the `rounded-full` corners once that tint animates into its own compositing layer, so on hover the tint leaked past the corners as square edges (Chrome clips it correctly, so it only reproduced in Safari). Promoting the clip container makes the zones composite inside its clip. Verified in Safari with a static repro forcing the composited-child state: square corner leak without the transform, clean rounded corners with it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Padding: shave 1px from each side of the divider per size (default label->divider 11->10px, divider->caret 8->7px; small 8->7px, 6->5px). Hover jump: drop the CSS transitions on the hover tint (zones) and the caret opacity. Animating them promoted the sub-pixel-positioned zone/icon into a WebKit compositing layer that snapped to the device-pixel grid, so the label/caret visibly jumped on hover (Safari only, worst at the small size). Instant hover states never promote, so the pill stays stable. The pill keeps its translateZ(0) backing layer to guard the rounded-corner clip of the tint. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Remove the `[transform:translateZ(0)]` from the pill. Forcing the pill onto a GPU layer makes WebKit re-rasterize the sub-pixel-positioned zones on every hover repaint and snap them to the device-pixel grid, which is the label/caret "jump" on hover (Safari only, worst small). The layer was added for the corner-tint clip, but that clip only broke while a CSS transition promoted the child; with the transitions already removed, the child never gets its own layer, so overflow-hidden clips correctly without the forced layer. Verified a promoted zone snaps its pixels (compare AE>0) vs an unpromoted one. Add an opt-in `padOverride` prop (inline padding, undefined in prod so rendering is unchanged) and a /debug page that renders both sizes live, drives their divider padding with sliders, and has diagnostic toggles (re-add transition / force translateZ) that should reintroduce the jump, to confirm the cause with a real pointer. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@web/app/`[locale]/debug/page.tsx:
- Around line 1-40: The debug tuner page in DownloadButtonDebug is exposed as a
production route because it has no runtime guard. Add a development-only gate at
the start of the page component (or equivalent route exclusion) so the `/debug`
route returns notFound() in production, and keep the existing DownloadButton
debug UI available only in non-production environments.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: aa5b7a4e-48de-42bc-baa1-c967d280d603
📒 Files selected for processing (2)
web/app/[locale]/components/download-button.tsxweb/app/[locale]/debug/page.tsx
default: pl-5 pr-2 / caret pl-1.5 pr-[7px] (20/8, 6/7) sm: pl-3 pr-[7px] / caret pl-[5px] pr-[7px] (12/7, 5/7) Sync /debug initial values to match. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The tuned values include odd px (5,7) that map to arbitrary Tailwind classes like pr-[7px]. That class silently did not resolve on the base-ui Menu.Trigger button, so the caret rendered padding-right:0 and the live button did not match the /debug tuner (which uses inline px via padOverride). Move padding into a per-size PILL_PADDING config applied as inline styles on both zones, so the exact values render identically in dev, prod, and /debug. padOverride now merges over the config. default: download 20/8, caret 6/7 sm: download 12/7, caret 5/7 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Default to 1x zoom and dark bg, and render each size next to its real neighbors (View on GitHub for default, Docs/Blog nav for sm) so padding is tuned at true on-screen scale. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
default: download 20/9, caret 7/11 sm: download 12/7, caret 5/9 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Tuning is done and the values live in PILL_PADDING. Drop the dev-only /debug page and the padOverride prop so production ships just the download button changes (padding config + hover-jump fix), no public /debug route. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ng, themes) Delta: #7318/#7319 mouse cursor-shape + right/middle drag forwarding, #7320 ghostty upstream, #6664 iOS themes, #7196 iOS scroll, #7257/#7307 web, #7329 CLI suggestions, #7222 codex resume update-suppression. Conflicts resolved keeping HEAD structure: - GhosttyTerminalView.swift: took main's viewDidEndLiveResize + resetCursorRects (cursor-shape #7318; ghosttyMouseShape/ghosttyMouseCursor already in HEAD). - Mobile/MobileHostService.swift: union (kept HEAD sharedRequestActivity + main publicStatusPayload theme payload #6664). - project.pbxproj: union-dedup, normalized; test-wiring green. - swift-file-length-budget.tsv regenerated. #7222 (codex update-check suppression) partially landed: the CMUXAgentLaunch package part (AgentResumeArgv.codexUpdateCheckSuppressionOverride) auto-merged and is present; the app-target files (+CodexUpdateCheck.swift + test) extend SurfaceResumeCommandCanonicalizer, a type HEAD dissolved into the CmuxWorkspaces package, so they can't compile and the suppression was never wired (call site was in the HEAD-deleted +PortableAgentExecutable). Removed those two files; re-wire recorded in merge-deferred-gaps. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Tighten the "Download for Mac" split-button divider spacing and fix a Safari-only hover jump. Layout only, no copy/behavior change.
What changed
PILL_PADDINGconfig applied as inline px (arbitrary Tailwind values likepr-[9px]did not resolve on the base-uiMenu.Trigger, so the caret rendered 0 right-padding). Values: default download20/9, caret7/11; sm download12/7, caret5/9.transition-colorson the zones,transition-opacityon the caret) and did not add a forcedtranslateZ(0)GPU layer. Either one made WebKit composite the sub-pixel-positioned zones and snap them to the device-pixel grid on hover, so the label/caret visibly jumped (Safari only, worst at the small size). Instant hover keeps the repaint on the main thread and matches Chrome.Testing
20px/9pxdownload,7px/11pxcaret; sm12px/7px,5px/9px.web-typecheckgreen; Vercel preview built.Single file:
web/app/[locale]/components/download-button.tsx.