Skip to content

fix: tidy change card layout - #26084

Merged
buluoray merged 1 commit into
mainfrom
fix/change-card-shared-layout
Oct 30, 2026
Merged

buluoray merged 1 commit into
mainfrom
fix/change-card-shared-layout

Conversation

@buluoray

@buluoray buluoray commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Every change card reads as one tidy layout: the answer window sits in the header row, the reason is a row like the others and names the crewmate that proposed the card, an Affects row that only repeats the title is dropped, an add shows only its new value, and the decline button has the same short shape as the accept button.

The owner's review of a Mate goal card ("Add a goal for ...") found four layout faults shared by every change card kind:

  1. The expiry line ("Expires in 22h. After that it can no longer be applied.") wrapped onto its own line and floated right-aligned under the title.
  2. "Kiro Crew's reason" was drawn label-above-value, while Goal and Affects use a two-column label | value grid.
  3. An add (no previous value) showed "(empty) →" before the new value.
  4. The buttons were asymmetric: "Decline change" beside "Set goal".
  5. "Affects | Scout" repeated the title "Add a goal for "Scout"" (requested by @buluoray).
  6. The reason read "Kiro Crew's reason" on a card a crewmate proposed whenever it was shown outside that crewmate's own chat (requested by @buluoray).

Why it matters

The change card is the one place a person approves what an agent wants to change. Every kind (settings, schedules, mate goals, servers, secrets, workflows) uses this layout, so a floating clock, a row that breaks the grid, a fake "(empty)" old value and a wordy decline make every approval harder to read.

Not a goal

  • The Heartbeat checkbox block of the goal card. PR feat(mate): offer the Heartbeat on the goal card as one checkbox #26003 owns it; this PR does not touch that block or its spacing.
  • New card features, new kinds, or new copy beyond the decline label.
  • Any security, governance or backend change. The expiry and the old value were already in the card the frontend receives.

What changed (motivation → approach → change)

  • Expiry / due clock → it shared a wrapping row with the title, so a long title pushed it alone onto the next line. It now sits in the header row beside the kind label (change-card-header), muted 12px, and reads "Answer within 22h" (answerWindow: one truncated narrow unit, so it never promises more time than is left). It names what runs out, because beside the kind label a bare "Expires in 22h" read as the goal or setting expiring. The old second sentence ("After that it can no longer be applied.") is cut in all 12 catalogs and not restored: helper text states only a fact the reader cannot already see, in one short line (requested by @buluoray). A wide card pushes it right; a narrow card wraps it under the kind, still left-aligned. The header was picked over the footer because the footer already holds the buttons and, on a narrow card, the clock would push them onto a second line.
  • Reason → it was a separate block outside the rows grid. It is now a CardRow inside change-card-rows, so it takes the same label column, divider and spacing as Goal or Affects.
  • Reason label → the author came only from the page (the crewmate chat set it, every other page fell back to the product name). ConversationCard now reads the proposer from the card: the roster row bound to the card's slot_key is the crewmate whose chat proposed it, and its display name (else name) fills {{name}}'s reason, already phrased per language in every catalog. A card from the main assistant, or one shown before the roster loads, keeps the existing author (cardAuthor.cardProposer, requested by @buluoray).
  • Affects row → it repeated the title whenever the card changes one member the title already names. New cardRegistry.scopeRepeatsTitle hides the row only when the gateway marks the scope's one member as the card's own subject (only_this_member, already sent by every per-member kind) and the title names that member as a whole word. A template's users are never marked, so a template named like its one crewmate keeps Affects. More members, a count above the named list, or a member the title does not name keep the row. Applies to every kind (requested by @buluoray).
  • Add vs edit → ChangeRow printed the old side whenever before was present, and the gateway sends before: null (or "") for an add. New isAddChange treats a row as an add when before is absent, or empty and would only print "(empty)". A field that names its empty value (an inherited reasoning effort) keeps old → new, and a real edit still shows old → new.
  • Decline label → the generic components.changeCards.cancel is now a bare verb, "Decline", in all 12 shipped catalogs (plus the regenerated en-XA pseudolocale), so it matches the short verb shape of each kind's accept label. The kinds that already name their own decline (Don't import, Don't save, tool access Not now) are unchanged.
  • I checked docs/decisions/ for the change card first. No recorded decision covers any of these four.
  • docs/architecture/mcp.md (change cards section) now describes the shared layout. An isolated capture entry (website/capture/change-card-layout.*, website/scripts/capture-change-card-layout.mjs) renders the real ChangeCard for the screenshots below.

Backwards compatibility

