Skip to content

feat(chat): mark the model chip with the session's harness when it is not the install's - #33404

Merged
chenmingwei23 merged 1 commit into
mainfrom
feat/chat-harness-label
Nov 9, 2026
Merged

chenmingwei23 merged 1 commit into
mainfrom
feat/chat-harness-label

Conversation

@chenmingwei23

@chenmingwei23 chenmingwei23 commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: A chat whose session runs on another harness than the install's own (for example Claude Code on a Kiro install) shows that harness in the composer, without opening a menu.

A session can now be created on a chosen harness (session_create with backend: "claude"). The chat never says which harness it runs on. A Claude Code session and a default session look the same: the header shows the title and status, and the composer footer shows the agent, the workspace and the model (opus). The harness name appears only in an error string inside the model picker.

Why it matters

A user who opens a worker session cannot tell whether Claude Code or Kiro is answering. That decides which models, tools, sign-in and cost apply. Today they have to ask the agent or open Settings to find out.

Not a goal

  • No harness picker or switch in the composer.
  • No change to the header, the session list or the Context panel.
  • No text label: the mark adds no words to the footer.
  • No change to sessions on the install's own harness.

What changed (motivation → approach → change)

The owner asked for as little new text as possible. So the composer's model chip now draws the session's harness brand mark (the existing HarnessLogo, 13 px, in the chip's muted colour) right before the model name, so it reads [mark] opus. It shows only when the session's harness is not the install's own (configuredAcpBackend). A session on the install's harness looks exactly as before, with zero new pixels. Kiro CLI and KAS count as one harness here: a stored Kiro CLI choice runs on KAS once kiro-cli offers it, and both draw the same Kiro mark, so marking one against the other would only add noise.

The mark's tooltip and the chip's accessible name say Runs on Claude Code, using the same acpBackendName label as the rest of the app. One new string, components.chatInput.harness_mark, is translated in every catalog.

No backend change was needed. The slot's selection-capabilities read already returns models_backend, which the server's own_models_backend sets only when the session's harness is outside the install's model namespace (Kiro CLI and KAS share one), for a live session and before it starts. That is exactly the "not the install's own" rule, so the client does not re-derive it. The main chat (ComposerDockView.tsx, which already receives it as modelsBackend) and the split pane (ChatPane.tsx) pass it to ChatInput as harnessBackend (chat-input/props.ts), and the chip (ModelChip in chat-input/ContextShelf.tsx) draws the mark when it is set. While the read is still loading, no mark is drawn rather than a guess. The chip loads HarnessLogo lazily, as ChatInput already does for SessionEnvironmentChip, so the brand marks stay out of the chat bundle (the App chunk otherwise went 918 B over its Bundle Size Gate budget). HarnessLogo.tsx only gets its header comment updated. The new string lives in website/src/i18n/locales/ (every catalog, en-XA regenerated). The model-selection spec records the rule.

Backwards compatibility

Compatible: one optional prop and one new string. A session on the install's harness renders the same chip as before.

Removes nothing: the change only adds a mark next to the model name.

Tests

  • website/src/test/ChatInput.harnessChip.test.tsx (new): a Claude Code session (models_backend: "claude") draws the Claude mark, with tooltip Runs on Claude Code and an accessible name that starts with it, and the chip text is still just opus. A Kiro session on another harness's install ("kas") draws the Kiro mark named Runs on Kiro Agent. A session with no models_backend (the install's own harness) draws no mark and keeps its old accessible name. With the chip change reverted, all 3 fail. The lazy logo's wait uses a named 5 s ceiling (namedCeiling), like the other lazy-mount tests; the file passed 3 more runs with --sequence.shuffle.
  • website/src/test/ChatPane.sessionModelList.test.tsx: two tests find the chip by its title on a pane that runs on Claude Code or Codex, so their selectors now expect the chip's title to start with Runs on <harness>.
  • Related existing suites pass: ChatPage.reasoningEffort, ChatInput.shelfChipsFloor, ChatInput, CrewChatWindow (one test in CrewChatWindow timed out at 5 s while several suites ran together, and passed when run alone).
  • tsc -p tsconfig.app.json, eslint on the changed files and npm run i18n:check are clean.

