fix(web): keep a long path from running under the folder picker button - #4823
fix(web): keep a long path from running under the folder picker button#4823Sy-D wants to merge 1 commit into
Conversation
CommandInput forwards className to the field wrapper, not to the inner input, so the pe-* reserved for the absolutely positioned submit button never applied and a long path slid underneath it. Target the input the same way the component already does for its start padding, and size the reserve to the button: it measures 83px for "Add" and 137px for "Create & Add", against 64px reserved. Closes pingdotgg#4819. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
ApprovabilityVerdict: Approved 68b9aed This is a CSS-only fix that adjusts padding selectors to prevent long paths from running under an absolutely-positioned button. The changes are purely visual with no runtime behavior impact. You can customize Macroscope's approvability policy. Learn more. |
1260bae to
cc773ee
Compare
What Changed
The folder picker input now reserves enough room for the submit button that sits on top of it, and the reservation actually reaches the input element.
Why
Reported in #4819: a long absolute path runs into the action area and hides the Add button and its shortcut.
Two things were wrong:
CommandInputforwardsclassNametoAutocompleteInput, which is the field wrapper — not the inner<input>. Thepe-16/pe-36/pe-32the palette passed never applied to the text field. Measured onmain, the input's computedpadding-inline-endwas 11px, i.e. its ownpx-*and nothing else. The component already solves this for the other side with*:data-[slot=autocomplete-input]:ps-9!, so the end padding now uses the same mechanism.pe-16(64px) was too small. The button is absolutely positioned withinset-e-2.5, and measured in the running app it spans 83px over the input for "Add" and 137px for "Create & Add".Sizes are therefore
pe-24(96px) andpe-38(152px), leaving 13px and 15px between the text edge and the button.Notes For Review
I kept the existing class-based approach rather than measuring the button at runtime, since the labels are a closed set. The trade-off is that a much longer label — a future wording change or a localisation — would need the padding revisited. If you would rather have it derived from the button's real width, say so and I will switch it.
The
repositorystep (pe-32, "Continue" / "Lookup") is wired through the same way but I did not exercise that flow, so its 128px is unverified — it was not part of the report.Validation
Measured in a running client, browse mode, before and after:
Add (Enter)Create & Add (Enter)vp run --filter @t3tools/web test— 1641 passedvp run --filter @t3tools/web typecheck— no errorsvp lint— no new warnings (two pre-existingno-unstable-nested-componentsin this file are untouched)vp fmt --check— cleanCloses #4819.
Checklist
Before:
Bildschirmaufnahme.2026-07-29.um.11.45.54.mov
Note
Fix long path text running under the folder picker button in the command palette
Targets end padding on the inner autocomplete input element (via
*:data-[slot=autocomplete-input]) rather than the wrapper div in CommandPalette.tsx. Also increases padding values in browsing flows (pe-38withwillCreateProjectPath,pe-24without) to give the submit button enough clearance.Macroscope summarized cc773ee.
Note
Low Risk
Scoped CSS-only change in the command palette add-project/browse input with no auth, data, or API impact.
Overview
Fixes #4819 by reserving end padding on the inner command palette input (via
*:data-[slot=autocomplete-input]), not on theCommandInputwrapper wherepe-*never reached the text field.Browse and remote-repository flows now use larger end padding (
pe-24/pe-38for Add vs Create & Add,pe-32for Continue/Lookup) so long paths stay clear of the absolutely positioned submit button.Reviewed by Cursor Bugbot for commit cc773ee. Bugbot is set up for automated code reviews on this repo. Configure here.