Skip to content

Add command palette feature tip#4718

Open
brennanb2025 wants to merge 11 commits into
mainfrom
brennanb2025/cmd-j-feature-tip
Open

Add command palette feature tip#4718
brennanb2025 wants to merge 11 commits into
mainfrom
brennanb2025/cmd-j-feature-tip

Conversation

@brennanb2025
Copy link
Copy Markdown
Contributor

@brennanb2025 brennanb2025 commented Jun 5, 2026

Summary

  • Adds a concrete in-app feature tip for the Cmd+J command palette, teaching users they can jump across worktrees, settings, tabs, and quick actions from one search surface.
  • Renders the live, platform-correct binding via useShortcutKeys('worktree.palette') so the keycap cue stays accurate after a rebind (and shows Ctrl+Shift+J on Linux/Windows), with the description pointing to Settings for rebinding.
  • Hand-authored an Orca-style CSS/keyframes animation (keypress cue → palette entrance → selection sweep across a worktree, the Shortcuts setting, and a quick action). No runtime GIF/video.
  • Passive education tip: single Got it acknowledgement CTA, no secondary "Maybe Later". Priority sits just after the Orca CLI tip.

Test plan

  • pnpm exec vitest run --config config/vitest.config.ts src/shared/feature-tips.test.ts src/renderer/src/components/feature-tips/feature-tip-modal-state.test.ts src/renderer/src/components/feature-tips/feature-tip-startup-gate.test.ts
  • Typecheck (tsgo -p config/tsconfig.tc.web.json) and oxlint on changed files
  • Animation + modal composition verified via Playwright-screenshotted mock mirroring the React port's classes/timing. Live Electron renderer not spun up to avoid disturbing concurrent dev sessions.

Generated after feature-tip candidate review.

Made with Orca 🐋

Summary by CodeRabbit

  • New Features
    • Added a Cmd+J palette feature tip: interactive visual demo, dialog with actions, reduced-motion support, animations, and telemetry for "shown" and "acknowledged".
  • Chores
    • Updated UI wording from "workspace" to "worktree".
  • Tests
    • Added/updated tests for the new tip, visuals, telemetry, ordering, and startup gating.

Co-authored-by: Orca <help@stably.ai>
@brennanb2025 brennanb2025 self-assigned this Jun 5, 2026
brennanb2025 and others added 4 commits June 5, 2026 14:02
Co-authored-by: Orca <help@stably.ai>
…able Settings link

- Replace stacked setTimeout typing with a single setInterval at 90ms/char
  for uniform cadence; sync the whole visual to one master timeline so the
  keypress visibly precedes the palette opening (cause -> effect).
- Hold the populated end state for 3.2s so the user can actually read the
  matched worktrees + create option.
- Show the two results together via cmd-j-tip-result-in, mirroring how the
  real palette renders incremental search.
- Mixed agent states in the results: 1 done (green dot) + 1 running
  (Loader2 spinner with 'Running' chip) so the tip shows the palette's value
  at a glance.
- Add CmdJPaletteTipDialog and extract shared FeatureTipActions so
  FeatureTipsModal stays under the max-lines rule.
- Make the 'Settings' link in the description open Settings -> Shortcuts
  (uses the existing settingsNavigationTarget machinery), then close the
  tip and dismiss the modal so the tip doesn't re-appear on Settings close.

Co-authored-by: Orca <help@stably.ai>
… pacing

Refine the Cmd+J feature tip after design review: use a live shortcut chip
in the title, keep the panel divider full-height, and show generic worktree
fixtures that match a realistic `auth` search. Tighten the demo animation
with fixed palette dimensions so the search bar does not jump while typing.

Co-authored-by: Orca <help@stably.ai>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 7, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 805fae83-cef6-4b3d-afe3-0a379f31fca8

📥 Commits

Reviewing files that changed from the base of the PR and between c255e1f and 355bf9d.

📒 Files selected for processing (2)
  • src/renderer/src/components/feature-tips/CmdJPaletteFeatureTipVisual.tsx
  • src/renderer/src/components/feature-tips/CmdJPaletteTipDialog.tsx
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/renderer/src/components/feature-tips/CmdJPaletteTipDialog.tsx
  • src/renderer/src/components/feature-tips/CmdJPaletteFeatureTipVisual.tsx

Walkthrough

Adds a Cmd+J command-palette feature tip end-to-end: feature-tip types and registry, telemetry schemas and helpers, animated visual + CSS, dialog and shared actions, modal routing/handlers, workspace→worktree copy updates, and tests covering behavior and telemetry.

Changes

Cmd+J Palette Feature Tip