Proof: not provable -- frontend test

Manual verification

On an isolated gateway (its own data home and port, not the real install, which runs KAS), a conductor session created two workers with session_create: one with backend: "claude" and one with no backend. Their selection-capabilities reads returned backend: "claude" and backend: "kas". In the dashboard, the Claude Code session's chip had one mark, and its accessible name began with Runs on Claude Code, then the model opus and the effort. The default session's chip had no mark, and its accessible name began with the model claude-opus-5.5, as on main.

Screenshots / video

Claude Code session (install runs KAS): the Claude mark before opus.

Claude Code session footer

Default session on the same install: unchanged.

Default session footer

Full window, Claude Code session

Claude Code session

Full window, default session

Default session

Related Issues

Closes #33399

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@chenmingwei23
chenmingwei23 requested review from a team and KiroCrewCaptain as code owners November 8, 2026 20:32
@chenmingwei23
chenmingwei23 requested a review from Zedmor November 8, 2026 20:32
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 8, 2026
@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of dc1bfac2e1ffdeb9124595650791acd79d8577c5 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks. The mark reuses the server's own models_backend rule, so the client does not work out a second "not the install's harness" check. The attached screenshot shows the change.

Notes

  • models_backend describes the model namespace, not the harness. If a future harness shares a namespace with the install's (the way Kiro CLI and KAS do now), it will get no mark. If that case comes up, name the field or the spec rule for the harness.

[DESIGN-REVIEWED] dc1bfac

Description read

[DESCRIPTION-READ] f57d01e12206fa3357d49a8af2a7071e093f1bdd54c0a80f615663331b8e469f

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of dc1bfac2e1ffdeb9124595650791acd79d8577c5 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing blocks. Issue #33399 records the defect, the change reuses HarnessLogo and the server's existing models_backend, and chats on the install's own harness keep the same chip.

What this change ships

Inventory (6 items) — 6 justified

Intent: let a user see, without opening a menu, that a chat runs on a different harness than the install's own (for example Claude Code on a Kiro install). This is an ADDITION.

  1. In the main chat, the composer's model chip shows the harness's brand mark before the model name, but only for a session on another harness — justified
  2. The chip's tooltip and accessible name now start with "Runs on " for those sessions — justified
  3. The split-pane chat's model chip shows the same mark — justified
  4. Kiro CLI and KAS count as one harness, so neither gets a mark when the install runs the other — justified
  5. One new string, "Runs on {{harness}}", translated in every catalog — justified
  6. The brand marks load lazily, so they stay out of the chat bundle — justified

[FIRST-PRINCIPLES-REVIEWED] dc1bfac

Description read

[DESCRIPTION-READ] 134785ed7d130a7766c89640749e558e0cf948816e5f1a9cfb8e473a6ad6fb82

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ human override accepted

@chenmingwei23 overrode this lane for dc1bfac2e1ffdeb9124595650791acd79d8577c5 via /ai-review override (this commit only).

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of dc1bfac2e1ffdeb9124595650791acd79d8577c5 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] dc1bfac

False positive or not applicable? A repository writer can comment:
/ai-review override gpt dc1bfac2e1ffdeb9124595650791acd79d8577c5 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed dc1bfac2e1ffdeb9124595650791acd79d8577c5 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] dc1bfac

Verdict parsed from the review's SHA-scoped output markers for commit dc1bfac2e1ffdeb9124595650791acd79d8577c5.

False positive or not applicable? A repository writer can comment:
/ai-review override fable dc1bfac2e1ffdeb9124595650791acd79d8577c5 false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 8, 2026
@chenmingwei23
chenmingwei23 force-pushed the feat/chat-harness-label branch from 3000ff8 to 018213c Compare November 8, 2026 21:06
@chenmingwei23

chenmingwei23 commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor Author

