Skip to content

Add starter prompt suggestions to the empty conversation state#73

Open
DragonnZhang wants to merge 1 commit into
mainfrom
loop/starter-suggestions
Open

Add starter prompt suggestions to the empty conversation state#73
DragonnZhang wants to merge 1 commit into
mainfrom
loop/starter-suggestions

Conversation

@DragonnZhang

Copy link
Copy Markdown
Collaborator

Closes #72

What & why

A new conversation shows a centered composer under "What should we build?" and nothing else. Every comparable desktop client (Claude Code Desktop "prompt suggestions", ChatGPT / Codex example prompts) fills that blank canvas with clickable starting points. This adds the same to OpenWork.

What changed

  • EmptyStateSuggestions (new, apps/electron/src/renderer/components/app-shell/EmptyStateSuggestions.tsx) — a row of 4 build-oriented suggestion chips (Explain this codebase, Build a feature, Fix a bug, Write tests), each a localized label + icon.
  • ChatDisplay — renders the chips beneath the centered empty-state composer, only while the composer is empty. Clicking a chip seeds the composer with the fuller localized prompt through the existing controlled-draft channel (onInputChangeinputValue) and focuses the input. It does not auto-send — the user can edit first. Chips disappear once the composer has content (seeded or typed).
  • i18n — 8 new keys (chat.suggestions.<id>.title / .prompt) added to all 7 locales.
  • e2ee2e/assertions/starter-suggestions.assert.ts driving the full path.

Frontend-only: no backend / qwen-code changes, no new IPC, no new persistence — content is static and localized, seeding reuses the path drafts already use.

Verification

Check Result
bun run typecheck:all ✅ zero delta vs main (11 pre-existing electron-typecheck baseline errors — missing vitest types + an auto-update.ts type issue — byte-identical with/without this change; packages/ui clean)
bun test ✅ zero delta vs main (56 pre-existing baseline failures byte-identical with/without this change)
bun run electron:build:renderer ✅ builds
bun run lint:i18n:parity ✅ 6 locales, 1552 keys each
eslint (touched files) ✅ 0 errors
CDP assertion (bun run e2e) ⚠️ could not execute in this environment — the Electron binary can't be installed (its download host github.com/releases returns 403 under the sandbox egress policy; node_modules/electron/dist/electron is absent). The assertion is included and transpile-checked so it runs in CI / locally where Electron is available.

CDP assertion coverage

The assertion drives the real UI end-to-end (not "it booted"):

  1. Reaches the ready AppShell and waits for [data-testid="empty-suggestions"].
  2. Asserts 4 visible chips.
  3. Asserts the composer starts empty.
  4. Clicks the first chip and asserts the composer is populated with a prompt longer than the chip's short label (proving it seeds the prompt, not the title).
  5. Asserts the suggestions surface disappears once the composer has content.

Generated by Claude Code

Render a row of clickable starter-prompt chips beneath the centered
composer on the empty conversation state (only while the composer is
empty). Clicking a chip seeds the composer with a fuller prompt via the
existing controlled-draft channel and focuses the input — it does not
auto-send, so the user can edit before submitting.

- New EmptyStateSuggestions component (4 build-oriented suggestions)
- Wired into ChatDisplay's empty-state block; hides once the composer
  has content
- 8 new i18n keys across all 7 locales
- CDP assertion driving the full path (render -> click -> composer
  seeded -> suggestions hide)

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add starter prompt suggestions to the empty conversation state

2 participants