Skip to content

UI/UX Audit: OKLCH tokens, AgentBuilder split, accessibility fixes#151

Merged
VictorGjn merged 21 commits intomasterfrom
fix/ui-ux-audit
Apr 3, 2026
Merged

UI/UX Audit: OKLCH tokens, AgentBuilder split, accessibility fixes#151
VictorGjn merged 21 commits intomasterfrom
fix/ui-ux-audit

Conversation

@VictorGjn
Copy link
Copy Markdown
Owner

UI/UX Audit Implementation

Full audit report: see session/2026-04-02_UI_UX_Audit_Modular.md

Design System

  • OKLCH design tokens (src/styles/tokens.css) replacing all hex values
  • theme.ts rewritten to use var(--m-*) CSS custom properties
  • globals.css rebuilt: imports tokens, Tailwind @theme mapping, Firefox scrollbars, scoped transitions
  • themeStore.ts now sets data-theme attribute on <html>
  • Font: Geist (not Geist Sans) everywhere

AgentBuilder Split (968 lines → 9 focused files)

  • src/panels/builder/AgentActionBar.tsx — save/load/export/import bar
  • src/panels/builder/SectionHeader.tsx — reusable collapsible header + GenerateBtn
  • src/panels/builder/IdentitySection.tsx — avatar, name, description, tags
  • src/panels/builder/PersonaSection.tsx — persona, tone, expertise
  • src/panels/builder/ConstraintsSection.tsx — safety profiles, custom rules
  • src/panels/builder/ObjectivesSection.tsx — objectives, success criteria
  • src/panels/builder/WorkflowCard.tsx — workflow steps timeline
  • src/panels/builder/ContextBudgetCard.tsx — token budget breakdown
  • src/panels/AgentBuilder.tsx — thin ~145-line orchestrator

Accessibility

  • Tabs.tsx: font size 9px→11px, ARIA tabs pattern, keyboard nav (arrows)
  • WizardLayout.tsx: role=tabpanel, aria-labelledby
  • Modal.tsx: focus trap (Tab/Shift+Tab cycling), focus restore on close

Color Consistency

  • Button.tsx: all hex → var(--m-*) tokens
  • RuntimePanel.tsx: FACT_COLORS hex → var(--m-fact-*)
  • AgentLibrary.tsx: removed inline toast, uses ds/Toast; hex → tokens

CSS

  • prefers-reduced-motion support
  • Firefox scrollbar support (scrollbar-width: thin)
  • Scoped .theme-transition class (no blanket * transition)

VictorGjn added 20 commits April 2, 2026 23:37
- Import tokens.css as single source of truth
- Map --m-* vars to Tailwind --color-* via @theme block
- Replace all hardcoded hex colors with var(--m-*) references
- Add Firefox scrollbar support (scrollbar-width/scrollbar-color)
- Scope theme transitions to .theme-transition class only
- Use Geist (not Geist Sans) for font-sans via --m-font-sans
- Keep focus-visible, sr-only, base reset, and React Flow overrides
- Remove separate dark/light scrollbar and React Flow theme blocks
  (tokens.css handles theme switching via data-theme attribute)
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9e86c78fae

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +47 to +48
{constraints.customConstraints.split('
').filter(Boolean).map((rule: string, i: number) => (
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P0 Badge Fix unterminated string in customConstraints split

This split call is written as split(' followed by a newline and then '), which creates an unterminated string literal in TSX. In practice the file cannot be parsed, so the frontend build/dev server fails before the Agent Builder can render.

Useful? React with 👍 / 👎.

workflowTokens={workflowTokens}
totalUsed={totalUsed}
tokenBudget={tokenBudget}
factCount={facts.length}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Pass the correct factsCount prop to ContextBudgetCard

The card component expects a factsCount prop, but this call site passes factCount instead, so the “Based on N insights” line never appears even when facts exist. This also leaves factsCount undefined in the child and creates a type mismatch that will fail typed builds.

Useful? React with 👍 / 👎.

const color = FACT_COLORS[fact.epistemicType] ?? 'var(--m-text-dim)';
return (
<span style={{ fontSize: 12, padding: '2px 6px', borderRadius: 4, background: color + '15', color, fontFamily: "'Geist Mono', monospace" }}>
<span style={{ fontSize: 12, padding: '2px 6px', borderRadius: 4, background: color + '15', color, fontFamily: "var(--m-font-mono), monospace" }}>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Use a valid alpha color for fact badge backgrounds

After switching FACT_COLORS to CSS variables, background: color + '15' now produces invalid CSS like var(--m-fact-observation)15. Browsers drop that declaration, so epistemic badges lose their tinted background state and become harder to scan.

Useful? React with 👍 / 👎.

@VictorGjn VictorGjn merged commit 0833777 into master Apr 3, 2026
1 check failed
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.

1 participant