Skip to content

feat(search): page-aware cmd+k palette with ask-Sim mode - #6518

Merged
j15z merged 30 commits into
stagingfrom
feat-enhance-cmd-k
Aug 11, 2026
Merged

feat(search): page-aware cmd+k palette with ask-Sim mode#6518
j15z merged 30 commits into
stagingfrom
feat-enhance-cmd-k

Conversation

@j15z

@j15zj15z commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Rebuilds cmd+k into one page-aware section model: results rank across sections in a single list, with page-context action groups (Actions / Sim) and exact-name tiers — typing a page name puts the page first, "start" puts the Start Trigger first, "deploy"/"copy"/"workflows" put their verb actions first, and matched actions carry a half-tier bias over equal-quality entity rows
  • Tab toggles Ask Sim mode: Enter auto-sends the typed query as a new chat through the chat handoff — raw prose, delivered identically whether Home is already mounted or reached cross-route. Depends on the send-recovery fix beneath this branch (fix(chat): stop losing sends aborted during mount-settling #6525)
  • The empty state browses every section uncapped (sections in sidebar order, chats above the integrations catalog); tool operations are search-only to keep open/close snappy. Ranking runs against a deferred query with cached tokenization so typing never blocks, and palette-only data (credentials, recent logs) fetches once the palette opens
  • Page surfaces (tables, files, knowledge, logs, canvas) register palette-only commands next to their handlers; gated invocations give feedback (e.g. a blocked deploy toasts the button tooltip's reason)
  • Shares the command chrome (search field + faded list) with the canvas connection selector; ports the palette onto the current base: emcn icon set, native browser-panel occlusion gating, scheduled-tasks retirement, and removal of the ?handoff=1 URL-signal machinery in favor of the inline chip-aware handoff consumer
  • Note for reviewers: the palette still unmounts on close, so the occlusion close-transition linger is intentionally not carried over — worth a desktop-app sanity check with a browser panel open

Type of Change

  • New feature

Testing

65 palette tests plus 202 across the touched areas pass; type-check, lint, and the full audit suite are green. Ask Sim auto-send live-verified end to end (cross-route: POST 200, chat created, message rendered)

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)

🤖 Generated with Claude Code

@vercel

vercelBot commented Aug 11, 2026

Copy link
Copy Markdown

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

ProjectDeploymentActionsUpdated (UTC)
docsReadyReadyPreviewAug 11, 2026 7:30am

Request Review

@cursor

cursorBot commented Aug 11, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Large UX surface across routing, chat handoff, and many page-registered command ids; ranking and permission gating changes are easy to miss in manual QA but do not alter core auth or data APIs.

Overview
Rebuilds the workspace cmd+k palette around one section model: empty-query browse follows sidebar order (uncapped sections), typed queries merge-rank across sections with page-aware hoisting, action bias, and exact-name tiers (page names, module verbs like workflows/deploy/copy, trigger names).

Tab toggles Ask Sim mode; Enter sends the query as a new chat via mothership handoff (or direct send when Home is already mounted), with persistence failure keeping the palette open.

Page surfaces (tables, files, knowledge, logs, deploy) register palette-only global commands via useRegisterGlobalCommands; GlobalCommand.shortcut is now optional so those handlers are invoked by id. Gated actions (e.g. deploy) surface the same feedback as disabled UI (toast).

Search ranking uses a deferred query, kebab-cased secondary tokens (toSearchToken), stricter secondary-text matching, and tool operations browse-hidden but searchable. Docs group and search-modal sections / pendingConnect store fields are removed; logs and workspace logos join the palette.

Shared CommandSearch / CommandFadedList chrome replaces ad-hoc cmdk layout in the palette and connection block selector; result rendering consolidates on SearchEntryGroup with richer row metadata and shortcut hints.

Reviewed by Cursor Bugbot for commit 9ad2d36. Bugbot is set up for automated code reviews on this repo. Configure here.

@greptile-apps

greptile-appsBot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR rebuilds the command palette around page-aware, globally ranked sections and adds Ask Sim handoff behavior.

  • Registers page-specific palette actions through the global command provider.
  • Adds unified search ranking, rendering, command chrome, and associated tests.
  • Updates deploy command eligibility to share the visible control’s loading and disabled guards.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains; both previously reported deploy paths are guarded in the current code, and the barrel-export concern was resolved as an intentional local convention.

Important Files Changed

FilenameOverview
apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/search-modal/search-modal.tsxRebuilds the palette around page-aware sections, unified ranking, and Ask Sim mode.
apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/search-modal/utils.tsImplements the search-entry model, ranking tiers, and action biases used by the palette.
apps/sim/app/workspace/[workspaceId]/providers/global-commands-provider.tsxExtends global commands to support palette-only commands without keyboard shortcuts.
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/deploy.tsxRegisters the deploy palette action and applies canonical permission, readiness, and registry-loading guards.
apps/sim/stores/modals/search/store.tsUpdates palette modal state and Ask Sim handoff behavior.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
Input[Command palette input] --> Rank[Rank page-aware sections]
Rank --> Results[Unified result list]
Results --> Page[Open page or entity]
Results --> Action[Invoke registered page action]
Input -->|Tab| Ask[Ask Sim mode]
Ask -->|Enter| Home[Open Home with chat prefill]
Loading

Reviews (13): Last reviewed commit: "fix(deploy): use the emcn toast input sh..." | Re-trigger Greptile

@j15z

j15z commented Aug 11, 2026

Copy link
Copy Markdown
CollaboratorAuthor

@greptile

@j15z

j15z commented Aug 11, 2026

Copy link
Copy Markdown
CollaboratorAuthor

@cursor review

@cursorcursorBot 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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit c3b2738. Configure here.

@icecrasher321

Copy link
Copy Markdown
Collaborator

@j15z you can rebase this against staging, the base was merged into that

@j15z
j15z changed the base branch from workflow-updates-v2 to stagingAugust 11, 2026 02:32
@j15z

j15z commented Aug 11, 2026

Copy link
Copy Markdown
CollaboratorAuthor

@greptile

@j15z

j15z commented Aug 11, 2026

Copy link
Copy Markdown
CollaboratorAuthor

@cursor review

@j15z
j15zforce-pushed the feat-enhance-cmd-k branch 2 times, most recently from 6d36494 to 5f8c15bCompareAugust 11, 2026 02:45
@j15z

j15z commented Aug 11, 2026

Copy link
Copy Markdown
CollaboratorAuthor

@greptile

@j15z

j15z commented Aug 11, 2026

Copy link
Copy Markdown
CollaboratorAuthor

@cursor review

@j15z

j15z commented Aug 11, 2026

Copy link
Copy Markdown
CollaboratorAuthor

@greptile

@j15z

j15z commented Aug 11, 2026

Copy link
Copy Markdown
CollaboratorAuthor

@cursor review

@cursorcursorBot 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.

✅ Bugbot reviewed your changes and found no new issues!

1 issue from previous review remains unresolved.

Fix All in Cursor

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 54aa354. Configure here.

@j15z

j15z commented Aug 11, 2026

Copy link
Copy Markdown
CollaboratorAuthor

@greptile

@j15z

j15z commented Aug 11, 2026

Copy link
Copy Markdown
CollaboratorAuthor

@cursor review

@cursorcursorBot 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.

✅ Bugbot reviewed your changes and found no new issues!

1 issue from previous review remains unresolved.

Fix All in Cursor

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 575223d. Configure here.

j15z added 16 commits August 10, 2026 22:49
Carries the former merge resolutions as one commit: the emcn icon set
(SelectAll fit-to-view, Search chrome), native browser-panel occlusion
gating, scheduled-tasks retirement, the chip-aware handoff consumer
superseding the ?handoff=1 machinery, and Knowledge bases pluralization.
Auto-send still loses the message on cross-route navigation — use-chat's
cleanup abort fires during Home's mount-settling effect cycle. Prefill
restored, but via LandingPromptStorage directly so free-form queries are
never mentionified into @ chips.
Re-lands the auto-send flip: with fix/mship-mount-send-loss beneath this
branch, sends started during Home's mount-settling window survive the
cleanup abort (queued, restored, re-dispatched), so the handoff no longer
loses the query on cross-route navigation.
- rank against a deferred query and hoist search-independent derivations
so typing never blocks on the cross-section re-rank
- cache secondary-text tokenization (hottest per-keystroke loop)
- skip building browse groups mid-search; gate the palette-only
credentials and logs queries on the palette being open
- flatten getGlobalSearchResults onto a spec-stable sort
- drop the dead store-side SEARCH_SECTIONS/docs path, the no-op
CommandSearch surface variant, a duplicate hex regex, a dead
font-base class, and the TaskItem/FolderedItem shape overlap
The frost under the floating input reused the canvas card's --surface-2
gradient, which reads as a tinted band on the palette's --surface-4/
--surface-5 dialog (visible in dark mode). The CommandSearch surface
variant returns — this time with genuinely different values — and the
chrome test pins the host-matching fog.
- table import command respects the in-progress upload gate
- Export CSV is offered to viewers (matching the header control)
- palette mode flips with the deferred query the ranking ran against
- a gated palette deploy reports the button tooltip's reason via toast
@j15z

j15z commented Aug 11, 2026

Copy link
Copy Markdown
CollaboratorAuthor

@greptile

@j15z

j15z commented Aug 11, 2026

Copy link
Copy Markdown
CollaboratorAuthor

@cursor review

@cursorcursorBot 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 using high effort and found 2 potential issues.

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 b39bb97. Configure here.

handler: () => {
if (!userPermissions.canEdit || tableDataRef.current?.locks.insertLocked) return
onRequestImportCsv()
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Silent locked CSV import

Medium Severity

table-import-csv still appears in the palette whenever canEdit is true, but the handler returns with no feedback when insertLocked is set. The header control is disabled for that lock, and the sibling table-new-column command already surfaces a blocked toast for schemaLocked, so a palette import on an insert-locked table looks selectable and then does nothing.

Additional Locations (1)
Fix in CursorFix in Web

Reviewed by Cursor Bugbot for commit b39bb97. Configure here.

handler: () => {
if (!tableDataRef.current?.rowCount) return
void handleExportCsv()
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Silent empty CSV export

Low Severity

table-export-csv is always offered on table detail, but the handler no-ops when rowCount is 0. The header Export control is disabled for empty tables, so the palette path gives no indication why nothing happened—the same class of silent failure the deploy action was later fixed to toast for.

Additional Locations (1)
Fix in CursorFix in Web

Reviewed by Cursor Bugbot for commit b39bb97. Configure here.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Base automatically changed from fix/mship-mount-send-loss to stagingAugust 11, 2026 07:19
# Conflicts:
#	apps/sim/app/workspace/[workspaceId]/home/home.tsx
#	apps/sim/app/workspace/[workspaceId]/home/hooks/use-chat.mount-send.test.tsx
#	apps/sim/app/workspace/[workspaceId]/home/hooks/use-chat.ts
#	apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/panel.tsx
#	apps/sim/lib/core/utils/browser-storage.ts
#	apps/sim/lib/mothership/events.ts
@j15z
j15z enabled auto-merge (squash) August 11, 2026 07:28
@j15z
j15z merged commit 9277e7d into stagingAug 11, 2026
29 of 30 checks passed
@j15z
j15z deleted the feat-enhance-cmd-k branch August 11, 2026 07:29
Sign up for freeto 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.

2 participants

@j15z@icecrasher321