Skip to content

feat(session-environments): polish the health card and name the bound environment on a locked chip - #27480

Merged
bolichen97 merged 1 commit into
mainfrom
crew/issue-triage/fix-25241-health-card-polish
Nov 2, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
crew/issue-triage/fix-25241-health-card-polish

Conversation

@iamwhatever

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: The remote environment's health card reads plainly, and a locked chip always names the environment the chat is bound to.

The follow-up list on #25241, left over from #21259:

  • The card's labels are vague: "Read-only status", "Workspace", and a "Load" row of three bare numbers that mean little without the core count.
  • Low memory is shown only by a meter colour, with no word on what it means.
  • A healthy meter is green, so green and warning colours compete for attention.
  • The card header shows a generic server icon, while the chip shows the Coder mark.
  • When a switch races the first message, the locked chip briefly reads "This machine" (with a laptop icon) for a chat that runs on a remote workspace, until the refused switch settles.

Why it matters

The health card is how a user checks whether a remote workspace can take a heavy build. Labels that need decoding, and a chip that names the wrong machine, make the user guess where their commands run.

Not a goal

  • New metrics, new endpoints, or a change to how often the card polls.
  • Any change to what the backend reports, or to when a chat locks.
  • Restyling the chip or the picker menu.

What changed (motivation → approach → change)

Each item from the issue is a small, separate change to the two components and the copy.

Item Before After
Load row "Load (1, 5, 15 min)": 0.42 · 0.3 · 0.25 "Busy cores (1, 5, 15 min)": 0.42 · 0.3 · 0.25 of 4
Memory advice none "Memory is low. Heavy builds may fail." under the memory meter at 80% used or more
Heading "Read-only status" "Workspace status"
Row label "Workspace" "Workspace name"
Meter colour healthy is green healthy is neutral (bg-muted); only warn and danger are coloured
Header icon generic server the provider's mark, as on the chip (EnvironmentHealthCard takes an icon)
Locked chip names a refused pick's target while it is pending names the bound profile once locked is true

The locked-chip fix is one line in SessionEnvironmentChip.tsx: once the gateway says the chat is locked, a pick still in flight can only be refused, so the chip uses data.profile instead of the pending target. Before the lock, a pending pick still shows at once, as today.

The three relabelled strings get new keys (statusHeading, workspaceName, busyCores), so no catalog keeps an old translation of the old wording. Two keys are new (busyCoresValue, memoryLow). All 12 hand-written catalogs in website/src/i18n/locales/ carry them, and en-XA is regenerated.

test/test_coder_session_launch.py gets a comment on its "stats" refusal: the guest browse has a stats op, and the Files browse route still cannot reach it, which is what the old test_the_browse_mode_has_no_metrics_op pin guarded.

Design calls, each the most conservative option:

  • The advice line uses the same 80% line as the warning colour, so the two always agree.
  • The value reads "x of N" with the three averages joined, keeping the existing · separator.

Backwards compatibility

Compatible: only display copy, colour and one label choice change; no API, config or stored data is touched.

Reader: website/src/components/EnvironmentHealthCard.tsx:EnvironmentHealthCard -- crew page -- the only reader of sessionEnvironments.health.readOnly, .workspace and .load; it reads the renamed keys (SessionEnvironmentChip.test.tsx asserts the new copy)

Tests

website/src/test/SessionEnvironmentChip.test.tsx:

  • shows the remote environment metrics when hovering the fixed chip asserts the new heading, row label, busy-cores label and 0.1 · 0.2 · 0.3 of 2 value, the Coder mark in the card, a neutral healthy meter, and no advice line.
  • advises on low memory and colours only a warning meter (new): at 85% used, the advice line shows, the memory meter is bg-warn and the healthy disk meter is bg-muted.
  • keeps a remote chat on its health card, refusal shown, when the lock overtakes a switch to This machine asserts that the chip reads "Coder MicroVM" with the Coder mark, never "This machine", while the refused switch is pending.

All three fail with the component changes reverted and pass with them (40/40 in the file). Locale style, parity and pseudolocale tests pass with I18N_BASE_REF set; tsc, eslint, i18n:check and i18n:render pass.

Manual verification

Captured the real built dashboard with stubbed APIs: hovered a chat locked to a Coder profile, in dark and light themes, with healthy memory and with memory at 88% used.

Screenshots / video

Healthy (dark, light):

Health card, healthy, dark

Health card, healthy, light

Low memory (dark, light):

Health card, low memory, dark

Health card, low memory, light

Related Issues

Closes #25241

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

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

Nothing blocks: these are copy, colour and display-choice changes on a card that has screenshots. The locked-chip fix makes the gateway's lock decide which environment the chip names.

[DESIGN-REVIEWED] d2f1cbb

Description read

[DESCRIPTION-READ] d54ce46226f92d28440ed58b564b04fd41f8fcde90ecf7fa8c7432c3c37a7c7b

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 1, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of d2f1cbb7687d31e8408bb66d8da6bffa3b55fb4b — 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

Every item comes from the #25241 follow-up list. The only extra surface is an optional icon fallback that the single caller never reaches.

Notes

  • Item 6 — one consumer, generalized: icon?: React.ReactNode with {icon ?? <Server …/>}. The only caller, SessionEnvironmentChip.tsx:83, always passes icon (1 call site of EnvironmentHealthCard in website/src), so the Server branch never runs. Subtraction: make icon required and delete the ?? <Server> fallback.

What this change ships

Inventory (8 items) — 7 justified

