Repository navigation
UI Consistency: 1 issue found
apps/web/src/components/CommandPalette.tsx (lines 2354-2358) — the new browseInputEndPaddingClass reserve keys only on willCreateProjectPath and hasHighlightedBrowseItem, but isBrowsing is also true during the clone-destination step, where the same absolutely-positioned accessory renders the wider Clone / Create & Clone / Cloning labels. Those states receive the reserve calibrated for Add / Create & Add, so the typed destination path can still run under the button. Moving the padding from the input-control wrapper to the inner input also drops the input's own px-[calc(--spacing(3)-1px)], so the Create & Clone case ends up with slightly less clearance than before (152px vs ~155px). Suggested fix: derive the reserve from the label actually rendered (pass the clone-destination state into the helper and add a wider bucket).
The previously flagged highlighted-item case is addressed by this revision (pe-30 bucket) and was not re-reported.
Details
Note
Your check run agent prompt is: .macroscope/check-run-agents/ui-consistency.md
More information about how Check Run Agents work can be found in our Help Center.
What was checked
- Ownership of the migrated padding:
inputProps.classNameflows throughCommandPaletteContent→CommandInput→AutocompleteInput→Input, landing on thespan[data-slot=input-control]wrapper. Targeting the native field via*:data-[slot=autocomplete-input]:...!matches the existing convention inapps/web/src/components/ui/command.tsx(*:data-[slot=autocomplete-input]:ps-9!) andui/autocomplete.tsx. This part of the change is consistent and not a finding. - Tailwind validity:
pe-24/pe-30/pe-38are dynamic-spacing utilities, the strings are fully static literals (scannable from.logic.ts, which already hostsITEM_ICON_CLASS/ADDON_ICON_CLASS), andps/pedo not conflict undercn/tailwind-merge with the primitive's existingps-*andhas-[+[data-slot=autocomplete-trigger]]:*:...:pe-7rules. - Geometry: with
--command-shell-inset: 0.5remand the accessory atinset-e-2.5, clearance ≈ reserve − button width − 1px. The browse (pe-24) and highlighted (pe-30) buckets track theAdd+EnterandAdd+⌘/Ctrl Enterwidths; the clone-destination labels are the outlier. - Accessibility/interaction: no changes to focus ring, disabled state, keyboard handling,
aria-label, or the tooltip trigger composition; logicalpe-*/inset-e-*properties preserved. - Scope discipline: the wrapper-level
className: "pe-30"insearch/ProjectContentSearchDialog.tsxis untouched by this PR and was intentionally not reported.
Files examined
apps/web/src/components/CommandPalette.tsxapps/web/src/components/CommandPalette.logic.tsapps/web/src/components/CommandPalette.logic.test.tsapps/web/src/components/CommandPaletteContent.tsxapps/web/src/components/ui/command.tsx,ui/autocomplete.tsx,ui/input.tsx,ui/button.tsx,ui/kbd.tsxapps/web/src/index.css(token values)
🔍 Agent activity — 1 tool call
💭 Looking at the prior commit, the browse reserve issue was already fixed by adding the hasHighlightedBrowseItem check. Now I'm examining the current diff to see how the padding variant changed from
pe-32to a more specific selector targeting the autocomplete input slot, and I need to verify that this variant applies correctly to both the wrapper and input elements. I need to trace how inputProps.className is being applied now that the selector changed to target children with the autocomplete-input slot instead of applying directly to the input element itself. This suggests the className is on a wrapper rather than the input itself, so I should look at how CommandPaletteContent handles the inputProps to understand the structure. The fix of moving the padding utility from the wrapper to the input element itself using the data-slot selector aligns with the pattern I see in the other components. Let me examine the full autocomplete.tsx file to confirm this approach is consistent. I'm tracing through how the className gets applied when AutocompletePrimitive.Input receives it—the Input component likely wraps a native input element with a data-slot attribute, so I need to check the input.tsx file to see exactly where that selector targets. I'm tracing how the className prop flows through the component hierarchy — it gets applied to the outer span with data-slot="input-control", while the native input element sits inside with its own data-slot="input". Base UI's render prop system merges props onto the rendered component, so when AutocompletePrimitive.Input has data-slot="autocomplete-input" and renders the Input component, that data-slot attribute gets passed through the spread props onto the native input element. The selector*:data-[slot=autocomplete-input]:pe-24!correctly targets the native input by its data-slot attribute, applying padding-inline-end. This is the right approach compared to the previous pattern of adding padding to the wrapper span, which would have affected the input's layout differently. The change aligns with the existing pattern used elsewhere in the codebase. The key fix here is thathasHighlightedBrowseItemnow yieldspe-30,willCreateProjectPathyieldspe-38, and the default ispe-24— all applied directly to the inner input rather than the wrapper. Since the input previously had its own internal padding and was nested inside a padded wrapper, moving the padding to the input itself gives more breathing room (96px from the end withpe-24versus the previous 75px calculation). The Tailwind spacing values are valid since v4 supports dynamic spacing scales. Now I need to verify that Tailwind's scanner will pick up these class strings from the.logic.tsfile — it should, since v4 scans all source files including TypeScript. I also want to check whether the accessory button is actually rendered whenhasHighlightedBrowseItemis true, and trace through the conditions around lines 1990-2320 forwillCreateProjectPath,canSubmitBrowsePath, and the input accessory rendering logic. There's also a question about the padding values: the new mapping givespe-38for create mode,pe-30for highlighted (120px), andpe-24for normal add (96px) — that's a 24px difference between highlighted and normal. I should verify whetherwillCreateProjectPathproduces the widest label by checkingsubmitActionLabel, and then look at the surrounding code region to confirm the three states are mutually exclusive. I'm checking whether the confirm step for the clone destination includes theisBrowsingstate, which determines the browse accessory display. The submit button labels differ between steps—"Create & Clone" or "Clone" for the clone destination step, which are wider than the "Create & Add" label used elsewhere. I'm noticing thatisBrowsingis also true during the confirm step for browse queries, so the accessory shows the clone-related states with the same padding buckets. The existing code didn't handle this either, which is a pre-existing gap, but this PR makes it relevant by introducing thebrowseInputEndPaddingClasshelper that specifically covers browse states—though the clone-destination widening was already in place. Looking at the actual spacing impact: for the create case, the padding shifts frompe-36on the wrapper (155px effective content edge) tope-38on the input (152px), so it's slightly tighter by about 3px. For non-create browse, it goes frompe-16(75px) tope-24(96px), which is noticeably wider. I'm trying to figure out if the "Add" button width accounts for this change. For the clone destination step, the "Clone" button is wider than "Add" by roughly 2 characters, and with the samepe-24reserve (96px), there's potential overlap—though this was already a problem before with the tighterpe-16spacing. The "Create & Clone" label withpe-38is only marginally different from the previouspe-36plus padding setup, so that's roughly equivalent. The real question is whether this counts as a violation worth flagging. The patch doesn't worsen the clone destination case meaningfully, and for "Create & Clone" it's only a 3px reduction from the previous 155px effective width. Without knowing if that was already tight, it's hard to say if this is a genuine issue or just an aesthetic edge case. Now I need to focus on the core Tailwind concerns. The main issue is that there's a helper in a.logic.tsfile generating Tailwind class strings, which goes against preferring source-level logic when behavior depends on consumer-provided classes. More critically, I need to verify whether the Tailwind config actually scans.logic.tsfiles — if the@sourcedirectives in the index.css only target.tsxfiles, then classes likepe-38andpe-30won't be generated at all, breaking the whole thing. And I should confirm those spacing values actually exist in Tailwind v4's dynamic spacing system. I'm also checking the!important modifier syntax in the selector — it's using the v4 trailing!format, which matches what's in command.tsx, so that's consistent. Now I need to look at the actual index.css to see what the@sourceglobs include, and whether there's a linting rule preventing class strings outside of.tsxfiles. I'm noticing thatProjectContentSearchDialog.tsxhas another call site usingpe-30directly on the wrapper, which doesn't match the pattern this PR establishes for targeting the inner input element. It's outside the scope of these changes, so it's not a regression here, but it does suggest an inconsistency I should investigate in the broader codebase. The real question is why the author switched to the*:data-[slot=autocomplete-input]selector in the first place — does padding on the wrapper span actually work when the input is nested inside? The wrapper isrelative inline-flex w-fullwith padding, and the accessory button is positioned absolutely withinset-e-2.5, which needs a relative ancestor. I need to trace whereinputAccessoryactually renders withinCommandPaletteContentto understand the DOM structure and whether the positioning would work correctly. The accessory sits inside a relative container wrapping the CommandInput, positioned 10px from the edge withinset-e-2.5, which means it overlaps the input area. Previously, padding on the wrapper span reduced the input width, but the new approach applies padding directly to the input element itself, keeping the styling consistent and more direct. I'm checking how Tailwind's merge utility handles potential class conflicts—the new*:data-[slot=autocomplete-input]:pe-38!variant doesn't clash with the existinghas-[+[data-slot=autocomplete-trigger],...]:*:data-[slot=autocomplete-input]:pe-7since they use different pseudo-selectors, and theps-9!uses a different direction entirely. The!importantflag is needed because the input's ownpx-[calc(--spacing(3)-1px)]has similar specificity, and the attribute selector variant gives higher specificity than a plain class. The specificity calculation confirms that the compiled selector has enough weight to override the input's own class, so the!prefix isn't strictly necessary but aligns with the existing pattern in command.tsx. Now I need to determine whether the check should pass when clean or fail by default. The instruction says to respond "All clear" when there are no findings, which suggests success in that case, though the JSON schema will ultimately dictate the output format. Looking at the actual concerns, I notice the repo already places Tailwind class strings in non-TSX logic modules likeCommandPalette.logic.tswith constants likeITEM_ICON_CLASS, so this approach is consistent with existing conventions. The clone-destination step reuses browse buckets with only marginal spacing differences (152 vs 155px), which doesn't seem significant enough to warrant failure. There's also a pre-existing issue where "Create & Clone" is wider than "Create & Add" during the confirm step, but that's not new. For the repository step, the new padding rule applies 128px directly to the input instead of the wrapper, which is slightly narrower than before but probably acceptable. I'm working through the spacing math more carefully—the shell inset plus border plus content width gives me about 15px of clearance with the new padding approach, compared to roughly 26px with the previous wrapper padding. That 11px reduction comes from removing the input's own padding, which should still be adequate but it's worth verifying against the actual button width. The author's prior measurement of 13px clearance for the Add + Enter button suggests they were accounting for padding correctly, so hitting around 15px for the repository step seems consistent with their methodology. Now I'm checking how the highlighted browse item modifier affects spacing—the padding difference between pe-30 and pe-24 accounts for the extra chip width. When the button is highlighted, the gap shrinks from gap-1.5 to gap-1, losing about 2px, but the keyboard shortcut text changes from "Enter" to "Ctrl Enter" (or "Ctrl Enter" on Windows), which adds roughly 24px of width. That extra width roughly offsets the padding reserve, so the clearance should stay around 13px—plausible. On Windows the "Ctrl " prefix might push closer to 30px depending on the font metrics, which could tighten clearance to around 7px, but that's still non-overlapping. The author already addressed this concern by adding pe-30, so I don't need to re-flag it. Now I'm checking for state conflicts—like whether isBrowsePending and willCreateProjectPath ever clash. When the button is pending with a new path typed in, willCreateProjectPath is false so the label shows "Add" with pe-24 padding, which is fine. The tests verify the padding classes are present by checking for substrings like "pe-38", which works correctly. There's a minor inconsistency where the browse input padding class lives in the logic module with a selector prefix, while the repository step class stays inline in the TSX—just an aesthetic difference. I'm also noticing that CommandInput passes its className to a wrapper span, but that's not a real issue here. There's another call site in ProjectContentSearchDialog that still uses pe-30 padding on the wrapper, but that's not changed by this PR and doesn't count as a regression. I could argue the PR creates divergent conventions across two call sites, but the guidelines say not to turn a focused PR into unrelated cleanup, so I'll skip that. Let me verify whether the wrapper padding approach actually works—yes, both approaches work; adding padding to the wrapper flex container effectively insets the input. The wrapper padding does affect cursor and selection positioning, but that's not really a problem. Actually, I should check if there's a real bug with the wrapper approach that this PR is fixing. Looking at the branch name "fix/folder-picker-path-overflow," it seems the wrapper padding might cause the input's box to shrink, which would prevent long paths from overflowing into the button. But I'm not entirely sure why they'd change from the wrapper approach—maybe it's about how Tailwind's class merging works with the existing CommandInput classes, or perhaps the input's own padding-inline-end creates some scrolling issue. Actually, both approaches seem functionally equivalent, so the distinction might be subtle. Now I'm checking whether overriding the inner input's padding with the stronger specificity actually removes the original 11px right padding, which would let text run closer to where the reserve space ends—that should be fine. The logical properties likepe-*andinset-e-2.5handle RTL correctly. I'm also verifying that Tailwind's merge function properly handles the selector override without conflicting with the base padding-start rule, sincepsandpeare different property groups. There might be a conflict lurking in the autocomplete.ts file though. Looking at the concrete numbers for the clone-destination case where the reserve becomes too small relative to a wider label: switching from wrapper padding to input padding actually reduces the effective reserve by 11px across all branches. The effective distance from the input's right edge drops from 139px down to 128px. Checking the other cases — browse create goes from 155px to 152px (losing 3px), browse highlighted jumps from 75px to 120px (gaining 45px), and browse normal increases from 75px to 96px (gaining 21px). The repository step with "Continue" as the button label is the widest label overall, and at 128px it's now the tightest fit after this change. Let me work through the exact measurements for the button and keyboard shortcut combination — the "Continue" button at extra-small size with the Enter key indicator, accounting for padding, gaps, and borders to see if 128px actually provides enough space. I need to find the shell inset value to calculate where the input's content edge sits. I'm working through the spacing calculations for the shell inset and button positioning. The shell's right border is 8 pixels from the container edge, and the button starts at 10 pixels from the right, so I need to figure out the clearance between them based on the button width and reserve space. For the "Add" button with "Enter" keyboard shortcut, I'm calculating that the total width comes to about 106 pixels with a 120-pixel reserve, giving roughly 13 pixels of clearance—which matches the measured spacing. I'm verifying this model works by checking character widths at the text-xs size and confirming the "Add" text alone is about 22 pixels, which is consistent with a 12-pixel font for three characters. Now I'm applying the same calculation to other button variants with different keyboard shortcuts like "⌘ Enter" and "Ctrl Enter" to see how their widths and clearances compare, then moving on to the "Create & Add" button case. For "Create & Add" with "Enter", the text is roughly 84 pixels wide, bringing the total width to about 142 pixels. With a 152-pixel reserve, that leaves only 9 pixels of clearance—slightly tighter than before but still acceptable. For the "Continue" button, the width comes to 114 pixels with a 128-pixel reserve, yielding 13 pixels of clearance, which matches the target spacing the author seems to be using consistently. Now checking the clone destination step: "Clone" with Enter gives a width of 93 pixels against a 96-pixel reserve, leaving just 2 pixels of clearance—barely positive. But "Cloning" in the pending state expands to 107 pixels, which overflows the reserve by 12 pixels. "Create & Clone" is even worse at 156 pixels, exceeding the 152-pixel reserve by 5 pixels. Looking at the highlighted state with Ctrl+Enter, the width calculation comes to 119 pixels against a 120-pixel reserve, so that's right at the edge with zero clearance. These do overlap, but I'm checking whether this is a regression introduced by the patch. Before the changes, "Create & Clone" had a −2 pixel clearance (already overlapping), and "Clone" was worse at −19 pixels. So the PR actually improves most of the clone cases, though "Create & Clone" does get slightly worse, going from −2 to −5. Given the estimates are rough with a ±10 pixel margin of error, I can't confidently call this a concrete regression. The rule is to report only clear violations introduced by the changed lines or pre-existing issues that the patch directly makes relevant or worsens. The patch introduces a helper that explicitly enumerates the width-driving states, and that helper is being used in the clone destination labels case. The real issue is that the helper omitsisCloneDestinationStepeven though it affects button width in the same way as the other inputs it does consider — this is the same consistency gap the author already fixed elsewhere. But looking back, the clone-destination reserve was already incomplete before the PR, so the patch didn't introduce the problem, it just didn't fix it either. Given that the change actually improves things overall, flagging this as a regression seems questionable under normal review standards. The author already fixed a similar issue in a prior run, so flagging the clone case now feels like a comparable finding—the button label widens in a state the reserve doesn't account for, and it's fixable by keying the helper on the rendered label or adding an input parameter. There's a detail that strengthens this: the pe-24 padding for "Clone" suggests... Actually, I should flag that the new helper only reserves space for "Add"/"Create & Add" labels, but the same button renders "Clone"/"Create & Clone"/"Cloning" during the clone-destination step, and the code explicitly renders that pending state—so the typed path can visually run under the button, which is exactly the bug this PR claims to fix for the non-clone case. I'm torn on whether this warrants a failure. It's largely a pre-existing issue and the PR does improve things overall, so maybe I should report it as a finding and mark it neutral rather than fail the check. Let me trace through the code path once more to be sure: the browse accessory shows whenisBrowsingis true, and the submit label handles the clone-destination step separately, so the confirm step does use the helper with the narrower reserve. That confirms the gap. Now I'm checking the actual button and keyboard sizes to see how much the label width varies. Looking at the button sizing across different screen sizes, I notice the text gets smaller on mobile (14px instead of the default), which actually makes the button wider relative to its content. The "Add" text is about 26px, and with 13px of clearance available, it still fits—though the clone button would be tighter. The helper text doesn't account for this label widening on the clone destination, which is the real issue I need to address. Let me think through whether this is worth reporting. The evidence is concrete: the submitActionLabel has four variants, but the reserve helper only calibrates for the add-flow widths. In the confirm step, "Create & Clone" is 14 characters against padding calibrated for "Create & Add" at 12 characters—that's roughly 14px of extra width at the 12px font size, and the available clearance is only 9-13px, so there's definitely overlap. The clone and cloning variants are even worse. This matters because the PR's whole purpose is preventing long paths from running under the button, and the clone-destination step is also a path input. Plus, the patch actually reduces the effective reserve by 3px for the "Create & Clone" case, making this omission directly relevant to the changes being made. I'll post an inline comment at the helper call site in CommandPalette.tsx since that's where both the .ts and .tsx files converge, but since the fix would need to touch CommandPalette.logic.ts as well, I'll skip a diff and just recommend widening the buckets with a flag likeisCloneDestinationStep. The repository branch's effective reserve drop of 11px is worth noting but probably not a concrete regression on its own. The comment's solid and actionable. Now I need to decide on the check result — this is a moderate finding with a clear regression risk, so I'll mark it as a failure since the check defaults to that when findings are present. Time to post the review.
1. modify_pr — One finding on the input end-padding reserve: the new helper covers the add-flow labels but not the clone-destination labels that the same accessory renders.
Agent Credits: 116 credits