Compare commits

...
Author SHA1 Message Date
l0ng-ai 0f336cb361 fix(agents): name the task's agent in the session status line
The session status line under the composer lost the agent's icon and name
when it was reduced to one quiet line; with several tasks open side by side
there was no way to tell which agent answered without opening the picker.
It now starts with the agent's icon and name again, before the branch.

Fixes #3917
2026-11-17 21:57:45 +08:00
2 changed files with 10 additions and 0 deletions

No files matched your search

+5
View File
@@ -406,6 +406,11 @@ function SessionStatus({
>
{/* Where the task works, in one quiet line like the new-task page: project (in a workspace), branch, worktree. */}
<span className={styles.where} title={task.cwd}>
{/* Which agent runs the task: with several tasks side by side, this tells their answers apart. */}
<span className={styles.fact} title={providerName(task.provider)}>
<Icon name={providerIcon(task.provider)} size={13} />
<span className={styles.factText}>{providerName(task.provider)}</span>
</span>
{project?.workspace && projectName && (
<span className={styles.fact}>
<Icon name="folder" size={13} />
@@ -373,6 +373,11 @@ describe("composer UI during submission", () => {
expect(screen.getByRole("button", { name: "Send" })).toBeEnabled();
});
it("names the task's agent under the composer", () => {
render(<SessionEditor input={{ kind: SESSION_KIND, key: sessionKey("A"), data: { task: "A" } }} />);
expect(screen.getByTitle("Codex")).toHaveTextContent("Codex");
});
it("clears an unchanged session draft after only moving the caret", async () => {
const response = deferred();
backend.prompt.mockReturnValue(response.promise);