Intent: a user can read the remote workspace's health at a glance and always sees which machine a locked chat runs on. ADDITION (polish) plus one FIX.

  1. Card heading "Read-only status" becomes "Workspace status" — justified
  2. Row label "Workspace" becomes "Workspace name" — justified
  3. "Load" row becomes "Busy cores" and shows "x · y · z of N" — justified
  4. "Memory is low. Heavy builds may fail." appears at 80% memory used or more — justified
  5. A healthy meter is neutral instead of green — justified
  6. The card header shows the provider's mark instead of a generic server icon — one consumer, generalized (icon fallback never used)
  7. A locked chip names the bound environment, not a refused pending switch — justified
  8. A test comment explains the stats browse refusal — justified

[FIRST-PRINCIPLES-REVIEWED] d2f1cbb

Description read

[DESCRIPTION-READ] d6dd4871467e6423dc918a54e8e95287aaa20a474c5e9f970683463ca0762b1d

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 1, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

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

UX-Verdict: PASS

Nothing blocks: the blind reader identified every relabelled row, the neutral meters and the low-memory line correctly, and the card has no controls to misread.

Notes

  • memoryLow: the reader asked "It doesn't say what I should do about it." Name the next step, for example "Memory is low. Close other jobs before a heavy build."
  • In light theme, text-warn on the 11px advice line read as "a darker olive/mustard… less clearly as a warning" (shot-04). Check its contrast, or pair the line with a warning icon.
  • busyCoresValue: the reader found "0.42 · 0.3 · 0.25 of 4" confusing: "can't tell which number is which." Show the 1-minute value against the core count and put the other two in a tooltip.

[UX-REVIEWED] d2f1cbb

Description read

[DESCRIPTION-READ] 6cdcb6a07d2ee214d85443201594d8bf997fc2308b3b0f15009ce353e7a3e3e0

That sha256 names everything this verdict read: the PR description, plus the 7 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 1, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] d2f1cbb

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

False positive or not applicable? A repository writer can comment:
/ai-review override fable d2f1cbb7687d31e8408bb66d8da6bffa3b55fb4b 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 1, 2026
@iamwhatever
iamwhatever force-pushed the crew/issue-triage/fix-25241-health-card-polish branch from d1417d0 to e4c3161 Compare November 2, 2026 00:23
@iamwhatever

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in website/src/i18n/locales/ (bn, de, en-XA, es, fr, hi, it, ja, ko, pt, ru, zh-CN) since this head went green (69a0d28 -> f2c0d92); CI re-running. No conflicts; the chip, locale and i18n tests pass on the new head e4c3161.

🤖 AI-assisted comment 🤖

@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 2, 2026
@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] d2f1cbb

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

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 2, 2026
@iamwhatever
iamwhatever force-pushed the crew/issue-triage/fix-25241-health-card-polish branch from e4c3161 to d2f1cbb Compare November 2, 2026 01:22
@iamwhatever

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in website/src/i18n/locales/ (bn, de, en-XA, en.manual, es, fr, hi, it, ja, ko, pt, ru, zh-CN) and website/src/components/ since this head went green (f2c0d92 -> 763378e); CI re-running. No conflicts; the chip, locale and i18n tests pass on the new head d2f1cbb.

🤖 AI-assisted comment 🤖

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: passed Eligible automated validation passed for the current revision readiness: checking Automated validation is still running labels Nov 2, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor Author

Review-ready at head d2f1cbb.

  • 95 checks pass, 0 failing, 0 running; readiness: passed; MERGEABLE.
  • GPT and Opus lanes are fresh for this head; Design, First Principles and UX pass; 0 unresolved threads.
  • green_age is STALE: main moved in the locale catalogs (website/src/i18n/locales/) and two sibling components after this head went green. No conflict exists. A maintainer can rebase at merge time; I am not rebasing again (2 of 3 re-syncs used).

Closes #25241. No merge, approval or auto-merge from me.

🤖 AI-assisted comment 🤖

@CrysisDeu CrysisDeu 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.

Approve at d2f1cbb7. 5 new keys in all 13 catalogs with real translations; 3 removed keys have no users. The locked chip shows the profile name from config, React-escaped; the health card shows real API state with no default "healthy". CI green, no overrides.

Nits: three UX-lane notes still open; one unused fallback icon; branch is behind main, rebase before merge.

Posted by code-reviewer (Kiro Crew member) on behalf of @CrysisDeu. Full report on file.

@bolichen97 bolichen97 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.

Reviewed at d2f1cbb. No blocking findings; LGTM.

Non-blocking notes (follow-up is fine):

  • ebsite/src/components/EnvironmentHealthCard.tsx:~73 - icon is optional with a <Server> fallback, but the only caller always passes it. For an unknown provider, ProviderGlyph already falls back to a generic cloud, so the Server branch is unreachable. Make icon required or drop the fallback (the first-principl
  • ebsite/src/i18n/locales/en.manual.json:~10245 - "Busy cores" overstates what the number is. A Linux load average also counts tasks in uninterruptible I/O wait, so a value of 3 "of 4" does not mean three cores are busy. A label like "Load vs cores" is more accurate. The UX review also found the three-number "x · y · z
  • ebsite/src/i18n/locales/en.manual.json:~10247 - "Memory is low. Heavy builds may fail." gives no next step, and the 11px text-warn line reads weakly in light theme (UX review notes). Optional copy and contrast follow-up, not a defect.

@bolichen97
bolichen97 enabled auto-merge (squash) November 2, 2026 03:34
@bolichen97
bolichen97 merged commit ead70c7 into main Nov 2, 2026
97 of 98 checks passed
@bolichen97
bolichen97 deleted the crew/issue-triage/fix-25241-health-card-polish branch November 2, 2026 03:37
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 2, 2026
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.

Health card follow-up: polish and locked-chip label (after #21259)

3 participants