Skip to content

feat(agent): display model name at end of completed chat session#1000

Open
Aarjav Jain (A2rjav) wants to merge 1 commit into
browseros-ai:devfrom
A2rjav:feat/883-display-model-name-at-session-end
Open

feat(agent): display model name at end of completed chat session#1000
Aarjav Jain (A2rjav) wants to merge 1 commit into
browseros-ai:devfrom
A2rjav:feat/883-display-model-name-at-session-end

Conversation

@A2rjav
Copy link
Copy Markdown

@A2rjav Aarjav Jain (A2rjav) commented May 12, 2026

Summary

Closes #883

Adds a small "Session completed with " footer that renders beneath the conversation once an assistant turn finishes. Users had no in-UI signal of which provider/model handled a given session, which made comparing model behaviour and debugging unexpected output harder than necessary.

Changes

New component: apps/agent/entrypoints/sidepanel/index/SessionCompletedFooter.tsx

  • Pure presentational component, no side effects
  • Subtle muted styling that doesn't compete with the conversation
  • formatSessionCompletedLabel helper resolves the best label:
    • LLM targets → Provider.name (the user's configured display name)
    • ACP targets → <adapterName> · <modelLabel> (e.g. Codex · gpt-4-turbo)
    • Graceful fallbacks when ACP metadata is partial (adapterName-only, modelLabel-only, or Provider.name)
  • Returns null when the provider is undefined or no label can be resolved

Wire-up: apps/agent/entrypoints/sidepanel/index/Chat.tsx

  • Renders the footer inside the chat <main> after the error banners
  • Visibility gated on: messages.length > 0 && status === 'ready' && !chatError && !agentUrlError
  • Hidden while streaming, while restoring a conversation, and while an error is showing

Tests: apps/agent/entrypoints/sidepanel/index/SessionCompletedFooter.test.ts

  • 6 cases covering: undefined provider, LLM target, full ACP target, ACP with only adapterName, ACP with only modelLabel, ACP with neither

Test plan

  • bun test apps/agent/entrypoints/sidepanel/index/SessionCompletedFooter.test.ts — 6/6 pass
  • bun test apps/agent/entrypoints/sidepanel/index/ — 18/18 pass (no regressions in adjacent files)
  • bunx @biomejs/biome check on the three touched files — clean
  • Open the sidepanel, send a message, wait for response → footer appears under the assistant reply with the active provider name
  • Switch to an ACP agent, send a message → footer shows <adapter> · <model>
  • Trigger an error mid-stream (e.g. invalid auth) → footer is hidden while the error banner is shown
  • Start a new conversation → footer is hidden until the first reply lands

Visual

┌──────────────────────────────────────────┐
│  user: summarise this page               │
│                                          │
│  assistant: ...long answer here...       │
│                                          │
│       Session completed with OpenAI GPT-4 │
└──────────────────────────────────────────┘

Closes browseros-ai#883

Users had no in-UI way to confirm which provider/model handled a given
session, which made comparing model behaviour and debugging unexpected
output harder than it needed to be.

- New SessionCompletedFooter component shows "Session completed with
  <model>" beneath the last assistant message once status transitions to
  'ready' and there is no active chat or agent-URL error
- formatSessionCompletedLabel resolves the best human-readable label:
  Provider.name for LLM targets, "<adapterName> · <modelLabel>" for ACP
  targets, with graceful fallbacks when ACP metadata is partial
- Unit tests cover undefined provider, llm targets, full and partial
  ACP targets, and both fallback paths
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 12, 2026

PR author is not in the allowed authors list.

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.

[Feature Request]: ✨ Display model name at end of session for tracking

1 participant