Skip to content

feat(ui-ux): Normalize chat UI/UX, upgrade dependencies, and version Edge Function source - #6

Merged
PostboxRetinal merged 17 commits into
mainfrom
feat/ui-ux-normalization
Aug 9, 2026
Merged

feat(ui-ux): Normalize chat UI/UX, upgrade dependencies, and version Edge Function source#6
PostboxRetinal merged 17 commits into
mainfrom
feat/ui-ux-normalization

Conversation

@PostboxRetinal

@PostboxRetinal PostboxRetinal commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Summary

Complete UI/UX normalization, dependency upgrades, and Edge Function source versioning. This branch brings the chat interface to production quality with a flat dark design, real-time voice input with editable transcripts, and comprehensive test coverage.

UI/UX

  • Flat dark design system: removed borders from header/footer/chat zones, differentiated via surface/background tokens
  • Unified 44px composer bar: ModelSelector + textarea + VoiceInput in a single row
  • Collapsible sidebar: localStorage persistence, grouped navigation blocks (Logo / Collapse+New / Conversations)
  • Centered chat window: mx-auto w-full max-w-3xl (768px) for optimal reading width
  • Editable conversation titles: click-to-edit inline, saved to Supabase (Enter/blur save, Escape cancel, empty fallback)
  • Flat copy button: no borders, minimal chrome, relies on bg-muted for visual separation
  • Pencil icon indicator: 14px inline SVG next to editable titles, opacity-40 default → group-hover:opacity-70
  • Model selector: IN/OUT pricing via MCP models_compare, categorized into Budget / Latest / Reasoning

Voice / STT

  • Extracted useVoiceComposer hook: owns all STT state (recording, processing, edit, reset)
  • Transcription above composer: prevents layout shift from dynamic content (44px row stays fixed)
  • VoiceTranscriptEditor: edit textarea + Submit / Re-record / Close affordances
  • Copy toast: sonner-based with document.execCommand('copy') fallback for non-secure contexts

Dependencies

Package From To Notes
Vite 7.3.2 8.2.1 Major
Vitest 3 4.1.10 Major
Tailwind CSS 3 3.4.19 Reverted from v4 (see below)
@vitejs/plugin-react 4 6 Major
eslint 10.8.0 10.8.1 Patch
sonner 2.0.7 2.0.8 Patch
@types/node 24 26 Major
typescript ^7.0.2 ^6.0.2 Native tsc compat

Tailwind v4 revert: v4 attempted but broke all UI styles (changed config to @theme CSS, PostCSS plugin to @tailwindcss/postcss, imports to @import "tailwindcss"). Reverted to v3.4.19 stable.

Edge Function

  • supabase/functions/research/index.ts (418 lines) versioned in repo
  • Bright Data: SERP API (Google searches) + Web Unlocker (page fetching)
  • AI/ML API: serverless LLM inferences, model selectable per session
  • Tool-calling loop: search → read → synthesize, up to 5 iterations
  • Deployment: supabase functions deploy research

Testing

  • 122 tests passing (21 files)
  • Coverage: ~60%+ statements, ~79% branches (thresholds: 25/65/60/25)
  • New test files: TranscriptionPreview, useVoiceComposer, VoiceInput, AuthContext, ConversationsContext, ConversationView (title editing), useMessages (error branches)
  • Excluded from denominator (audited, type-only): models.ts, database.types.ts, chat/index.ts

Stats

  • 19 commits
  • 63 files changed (+3,450 / -509 lines)
  • 122 tests, 0 typecheck/lint errors

Verification

  • bun run typecheck - 0 errors
  • bun run lint - 0 errors (1 pre-existing legacy warning in AuthScreen)
  • bun run test - 122/122 passing
  • bun run build - OK (CSS 33.28 kB)
  • openspec validate --all - 9/9 specs valid

Breaking Changes

None. UI-only changes. No backend schema or API changes.

Migration Notes

  • Do not re-attempt Tailwind v4 without dedicated migration sprint
  • Edge Function source now versioned; deployment still manual (supabase functions deploy research)
  • Pencil icon + copy button changes are visual-only, no behavioral test changes needed

Supersedes #4 (Dependabot @babel/core patch) and #5 (Dependabot vite patch). Both are subsumed by the dependency upgrades in this branch.

Closes #4
Closes #5

- Extracted chat UI into reusable components: ChatBubble, ChatMessage, ChatList, and ChatComposer.
- Updated MessageList to act as a thin pass-through to ChatList for backward compatibility.
- Implemented markdown rendering for assistant messages in ChatBubble.
- Added source citation handling in ChatMessage for assistant messages.
- Introduced ChatComposer for message input handling, ensuring trimmed submissions.
- Enhanced ConversationView to utilize ChatComposer alongside VoiceInput.
- Updated AuthScreen to use toast notifications for error and success messages.
- Added unit tests for new components and updated existing tests to ensure coverage.
- Configured Vitest for coverage reporting with thresholds to maintain code quality.
…er experience

- Updated App.tsx to enhance loading states and conversation selection prompts.
- Refactored ConversationSidebar.tsx for consistent styling and added a new header for the DevVoice branding.
- Enhanced ConversationView.tsx to display active model information and improved layout.
- Modified ModelSelector.tsx to export DEFAULT_MODEL_ID for better accessibility.
- Improved SourceCitation.tsx to include an index for citations and updated styles.
- Updated MessageList.test.tsx to ensure proper rendering of messages and markdown content.
- Enhanced SourceCitation.test.tsx to validate rendering of titles and index numbers.
- Refactored ChatBubble.tsx to unify styles and ensure markdown rendering.
- Updated ChatComposer.tsx to handle Enter and Shift+Enter for message submission and newlines.
- Enhanced ChatList.tsx to improve loading and empty states with visual indicators.
- Refactored ChatMessage.tsx to include timestamps and improved source citation rendering.
- Updated CSS styles in index.css for new UI elements and animations.
- Modified tailwind.config.js to extend color palette for better theme support.
…del handling and UI updates

feat(chat): add copy functionality to ChatMessage and refine ChatComposer input behavior
test: extend tests for ModelSelector and ChatMessage to cover new features and ensure accessibility
- Consolidate ModelSelector, ChatComposer, and VoiceInput into a single 44px composer bar.
- Extract TranscriptionPreview and VoiceTranscriptEditor components to render above the composer row.
- Implement collapsible sidebar with localStorage persistence and grouped navigation.
- Enhance visual differentiation of header, footer, and message scroll zones.
- Introduce model chip with pricing and categories in ModelSelector.
- Add inline copy button beside user messages and align user messages to the right.
- Increase test coverage with new tests for TranscriptionPreview, VoiceInput, and useVoiceComposer.
- Exclude type-only files from coverage calculations.
- Update package version to 0.4.2b.
@PostboxRetinal PostboxRetinal self-assigned this Aug 9, 2026
@PostboxRetinal PostboxRetinal added documentation Improvements or additions to documentation enhancement New feature or request dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Aug 9, 2026
@PostboxRetinal
PostboxRetinal marked this pull request as ready for review August 9, 2026 12:40
@PostboxRetinal
PostboxRetinal merged commit c26a8c0 into main Aug 9, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation enhancement New feature or request javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant