Repository navigation
UI Consistency: 1 issue found
1 finding
apps/web/src/components/pullRequest/PullRequestDiffFileTree.tsx(line 193): the load-moreButtonaddsoverflow-hiddento clip its progress fill, which also clips the primitive's coarse-pointer hit-target pseudo-element (pointer-coarse:after:min-h-11/min-w-11). On touch devices the tap target shrinks from the primitive's 44px minimum to thesize="xs"box (28px, 24px atsm). Suggested fix posted inline (pointer-coarse:overflow-visible, or paint the fill as a background gradient).
Previously flagged issues (duplicated tree theme CSS, surface-subheader layout, min-w-64 sidebar floor, h-10 vs sm:h-6 footer height) are resolved at this head: the theme contract now lives in apps/web/src/pierre-tree-theme.ts and is shared with FileBrowserPanel, the subheader spells its geometry out in Tailwind and matches the other data-surface-subheader rows (h-10 min-h-10 … border-b border-border/60), the sidebar width is governed only by w-[min(22rem,46%)], and the footer heights now line up (size="xs" + p-2 = 44/40px vs h-11 sm:h-10).
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.
Checks performed
- Shared primitives: new
Togglefor the file-explorer visibility matches the sibling word-wrap toggle exactly (variant="ghost",size="sm",size-3.5icon,TooltipTrigger render=pattern); no raw controls reconstructed.Buttonused for load-more/retry rather than a bespoke element. - Tailwind/CSS ownership: shadow-root theme overrides for Pierre trees are correctly kept as a
unsafeCSSstring plus a host-style helper (custom element / shadow root is exactly the case that should stay outside per-component Tailwind), and are now single-sourced inpierre-tree-theme.tsfor bothFileBrowserPaneland the new tree. No new globalindex.cssrules; no.darkselector usage introduced. - Layout:
flex min-h-0 flex-1 overflow-hiddenwrapper withmin-w-0 flex-1viewer column andshrink-0aside preserves the viewer's ownoverflow-auto [scrollbar-gutter:stable]scroll ownership; the sidebar cap no longer defeats the narrow inline-preview floor. - Prop contracts:
viewerRefexists onStyledDiffCodeView(readonly viewerRef?: Ref<CodeViewHandle<LAnnotation>>), anduseLocalStorage(key, initial, Schema.Boolean)matches the hook signature, so the new persistence and scroll-to-item wiring typechecks. - Accessibility:
aria-labels on the toggle and tree,role="status"on the completion row,aria-busyon the pagination button all present; the only regression found is the clipped coarse-pointer hit target reported above.
Out of scope for actions: docs/user/source-control.md (outside the configured include patterns) refers to "the tree header control to collapse and expand all folders", while at this head the tree header renders only the title and count and the bulk action lives in the diff toolbar.
🔍 Agent activity — 1 tool call
💭 Looking at the previous issues that were flagged—the
data-surface-subheaderattribute, themin-w-64constraint, and thesize="xs"withh-10combination—they all appear to be resolved in the current diff. Now I'm reviewing the head to check for any new problems that might have surfaced. I'm checking how other subheaders in the codebase handle their styling, particularly looking at the FileBrowserPanel to see if there's a consistent height convention. I'm also comparing the heights of the "All N files loaded" row against the load-more footer to understand the spacing — the subheader usesh-11on desktop andsm:h-10, while the footer combines button sizing with padding that adds up differently across breakpoints. I need to verify whether Tailwind v4 supports arbitrary opacity values like/8, check if the Button component withsize="xs"needs explicit background transparency, and look at how the Toggle component is used elsewhere with TooltipTrigger to ensure consistency with variant and size props. I'm noticing a discrepancy between what git grep shows at the current head versus what the diff indicates. The file appears to have different content at line 154 compared to what I expected based on the merge-base diff, which suggests the grep might be looking at a different commit state than the one the diff was generated against. The grep results are pointing to a version of PullRequestDiffFileTree.tsx that exists in some commit, showing those gap-1 buttons at lines 148-154, but it's unclear which commit that actually is—possibly a different PR branch rather than the main HEAD. The tree view URL I used seems to have fetched different file content via the GitHub API at that specific SHA, which is creating some confusion about what version I'm actually looking at. Let me run git grep explicitly against the 0873cd2 commit to clarify what's really there. Good, I've confirmed the right commit is in place with the span version. Now I'm reviewing the current state and noticing a sizing inconsistency — the button withsize="xs"in the progress footer has a height of 44px on mobile and 40px on tablet due to the padding wrapper, but the "All N files loaded" row above it is taller at 44px and 40px respectively, so there's a mismatch I need to address. I'm also checking whether Tailwind v4 supports arbitrary opacity values like/8— it does, using color-mix under the hood, and the codebase already uses similar patterns likeshadow-primary/24andopacity-64, so that's fine. The focus ring is a box-shadow that won't be clipped by theoverflow-hiddenI added to the button, but I'm realizing the coarse-pointer hit-target expander (a pseudo-element sized to at least 44px) will get clipped by that overflow, which breaks the touch target on mobile. So the button ends up at 28px on coarse-pointer devices, which falls short of the 44px accessibility target. I should check if other buttons in the codebase use overflow-hidden to see if this is a pattern worth flagging, and also consider whether the coarse-pointer case matters for this Electron app or if it's primarily a desktop context. There might be a better way to implement the progress fill using a background gradient or CSS variable instead of relying on overflow-hidden. I'm exploring different solutions: applying overflow-hidden only to a wrapper, using a selector like[&>span:first-child], or potentially masking the fill with the button's border-radius. The challenge is clipping the fill to the button's rounded corners without affecting the overall button size. Another option is rendering the progress directly through the button's background instead. Now I'm checking whether the Toggle component supports the "sm" size variant, and looking at how other toolbar toggles in that file are sized for consistency — some might be using icon-specific size variants like "icon-xs" instead of the general "sm" size, which could be a consistency issue to flag. The new Toggle component matches the neighboring wordWrap Toggle perfectly in terms of styling. Now I'm investigating whetheroverflow-hiddenon the Button is actually clipping the coarse-pointer hit-target pseudo-element—I need to examine the Button's base styles more carefully to determine if this is a real issue. The Button has a min-h-11 (44px) pseudo-element that should expand the hit target, but withoverflow-hiddenapplied, it gets clipped to the button's actual height of h-7 (28px) or sm:h-6 (24px). This would genuinely break the coarse-pointer contract that the primitive is supposed to maintain. The question is whether this is a new regression or something flagged before—the prior runs caught an h-10/sm:h-6 mismatch, but this seems distinct. The smallest fix would be to remove or adjust theoverflow-hiddenclass rather than letting it override the accessibility requirement. Now I'm considering whether to paint the progress bar as a background gradient directly on the button instead, using an inline style with a linear-gradient that respects the border-radius automatically. The outline variant already has its own background color, and the call site is overriding it withbg-transparentanyway—which itself violates the rule about not overriding base state colors. So there's a layering issue here where the progress gradient needs to work alongside whatever background the variant provides. I'm exploring whether I could usepointer-coarse:overflow-visibleto let the fill span overflow on touch devices, or give the fill span rounded left corners to match the button's radius and prevent the visual overflow at the corners. The simplest approach might be switching to a background-image gradient directly on the button itself and removing theoverflow-hiddenconstraint altogether. Let me check what--control-radiusis set to and how the codebase handles clipping inner fills elsewhere, plus whether there's already a Progress primitive I should be using instead of this hand-rolled solution. I'm noticing thatComposerPrimaryActions.tsxuses a raw button element with overflow-hidden instead of the Button primitive, which isn't a pattern I see elsewhere in the codebase. Looking at the::afterpseudo-element with its full sizing and absolute positioning, it would start from the padding box and extend across the full dimensions—this could potentially cause issues with coarse-pointer interactions, though I'm weighing how significant that concern actually is. The guidance around preserving accessibility during migrations applies here defensibly, even though this is new code rather than a migration. The sidebar appears in the PR code tab which is accessible on mobile web, and the responsive sizing variants suggest mobile contexts do matter. The fill span itself is the first child and doesn't interfere with the button's flex layout, so that's not a problem. Now I'm checking whether Tailwind v4 handles opacity modifiers likebg-primary/8with arbitrary percentage values. The docs mention a tree header control for collapsing folders, but that feature doesn't actually exist in the current code — though there is a separate "Collapse all files" button in the toolbar that does work, so it's just a documentation inaccuracy that's out of scope. The real issue I'm noticing is that the file count was moved from the meta line into the tree header, but the tree only shows when the file explorer is open, so when it's collapsed, the file count disappears entirely from the UI. The file count removal seems intentional based on the code comment, and since the tree defaults to open anyway, I'll deprioritize flagging it as a regression. Now I need to verify thatStyledDiffCodeViewactually accepts aviewerRefprop to avoid a type error, and check theuseLocalStoragehook signature and whether theTogglecomponent pattern outside aToggleGroupwithpressed/onPressedChangematches the existing wordWrap implementation. I'm checking whether overflow-hidden appears on other Button instances in the codebase, and from the search results it looks like this is the only Button primitive using it—though there's a ComposerPrimaryActions component with overflow-hidden that's not a primitive. I should also look at how progress fills are handled elsewhere, like the ContextWindowMeter which uses a div with overflow-hidden and rounded styling. Now I'm wondering if there's an established "load more" button pattern used in other parts of the codebase like FileBrowserPanel or ChangedFilesTree, since this bespoke progress button might be inconsistent with existing conventions. I'm zeroing in on the root cause: the overflow-hidden property is clipping the pseudo-element that handles the coarse pointer hit target on the Button. Let me verify the pseudo-element setup once more—it's using Tailwind's after variant to create a full-size element with minimum dimensions, and the content property is being set through a CSS variable. The button sits at 28px height on mobile (where coarse pointers are likely), but the pseudo-element's minimum height is 44px, which means it's trying to expand 16px beyond the button's bounds. With overflow-hidden applied, that expansion gets clipped, reducing the effective tap target back down to 28px. It's a real issue, though the severity is modest since we're only losing 16px of hit area. The instructions treat this as a failure case unless everything checks out, and this consistency risk seems worth flagging with an inline comment. I should suggest a fix that avoids the clipping problem entirely—using a background gradient approach instead of relying on the pseudo-element expansion. I'm exploring usingcolor-mix()to apply the progress gradient inline, though that loses the smooth width transition animation. Another option is to keep the current structure but add an explicit height rule for coarse pointers so the button itself reaches 44px, though that conflicts with the smaller heights at larger breakpoints. The cleanest approach seems to be droppingoverflow-hiddenand using the background-gradient method directly, withpointer-coarse:overflow-visibleas a fallback if needed. I'll prepare a diff-style suggestion showing the changes across those lines. The test expects a specific width value, so switching to a gradient would break it—I'd need to update the test or go with a minimal fix likepointer-coarse:overflow-visible. With that approach, the progress fill's square corners would show against the button's rounded corners since the radius isn't being overridden at the xs size. I'm weighing whether to suggest addingpointer-coarse:overflow-visibleto the button androunded-[inherit]to the fill as a two-line change, or just propose the overflow adjustment inline and mention the gradient alternative separately. The challenge is thatpointer-coarse:overflow-visiblealso removes clipping from the tap-target, which isn't ideal. Let me verify thatpointer-coarseis actually a valid Tailwind v4 variant — yes, it was added in v4.1 and the component already uses it elsewhere. I should also check the other details: the file count logic looks fine, thearia-live="polite"inside the button is unconventional but harmless, and the status role on the loaded files row is appropriate. The Button's explicittype="button"is redundant but safe, the aside border styling works fine with the tree's background, and the disabled state on the outline button variant renders correctly. For the progress fill, I need to trace the z-index layering — the fill span has no z-index while the label sits at z-10, and there's a shadow overlay on the button itself... Checking z-index ordering... Actually, let me verify thatPullRequestMetaLineisn't left unused after removing the file count from the toolbar — it's still being used elsewhere, so that's fine. Hiding the tree does lose the lower bound info on file counts, but that's an intentional design choice. The tree sidebar only renders when the diff is loaded, so the loading and error states inwithReviewBardon't show it, which isn't a consistency problem. On narrow viewports like a 375px phone, the aside takes up 46% of the width, which gives the tree about 172px... On mobile, that leaves the viewer with roughly 200px, which is too cramped to meaningfully display code. The sidebar being open by default on such a narrow screen is a responsive geometry issue, though the author already addressed the min-width cap in a prior comment. Raising another width complaint might be redundant. So I'm settling on one concrete finding: the overflow-hidden is clipping the coarse-pointer hit target. Let me verify this is actually new and not something already flagged. The previous comment was about button height at line 215 — a related but different issue. They removed the h-10 class, leaving the button at 28px tall on mobile with 8px padding, which falls short of the intended 40px tap target. This is legitimate and distinct from what was already raised. I should double-check the actual class string to confirm. Looking at line 193 in PullRequestDiffFileTree.tsx, the class includes overflow-hidden on a transparent background container. This clips the Button primitive's coarse-pointer pseudo-element that's supposed to expand the tap target to 44px minimum, so on touch devices the control shrinks back to just the visual 28px box. I'll post an inline comment explaining this and suggesting the overflow-hidden be applied more selectively. I'm considering whether to addpointer-coarse:overflow-visibleto allow the fill to expand properly on touch, but I need to check the repo's Tailwind class ordering rules first—it looks like pointer variants come before pseudo-class variants in their prettier-plugin-tailwindcss config. Rather than risk lint issues, I could suggest using a background gradient for the fill instead. The class ordering looks right withpointer-coarse:overflow-visiblepositioned before thedark:variant, matching the pattern I see across the codebase. I'll go ahead and post this.
1. modify_pr — One finding: the load-more control's call-site overflow-hidden clips the Button primitive's coarse-pointer hit-target pseudo-element. Inline comment below.
Agent Credits: 135 credits