Display chat name and model badge in chat panel header#3
Merged
Conversation
|
🚅 Deployed to the padtask-pr-3 environment in padtask
|
- Add model badge (right-justified) in chat panel header showing the model returned by the API (e.g. claude-sonnet-4-20250514) - Replace hardcoded "Chat" title with dynamic chat name that syncs with the sidebar (updates on rename, first message, and chat switch) - Server now returns `model` field from the Anthropic API response https://claude.ai/code/session_01WjjDjbvTo4TkS8taZKpBrj
ad42bd0 to
0bbeb15
Compare
- Changed model badge color from #555 to #888 for better contrast against the dark #111 header background - Show default model name on page load instead of empty span https://claude.ai/code/session_01WjjDjbvTo4TkS8taZKpBrj
- Added background, border, and padding to make the badge stand out - Bumped font size and weight for better readability https://claude.ai/code/session_01WjjDjbvTo4TkS8taZKpBrj
Maps API model IDs to clean display names: - claude-sonnet-* → Sonnet 4.6 - claude-opus-* → Opus 4.6 - claude-haiku-* → Haiku 4.5 https://claude.ai/code/session_01WjjDjbvTo4TkS8taZKpBrj
Use same font-size, color, background, padding, border-radius, and border as the task count badge for visual consistency. https://claude.ai/code/session_01WjjDjbvTo4TkS8taZKpBrj
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.
Summary
This PR adds dynamic chat panel header updates to display the current chat name and the AI model being used. The chat panel title now reflects the active chat session, and a model badge shows which model generated the response.
Key Changes
.model-badgeCSS class: Styled badge element for displaying the model name with smaller font size and muted colorupdatePanelTitle()function: Updates the chat panel title to reflect the currently active chat session/api/chatendpoint to include themodelfield in the JSON responseImplementation Details
data.modelfieldupdatePanelTitle()to keep the UI in synchttps://claude.ai/code/session_01WjjDjbvTo4TkS8taZKpBrj