Commit Graph

180 Commits

Author SHA1 Message Date
cogwheel0
4b5d987a19 Revert "refactor: optimize renderer"
This reverts commit 0081d56703.
2025-10-02 15:21:44 +05:30
cogwheel0
0081d56703 refactor: optimize renderer 2025-10-02 14:41:17 +05:30
cogwheel0
0f6d1ba464 refactor: improve chat page scrolling behavior and reset logic
- Introduced a new boolean flag `_pendingConversationScrollReset` to manage scrolling behavior when switching conversations.
- Added a method `_resetScrollToTop` to handle scrolling to the top of the chat when necessary, enhancing user experience.
- Updated the logic in the chat page to ensure proper scrolling behavior based on conversation state, improving usability during conversation transitions.
- Refactored the chat input widget to simplify the layout and enhance responsiveness, ensuring better integration with the overall chat interface.
2025-10-02 12:34:12 +05:30
cogwheel0
ba239c47f0 refactor: improve chat input styling and responsiveness
- Enhanced the chat input UI with dynamic background and border colors based on theme brightness and active state.
- Introduced animated containers for smoother transitions in button and input styles, improving user experience.
- Updated the button's shadow and border properties to align with the current theme, ensuring better visual consistency.
- Refactored the layout to utilize a more responsive design, enhancing usability across different devices.
2025-10-02 12:22:07 +05:30
cogwheel0
2538181f8a refactor: enhance chat input UI with compact composer and improved styling
- Introduced a compact composer mode for the chat input, optimizing space when no quick pills are available.
- Refactored the input shell decoration and layout to improve visual consistency and responsiveness.
- Enhanced the text field and button styling, ensuring better integration with the current theme and improved user experience.
- Streamlined the build method by encapsulating the composer text field logic into a separate method for better readability and maintainability.
2025-10-02 12:12:29 +05:30
cogwheel0
1fa8412e0a feat: implement dynamic theme palette selection
- Introduced a new feature allowing users to select from multiple accent color palettes for buttons, cards, and chat bubbles.
- Added `AppThemePalette` provider to manage the current theme palette and persist user selections.
- Updated the `AppTheme` class to utilize the selected palette for light and dark themes, enhancing visual customization.
- Enhanced the `AppCustomizationPage` to include a palette selector, improving user experience and personalization options.
- Updated localization files to support new palette selection UI elements in multiple languages.
2025-10-02 01:58:12 +05:30
cogwheel0
63713622d1 fix: chat input icons 2025-10-02 00:54:35 +05:30
cogwheel0
ff02af1e89 refactor: centralize conversation cache management
- Introduced a new method `refreshConversationsCache` to streamline the invalidation of the conversations provider and optionally the folders provider.
- Updated various components to utilize the new cache management method, enhancing code clarity and reducing redundancy.
- This refactor improves the efficiency of conversation and folder synchronization across the application.
2025-10-02 00:30:14 +05:30
cogwheel0
73ccb14b20 refactor: enhance conversation fetching and folder management
- Improved the logic for fetching conversations within folders by introducing a new condition to determine when to fetch folder conversations.
- Added detailed logging for successful and failed fetch attempts to aid in debugging and monitoring.
- Implemented a method to resolve folder conversations, ensuring that conversations are displayed in the correct order and that placeholders are used when necessary.
- Updated the ChatsDrawer to utilize the new conversation resolution logic, enhancing the user experience by ensuring all relevant conversations are displayed.
- This refactor streamlines conversation management and improves the overall efficiency of the chat interface.
2025-10-02 00:06:00 +05:30
cogwheel0
ebe6cec17c feat: enhance routing and connectivity handling
- Added a new route for connection issues, allowing users to navigate to a dedicated page when the server is unreachable.
- Updated the RouterNotifier to manage navigation based on server connectivity status and authentication state.
- Improved the handling of offline scenarios by integrating connectivity checks into the routing logic.
- Enhanced localization support for connection issue messages in multiple languages.
- Refactored the OfflineIndicator widget to streamline the display of connectivity status without unnecessary complexity.
2025-10-01 23:26:12 +05:30
cogwheel0
d899ca5f70 refactor: update streaming helper to use conversation delta listener
- Replaced direct stream handling for chat and channel events in `attachUnifiedChunkedStreaming` with a new `RegisterConversationDeltaListener` parameter for improved encapsulation and flexibility.
- Removed the previous chat and channel event stream parameters, streamlining the function signature and enhancing code clarity.
- Updated the `regenerateMessage` and `_sendMessageInternal` methods to utilize the new listener registration, improving the management of conversation delta events.
- Enhanced error handling for delta listeners, ensuring robust logging of errors during event processing.
2025-10-01 19:46:21 +05:30
cogwheel0
f15a8eda79 refactor: streamline conversation delta stream handling
- Replaced direct stream access in the `regenerateMessage` and `_sendMessageInternal` methods with a new helper function `_conversationDeltaStream` for better encapsulation and reusability.
- Improved the management of chat and channel event streams by utilizing the new helper function, enhancing code clarity and maintainability.
- Removed the previous `conversationDeltaEventsProvider` as it is no longer necessary with the new implementation, simplifying the provider structure.
2025-10-01 19:20:46 +05:30
cogwheel0
8a8ba76298 refactor: update providers to use keepAlive for enhanced state management
- Changed multiple provider annotations to `@Riverpod(keepAlive: true)` to improve state retention and management across the application.
- This update aligns with recent enhancements in state management practices, ensuring better performance and user experience throughout the app.
2025-10-01 18:32:16 +05:30
cogwheel0
3faac9f16b refactor: improve typing indicator in assistant message widget
- Replaced the previous gradient-based typing indicator with a more dynamic three-dot animation.
- Simplified the animation logic for the typing indicator, enhancing visual feedback and responsiveness.
- Adjusted the layout to ensure proper spacing and prevent clipping during animations.
- Cleaned up the code for better readability and maintainability.
2025-10-01 01:50:36 +05:30
cogwheel0
5a4021aaa9 refactor: enhance chat page auto-scrolling behavior
- Introduced new state variables to manage auto-scrolling functionality.
- Implemented a method to calculate the distance from the bottom of the chat.
- Improved the logic for auto-scrolling to the bottom when new messages arrive or when the user is near the bottom.
- Refactored the scroll-to-bottom logic to enhance performance and user experience.
- Ensured that the auto-scroll behavior is only triggered when appropriate, preventing unnecessary scrolls.
2025-10-01 01:38:47 +05:30
cogwheel0
21cff39c1c Revert "refactor: remove unused code"
This reverts commit 03bb03446b.
2025-10-01 00:47:29 +05:30
cogwheel0
03bb03446b refactor: remove unused code 2025-10-01 00:35:56 +05:30
cogwheel0
fc4430e8df refactor: improve typing indicator logic in assistant message widget
- Simplified the logic for showing the typing indicator by introducing a new method `_shouldShowTypingIndicator`.
- Enhanced the `_isAssistantResponseEmpty` method to check for various conditions that determine if the assistant's response is empty.
- Refactored the `_buildTypingIndicator` method to streamline the UI rendering and improve visual feedback with a gradient background.
- Removed unnecessary comments and cleaned up the code for better readability and maintainability.
2025-09-30 23:56:35 +05:30
cogwheel0
37ebe46e15 refactor: optimize providers with keepAlive for improved state management
- Updated multiple providers to use `@Riverpod(keepAlive: true)` for better state retention throughout the app lifecycle.
- Enhanced `SocketConnectionStream` and `ConversationDeltaStream` with comments clarifying the purpose of public getters.
- Improved error handling in the `_ChatPageState` by ensuring proper checks for mounted state before using context.
- Added comments to clarify the rationale behind keepAlive usage in various providers, ensuring better maintainability and understanding of the codebase.
2025-09-30 23:18:06 +05:30
cogwheel0
46bd057089 refactor: enhance chat message handling and scrolling behavior
- Added `sendMessageWithContainer` function to facilitate message sending with a ProviderContainer.
- Updated `_ChatPageState` to improve scroll behavior, ensuring smoother auto-scrolling when near the bottom of the chat.
- Refactored scroll logic to simplify conditions for showing and hiding the scroll-to-bottom button.
- Adjusted the `OptimizedList` widget to correctly handle item indexing based on the reverse property, enhancing list performance and usability.
2025-09-30 21:17:11 +05:30
cogwheel0
7debb7a055 chore: update markdown dependency and refactor streaming handling
- Added `markdown` dependency version `^7.2.1` in `pubspec.yaml`.
- Updated `pubspec.lock` to reflect the direct dependency change.
- Refactored `streaming_helper.dart` to utilize `StreamingResponseController` for better stream management.
- Enhanced `ChatMessagesNotifier` to handle message streams with improved formatting and error handling.
- Updated `StreamingMarkdownWidget` to streamline markdown rendering and support new configurations.
2025-09-30 20:49:02 +05:30
cogwheel0
ff6d33abdf refactor: enhance model loading and error handling in providers
- Improved handling of asynchronous states in the model loading process.
- Added debug logging for better traceability of model loading failures.
- Ensured proper checks for mounted state to prevent updates after disposal.
- Cleaned up code formatting for better readability.
- Updated the `defaultModel` provider to include more detailed logging and error handling.
2025-09-30 15:20:08 +05:30
cogwheel0
375c961412 fix: add comment for ChatMessagesNotifier class
Resolves analyzer errors from previous commit.
2025-09-30 15:04:20 +05:30
cogwheel0
c4b1d10801 docs: revert chatMessagesProvider migration attempt
ChatMessagesNotifier is extremely complex (2400+ lines) and requires
a dedicated, careful migration session with comprehensive testing.

