feat(app): hint slash commands in prompt placeholder - #830
Conversation
The home composer placeholder previously mentioned `@` for mentioning files but never hinted at `/` for invoking commands. Non-technical users who never read keyboard docs had no way to discover the slash-command mechanism, even though it is the only entry point for inserting a command pill into the current task. Update `prompt.placeholder.home` in both locales to list all three inline affordances, add a unit test that asserts both `@` and `/` appear in the resolved copy, and add a `prompt-placeholder` snap target that captures the home composer in English and Chinese for visual review. Refs #826
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe PR extends the home prompt placeholder text to hint at both file-mention ( ChangesHome Prompt Placeholder Copy and Validation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Suggested priority: P2 (includes user-path files (packages/app/src/components/prompt-input/placeholder.test.ts, packages/app/src/i18n/en.ts, packages/app/src/i18n/zh.ts)).
P1/P0 are reserved for maintainer confirmation. Please relabel manually if this is a release blocker, security issue, data-loss risk, or updater/runtime failure.
There was a problem hiding this comment.
Code Review
This pull request updates the home prompt placeholder to include a hint for the / command in English and Chinese, supported by new unit tests and an E2E snapshot test. The review feedback recommends adding responsive test cases for smaller breakpoints to verify text visibility, reducing the E2E test timeout to a more standard value, and ensuring all supported locales are updated for feature parity.
Perf delta summaryComparator: fail
|
Add a 768px viewport row to the prompt-placeholder snap grid so the shot covers the Electron window minWidth (packages/desktop-electron/src/main/windows.ts). The placeholder element uses `truncate whitespace-nowrap`, so without this case the snap would not surface clipping of the new `/ for commands` hint at the narrowest supported window. The current copy still fits at 768px in both locales, but the snap now guards against regression if the hint copy grows further.
Window minWidth (768) is not the same as composer minWidth: the prompt width is window width minus sidebar minus right panel. Add a third column to the snap grid where the right panel is open, so the snap reflects the worst-case width the composer actually sees (~228px) and surfaces clipping of the new `/ for commands` hint that does not appear at the bare 768 window width. Use a locale-independent toggle via aria-controls="right-panel" since openRightPanel looks up by English aria name and would not find the button after the snap switches to zh.
The en squeezed shot opens the right panel, which persists rightPanel.opened into pawwork.global.dat:layout. Without clearing layout state before switching to zh, the zh-1440 and zh-768 shots inherit the open panel and duplicate the squeezed state — three of six zh cells covered the same width.
Summary
Update the home composer placeholder so it lists all three inline affordances: type a task,
@to mention files,/to invoke commands. Both English and Chinese copy updated.Why
The previous placeholder only hinted at
@mentions. Non-technical users had no way to discover that/opens a command popover from within the input box./is the only entry point that inserts a command pill into the current task (Cmd+Shift+Popens the global palette, a different browse-and-execute model).Related Issue
Closes #826.
Human Review Status
Pending
Review Focus
prompt-placeholdersnap target for both English and Chinese (see screenshot below).Risk Notes
None. Pure copy change in two locales plus a non-blocking snap target. No layout, logic, or behavior change.
How To Verify
Screenshots or Recordings
Checklist
bug,enhancement,task,documentation. Type labels are author-added; the labeler bot does NOT assign them. Add the label in the GitHub UI, then tick this.app,ui,platform,harness,ci. The labeler bot assigns these on PR open based on changed paths. Confirm the bot's choice (or override if wrong), then tick this.P0,P1,P2,P3. The priority-triage bot suggests one on PR open. Confirm or override, then tick this.Pending,Approved by @<reviewer>, orNot required: <reason>(default isPending; "not required" is restricted to bot-authored low-risk PRs).dev, and my PR title and commit messages use Conventional Commits in English.Summary by CodeRabbit
Documentation
@to mention files and/to trigger commands.Tests