Layer / File(s) Summary
Feature tip contract and telemetry schema
src/shared/feature-tips.ts, src/shared/telemetry-events.ts, src/shared/feature-tips.test.ts
FeatureTipId adds 'cmd-j-palette', FeatureTipAction adds 'learn-cmd-j-palette', FEATURE_TIPS includes the new tip. Zod schemas for cmd_j_palette_feature_tip_shown and cmd_j_palette_feature_tip_acknowledged are registered. Tests updated for ordering, seen filtering, and tip shape.
Telemetry tracking infrastructure
src/renderer/src/components/feature-tips/feature-tip-telemetry.ts, src/renderer/src/components/feature-tips/feature-tip-telemetry.test.ts
Adds CmdJPaletteFeatureTipSource type and trackCmdJPaletteFeatureTipShown / trackCmdJPaletteFeatureTipAcknowledged helpers; tests assert telemetry events and payload source values.
Cmd+J palette visual component
src/renderer/src/assets/main.css, src/renderer/src/components/feature-tips/CmdJPaletteFeatureTipVisual.tsx, src/renderer/src/components/feature-tips/CmdJPaletteFeatureTipVisual.test.tsx
New CmdJPaletteFeatureTipVisual renders animated demo with staged typing, shortcut chips, filtered worktree results, and conditional "Create worktree" row. CSS adds caret/results animations with reduced-motion fallbacks. Tests cover reduced-motion, timers, shortcut fallbacks, and rendering.
Dialog wrapper and shared actions component
src/renderer/src/components/feature-tips/FeatureTipActions.tsx, src/renderer/src/components/feature-tips/CmdJPaletteTipDialog.tsx, src/renderer/src/components/feature-tips/CmdJPaletteTipDialog.test.tsx
Adds FeatureTipActions (skip + primary CTA with busy state) and CmdJPaletteTipDialog that renders inline shortcut <kbd> chips, eyebrow/description, rebind link, visual, and footer actions. Tests verify static rendering and fallbacks.
Feature tips modal integration
src/renderer/src/components/feature-tips/FeatureTipsModal.tsx
Routes learn-cmd-j-palette through CmdJPaletteTipDialog, renders CmdJPaletteFeatureTipVisual in visual branch, tracks acknowledgment telemetry on primary action, and adds openShortcutsSettings helper to mark tip seen and navigate to shortcuts settings.
Terminology updates: workspace → worktree
src/renderer/src/components/WorktreeJumpPalette.tsx, src/renderer/src/components/cmd-j/quick-actions.ts, src/renderer/src/components/cmd-j/palette-results.test.ts
Updates UI copy and test fixtures from "workspace" to "worktree": headers, hints, empty-state messages, placeholders, quick-action titles/descriptions/verb keywords, and test ranking queries.
Feature tip selection and sequencing tests
src/renderer/src/components/feature-tips/feature-tip-modal-state.test.ts, src/renderer/src/components/feature-tips/feature-tip-startup-gate.test.ts
Adds tests asserting fallback to cmd-j-palette after CLI tip seen and updates seenTipIds across scenarios to include cmd-j-palette where appropriate.
App-level integration
src/renderer/src/App.tsx, src/main/startup/dev-education-suppression.test.ts
Imports trackCmdJPaletteFeatureTipShown and calls it with 'app_open' when feature tip decision opens; dev-education suppression test updated to expect cmd-j-palette in suppressed featureTipsSeenIds.

Suggested reviewers

  • Jinwoo-H
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

brennanb2025 and others added 3 commits June 7, 2026 14:46
…ow-ups

Add CSS reduced-motion guards and JS animation gating to match the CLI tip
pattern, fall back to default shortcut labels when unassigned, improve dialog
a11y, wire palette tip telemetry, and add component tests.

Co-authored-by: Orca <help@stably.ai>
Show worktrees on empty query before filtering, add an uppercase TIP badge,
restore per-key shortcut chips with plus separators, and hold longer on the
open palette beat. Align Cmd+J palette strings from workspace to worktree.

Co-authored-by: Orca <help@stably.ai>
Narrow the FEATURE_TIPS fixture through a helper so tsgo accepts the tip
prop passed to CmdJPaletteTipDialog.

Co-authored-by: Orca <help@stably.ai>
@brennanb2025 brennanb2025 marked this pull request as ready for review June 8, 2026 01:39
Copy link
Copy Markdown
Contributor