Hold lifted. The branch is rebased onto main with the bundle-size fix (#33665), and the owning worker session of conductor chat-3181-1793922654 is driving it to green.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 8, 2026
@chenmingwei23
chenmingwei23 force-pushed the feat/chat-harness-label branch from 018213c to bf4c118 Compare November 9, 2026 03:31
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 9, 2026
@chenmingwei23
chenmingwei23 force-pushed the feat/chat-harness-label branch from bf4c118 to 7955bfc Compare November 9, 2026 03:50
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 9, 2026
@chenmingwei23
chenmingwei23 force-pushed the feat/chat-harness-label branch from 7955bfc to 185a75c Compare November 9, 2026 04:09
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 9, 2026
@chenmingwei23
chenmingwei23 force-pushed the feat/chat-harness-label branch from 185a75c to fb36663 Compare November 9, 2026 04:59
@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Nov 9, 2026
@github-actions github-actions Bot added readiness: checking Automated validation is still running merge conflict Branch has merge conflicts with its base — author must resolve before merge labels Nov 9, 2026
@chenmingwei23
chenmingwei23 force-pushed the feat/chat-harness-label branch from fb36663 to aa01114 Compare November 9, 2026 05:18
@chenmingwei23

Copy link
Copy Markdown
Contributor Author

/ai-review override ux aa01114 not-applicable: owner ruled the bare mark is the intended design, no new footer text; the harness is named in the tooltip and aria-label.

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Human judgment recorded

@chenmingwei23 recorded a not-applicable release (class not-applicable) for the ux AI finding on aa01114b1390694187175f0f5d1054ad502e78b2.

owner ruled the bare mark is the intended design, no new footer text; the harness is named in the tooltip and aria-label.

This decision applies only to this commit. A new push requires a new judgment.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Nov 9, 2026
…hen it is not the install's

A session created on another harness (session_create backend='claude') looked
the same as a default one: nothing in the chat said Claude Code. The model chip
now draws that harness's brand mark (HarnessLogo) before the model, named in its
tooltip and accessible name (Runs on Claude Code). A session on the install's
own harness is unchanged. Kiro CLI and KAS count as one harness.
@chenmingwei23
chenmingwei23 force-pushed the feat/chat-harness-label branch from aa01114 to dc1bfac Compare November 9, 2026 05:49
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 9, 2026
@chenmingwei23

Copy link
Copy Markdown
Contributor Author

/ai-review override ux dc1bfac not-applicable: owner ruled the bare mark is the intended design, no new footer text; the harness is named in the tooltip and aria-label.

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Human judgment recorded

@chenmingwei23 recorded a not-applicable release (class not-applicable) for the ux AI finding on dc1bfac2e1ffdeb9124595650791acd79d8577c5.

owner ruled the bare mark is the intended design, no new footer text; the harness is named in the tooltip and aria-label.

This decision applies only to this commit. A new push requires a new judgment.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention labels Nov 9, 2026
@chenmingwei23
chenmingwei23 enabled auto-merge (squash) November 9, 2026 07:59

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This review checked head dc1bfac. The mark reads the server's existing models_backend. own_models_backend fills it only when the session's harness is selectable and uses a different model namespace than the install's, on both the cold and the live capability paths. Both capability queries are keyed by slot, so one session's mark cannot leak onto another. Hosts that do not pass the new prop keep the old chip. Labels render as React text and attributes only. PR Readiness is green on this head.

Done well: the client does not work out a second "not the install's harness" check. So the chip, the model picker list and the harness error message cannot disagree. The new test also pins that the visible chip text stays the model name only.

Optional:

  • The main chat wiring at ComposerDockView.tsx:704 (harnessBackend={modelsBackend}) has no test. One ChatPage case that mocks models_backend: 'claude' and asserts the chip title starts with Runs on Claude Code · would pin it, the way ChatPane.sessionModelList pins the split pane.
  • The body says all 3 new tests fail with the chip change reverted. The "install harness unchanged" case passes on main, so only 2 fail. That case still guards the default session. Also, the kas case checks only the span title and does not wait for the Kiro logo.
  • The inner mark span's title repeats the start of the button's own tooltip. You could drop it and assert on the chip's aria-label instead.

@chenmingwei23
chenmingwei23 merged commit 239ef0a into main Nov 9, 2026
205 of 215 checks passed
@chenmingwei23
chenmingwei23 deleted the feat/chat-harness-label branch November 9, 2026 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

readiness: passed Eligible automated validation passed for the current revision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chat: show which harness a session runs on when it is not the install's own

2 participants