Files
bb9d9490d0 refactor(design): one colour system on the bot pages (#144)
app/globals.css defines the identity -- editorial ink, one ochre accent --
and says so in a comment: "No generic AI gradient blue/purple." The bot
pages ignored it and ran a parallel palette, so a single viewport of
/bots/legal-expert showed a blue logo, a blue nav button and an ochre CTA
at the same time.

There were four colour sources, not two:
  lib/config/colors.ts        16-colour accent sets
  lib/hooks/navigationConfig  its own 5-colour NAV_COLOR_CLASSES
  ACCENT_HERO_CLASSES         a fifth set (whose green and indigo entries
                              both set chatBg to 'bg-blue-50' -- it was not
                              even self-consistent)
  raw Tailwind greys          text-gray-900 / bg-white / border-gray-200

The six professional bots are Botsmann, so they now wear the brand:
BRAND_ACCENT and BRAND_HERO, plus a single NAV_COLORS scheme. 113 raw
grey/white classes became semantic tokens (text-ink, text-ink-muted,
bg-surface, bg-paper, border-edge). The page ground is bg-paper, matching
the homepage instead of flat white.

The 'B' mark in BotNavigation was literally
`bg-gradient-to-r from-blue-600 to-purple-600` -- the exact thing globals.css
forbids by name. It now renders the shared <Logo>, so it cannot drift again.

Per-bot accentColor is gone from the first-party config and its plumbing.
The per-colour sets STAY for user-created bots: custom_bots.accent_color is
a real column with a CHECK constraint and the owner picks it. That is user
data, not a design token.

Also deleted components/shared/BotPageTemplate.tsx -- nothing imported it.

Not in this change: /try, /enterprise, /bots and /knowledge still carry
blue/purple gradients (72 files match the raw palette). Same class, separate
pass, so this one stays reviewable.

verify: format, lint, typecheck, 240 tests, build -- all green. Verified
visually against a local production build.


Claude-Session: https://claude.ai/code/session_01HVwg8DKHQktxJuHeLM3xpG

Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-28 08:16:47 +00:00

117 lines
4.3 KiB
TypeScript

'use client';
import type { VisionContent } from '@/lib/config/bot-pages';
import { BRAND_ACCENT, VISION_STATUS_CONFIG } from '@/lib/config/colors';
interface VisionSectionProps {
content: VisionContent;
}
export function VisionSection({ content }: VisionSectionProps) {
const { badge, title, subtitle, mission, principles, phases, benefits } = content;
const accent = BRAND_ACCENT;
return (
<div className="max-w-6xl mx-auto">
{badge && (
<div className="text-center mb-4">
<span
className={`inline-block px-3 py-1 text-sm font-medium rounded-full ${accent.badge}`}
>
{badge}
</span>
</div>
)}
<h2 className="text-3xl font-bold text-center text-ink mb-4">{title}</h2>
{subtitle && (
<p className="text-lg text-ink-muted text-center max-w-3xl mx-auto mb-12">{subtitle}</p>
)}
{/* Mission */}
{mission && (
<div className="bg-paper rounded-xl p-8 mb-12 text-center">
<h3 className="text-xl font-semibold text-ink mb-3">{mission.title}</h3>
<p className="text-ink-muted max-w-2xl mx-auto">{mission.description}</p>
</div>
)}
{/* Principles */}
{principles && principles.length > 0 && (
<div className="grid gap-6 md:grid-cols-3 mb-12">
{principles.map((principle, index) => (
<div key={index} className="text-center">
{principle.icon && <span className="text-3xl mb-3 block">{principle.icon}</span>}
<h4 className="font-semibold text-ink mb-2">{principle.title}</h4>
<p className="text-ink-muted text-sm">{principle.description}</p>
</div>
))}
</div>
)}
{/* Phases/Roadmap */}
{phases && phases.length > 0 && (
<div className="mb-12">
<h3 className="text-2xl font-bold text-center text-ink mb-8">Development Roadmap</h3>
<div className="space-y-6">
{phases.map((phase, index) => (
<div key={index} className="bg-surface rounded-xl border border-edge p-6 shadow-sm">
<div className="flex flex-wrap items-center gap-3 mb-4">
<span className="text-sm font-medium text-ink-muted">{phase.phase}</span>
<span
className={`px-2 py-1 text-xs rounded ${VISION_STATUS_CONFIG[phase.status]?.colors}`}
>
{VISION_STATUS_CONFIG[phase.status]?.label}
</span>
</div>
<h4 className="text-xl font-semibold text-ink mb-2">{phase.title}</h4>
{phase.timeline && (
<p className="text-sm text-ink-muted mb-3">Timeline: {phase.timeline}</p>
)}
<p className="text-ink-muted mb-4">{phase.description}</p>
{phase.capabilities && phase.capabilities.length > 0 && (
<div>
<h5 className="text-sm font-medium text-ink mb-2">Key Capabilities:</h5>
<ul className="grid gap-2 md:grid-cols-2">
{phase.capabilities.map((cap, capIndex) => (
<li
key={capIndex}
className="text-sm text-ink-muted flex items-center gap-2"
>
<span className={`w-1.5 h-1.5 rounded-full ${accent.primary}`}></span>
{cap}
</li>
))}
</ul>
</div>
)}
</div>
))}
</div>
</div>
)}
{/* Benefits */}
{benefits && benefits.length > 0 && (
<div>
<h3 className="text-2xl font-bold text-center text-ink mb-8">Why This Vision Matters</h3>
<div className="grid gap-6 md:grid-cols-2 lg:grid-cols-4">
{benefits.map((benefit, index) => (
<div key={index} className="text-center p-4">
<span className="text-3xl mb-3 block">{benefit.icon}</span>
<h4 className="font-semibold text-ink mb-2">{benefit.title}</h4>
<p className="text-ink-muted text-sm">{benefit.description}</p>
</div>
))}
</div>
</div>
)}
</div>
);
}