Skip to content

Name the agent's execution source in session management - #651

Open
Yuandi (DDKinger) wants to merge 2 commits into
mainfrom
dev/DDKinger/sessions-title-agent-source
Open

Name the agent's execution source in session management#651
Yuandi (DDKinger) wants to merge 2 commits into
mainfrom
dev/DDKinger/sessions-title-agent-source

Conversation

@DDKinger

@DDKinger Yuandi (DDKinger) commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary of the Pull Request

Session management didn't say where the agent runs the way the agent pane does,
and said it in a place of its own for rows.

Title bar. Before: the agent pane bar named the agent and where it runs --
Copilot · Debian for a WSL agent, Copilot · Windows for a host one -- but
opening session management replaced that with Agent sessions: Copilot: no
logo, no backend. After: the sessions view keeps the agent logo and reads
Agent sessions: Copilot · Debian. The chat view is unchanged.

Rows. Before: an in-distro row led with a bracketed [WSL-Ubuntu] tag, so
a WSL list read as a column of brackets and the distro sat far from the provider
it qualifies. After: the distro joins the existing provider suffix --
· copilot · Ubuntu.

Detailed Description of the Pull Request / Additional comments

_refreshLabel now composes <agent> · <backend> once and reuses it. The
chat view still appends the version and connected model; the sessions view
wraps the identity in the existing Agent sessions: {0} title instead of just
the agent name, and version and model stay out of it. _refreshLogo no longer
collapses the agent mark in the sessions view.

Only the en-US <comment> for AgentPane_SessionsTitleFormat changed, to say
{0} is now the agent and its environment. The string value is untouched, so
no locale needs retranslation.

For rows, the bracketed tag also predates source filtering: rows are now
narrowed to the viewing pane's own execution source, so every visible row
shares one location and the tag disambiguates nothing -- it only repeats which
distro the pane already is. origin_prefix_for keeps only its agent-pane
marker, and the distro inherits the provider's surfacing rule (selected or
active row). A row whose provider is unknown still names its distro.

Validation Steps Performed

  • cargo test: 1616 passed, 0 failed. Updated
    render_sessions_view_paints_wsl_distro_tag to assert the new suffix and
    replaced the prefix unit test with cli_suffix_appends_the_wsl_distro.
  • Full Debug solution build: 0 errors.
  • Loose Debug package deployed and launched.

Copilot AI lite review requested due to automatic review settings August 21, 2026 16:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the agent pane’s session-management header so it consistently shows the same agent identity (including execution source/backend) as the chat view, addressing the loss of “Copilot · ” context when opening session management.

Changes:

  • Refactors AgentPaneContent::_refreshLabel() to build a shared <agent> · <backend> identity and then conditionally append version/model only in the chat view.
  • Keeps the agent logo visible in session-management view by making _refreshLogo() depend only on whether an agent name is known.
  • Updates the en-US resource comment for AgentPane_SessionsTitleFormat to describe the expanded {0} meaning (string value unchanged).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/cascadia/TerminalApp/AgentPaneContent.cpp Unifies label composition across chat vs. sessions view and preserves agent logo visibility in sessions view.
src/cascadia/TerminalApp/Resources/en-US/Resources.resw Updates translator comment for the sessions title format to reflect {0} now including execution environment when present.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/cascadia/TerminalApp/Resources/en-US/Resources.resw
Copilot AI review requested due to automatic review settings August 21, 2026 16:47
@DDKinger Yuandi (DDKinger) changed the title Name the agent's execution source in the session management title Name the agent's execution source in session management Aug 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.

Yuandi (DDKinger) and others added 2 commits August 23, 2026 15:56
The agent pane bar names the execution source it resolved ("Copilot ·
Debian" for a WSL agent, "Copilot · Windows" for a host one), but pressing
F2 replaced that with "Agent sessions: Copilot": no mark, no backend.
Nothing else in the sessions view repeats which distro the pane's agent
runs in, so the one place that knew dropped it exactly when the user went
looking for sessions.

Build the identity once and reuse it in both views. The sessions view
keeps its "Agent sessions: {0}" title and now fills it with
"<agent> · <backend>"; only the chat view appends the version and model,
which describe the live conversation rather than the session list.
`_refreshLogo` also stops collapsing the agent mark in the sessions view,
so the two views open with the same logo and identity.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Rows for in-distro sessions led with a bracketed `[WSL-Ubuntu] ` tag, so a
WSL list read as a column of brackets and the distro sat far from the
provider it qualifies.

The tag also predates source filtering. Rows are now narrowed to the
viewing pane's own execution source, so every visible row shares one
location and the tag disambiguates nothing -- it only says which distro
the pane already is.

Fold it into the existing provider suffix instead: `· copilot · Ubuntu`.
`origin_prefix_for` keeps only its agent-pane marker, and the distro
inherits the provider's surfacing rule, appearing on the selected or
active row. A row whose provider is unknown still names its distro.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@DDKinger
Yuandi (DDKinger) force-pushed the dev/DDKinger/sessions-title-agent-source branch from 85ba867 to 28d750a Compare August 23, 2026 08:04
Copilot AI review requested due to automatic review settings August 23, 2026 08:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Comment on lines +457 to +458
- Naming the distro on the row, now as a `· <distro>` suffix beside the CLI
provider (`cli_suffix_for`) rather than a leading `[WSL-<distro>]` tag.
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.

2 participants