Skip to content

fix(chat): put the phone's suggestion chip behind a setting, off by default - #223

Merged
devswha merged 3 commits into
mainfrom
fix/suggestion-chip-setting
Oct 1, 2026
Merged

devswha merged 3 commits into
mainfrom
fix/suggestion-chip-setting

Conversation

@devswha

@devswha devswha commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

Change

#198 shows the prompt Claude Code suggests next as a dashed chip above the message box on touch screens, and there was no way to turn it off. The chip now waits for Settings → Composer → Suggestion chip (showSuggestionChip), which is off by default, like the quick replies row.

  • The suggestion still stands as the box's placeholder on every screen, and Tab still takes it with a keyboard. Only the touch-screen chip changes.
  • showSuggestionChip gets a default and sanitizing in settings.ts, a toggle row in SettingsDialog, and strings in ko, ja and zh.
  • CHANGELOG: [Unreleased] → Changed.

Validation

  • bun run typecheck and bun run test:unit (636 pass, including a new settings.test.ts case for the default and sanitizing).
  • bun run test:ui (32 PASS): a new 390×844 touch check. With default settings, the suggestion shows as the placeholder and there is no chip. With the setting on, the chip shows, and a tap puts the suggestion in the box. With main's Composer.tsx, which shows the chip without the setting, the check fails at its "no suggestion chip" assertion.

🤖 Generated with Claude Code

devswha and others added 2 commits October 1, 2026 13:26
…efault

#198 shows Claude Code's suggested next prompt as a dashed chip above the
message box on touch screens, with no way to turn it off. It now waits
for Settings -> Composer -> Suggestion chip (showSuggestionChip, off by
default). The suggestion still stands as the box's placeholder, and Tab
still takes it with a keyboard.

- settings: showSuggestionChip in Settings, its default and sanitizing,
  with a unit test.
- ui-regression: a phone with default settings shows the suggestion as
  the placeholder and no chip; a phone with the setting on shows the
  chip, and a tap puts the suggestion in the box.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: devswha/herdr-web-ui/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: b130910e-16a4-49f4-accc-6cd37af4d70a

📥 Commits

Reviewing files that changed from the base of the PR and between 29a872f and fd022db.

📒 Files selected for processing (8)
  • CHANGELOG.md
  • scripts/ui-regression.ts
  • src/components/Composer.tsx
  • src/components/SettingsDialog.tsx
  • src/lib/i18n.ja.ts
  • src/lib/i18n.ko.ts
  • src/lib/i18n.zh.ts
  • src/lib/settings.ts
🚧 Files skipped from review as they are similar to previous changes (4)
  • src/lib/i18n.ko.ts
  • src/lib/i18n.ja.ts
  • src/lib/i18n.zh.ts
  • CHANGELOG.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.


📝 Summary

Summary by CodeRabbit

  • New Features
    • On touch screens, the suggested-prompt chip is off by default. Enable it in Settings → Composer → Suggestion chip to insert a suggestion with a tap. The suggestion remains available as the composer placeholder, and keyboard users can still accept it with Tab.
    • The setting is available in English, Japanese, Korean, and Simplified Chinese.
  • Bug Fixes
    • The suggestion chip appears only when enabled, a suggestion is available, and the composer is empty.

Walkthrough

Adds a default-off setting for the suggestion chip, exposes it in Composer settings, and applies it to chip rendering. Mobile regression checks cover the disabled and enabled states. The changelog describes the setting and existing placeholder and Tab behavior.

Changes

Suggestion Chip

Layer / File(s) Summary
Add and expose the chip preference
src/lib/settings.ts, src/components/SettingsDialog.tsx, src/lib/i18n.*.ts, src/lib/settings.test.ts
Adds the showSuggestionChip preference with a default of false and boolean sanitization. Adds the Composer settings toggle, Japanese, Korean, and Chinese translations, and settings tests.
Control and verify composer chip behavior
src/components/Composer.tsx, scripts/ui-regression.ts, CHANGELOG.md
The Composer shows the chip only when the setting is enabled, a suggestion is offered, and the composer is empty. Mobile regression checks cover the disabled and enabled states. The changelog documents the setting and existing placeholder and Tab behavior.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: haeminway1

Merge Risk: ⚪ Minimal · up to fd022

The suggestion chip is now opt-in while placeholder and Tab acceptance remain available. No material merge-blocking risk is evident; normal checks are sufficient.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 8 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: placing the phone suggestion chip behind a setting and disabling it by default.
Description check ✅ Passed The description includes the required Change and Validation sections, explains the new setting and behavior, and reports relevant typecheck, unit, and UI test results. It does not include the template…
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 8 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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

