Skip to content

Merge branch 'main' into chore/web/add-theme-button-label

MacroscopeApp / Macroscope - UI Consistency failed Aug 20, 2026 in 1m 50s

UI Consistency: 1 issue found

apps/web/src/components/settings/ThemeSearchSection.tsx — the new setResults(null) in the search catch block (line 148) discards results without invalidating lastSearchKeyRef, which still holds the last successful (query, sort) key. Reverting to a previously successful query (e.g. dracula → draculaz fails → back to dracula) then hits the lastSearchKeyRef.current === searchKey branch: the effect aborts, stops the spinner and clears the error, leaving the panel with no results, no error, no spinner and no retry affordance. Suggested fix (posted inline): reset lastSearchKeyRef.current = null wherever the results it describes are discarded.

No other new findings: the suggestion chips now carry disabled={installingId !== null}, matching the sibling Sort select and the card install actions, so the previously flagged inert-chip state is resolved.

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.

Scope reviewed

Merge base 730ce9e → head 7d46f92, limited to the check's include patterns (apps/web/src/**/*.{ts,tsx,css}):

  • apps/web/src/components/Icons.tsx — GitLabIcon gains an optional monochrome prop; still assignable where the shared Icon type is expected, and brand fills are unchanged in the default (non-monochrome) path.
  • apps/web/src/components/settings/ThemeSearchSection.tsx — debounced search-as-you-type, shared Spinner in the InputGroupAddon, Button + render={<a …>} at size="icon-micro" variant="ghost-muted" for the source link (restores the coarse-pointer hit target and focus ring), shared GitHubIcon/GitLabIcon marks, chips disabled during install.
  • apps/web/src/components/settings/ThemeImportDialog.tsx — editor min-height, opaque selection:bg-primary + selection:text-primary-foreground over the highlighted <pre>, action row retained in the import section with an explanatory comment (previously raised; left as an intentional, documented exception this run).
  • apps/web/src/components/settings/ThemeSettings.tsx, ThemeEditorPanel.tsx — icon/label pairing is now consistent (Create theme → PaintbrushIcon, Add theme → PlusIcon in both the library header and the editor footer); grid minmax change is contextual layout at the call site.

Delta since the previous run (f97dfc9)

Only two hunks changed: the chip disabled prop (resolves the earlier inert-affordance comment) and the new setResults(null) on search failure, which is the source of the finding above.


🔍 Agent activity — 1 tool call