Current status: 38/39 providers migrated (97%)
Remaining: chatMessagesProvider only

All other Phase 5 providers successfully migrated!
2025-09-30 15:04:04 +05:30
cogwheel0
8543f9255e refactor: migrate voiceInputAvailableProvider
Phase 5.1 Complete (1/5)
- voiceInputAvailableProvider → voiceInputAvailable
- Simple FutureProvider migration
- 2 usages updated automatically
2025-09-30 14:58:53 +05:30
cogwheel0
a63739db6b refactor: migrate Phase 1 providers (2-7/10) to @riverpod
Migrated providers:
- selectedModelProvider → SelectedModel
- isManualModelSelectionProvider → IsManualModelSelection
- reviewerModeProvider → ReviewerMode
- isLoadingConversationProvider → IsLoadingConversation
- prefilledInputTextProvider → PrefilledInputText
- inputFocusTriggerProvider → InputFocusTrigger
- composerHasFocusProvider → ComposerHasFocus
- batchModeProvider → BatchMode
- reducedMotionProvider → ReducedMotion

All provider names unchanged, no breaking changes.
Build runner successful, analyzer passing.
Only 1 WARNING (keepAlive usage) and 2 INFO items remaining.
2025-09-30 14:31:56 +05:30
cogwheel0
f18d378c3c docs: add comprehensive Riverpod 3.0 migration documentation and Priority 1 implementation
Priority 1 (COMPLETE):
- Add riverpod_lint and custom_lint packages
- Update analysis_options.yaml with custom_lint plugin
- Update AGENTS.md with Riverpod 3.0 best practices
- Fix unsafe ref usage in modern_chat_input.dart
- All tests passing, zero breaking changes

Priority 2 (PLANNED):
- Complete migration plan for 39 providers (RIVERPOD_PRIORITY2_PLAN.md)
- Quick reference guide (RIVERPOD_PRIORITY2_QUICKREF.md)
- Progress tracker (RIVERPOD_PRIORITY2_TRACKER.md)
- Master documentation index (RIVERPOD_MIGRATION_INDEX.md)
- Analysis and summary documents

Documentation includes:
- Step-by-step migration examples
- 6-phase implementation plan (23-33 hours)
- Testing strategies and rollback procedures
- Risk assessment and mitigation
- Timeline and resource estimates
2025-09-30 14:27:50 +05:30
cogwheel0
3dfa5c6ec8 refactor: sockets to use riverpod 2025-09-29 00:22:12 +05:30
cogwheel0
0ba48030c8 refactor: riverpod 3 2025-09-28 23:18:24 +05:30
cogwheel0
cb86ad8cd2 refactor: redesign status history 2025-09-28 15:58:46 +05:30
cogwheel0
0ff48eeb38 fix: sources count 2025-09-28 15:15:35 +05:30
cogwheel0
b8856679da feat: show sources 2025-09-28 14:59:29 +05:30
cogwheel0
ae20035900 fix: number of sites count 2025-09-28 14:25:35 +05:30
cogwheel0
ea8eda6784 refactor: remove debuglogs 2025-09-27 16:57:42 +05:30
cogwheel0
9411c81424 fix: followups not arriving issue 2025-09-27 16:50:16 +05:30
cogwheel0
0d5fcabea8 fix: streaming issues 2025-09-27 16:34:37 +05:30
cogwheel0
0c2bd5b4f9 refactor: login and streaming issues 2025-09-26 20:57:54 +05:30
cogwheel0
3c959c83bf refactor: use background only flows 2025-09-26 13:59:28 +05:30
cogwheel0
5f03610f35 fix: streaming 2025-09-26 01:38:00 +05:30
cogwheel0
748f2a43a8 refactor: followups design 2025-09-26 00:10:43 +05:30
cogwheel0
3124bccfeb refactor: more logs 2025-09-25 23:22:48 +05:30
cogwheel0
9210b2155a refactor: all logging 2025-09-25 22:36:42 +05:30
cogwheel0
db0261ffed refactor: titles 2025-09-25 21:15:47 +05:30
cogwheel0
0943621731 refactor: animations 2025-09-25 19:40:34 +05:30
cogwheel0
bfa5ff6363 feat: followups 2025-09-25 18:25:39 +05:30
cogwheel0
637274133f refactor: removing legacy socket code 2025-09-25 12:28:02 +05:30
cogwheel0
5f013b1b73 refactor: formatting 2025-09-24 12:00:49 +05:30
cogwheel0
b8c024d0b0 refactor: improvements 2025-09-24 10:52:15 +05:30
cogwheel0
8da8a78001 refactor: perf improvements 2025-09-23 11:00:25 +05:30
cogwheel0
41216ea432 refactor: optimize codebase 2025-09-23 00:58:58 +05:30