From 550cbee113e28f43775151d87dc36abf934657b3 Mon Sep 17 00:00:00 2001 From: Ammar Date: Mon, 1 Jun 2026 19:59:28 -0500 Subject: [PATCH 1/2] feat: add symbol-shortcut tip to placeholder carousel Surface the backslash symbol shortcut feature in the ChatInput placeholder tips carousel, and generalize the tip invariant (doc comment + test) to accept backslash shortcuts in addition to slash commands. --- .../features/ChatInput/placeholderTips.test.ts | 7 +++++-- src/browser/features/ChatInput/placeholderTips.ts | 13 ++++++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/browser/features/ChatInput/placeholderTips.test.ts b/src/browser/features/ChatInput/placeholderTips.test.ts index 44f44ed518..9411c237f9 100644 --- a/src/browser/features/ChatInput/placeholderTips.test.ts +++ b/src/browser/features/ChatInput/placeholderTips.test.ts @@ -8,9 +8,12 @@ interface StorybookGlobal { const TWENTY_MIN_MS = 20 * 60 * 1000; describe("PLACEHOLDER_TIPS", () => { - test("every tip references a slash command", () => { + test("every tip references a slash command or backslash symbol shortcut", () => { for (const tip of PLACEHOLDER_TIPS) { - expect(tip).toMatch(/\/[A-Za-z+]/); + // Tips must point at a real input feature: a slash command (/orchestrate) + // or a backslash symbol shortcut (\alpha). Anything else would send the + // user toward something the input doesn't actually do. + expect(tip).toMatch(/[/\\][A-Za-z+]/); } }); diff --git a/src/browser/features/ChatInput/placeholderTips.ts b/src/browser/features/ChatInput/placeholderTips.ts index fb3e14a70c..3707dfd0b3 100644 --- a/src/browser/features/ChatInput/placeholderTips.ts +++ b/src/browser/features/ChatInput/placeholderTips.ts @@ -11,11 +11,13 @@ * same bucket and you still see the same tip. The bucket boundary is the * only thing that advances the carousel. * - * Every tip in this list must be wired up as a real slash command (registry - * or built-in skill) AND ungated by experiments (no `experimentGate` on the - * command definition). Advertising an unimplemented or feature-flag-locked - * command sends the user into an unknown-command / experiment-required dead - * end the moment they follow the suggestion. When adding a tip, grep + * Every tip in this list must surface a real, always-available input feature: + * either a slash command (registry or built-in skill) that is ungated by + * experiments (no `experimentGate` on the command definition), or a backslash + * symbol shortcut (see `symbolShortcuts.ts`, which is always on). Advertising + * an unimplemented or feature-flag-locked command sends the user into an + * unknown-command / experiment-required dead end the moment they follow the + * suggestion. When adding a slash-command tip, grep * `src/browser/utils/slashCommands/registry.ts` for `experimentGate` to make * sure the command you're surfacing isn't gated. */ @@ -50,6 +52,7 @@ export const PLACEHOLDER_TIPS: readonly string[] = [ "Try /clear --soft to reset context while keeping the chat visible", "Try /new to start a fresh workspace from the trunk branch", "Try /vim to toggle vim keybindings in the chat input", + "Try \\alpha or \\sum to insert LaTeX-style symbols like α and ∑ as you type", ]; /** From a952f8894f02408ff2ea8e04b2deb3959fb158b3 Mon Sep 17 00:00:00 2001 From: Ammar Date: Mon, 1 Jun 2026 20:11:51 -0500 Subject: [PATCH 2/2] tests: drop tautological tip-format assertion per review --- src/browser/features/ChatInput/placeholderTips.test.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/browser/features/ChatInput/placeholderTips.test.ts b/src/browser/features/ChatInput/placeholderTips.test.ts index 9411c237f9..d62e4ae942 100644 --- a/src/browser/features/ChatInput/placeholderTips.test.ts +++ b/src/browser/features/ChatInput/placeholderTips.test.ts @@ -8,15 +8,6 @@ interface StorybookGlobal { const TWENTY_MIN_MS = 20 * 60 * 1000; describe("PLACEHOLDER_TIPS", () => { - test("every tip references a slash command or backslash symbol shortcut", () => { - for (const tip of PLACEHOLDER_TIPS) { - // Tips must point at a real input feature: a slash command (/orchestrate) - // or a backslash symbol shortcut (\alpha). Anything else would send the - // user toward something the input doesn't actually do. - expect(tip).toMatch(/[/\\][A-Za-z+]/); - } - }); - test("tips are unique", () => { const unique = new Set(PLACEHOLDER_TIPS); expect(unique.size).toBe(PLACEHOLDER_TIPS.length);