Skip to content

feat(website): ErrorNotice impact levels, nested form and a real-button action row (#37262) - #37263

Merged
buluoray merged 1 commit into
mainfrom
crew/slack/error-notice-impact
Nov 14, 2026
Merged

buluoray merged 1 commit into
mainfrom
crew/slack/error-notice-impact

Conversation

@buluoray

@buluoray buluoray commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Give ErrorNotice the accepted impact levels, so a missing detail no longer looks like a failed page, and show the new look on a few example call sites.

Every failure in the dashboard is a red box with a red body and role="alert". Inside an amber warning it becomes a red box in a yellow box. The design is accepted in rfc-error-notice-impact.md (#37124).

Why it matters

A user reads the loud red box as "something important broke" even when only a name or a forecast is missing. Call sites cannot pick a calmer look until the component and the review rule offer one.

Not a goal

What changed (motivation → approach → change)

Part Change
impact blocking (default: red box, role="alert"), partial (amber, role="status"), minor (grey line, role="status")
nested inside a host that already frames it: no second box, a thin rule above
actions host buttons in one action row before "Ask the agent", with a real-button look (border, padding, hover, focus ring); the hand-off stays a link
Layout icon and title on one line, message under it, then the action row; the ✕ stays top-right
Colours new tokens in design-tokens.css, bridged in tailwind-theme.css, measured in every built-in palette
Rule errors-use-error-notice allows a calmer look only through impact; the dismissLabel doc comment matches
Examples KiroAccountModal forecast (minor), sign-in status and balance (partial); pages/chat/crew-window/CrewChatWindow.tsx effort and mode (partial, inline); KiroPrerequisiteGate "Use Kiro CLI instead" error (blocking, nested)
RFC a dated amendment for the split and the token mixes; the status stays as main records it (accepted, #37269)

Measuring all palettes changed some mixes from the RFC. Several dark packs cannot reach 4.5:1 on their own tints with a mix toward --text, so the nested, minor-link, border and ring tokens mix toward --text-strong or less hue. The RFC amendment lists each one and the numbers.

Backwards compatibility

Compatible: impact, nested and actions are optional, and a notice without them keeps role="alert" and the blocking meaning.

Reader: website/src/components/ErrorNotice.tsx:messagePlacement -- app -- still read by the inline variant; the block variant now always puts the message under the title (ErrorNotice.messagePlacement.test.tsx)
Reader: website/src/components/ErrorNotice.tsx:actionPlacement -- app -- still read by the inline variant; the block variant now always uses the action row (ErrorNotice.belowOnPhone.test.tsx)

Tests

  • ErrorNotice.impact.test.tsx (new): role, icon, fill and inks per level; nested draws no box and keeps its role; announce={false} drops the role at every level; actions renders host buttons before the hand-off link with the button skin; the default stays blocking.
  • errorNoticeImpactContrast.test.ts (new): reads every notice mix from the stylesheet. Every light palette and the default dark palette clear 4.5:1 text and 3:1 border and ring over --bg, --bg-elevated and --card; every other dark palette never drops below today's colour. Both files failed before the change.
  • Updated pins for the new layout and icon: errorToAgent, ErrorNotice.messagePlacement, .belowOnPhone, .showIcon, TasksCapacityCard, TrustAppModal, ChatSidebar.folderSortMode, issue-radar/IssueRadarPrDetailCoverage.test.tsx, dev-fleet/DevFleetPage.liveStateUnknownNotice.test.tsx, the CrewLogPanel snapshot, and KiroAccountModal and App.topbarAndShortcuts (standing notices are now status).

Full frontend suite run locally in four shards: the only failure outside these files is UsageTab.spendChartHarness "$0" axis tick, which also fails with this diff reverted.

Manual verification

Rendered every scene with node capture/shoot-error-notice-impact.mjs in light and dark and looked at each frame. The button-state scene forces :hover and :focus-visible through DevTools so the real rules show.

Screenshots / video

Component render, not the live page. Mocked data. Scene 1 and scene 5 error text is made up.

Button on each impact: rest, hover, focus

Action-row buttons, dark
Action-row buttons, light

Blocking (KasLoginGate), blocking + nested (KiroPrerequisiteGate)

Blocking, light
Blocking nested, dark

Every scene, light and dark

signin-name dark
signin-name light
forecast dark
forecast light
balance dark
balance light
effort-inline dark
effort-inline light
switch-nested light
replaced-blocking dark
pending-read dark
pending-read light

Related Issues

Part of #37262

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

Contributions are accepted under the project's Apache-2.0 license.

@buluoray
buluoray requested review from a team and KiroCrewCaptain as code owners November 14, 2026 16:05
@buluoray
buluoray enabled auto-merge (squash) November 14, 2026 16:06
@buluoray
buluoray force-pushed the crew/slack/error-notice-impact branch from 96cb63d to e7b48dc Compare November 14, 2026 16:06
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 14, 2026
@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 3f6dd15

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

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

Nothing blocks: the new props are optional and default to today's blocking role, rendered evidence is attached, and the block variant still accepts the placement props it now ignores.

Notes

  • Every existing block notice changes layout in this PR: the message now sits under the title, the action row comes after it, and actionPlacement="beside" and messagePlacement stop applying. The description calls this compatible, yet it moves call sites that are out of goal. One sentence under Backwards compatibility should say this is deliberate (RFC) and global.
  • Most call sites still pass actionPlacement="below" or messagePlacement="below" to block notices, and now nothing reads them. The props are still typed for both variants. Narrowing them to variant="inline" in a follow-up would stop new callers relying on props that do nothing.

[DESIGN-REVIEWED] 3f6dd15

Description read

[DESCRIPTION-READ] 2924d9840bc33ea99d23c106029c01c0bbe9ee8002ab5a7e499aa533500eb0e1

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

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 3f6dd15b8db8cb3a25893a278f3ac3b0b8c5ed63 — 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. The accepted base RFC covers every default this changes (layout 2, the lighter fill, the role for each level). Item 9 is the one note.

Notes

  • Item 9 — rides along: the base RFC says "The code PR removes them from block-variant call sites, so no call site passes a prop that does nothing." This PR's amendment moves that removal to Phase 1b. Until then, messagePlacement=/actionPlacement= still appear 112 times across 67 non-test .tsx files (inline and block uses not separated), and the block ones now do nothing. Subtraction: delete those props from the block call sites this PR already touches (KiroAccountModal.tsx, KiroPrerequisiteGate.tsx), so the leftovers sit only in files the follow-up PRs own.

What this change ships

Inventory (9 items) — 7 justified

Intent: let a missing detail look calmer than a failed page, so users stop reading every gap as a breakage. ADDITION.

  1. Notices can be amber/status (partial) or a grey line (minor); the default stays red/alert — justified
  2. A notice inside a warning box draws no second box (nested) — justified
  3. Host buttons (Retry, Refresh) sit in one action row before "Ask the agent" and look like real buttons — justified
  4. Every block notice: message under the title, hand-off moved into the action row, lighter fill, new icon — justified
  5. The ✕ dismiss turns grey instead of red on every notice — undeclared
  6. The review rule now allows a calmer look, but only through impact — justified
  7. New colour tokens in every palette, with a contrast test — justified
  8. Six example call sites moved to partial/minor/nested — justified
  9. The RFC amendment splits Phase 1; block-variant placement props stay behind as dead props — rides along

[FIRST-PRINCIPLES-REVIEWED] 3f6dd15

Description read

[DESCRIPTION-READ] 371de4932ea8aed0268c4ef224bf2e059b8d81ec955f111f257d3f40f2fa7ad7

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

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

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

UX-Verdict: PASS

Nothing blocks. Every changed level, the nested form and the action row are in the screenshots, and the blind reader read the Refresh and Retry buttons correctly.

Notes

  • The "Ask the agen…" clipping in shot-11/12 comes from the capture scene, which passes askAgent. The real CrewChatWindow effort and mode lines show no hand-off. Re-shoot the scene without askAgent so the evidence matches the shipped surface.
  • On light, the inline partial line (shot-12) "doesn't look like a warning at all, apart from the small triangle". The amber ink is mixed so far toward the strong text colour that the level hardly shows. Keep a visible amber hue on the inline ink.
  • Shot-01/02 put one Refresh button three times in a row with no state labels, and the reader asked "why there are three". Label each frame (rest / hover / focus) under its button so a future reviewer can tell the states apart.

[UX-REVIEWED] 3f6dd15

Description read

[DESCRIPTION-READ] d6467210dd7423289cc9ec00cdeaadce2f384815687f721f459ef78c5ca94e0f

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

@buluoray

Copy link
Copy Markdown
Contributor Author

span=d901abc4640f

  • product-shape change without accepted RFC: default block layout and look

needs-a-decision: the finding is right on process. The RFC merged in #37124 left its status at draft, so the base has no accepted record for the new default block layout and colours.
The design itself was approved on #37124 and the repository owner asked for this implementation the same day; the RFC's Design section and its 2026-11-14 amendment cover every block-layout change in this diff.
Asking a maintainer to record the decision with /ai-review override first-principles e7b48dc9231dd2d2cf2da67e93b2ce3e29f52bac product-shape: ..., or to say they want a docs-only PR that flips the RFC to accepted on main first.

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

Notes:

  • ErrorNotice.tsx:679: hasActions counts askAgent even while the gateway is offline. In that state AskAgentButton returns null, so a notice with no other actions shows an empty mt-2 row. The cost is a little blank space, and the old actionPlacement="below" wrapper behaved the same way.

[OPUS-REVIEWED] 3f6dd15

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

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

@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: A person should decide

Why: the decider thinks the change is probably fine but estimates a 25% chance that this change introduces a defect, above the 12% limit for approving on its own.

This PR implements Phase 1a of the error-notice impact RFC, following the RFC's design and its dated amendment. impact/nested/actions are optional, and the default stays blocking with role="alert". All tokens and colour classes exist and have Tailwind bridges, and the contrast test reads the real mixes from the stylesheet. The six example sites are reasonable (KiroPrerequisiteGate really is inside a warn box). Tests that depend on the old DOM shape (.flex-1, action-row lookups, roles) were updated, and new tests cover levels, nested, actions and contrast. The First Principles block on the RFC being "draft" is a governance call: the RFC explicitly accepts the new layout for every block notice, and the PR records the acceptance. There is no data, security or trust impact. Remaining risk: frontend CI was still pending at review time, and some cosmetic layout gaps (empty action row, labelled-dismiss evidence) are not blocking.

An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit e7b48dc923 · 1060 changed lines. If this recommendation is wrong, reply here: replies are how the approver is evaluated.

@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 14, 2026
@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 14, 2026
@buluoray
buluoray force-pushed the crew/slack/error-notice-impact branch from e7b48dc to 3f6dd15 Compare November 14, 2026 20:30
@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: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Nov 14, 2026

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

The review checked head 3f6dd15: every new colour class has a matching theme token, the six call sites match the accepted RFC's Phase 1a list, a notice with no impact still renders role="alert" in red (pinned by errorToAgent.test and ErrorNotice.impact.test), and the new tests use no timers, sleeps or random values. PR Readiness is green on this head.

Well done: errorNoticeImpactContrast.test.ts reads each color-mix() straight from the stylesheet and measures it in every built-in palette, so a later token change gets measured instead of trusted.

Security: the flagged path, KiroAccountModal.signOutLink.test.tsx, changes one expected role from alert to status to match the new partial impact. It touches no sign-in or sign-out logic. The diff adds no HTML strings and no innerHTML.

The design is signed off under the standing maintainer sign-off for changes by team members.

Optional:

  • Three capture scenes (balance with Refresh in the row, SecurityPanelConfigPending, KiroSignInSources) are captioned as shipped call sites, but no production ErrorNotice passes actions on this head, and those last two files are not in the diff. Relabel them as future call sites.
  • ErrorNotice.tsx:477: when askAgent is set and the gateway is offline, the hand-off renders nothing but the block notice still draws an empty action row, and the inline notice an empty span. Gate both on the connected state and add a test.
  • The Backwards compatibility section could say that every block notice now takes layout 2, the new fill and body ink, and a grey dismiss button.

@buluoray
buluoray merged commit 46f62de into main Nov 14, 2026
97 of 98 checks passed
@buluoray
buluoray deleted the crew/slack/error-notice-impact branch November 14, 2026 22:16
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 14, 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.

2 participants