Compatible: frontend-only layout and copy; no API, stored record or route changes.

Removes nothing: the "(empty) →" text only ever stood for a missing previous value. The add still shows the full new value, and a real edit keeps old → new.

Tests

  • ConversationCard.test.tsx › shared change card layout:
    • the expiry is a child of the header row beside the kind, not of the title, and reads exactly Answer within 1h; answerWindow truncates to one narrow unit (22h, 2d, 45m, 1m under a minute);
    • the reason is a data-card-row in the rows grid with the same row and label classes as a change row;
    • a goal add renders only its new value;
    • a card from a crewmate's slot reads "Scout's reason" on a non-crewmate page; a main-assistant card, and an unknown roster, keep "Kiro Crew's reason";
    • a typed secret survives the proposer resolving after the card is drawn (the card is never remounted);
    • a failed crewmate-list read shows an inline ErrorNotice under the card, which stays usable;
    • Affects is hidden when it names only the title's member, and shown for two members, a different member, or a count larger than the names;
    • the generic decline reads Decline next to Set goal.
  • CardChanges.test.tsx: scopeRepeatsTitle matches a whole word only ("Al" in "Alex" does not count) and in any language; null, "" and [] befores render the new value alone; a real edit keeps old → new.
  • The existing one-left-edge layout test was updated for the header row.
  • Mutation check: reverting each of the four fixes separately made the changed test files fail.

Proof: not provable -- frontend test (prove.py runs Python only)

Manual verification

I rendered the real ChangeCard through the capture entry at 720px and 360px, in light and dark, on main (before) and this branch (after), and looked at each frame. Wide: the answer window ("Answer within 22h") is on the kind row at the right, the reason lines up with Goal and Affects, and the add shows no "(empty) →". Narrow: the short expiry now fits on the kind row, rows stack label above value as before, and both buttons stay on one line.

Screenshots / video

Before (left, main) vs after (right). Goal add card, wide, dark:

Goal card wide dark, before vs after

Goal add card, narrow (360px), light:

Goal card narrow light, before vs after

Goal card, first head (left) vs now (right): the clock reads "Answer within 22h", the Affects row that repeated the title is gone, and the reason names the proposing crewmate ("Pebble's reason"):

Goal card first head vs now

A goal whose scope names more than the title keeps Affects:

Affects kept for two members

More variants

Setting edit (old → new kept), wide, light:

Setting edit wide light, before vs after

Goal add card, narrow, dark:

Goal card narrow dark, before vs after

Related Issues

Owner feedback from a screenshot of the Mate goal card; no issue filed. Not in scope: #26003 (Heartbeat checkbox on the same card).

Sibling sweep

Swept: git grep -nE "before !== undefined|changeCards.cancel|change-card-expires|change-card-reason" -- website/src
Sibling: website/src/cards/CardResultLine.tsx -- not affected -- the result line prints the gateway summary, not the before/after rows
Sibling: website/src/cards/ChangeCard.tsx -- changed here

Pattern harvest

Not generalizable: these are four layout choices in one shared component, now pinned by its own tests.

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

Contribution License Agreement

Contributed under the project's Apache-2.0 license.

@buluoray
buluoray requested review from a team and KiroCrewCaptain as code owners October 30, 2026 03:58
@buluoray
buluoray requested a review from cruisercohen October 30, 2026 03:58
@buluoray
buluoray enabled auto-merge (squash) October 30, 2026 03:58
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 30, 2026
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

Frontend-only layout and copy change backed by six rendered screenshots; the removed expires catalog key and the old "Decline change" label have no readers left in the tree.

Notes

  • scopeRepeatsTitle matches the member name against the localized title text to decide whether to hide Affects. The gateway already sets only_this_member, so having it also send a "the title names this member" flag would drop the string matching, which can go wrong in languages that don't separate words.

[DESIGN-REVIEWED] 452ad93

Description read

[DESCRIPTION-READ] 0e51ec2261116bd0d8960191547412cd25652454eb1713aca39d2b33b16a46e6

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 Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 452ad93dd5d3f802037402b82959f41f2d6162ea — 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. Every layout item answers the owner's review. The one rider is a new failure notice added for a label that already falls back on its own.

Notes

  • Item 8 — rides along: the Goal is layout and the reason label, yet the diff adds <ErrorNotice … testId="change-card-roster-error" message={rosterError ? …}> under every live card. When the roster cannot be read, proposer ?? pageAuthor already falls back to the page's author, so the card works without the notice. Subtraction: delete the ErrorNotice sibling in ConversationCard.tsx and its test says so beside the card when the crewmate list cannot be read, and keep the silent fallback.

