fix(app): follow the selected agent in the home dock placeholder - #1600
Open
chphch wants to merge 1 commit into
Open
fix(app): follow the selected agent in the home dock placeholder#1600chphch wants to merge 1 commit into
chphch wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The session list's dock composer hardcodes
Ask Codexas 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
currentAgentis 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 typecheckclean 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 Code↔Ask Codex).🤖 Generated with Claude Code