💭 I'm checking the current PR diff against prior review feedback, noting that several flagged issues like the Button render and Spinner primitive have been fixed, while the ThemeImportDialog's hand-rolled flex div replacing DialogFooter still looks like an outstanding concern. That said, the author added a comment justifying the DialogFooter choice, so re-flagging it would be duplicative since it was already addressed with explanation. I'm also checking other smaller items — the suggestion chip disabled state, the GitLabIcon prop type change, the removed license icon display, and the "Import theme" to "Add theme" label consistency — before pulling up the actual files to verify these details directly. I want to check what's new since the last reviewed commit f97dfc9, since the branch is about adding a theme button label. I'll diff f97dfc9..7d46f92 to see if the changes involve the ThemeSettings/ThemeEditorPanel PaintbrushIcon and the "Add theme" label. The branch was likely force-pushed, so I should check the PR's commit list to confirm. The latest commit at 7d46f92 addresses the chip disabled issue flagged in the prior review by adding a disabled condition tied to the installing state, plus clearing results on a failed search. I want to diff this against the earlier reviewed commit, but it's not available in the shallow clone, so I'm working from the merge base instead. I notice two changes: the disabled chip state addresses my earlier comment, and clearing results on search error is new behavior. That seems reasonable on its own, but I'm worried about how it interacts with the ref tracking logic — since the failed search key never updates lastSearchKeyRef, the mismatch with the current searchKey could trigger the search to run again unintentionally. Actually no, the effect only reruns when its dependencies change, and an error doesn't alter any of them, so there's no rerun loop there. I also checked that the chips row still displays correctly after an error (since it's gated on isSearching rather than results), with only the sort control hidden since results is null — and the disabled state on chips during install stays consistent with the other disabled controls. Now I'm deciding whether to flag the hand-rolled dialog footer again — but since I already raised that at an earlier commit and the footer code hasn't meaningfully changed since then aside from selection styling, re-flagging would just be a duplicate, so I'll skip it and instead look for genuinely new issues introduced by this diff. Looking at the GitLabIcon change, it swapped the shared Icon type for inline props, which loses the common type contract — worth checking if GitLabIcon is used anywhere that expects the strict Icon type, since an optional prop addition might still be assignable but could also cause a type mismatch depending on how it's consumed elsewhere. Other changes look minor: the grid minmax tweak from 17rem to 16rem is fine, and the ThemeImportDialog min-height adjustment was already addressed. I'm now looking more closely at the textarea selection styling — the author changed selection:bg-accent to selection:bg-primary with text-primary-foreground, but I'm noticing a potential issue where the transparent text state for syntax-highlighted content might conflict with the new selection text color. Actually, thinking it through, the opaque primary selection band covers the highlighted <pre> beneath it, so selected glyphs render cleanly in primary-foreground on primary background while unselected text stays transparent to show the syntax-highlighted pre layer — that's the intended behavior, trading syntax colors for readability during selection, which seems fine since the textarea sits above the pre with a transparent background. Now I want to check the icon change in ThemeEditorPanel from PlusIcon to PaintbrushIcon around line 1258. I should verify label-icon consistency across the theme UI: ThemeSettings seems to use "Create theme" with PaintbrushIcon and "Add theme" with PlusIcon, while ThemeSearchSection uses "Install"/"Installing" with PackagePlusIcon. There's a wording inconsistency between "Add theme" (import) and "Install" (search) that might be worth flagging, though I want to avoid being overly pedantic about terminology versus actual component/Tailwind issues. Let me look at both files to compare these labels directly. Icon usage checks out consistently between the two locations, and the "Install"/"Add theme" wording difference seems intentional rather than a bug. I'm now digging into the new head commit's changes, specifically looking closer at the null-setting behavior in the search error handler for potential regressions. Tracing through a scenario: a user searches "dracula" successfully, then types "draculaX" which fails and clears results, then backspaces to "dracula" again. Since lastSearchKeyRef still matches the original successful query, the code skips re-fetching and just clears the error—but results were already wiped by the failed search, leaving the user staring at a blank pane with no spinner, no error, and no results. This is a real regression caused by the new results-clearing line, since it violates the assumption that lastSearchKeyRef matching means results are still valid. That's a real bug from the changed line — the user is stuck with an empty panel and no retry path. The fix is to also clear lastSearchKeyRef.current to null in the catch block alongside setResults(null), so a reverted query re-triggers the search instead of being skipped as unchanged. I'll propose this as an inline suggestion at the changed line, matching the existing indentation. This regression falls within scope since it's a concrete UI/state behavior change introduced by the diff, so it's worth flagging. I also want to double-check the disabled-chips change doesn't introduce its own issue, since the onClick handler still fires runSearch when the query matches a suggestion even while chips are visually disabled during install. I think I've found a real issue worth flagging: clearing results on line 148 breaks the lastSearchKeyRef invariant, since the ref still points to the last successful key even though its results are gone. This means typing past a good query and deleting back to it could hit the abort branch, stopping the spinner and clearing the error while leaving a stale state — I'll write up an inline comment on that line and mark this as a failing check.

1. modify_pr — One finding on the new error handling in ThemeSearchSection. The rest of this revision (chips now carrying disabled={installingId !== null} instead of a silent no-op) matches the sibling Sort select and card actions, so that state is now visible on the control.


Agent Credits: 89 credits