What this change ships

Inventory (9 items) — 8 justified

Intent: make every approval card in the dashboard read as one tidy layout. This is a FIX for faults the owner reported in review.

  1. The expiry clock moved out of the title row into the header row, beside the kind label — justified
  2. The expiry now reads "Answer within 22h" and the "After that…" sentence is gone in all catalogs — justified
  3. The reason is drawn as a label | value row in the same grid as Goal and Affects — justified
  4. The reason label names the crewmate that proposed the card, on any page — justified
  5. The Affects row is hidden when its one marked member only repeats the title — justified
  6. An add shows only the new value, with no "(empty) →" — justified
  7. The generic decline button now reads "Decline" in every catalog — justified
  8. An inline error appears under each live card when the crewmate list fails to load — rides along
  9. An isolated capture page and a screenshot script for the card — justified

[FIRST-PRINCIPLES-REVIEWED] 452ad93

Description read

[DESCRIPTION-READ] b1c66693192976a6045276fd3303740625d8d9f4fae6281607d5cb5dfcfde01f

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 Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)

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

UX-Verdict: PASS

cannot evaluate: missing the new inline error under a change card when the crewmate list fails to load. It shows raw error text, and none of the six screenshots shows it.

Evidence gaps

  • Crewmate-list error notice: ConversationCard.tsx adds <ErrorNotice … testId="change-card-roster-error" message={rosterError.message …}> under a live card. No screenshot shows it, so nobody has judged its wording, how it sits under the card, or whether it reads as the approval itself having failed. A screenshot of a goal card with the crewmate-list request failing would close this gap.
  • Scheduled-run clock in the new header row: change-card-due moved into change-card-header with new wrapping and alignment. All six shots show only the expiry clock ("Answer within 22h"), never the "due" clock of a scheduled card. A wide and a narrow shot of a schedule card would close this gap.

Notes

  • Roster error copy: the notice prints the raw exception message (rosterError.message). The only thing that fails here is the reason label, so the card still works. Show a plain line such as "Couldn't load crewmates, so the reason is labelled Kiro Crew", or show nothing and keep the fallback silently.
  • "Answer within 22h" doesn't say what happens at zero: the blind reader said "The short one doesn't say what happens if I don't answer." The expired-state copy covers it later, so this is not a blocker.
  • Who "Pebble" is: the reader couldn't tell whether Kiro Crew and Pebble are the same assistant. That's existing vocabulary, not new in this PR.

[UX-REVIEWED] 452ad93

Description read

[DESCRIPTION-READ] 93c781c26adb2489b62a3318d045bd563975da44c9900ec97da9a98a1b6f48f4

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

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] 452ad93

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

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

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 452ad93

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

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

Copy link
Copy Markdown
Contributor Author

Updated at @buluoray's request (head 1f5d222): the expiry line now reads only "Expires in " (e.g. "Expires in 22h"). The second sentence, "After that it can no longer be applied.", is cut from all 12 catalogs plus the en-XA pseudolocale; every change card kind shares this one string. The PR description's expiry wording, tests and screenshots are updated to match. No other helper text this PR touches carried the same kind of filler.

@buluoray
buluoray force-pushed the fix/change-card-shared-layout branch from 2ba319d to 1f5d222 Compare October 30, 2026 06:04
@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: passed Eligible automated validation passed for the current revision readiness: checking Automated validation is still running labels Oct 30, 2026
@buluoray

Copy link
Copy Markdown
Contributor Author

Updated at @buluoray's request (head 4cc5877): the Affects row is now left out when it only repeats the title, i.e. the scope is exactly one member and the title already names that member (e.g. "Add a goal for "Scout"" no longer shows "Affects | Scout"). A scope with more members, or a member the title does not name, keeps the row. This applies to every change card kind and is in the same commit as the expiry cut. The description, tests and screenshots are updated.

@buluoray
buluoray force-pushed the fix/change-card-shared-layout branch from 1f5d222 to 4cc5877 Compare October 30, 2026 07:37
@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 Oct 30, 2026
@buluoray

Copy link
Copy Markdown
Contributor Author

Updated at @buluoray's request (head 7cc576f): the reason label now names the crewmate that proposed the card, read from the card's own slot (the roster row bound to it), on any page: "Scout's reason" via each catalog's {{name}}'s reason. A card from the main assistant, or one shown before the roster loads, keeps "Kiro Crew's reason". Same single commit as the expiry cut and the Affects rule; description, tests and screenshots updated.

