1.4 KiB
1.4 KiB
Pro-Grade UI Implementation Plan
Goal
Eliminate the "Wall of Text" by introducing a Card/Bubble architecture. Messages should feel distinct, structured, and "Pro".
User Review Required
Important
Layout Change: User messages will now align to the RIGHT. AI messages to the LEFT. This is standard in modern chat layouts but a departure from typical CLI tools.
Proposed Changes
1. New Component: ChatBubble.mjs
- Location:
bin/ui/components/ChatBubble.mjs - Flex Logic:
User:flexDirection: row-reverse. Text aligns right. Box has Cyan border.AI:flexDirection: row. Text aligns left. Box has Gray/White border.System: Compact, centered or subtle left-border.
2. Integration: ViewportMessage Redesign
- File:
bin/opencode-ink.mjs - Change: Replace the current
ViewportMessageimplementation. - Logic:
- Instead of
h(Text), useh(ChatBubble, { role, content }). - Pass
widtheffectively to ensure bubbles wrap correctly.
- Instead of
3. "The Ghost Box" (Thinking)
- Status: Already separated (previous task). We will give it a "Glass" look (dimmed, single border).
Verification Plan
- Chat Flow:
- Send "Hello". Verify it appears on the Right (Cyan).
- AI replies. Verify it appears on the Left.
- Error occurs. Verify it appears as a distinct Red Card.
- Responsiveness:
- Resize window. Ensure bubbles resize and don't overlap.