Skip to content

refactor(FR-896): chat card state managment and naming convention#3573

Merged
graphite-app[bot] merged 1 commit into
mainfrom
refactor/chat-card-state-managment
Apr 24, 2025
Merged

refactor(FR-896): chat card state managment and naming convention#3573
graphite-app[bot] merged 1 commit into
mainfrom
refactor/chat-card-state-managment

Conversation

@yomybaby
Copy link
Copy Markdown
Member

@yomybaby yomybaby commented Apr 24, 2025

Resolves #3574 (FR-896)

Refactor Chat Components for Better State Management

  • Refactored AIAgentSelect to use the useAIAgent hook directly instead of requiring agents to be passed as props
  • Simplified ChatCard component by removing redundant state management and using controlled components
  • Added onUpdateChat callback to ChatCard to propagate changes to parent components
  • Improved ChatHeader component by making it more declarative with explicit callbacks
  • Enhanced Conversation component to properly update chat state using the new callback pattern
    -Fetch default endpoint selection in ChatPage to improve initial user experience
  • Removed unnecessary state variables and transitions for better performance
  • Fixed prop types and interfaces across components for better type safety

Copy link
Copy Markdown
Member Author

yomybaby commented Apr 24, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@yomybaby yomybaby force-pushed the refactor/chat-card-state-managment branch from 72b3e8d to 4909efe Compare April 24, 2025 03:00
@yomybaby yomybaby requested a review from ragingwind April 24, 2025 03:02
@yomybaby yomybaby marked this pull request as ready for review April 24, 2025 03:02
@ragingwind ragingwind force-pushed the refactor/chat-card-state-managment branch from 4909efe to 8df2bc7 Compare April 24, 2025 06:01
@ragingwind ragingwind force-pushed the fix/modal-form-endpoint branch 2 times, most recently from 47f0324 to 5f8ae64 Compare April 24, 2025 06:06
@ragingwind ragingwind force-pushed the refactor/chat-card-state-managment branch from 8df2bc7 to 375e1c0 Compare April 24, 2025 06:06
@ragingwind ragingwind force-pushed the fix/modal-form-endpoint branch from 5f8ae64 to ac20500 Compare April 24, 2025 06:12
@ragingwind ragingwind force-pushed the refactor/chat-card-state-managment branch 2 times, most recently from e7f30ab to bd5e7ec Compare April 24, 2025 06:20
@yomybaby yomybaby changed the title refactor: chat card state managment and naming convention refactor(FR-896): chat card state managment and naming convention Apr 24, 2025
@yomybaby yomybaby force-pushed the refactor/chat-card-state-managment branch from bd5e7ec to 7f62189 Compare April 24, 2025 07:25
@yomybaby yomybaby force-pushed the fix/modal-form-endpoint branch from ac20500 to 74e7e26 Compare April 24, 2025 07:25
@yomybaby yomybaby requested a review from ragingwind April 24, 2025 07:27
Comment thread react/src/components/Chat/ChatCard.tsx
@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented Apr 24, 2025

Merge activity

)

Resolves #3574 (FR-896)

# Refactor Chat Components for Better State Management

- Refactored `AIAgentSelect` to use the `useAIAgent` hook directly instead of requiring agents to be passed as props
- Simplified `ChatCard` component by removing redundant state management and using controlled components
- Added `onUpdateChat` callback to `ChatCard` to propagate changes to parent components
- Improved `ChatHeader` component by making it more declarative with explicit callbacks
- Enhanced `Conversation` component to properly update chat state using the new callback pattern
-Fetch default endpoint selection in `ChatPage` to improve initial user experience
- Removed unnecessary state variables and transitions for better performance
- Fixed prop types and interfaces across components for better type safety
@graphite-app graphite-app Bot force-pushed the fix/modal-form-endpoint branch from 74e7e26 to 51835df Compare April 24, 2025 07:39
@graphite-app graphite-app Bot force-pushed the refactor/chat-card-state-managment branch from 7f62189 to fcbb821 Compare April 24, 2025 07:40
Base automatically changed from fix/modal-form-endpoint to main April 24, 2025 07:41
@graphite-app graphite-app Bot merged commit fcbb821 into main Apr 24, 2025
4 checks passed
@graphite-app graphite-app Bot deleted the refactor/chat-card-state-managment branch April 24, 2025 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100~500 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: Chat card state management and naming convention

2 participants