@buluoray
buluoray force-pushed the fix/change-card-shared-layout branch from 4cc5877 to 7cc576f Compare October 30, 2026 08:27
@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: checking Automated validation is still running labels Oct 30, 2026
@buluoray
buluoray force-pushed the fix/change-card-shared-layout branch from 4789786 to f0c5c8b Compare October 30, 2026 10:39
@buluoray

Copy link
Copy Markdown
Contributor Author

Head 4789786, addressed in f0c5c8b:

  • Frontend Tests (1), ruStyle [changed-values] (ru catalog addresses the reader as ты): fixed. components.changeCards.answer_within is now "Ответь в течение {{when}}". Frontend Coverage Merge and Coverage Gate were red only because that shard failed.
  • GPT 6.1 F1 (chained roster waits on the default deadline, ConversationCard.test.tsx:286/313/326): fixed. All three waits pass an explicit ROSTER_CHAIN timeout, with a comment naming the cards → roster read chain.

@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 Oct 30, 2026
@buluoray
buluoray force-pushed the fix/change-card-shared-layout branch from f0c5c8b to e4dfbde Compare October 30, 2026 11:29
@buluoray

Copy link
Copy Markdown
Contributor Author

Findings on f0c5c8b, addressed in e4dfbde:

  • Opus 5.5 (ChangeCard.tsx:382, a template named like its one crewmate hid Affects on a template.update card): fixed. scopeRepeatsTitle now also requires the gateway's scope.only_this_member mark, which only per-member kinds send, so a template's users always keep their row. Tests cover the template title case.
  • GPT 6.1 (ConversationCard.tsx:156, roster failure discarded): fixed. A failed crewmate-list read renders an inline ErrorNotice (no hand-off: typed secret and composer draft) under the card, which stays mounted and usable with the page's author. Test drives a 500 from /api/members.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 30, 2026
Move the due/answer clock into the header row beside the kind and word it
as what runs out, "Answer within <when>", draw the proposer's reason as
a row of the same label | value grid and label it with the crewmate that
proposed the card, drop an Affects row that only repeats the member the
title names, show an add as its new value alone instead of "(empty) ->",
and shorten the generic decline to a bare "Decline" in every shipped
locale.
@buluoray

Copy link
Copy Markdown
Contributor Author

Conflict-only rebase onto main (after #26003 landed), e4dfbde -> 452ad93. One conflict, website/src/cards/ChangeCard.tsx: main added the Heartbeat spec.Option line right after the old label-above-value reason block, which this PR replaces with a grid row. Resolved by keeping main's spec.Option line exactly where #26003 put it (after the reason, before the error notice) and dropping only the old reason block. git range-diff shows no other change to this PR's lines.

@buluoray
buluoray force-pushed the fix/change-card-shared-layout branch from e4dfbde to 452ad93 Compare October 30, 2026 15:13
@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 merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Oct 30, 2026
@buluoray
buluoray merged commit fb4da54 into main Oct 30, 2026
94 checks passed
@buluoray
buluoray deleted the fix/change-card-shared-layout branch October 30, 2026 16:56
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 30, 2026
bolichen97 added a commit that referenced this pull request Oct 31, 2026
…/0.11.0 (#26594)

Backports these main PRs to release/0.11.0 after #26487, in pick order.
Each was a `git cherry-pick -x` of its squash commit on main:

- fix(memory): keep the shared -wal on close when the driver has no setconfig (#26486) (cherry picked from commit ad856ad)
- fix(crew): blink a working icon's eyes and seat it flush in the crew stack (#25381) (cherry picked from commit d180166)
- fix(crew): counter-scale a working icon's frame in the face flight (#25020) (cherry picked from commit 94de6c6)
- fix(terminal): keep a newly opened terminal above the iPhone keyboard (#25370) (cherry picked from commit 670ab7d)
- fix(hooks): run agent spec hooks by kiro-cli's rules on KAS (#26428) (cherry picked from commit 314ea38)

Conflict resolved by hand:
- #26428: src/kiro_crew/hook_runtime/script_hooks.py keeps 0.11.0's
  extra_hooks_cwd branch (main passes **extra_run, which 0.11.0 lacks)
  and sets result.from_spec on both branches.

Left out (see the PR body): #19629, #23916, #23911 already on
release/0.11.0; #26001, #25419, #25142 need files only main has;
#26084 and #25483 use props and APIs only main has; #24634, #24635 and
#25364 conflict widely with code main changed after the cut; #26397
needs #26152's route; #26144 needs sandbox_launch_mark; #26456 not merged.

Co-authored-by: w <w@k.local>
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