Skip to content

fix(app): follow the selected agent in the home dock placeholder - #1600

Open
chphch wants to merge 1 commit into
slopus:mainfrom
chphch:pr/home-dock-placeholder
Open

fix(app): follow the selected agent in the home dock placeholder#1600
chphch wants to merge 1 commit into
slopus:mainfrom
chphch:pr/home-dock-placeholder

Conversation

@chphch

@chphch chphch commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Problem

The session list's dock composer hardcodes Ask Codex as the placeholder of its focused state:

https://github.com/slopus/happy/blob/3c0155c2/packages/happy-app/sources/components/HomeDock.tsx#L1049

It names Codex regardless of which agent the new-session draft has selected, so anyone whose default is Claude Code (or Gemini, OpenClaw, Agy) is told they are about to talk to a different agent than the one that will actually start. The dock right below it shows the real agent, so the two disagree on the same screen.

Fix

Derive the placeholder from the selected agent, the same way the first-message composer already does:

https://github.com/slopus/happy/blob/3c0155c2/packages/happy-app/sources/app/(app)/new/index.tsx#L1879

-                            placeholder="Ask Codex"
+                            placeholder={`Ask ${currentAgent.name}`}

currentAgent is already computed in this component for the model button's fallback label, so there is no new state or lookup.

Left the string hardcoded rather than routing it through t(...), to match its neighbours in this component (Plan, ask, build…, Machine, Project, Worktree, No worktree) — happy to switch it to a translation key if you would rather fix all of them at once.

Verification

pnpm typecheck clean on this branch. Rendered the dock at phone width and switched the agent between Claude Code and Codex — the placeholder follows the selection (Ask Claude CodeAsk Codex).

🤖 Generated with Claude Code

The session list's dock composer hardcoded "Ask Codex" in its focused
state, so it named Codex no matter which agent the new-session draft
had selected — misleading for anyone whose default is Claude Code.

Derive it from the draft's agent instead, the same way the first-message
composer already does (`app/(app)/new/index.tsx`).

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
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