Skip to content

fix: Standardize status icons and colors app-wide - #67

Merged
marekdano merged 5 commits into
mainfrom
62-update-status-icons
Sep 1, 2026
Merged

marekdano merged 5 commits into
mainfrom
62-update-status-icons

Conversation

@marekdano

Copy link
Copy Markdown
Contributor

Closes #62

Summary

Standardizes the four status severities (success/info/warning/error) on the icon set already used in ui/sonner.tsx (CircleCheckIcon/InfoIcon/TriangleAlertIcon/OctagonXIcon), and adds semantic --success/--warning CSS tokens alongside the existing --destructive, so color and glyph choices no longer drift per call site.

  • Added src/lib/status.ts — a single STATUS_ICON / STATUS_TONE_CLASS lookup keyed by severity; most call sites now consume it instead of picking an icon/color ad hoc.
  • Added --success / --warning tokens (light + dark) in index.css, wired into badge.tsx and StatusDot.tsx.
  • Fixed a real bug in StatusHeadline.tsx where warning and error rendered the identical AlertTriangle icon.
  • Consolidated deprecated/inconsistent lucide imports (CheckCircle2, AlertTriangle, AlertCircle, XCircle, CircleAlert) onto the canonical set, and replaced raw Tailwind shades (green-500, emerald-500, yellow-300/500/600, red-500) with the semantic tokens across 17 components.
  • Fixed one semantically-wrong glyph: the informational hint next to the MCP server URL field used an alert icon (CircleAlert); it's now InfoIcon.

Test plan

  • npm run lint, tsc -b, npm run format:check all clean
  • vitest run — 184 files / 3062 tests passing (updated 2 tests that asserted old raw color classes; added src/lib/status.test.ts for the new lookup)

@marekdano marekdano self-assigned this Aug 21, 2026

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

Solid PR!!

One thing to check src/components/mcp-servers/AdvancedSettings.tsx: still uses TriangleAlert. Should it use STATUS_ICON.warning?

@marekdano
marekdano force-pushed the 62-update-status-icons branch from 0013056 to 6b2f5a8 Compare August 24, 2026 09:26
@marekdano
marekdano requested a review from vishu-bh August 24, 2026 09:26

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

I pointed out three TriangleAlerts left behind. Not sure if I'm doing this right, if not, ignore. 😅

};
case "warning":
return {
Icon: TriangleAlert,

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.

STATUS_ICON.warning?

Comment thread src/components/servers/ServersTable.tsx Outdated
case "warning":
return {
labelId: "mcpServer.status.warning",
Icon: TriangleAlert,

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.

STATUS_ICON.warning?

Comment thread src/pages/CreateServer.tsx Outdated
};
case "warning":
return {
Icon: TriangleAlert,

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.

STATUS_ICON.warning?

@marekdano
marekdano requested a review from gcgoncalves August 24, 2026 17:03

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

Nice job updating the icons and colors meant to convey meaning with a consistent approach! 🙌

We may want to move to the green vs emerald token because it's a bit brighter without loosing necessary contrast, but that can be done later if desired.

@marekdano
marekdano force-pushed the 62-update-status-icons branch from 7ed9667 to 3092dbf Compare August 26, 2026 11:28
@marekdano
marekdano requested a review from a-effort August 26, 2026 13:43
@marekdano

Copy link
Copy Markdown
Contributor Author

Nice job updating the icons and colors meant to convey meaning with a consistent approach! 🙌

We may want to move to the green vs emerald token because it's a bit brighter without loosing necessary contrast, but that can be done later if desired.

Addressed!

@marekdano

Copy link
Copy Markdown
Contributor Author

@a-effort - please review

Signed-off-by: Marek Dano <mk.dano@gmail.com>
Signed-off-by: Marek Dano <mk.dano@gmail.com>
Signed-off-by: Marek Dano <mk.dano@gmail.com>
Signed-off-by: Marek Dano <mk.dano@gmail.com>
@marekdano
marekdano force-pushed the 62-update-status-icons branch from 527fa47 to bb72a3d Compare August 31, 2026 10:29
Signed-off-by: Marek Dano <mk.dano@gmail.com>

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

Non-blocking notes, all fine as follow-ups:

1. Badge success/warning fail AA in light mode. bg-success/15 text-success puts green-600/amber-600 text on its own 15% tint: success 4.57:1 -> 2.79:1, warning 4.58:1 -> 2.71:1, on text-xs badge text needing 4.5:1. Dark mode is fine. One token can't serve both an icon fill (3:1) and text on its own tint (4.5:1); adding --success-foreground/--warning-foreground at the 700 shades for the badge, keeping text-success for icons, would cover both.

2. Two different reds in one form. MCPServerForm.tsx and QueryParameterAuth.tsx move * to text-destructive, but BasicAuth.tsx, OAuth2Auth.tsx (7x) and CustomHeadersAuth.tsx keep text-red-500. AdvancedSettings renders all four as siblings, so both reds show in the same form, and they diverge further in dark mode.

3. Three sibling preview panels missed. Same success/error header as PromptPreviewResult, still on CheckCircle2/AlertCircle: ResourcePreviewResult.tsx:97 (also text-emerald-500), ToolPreviewResult.tsx:61, ToolLiveInvokeResult.tsx:57. All present at the merge base.

4. Info notifications drop below AA. inline-notification.tsx applies STATUS_TONE_CLASS.info (text-muted-foreground) to the message as well as the icon: 5.17:1 -> 3.45:1 in light mode. Unaccented is right for the icon; the <p> could stay text-foreground.

@marekdano
marekdano merged commit 47da628 into main Sep 1, 2026
5 checks passed
@marekdano marekdano mentioned this pull request Sep 1, 2026
5 tasks done
@gcgoncalves
gcgoncalves deleted the 62-update-status-icons branch September 8, 2026 14:24
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.

[Bug] Standardize status icons and colors app-wide

4 participants