@pullfrog pullfrog Bot left a comment

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes — adds a passive education feature tip for the Cmd+J command palette with a JS-driven animation, platform-correct shortcut rendering, and telemetry. Also renames "Workspaces" → "Worktrees" throughout the jump palette.

  • Add cmd-j-palette feature tip — new tip entry in FEATURE_TIPS with 'learn-cmd-j-palette' action, priority 'new', positioned after the CLI tip in the ordering. Title uses a <shortcut> placeholder token for live binding injection.
  • Add CmdJPaletteFeatureTipVisual — phase-machine animation (idle → pressed → open → typing → loop) with reduced-motion support, live shortcut-key chips with per-key stagger, and demo worktree filtering that mirrors the real palette behavior.
  • Add CmdJPaletteTipDialog — custom horizontal layout dialog matching the CLI tip presentation, with live shortcut rendered as a <kbd> chip in the title, a clickable rebind link to Settings → Shortcuts, and a single "Got it" acknowledgement CTA.
  • Extract FeatureTipActions into its own component from FeatureTipsModal, adding a getPrimaryBusyLabel helper keyed on the tip action.
  • Add telemetrycmd_j_palette_feature_tip_shown and cmd_j_palette_feature_tip_acknowledged events with source field, wired into the startup gate and modal dismiss paths.
  • Rename Workspaces → Worktrees — updates copy throughout WorktreeJumpPalette, quick-actions.ts, palette-results.test.ts, and related test expectations.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/renderer/src/components/feature-tips/CmdJPaletteFeatureTipVisual.tsx`:
- Around line 7-8: Update the in-file comment in CmdJPaletteFeatureTipVisual
(around the top comment block) to replace "workspace" with "worktree" so it
reads "live worktree switcher" and otherwise maintain the existing note about
recent worktrees and typing behavior; locate the comment near the existing text
"// Why: the real palette lists recent worktrees on open; typing only narrows
the list. Mix done + running states so the tip reads like a live workspace
switcher." and change the final phrase to "live worktree switcher".
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 94877fd3-fdba-43c5-97c9-dbcfe7503886

📥 Commits

Reviewing files that changed from the base of the PR and between 4106cc4 and 1547475.

📒 Files selected for processing (19)
  • src/main/startup/dev-education-suppression.test.ts
  • src/renderer/src/App.tsx
  • src/renderer/src/assets/main.css
  • src/renderer/src/components/WorktreeJumpPalette.tsx
  • src/renderer/src/components/cmd-j/palette-results.test.ts
  • src/renderer/src/components/cmd-j/quick-actions.ts
  • src/renderer/src/components/feature-tips/CmdJPaletteFeatureTipVisual.test.tsx
  • src/renderer/src/components/feature-tips/CmdJPaletteFeatureTipVisual.tsx
  • src/renderer/src/components/feature-tips/CmdJPaletteTipDialog.test.tsx
  • src/renderer/src/components/feature-tips/CmdJPaletteTipDialog.tsx
  • src/renderer/src/components/feature-tips/FeatureTipActions.tsx
  • src/renderer/src/components/feature-tips/FeatureTipsModal.tsx
  • src/renderer/src/components/feature-tips/feature-tip-modal-state.test.ts
  • src/renderer/src/components/feature-tips/feature-tip-startup-gate.test.ts
  • src/renderer/src/components/feature-tips/feature-tip-telemetry.test.ts
  • src/renderer/src/components/feature-tips/feature-tip-telemetry.ts
  • src/shared/feature-tips.test.ts
  • src/shared/feature-tips.ts
  • src/shared/telemetry-events.ts

Comment thread src/renderer/src/components/feature-tips/CmdJPaletteFeatureTipVisual.tsx Outdated
…-search list

Add a closing phase with a frozen filtered frame so the palette fades out on
the final search results instead of swapping to the empty-query worktree list.
Keep the palette hidden during the keypress beat and restore the full pre-search
dwell before typing on every cycle.

Co-authored-by: Orca <help@stably.ai>
Copy link
Copy Markdown
Contributor

@pullfrog pullfrog Bot left a comment

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes — one commit since the prior review: fixes a visual glitch in the command palette feature tip animation where the loop reset briefly flashed the unfiltered worktree list before the closing fade completed.

  • Add closing phase to animation cycle — freezes the final filtered state (query, worktrees, create-row) into a ClosingFrame snapshot before resetting, so the palette fades out with its last content intact rather than flashing back to the pre-search list.
  • Hide palette during pressed phase — uses pointer-events-none invisible opacity-0 instead of just opacity-0, preventing an empty search shell from briefly appearing between animation cycles.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

brennanb2025 and others added 2 commits June 7, 2026 19:55
Prevent Radix from auto-focusing the inline Settings → Shortcuts control
and style it as plain underlined text so the tip does not look pre-selected.

Co-authored-by: Orca <help@stably.ai>
Address CodeRabbit review feedback on the demo animation comment.

Co-authored-by: Orca <help@stably.ai>
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