@devswha
devswha merged commit ce4a16f into main Oct 1, 2026
3 checks passed
@devswha
devswha deleted the fix/suggestion-chip-setting branch October 1, 2026 05:26
devswha added a commit that referenced this pull request Oct 1, 2026
## Change

Installed apps are on v0.3.36. This PR prepares v0.3.37: the app and
plugin versions go up together, and the Unreleased notes move under the
dated release heading.

This release trims UI that 0.3.36 added or kept. Everything in it is
under **Changed**:
- The agent icon choice (Clawd, the Codex app mark) leaves Settings →
Appearance. Panes show the provider logos again, also where an icon was
chosen in 0.3.36. The color palettes stay (#219).
- **Report a problem** leaves the composer on every screen, and **Hide
keyboard** leaves it on phones. Tapping the transcript or dragging it
down still puts the keyboard away (#221).
- The phone's suggestion chip is off until Settings → Composer →
**Suggestion chip** turns it on. The placeholder and Tab are unchanged
(#223).

No server or remote-bundle changes.

## Validation

- `bun scripts/release-notes.ts 0.3.37` passes.
- Fast checks and Integration and browser must pass before the squash
merge. After the merge, publish with `gh workflow run release.yml --ref
main -f version=0.3.37`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <[email protected]>
devswha added a commit that referenced this pull request Oct 7, 2026
…he mic button and a phone's Agents list (#559)

## Change

Four defaults, chosen while looking at the demo on a fresh browser.

- **Sidebar rows default to Two lines.** A workspace row says what its agent is doing, with the workspace and folder under it. **One line** stays in Settings → Appearance.
- **The suggestion chip is on by default.** On a touch screen the chip above the message box takes Claude Code's suggested next prompt; #223 had turned it off until chosen. It is still hidden where a mouse is used (Tab takes the suggestion there).
- **A phone's Agents list starts folded.** At the width where the sidebar is a drawer (`max-width: 768px`) the list opens folded, with its heading and count; a tap opens it. The fold is not stored, as before.
- **The mic shows in a desktop's chat without being turned on.** `voiceInput` was a boolean, off until chosen. It is now `auto | on | off`, default `auto`, and Settings → Voice input → Microphone button is a three-way control.

| | desktop chat | phone chat | terminal input line |
|---|---|---|---|
| Auto (default) | shown where dictation can work | hidden | hidden |
| On | shown | shown | shown |
| Off | hidden | hidden | hidden |

"Can work" is `useVoiceInput`'s `available`: a secure context, and a server key or the browser's own recognition. On Auto a mic that could not work is left out; On keeps today's behavior, disabled with its reason. "Phone" is the composer's own `(max-width: 640px), (pointer: coarse)`, so a tablet counts as one.

Decisions worth a look in review:

- **A stored `false` reads as `auto`.** Any settings change writes the whole record, so nearly every existing device holds `voiceInput: false` whether or not anyone chose it. Reading it as off would show the mic to new browsers only. The cost: a device that had turned the mic off on purpose sees it again in a desktop's chat. A stored `true` reads as `on`.
- **Without a key, Chrome and Edge send the audio to Google or Microsoft** once the mic is pressed. Nothing is recorded before that, and the Settings hint says so, but the button is now there without a choice.
- A desktop's composer now asks `GET /api/voice` on mount (one request, shared by every composer). `scripts/chat-history-browser-qa.ts` serves its own fixture and did not answer that route, which made its process exit non-zero; it answers it now. The demo transport already did.

The unreleased CHANGELOG line of #521 said One line "stays the default"; it is reworded.

## Validation

- `bun run check fast`: workflow syntax, generated types, typecheck, build, unit tests (1648 pass, 0 fail).
- `bun run check browser`: the whole lane, 173 PASS, exit 0.
- Outside the lane, each with `bun run check run`: `pi-image-browser-qa`, `skill-activity-browser-qa`, `update-browser-qa`, `font-swap-demo-regression`, `keyboard-viewport-demo-regression`, all exit 0.
- New in `scripts/ui-regression.ts`: rows are two lines until One line is chosen; a phone shows the chip until Settings turns it off; a phone's drawer opens with Agents folded; a desktop's chat offers the mic and a phone's does not.
- New unit tests in `src/lib/settings.test.ts` for the three-way setting, the legacy boolean and where Auto asks for the mic.
- One earlier run of the lane timed out at "the message sent before the snapshot is a live pending row" (the step #556 also reported); the reruns passed.

No screenshot attached. README and site media still show one-line rows.

🤖 Generated with [Claude Code](https://claude.com/claude-code)


Co-Authored-By: Claude Fable 5.1 <[email protected]>
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