Repository navigation
Conversation
The Date column used gap-1.5 between its label and button, while the Time column is a Label that already has gap-2, so the Date button sat 2px higher than the Time field. Use gap-2 on the Date column and add a layout test. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This PR makes a one-class spacing adjustment in the custom snooze dialog and adds a focused browser layout test. It changes only visual alignment, with no product-default, API, data, or request-path behavior changes. You can add or adjust custom eligibility rules. Learn more. |
Contributor
This branch has not been deployed
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.
Problem
On the Custom snooze dialog, in Date and time mode, the Date button sits 2px higher than the Time field. Reported by @miadotcx on X, who filed it as a "MAJOR bug" that makes T3 Code "completely unusable" and "possibly vulnerable to RCE": https://x.com/miadotcx/status/2112954163688587350
Severity assessment: critical, in the sense that it is critically crooked. It is purely cosmetic. There is no RCE, only RCE (Really Crooked Elements).
Cause: the two columns space their label and control differently.
divwithgap-1.5(6px) between a separateLabeland the button.Labelthat wraps its text and the input.Labelalready hasgap-2(8px).So the Date button starts 2px above the Time field. Duration mode is not affected: the amount field and the Unit label both use 8px already.
Change
The Date column uses
gap-2, matchingLabel. One class, no other layout change.I also added
CustomSnoozeDialog.layout.browser.test.tsx, which renders the dialog at 1280px wide and asserts the Date button and the Time field start at the sametop. It is named.layout.on purpose: #22433 adds aCustomSnoozeDialog.browser.test.tsxand I did not want the two PRs to collide.Scope and approval
This is a very small, focused fix for an obvious visual bug, so I am submitting it without a prior issue (CONTRIBUTING, "very small, focused fix for an obvious bug"). It changes one spacing class and no behavior. There is no GitHub issue for it; the report is the post above.
#22433 (24-hour time entry in custom snooze) edits the Time
Inputprops in the same block, around thetypeattribute. This PR only touches the Date column's wrapperdiva few lines above, so the two should merge without conflict.Verification
I measured the real component in the repo's own browser test project (headless Chromium,
~/index.cssloaded, so the actual Tailwind classes apply). I did not drive the full app: its dev server needs pairing, so the component test is the evidence.getBoundingClientRect().topof the Date button and of the Time field's bordered box (the span around the native input), at 1280px wide (two columns):At 480px wide (stacked) the label-to-control distance was 24px for Date and 26px for Time before, and 26px for both after. Control heights were equal in both layouts (32px at 1280px, 36px at 480px), so only the label gap was off.
Commands, run from
apps/web:vp test run --project browser src/components/CustomSnoozeDialog.layout.browser.test.tsx: fails onmainwithDate top 465.5px, Time top 467.5px, passes with the fix.vp fmt --checkandvp linton the two changed files: clean apart from an existingreact(purity)warning on thenew Date()call in the calendardisabledprop, which this PR does not touch.vp run typecheckinapps/web: exit 0.I did not run
vp run check:changed: here it compared against a stale base and tried to cover 5,000+ files.Before (1280px wide, Date button 2px above the Time field):
After (aligned):
Narrow (stacked), before and after:
Not covered: dark theme captures, browsers other than Chromium (the layout is plain flex and grid with a fixed gap), the Electron shell (it wraps this same web component), and mobile (it has its own UI and does not use this dialog). This removes 2px of attack surface.
Claude Sonnet 5.5, via Claude Code in T3 Code.
🤖 Generated with Claude Code