Skip to content

improvement(search): align cmd+k action icons + highlight with the design system#5114

Merged
waleedlatif1 merged 2 commits into
stagingfrom
fix/cmdk-icons-highlight
Jun 17, 2026
Merged

improvement(search): align cmd+k action icons + highlight with the design system#5114
waleedlatif1 merged 2 commits into
stagingfrom
fix/cmdk-icons-highlight

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Each cmd+k Actions verb now uses the exact icon from its real location in the app: Fit to view → Scan (workflow-controls), Copy workflow link → Duplicate (nav context menu), Invite teammates → User (settings teammates nav). Run/Create/Create folder/Import already matched their real spots.
  • Removed the Toggle theme action and its now-dead useTheme/next-themes wiring.
  • Matched-text highlight now uses the design-system search tokens --highlight-match-bg / --highlight-match-text — the same treatment as the SearchHighlight component used in knowledge-base and code search — instead of an ad-hoc font-semibold. (font-semibold wasn't a design convention; the search-match precedent is color + background, no weight.)

Type of Change

  • Improvement

Testing

  • 20 matcher unit tests pass; typecheck + biome clean. Tested manually.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

…sign system

- Each Actions verb now uses the exact icon from its real location: Fit to view
  -> Scan (workflow-controls), Copy workflow link -> Duplicate (nav context menu),
  Invite teammates -> User (settings teammates nav). Run/Create/Import already matched.
- Remove the Toggle theme action and its now-dead useTheme wiring.
- Matched-text highlight now uses the design-system search tokens
  (--highlight-match-bg / --highlight-match-text), matching the SearchHighlight
  component used in knowledge-base and code search, instead of an ad-hoc font-semibold.
@vercel

vercel Bot commented Jun 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Jun 17, 2026 6:49pm

Request Review

@cursor

cursor Bot commented Jun 17, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
UI-only changes to the search modal and highlight styling; no auth, data, or workflow execution paths affected.

Overview
The workspace cmd+k palette updates Actions icons to match where those commands live elsewhere: Fit workflow to view uses Scan, Copy workflow link uses Duplicate, and Invite teammates uses User. The Toggle theme action is removed, along with useTheme / next-themes wiring in the modal.

Fuzzy-match labels in HighlightedText no longer use semibold + body text color; matched segments are styled with font-medium only.

Reviewed by Cursor Bugbot for commit 58f90ed. Configure here.

Drop the colored background highlight in favor of the design system's standard
emphasis weight (font-medium, used by Button/Label/Input/Table). Lighter than
the previous semibold and avoids a background, keeping the palette's clean,
undecorated text style.
@waleedlatif1 waleedlatif1 merged commit d7fd040 into staging Jun 17, 2026
10 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/cmdk-icons-highlight branch June 17, 2026 18:53
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 58f90ed. Configure here.

{buildSegments(text, positions).map((segment, index) =>
segment.hit ? (
<span key={index} className='font-semibold text-[var(--text-body)]'>
<span key={index} className='font-medium'>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Match highlight missing design tokens

Low Severity

HighlightedText marks fuzzy matches with only font-medium, while knowledge-base and code search use SearchHighlight’s bg-[var(--highlight-match-bg)] and text-[var(--highlight-match-text)] with no extra weight. Cmd+k search hits therefore look different from the rest of search UI and from what this change describes.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 58f90ed. Configure here.

@greptile-apps

greptile-apps Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR polishes the cmd+k command palette: it replaces three action icons with ones that match their real-UI counterparts, removes the "Toggle theme" action and its useTheme dependency, and lightens the fuzzy-match highlight weight. The icon swaps and cleanup are straightforward, but the highlight change diverges from its stated goal and one icon choice is semantically off.

  • Highlight tokens not applied: The PR description says matched text now uses --highlight-match-bg/--highlight-match-text (matching SearchHighlight), but the code only changes font-semibold to font-medium — no background or text-color CSS variable is wired in, leaving the highlight nearly invisible in most themes.
  • Scan from lucide-react: All other icons in the file come from @/components/emcn/icons; Scan is pulled directly from lucide-react, creating an inconsistent icon source in this file.
  • Duplicate icon for "Copy workflow link": In the rest of the app the Duplicate icon signals cloning a workflow, not sharing a URL — the removed Link icon was a more accurate affordance for this action.

Confidence Score: 3/5

Merging is low-risk from a functional standpoint — no data mutations or auth paths are touched — but the fuzzy-match highlight will appear as a barely-noticeable weight change rather than the colour-backed highlight that was the stated goal of the PR.

The highlight change in command-items.tsx replaces font-semibold with font-medium but omits the --highlight-match-bg/--highlight-match-text CSS variables the PR description says were adopted. In most themes the difference between medium and normal weight is imperceptible, so users lose the visual cue that shows which characters matched their query — the opposite of the intended improvement. The icon inconsistency (Scan from lucide vs. emcn for everything else) and the semantic mismatch of Duplicate for a copy-link action are contained style issues, but the highlight regression affects every search result rendered through HighlightedText.

command-items.tsx needs the highlight span updated to apply bg-[var(--highlight-match-bg)] text-[var(--highlight-match-text)] as described; search-modal.tsx is otherwise clean but worth a second look on the Duplicate icon choice and the direct lucide import.

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/search-modal/components/command-items/command-items.tsx Changed matched-text highlight from font-semibold text-[var(--text-body)] to font-medium — the stated design-system token alignment (--highlight-match-bg/--highlight-match-text) was not actually applied.
apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/search-modal/search-modal.tsx Removes useTheme/toggle-theme action, swaps three action icons (Expand→Scan from lucide, Link→Duplicate, Users→User); Scan is the only icon sourced outside @/components/emcn/icons and Duplicate carries a semantics mismatch for the copy-link action.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[cmd+k opens SearchModal] --> B[User types query]
    B --> C[HighlightedText renders matched chars]
    C --> D{segment.hit?}
    D -- yes --> E["span.font-medium (PR: was font-semibold)"]
    D -- no --> F[plain span]

    B --> G[filteredActions computed]
    G --> H{context matches page?}
    H -- workflow --> I["fit-to-view → Scan from lucide-react"]
    H -- workflow --> J["copy-workflow-url → Duplicate from emcn"]
    H -- global --> K["invite-teammates → User from emcn"]
    H -- global --> L["create/folder/import (unchanged)"]

    M["toggle-theme action REMOVED"] -.->|"useTheme dependency dropped"| N["next-themes no longer used here"]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[cmd+k opens SearchModal] --> B[User types query]
    B --> C[HighlightedText renders matched chars]
    C --> D{segment.hit?}
    D -- yes --> E["span.font-medium (PR: was font-semibold)"]
    D -- no --> F[plain span]

    B --> G[filteredActions computed]
    G --> H{context matches page?}
    H -- workflow --> I["fit-to-view → Scan from lucide-react"]
    H -- workflow --> J["copy-workflow-url → Duplicate from emcn"]
    H -- global --> K["invite-teammates → User from emcn"]
    H -- global --> L["create/folder/import (unchanged)"]

    M["toggle-theme action REMOVED"] -.->|"useTheme dependency dropped"| N["next-themes no longer used here"]
Loading

Reviews (1): Last reviewed commit: "improvement(search): use font-medium for..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant