Skip to content

fix(frontend): move ChatMessage out of ChatInterface#250

Open
Creative-Titilayo wants to merge 1 commit into
DXmakers:mainfrom
Creative-Titilayo:fix/108-move-chatmessage-type
Open

fix(frontend): move ChatMessage out of ChatInterface#250
Creative-Titilayo wants to merge 1 commit into
DXmakers:mainfrom
Creative-Titilayo:fix/108-move-chatmessage-type

Conversation

@Creative-Titilayo

@Creative-Titilayo Creative-Titilayo commented Jun 2, 2026

Copy link
Copy Markdown

Overview

This PR moves ChatMessage out of ChatInterface.tsx and into the shared frontend domain types module so the component no longer owns a reusable domain model. It keeps chat UI behavior stable while tightening the type boundary across the frontend.

Related Issue

Closes #108

Changes

⚙️ Shared Domain Types

  • [MODIFY] frontend/src/types/domain.ts
  • Kept ChatMessage as the single shared source of truth for chat message shape.
  • Preserved the existing agent/user sender union and optional proactive / timestamp fields.

🌐 Chat Component Boundary

  • [MODIFY] frontend/src/components/features/chat/ChatInterface.tsx
  • Removed the ChatMessage re-export from the component file.
  • Continued importing ChatMessage from the shared domain module for local props typing.

🧩 Frontend Consumers

  • [MODIFY] frontend/src/app/page.tsx

  • Updated the page to import ChatMessage directly from frontend/src/types/domain.

  • [MODIFY] frontend/src/config/mockData.ts

  • Updated mock chat data to import ChatMessage directly from the shared domain types.

Verification Results

Acceptance Criteria Status
Frontend build passes
Shared domain type coverage passes
Chat UI behavior remains stable

@drips-wave

drips-wave Bot commented Jun 2, 2026

Copy link
Copy Markdown

@Creative-Titilayo Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

[Frontend Fix 01] Move ChatMessage type out of ChatInterface.tsx

1 participant