Skip to content

Conversation

@erskingardner
Copy link
Member

@erskingardner erskingardner commented May 20, 2025

Summary by CodeRabbit

  • New Features

    • Introduced advanced routing using go_router with Riverpod for state management, enabling seamless navigation and authentication flow.
    • Added authentication state provider for login/logout functionality.
    • Centralized route constants and navigation helpers for easier navigation.
    • Enhanced documentation for AI-powered CLI tools.
    • Added comprehensive Flutter UI for onboarding, authentication, chat, and contact list screens.
  • Style

    • Updated the entire app's color palette to a new "glitch" theme, affecting all UI components for a refreshed look.
    • Improved code formatting and consistency across UI widgets.
  • Refactor

    • Migrated navigation logic from Navigator to go_router throughout authentication and chat screens.
    • Refactored routing setup to use provider-based configuration.
    • Updated main app initialization to leverage new routing and theming.
  • Chores

    • Integrated CocoaPods support into the macOS project for dependency management.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 20, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This update introduces a comprehensive refactor of navigation and theming in a Flutter messaging app. The routing system is migrated to use go_router with Riverpod for state management, centralizing route definitions and navigation helpers. The color palette is standardized with a new "glitch" theme. Numerous UI components are updated to use the new navigation and color scheme, while authentication and routing logic are now provider-driven. Additional project configuration changes support CocoaPods integration for macOS.

Changes

File(s) / Group Change Summary
.context/01_rust_api.md Simplified WhitenoiseState struct and commented out multi-account support fields and methods.
.cursor/rules/vibe-tools.mdc Added global rule file with detailed documentation for vibe-tools CLI.
.repomix-plan-filtered.txt Added packed representation of the Flutter project, including routing, authentication, chat UI, and navigation flows.
local-research/go_router_implementation_plan.md Added detailed plan for integrating go_router with Riverpod, including route structure, helpers, and best practices.
lib/config/providers/auth_provider.dart Introduced AuthState class and authProvider for authentication state management.
lib/main.dart Converted MyApp to ConsumerWidget, updated to use routerProvider, and changed theme color.
lib/routing/router.dart Removed static router configuration file.
lib/routing/router_provider.dart Added Riverpod-based routerProvider with authentication-aware routing and redirection.
lib/routing/routes.dart Added navigation helper methods and imports for context-based routing.
lib/shared/custom_button.dart, lib/shared/custom_textfield.dart, lib/ui/core/ui/custom_textfield.dart Updated color scheme to use new glitch palette; reformatted style and borders.
lib/ui/core/themes/colors.dart Replaced old color constants with structured glitch palette and new color schemes.
lib/ui/auth_flow/welcome_screen.dart, lib/ui/auth_flow/info_screen.dart, lib/ui/auth_flow/create_profile_screen.dart, lib/ui/auth_flow/key_created_screen.dart, lib/ui/auth_flow/logged_screen.dart, lib/ui/auth_flow/login_screen.dart Migrated navigation from Navigator to go_router and centralized route helpers; updated UI colors and text styling.
lib/ui/chat/chat_screen.dart, lib/ui/chat/groupchat_screen.dart Updated navigation to use go_router, refactored formatting, and applied glitch color scheme.
lib/ui/chat/widgets/*, lib/ui/contact_list/widgets/* Updated color constants, reformatted widget constructors, and improved style consistency.
lib/ui/contact_list/chat_invitation_sheet.dart, lib/ui/contact_list/start_chat_bottom_sheet.dart, lib/ui/contact_list/group_chat_details_sheet.dart, lib/ui/contact_list/new_chat_bottom_sheet.dart Reformatted builder functions, updated color constants, and improved style.
lib/ui/contact_list/chat_list_screen.dart Added imports for go_router and route definitions.
macos/Runner.xcodeproj/project.pbxproj, macos/Runner.xcworkspace/contents.xcworkspacedata Integrated CocoaPods frameworks/configs into macOS project and workspace.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant App (Flutter)
  participant RouterProvider (Riverpod)
  participant AuthProvider
  participant GoRouter

  User->>App (Flutter): Launches app
  App (Flutter)->>RouterProvider: Requests router instance
  RouterProvider->>AuthProvider: Checks authentication state
  AuthProvider-->>RouterProvider: Returns isAuthenticated
  RouterProvider->>GoRouter: Configures routes and redirects
  GoRouter-->>App (Flutter): Provides navigation structure

  User->>App (Flutter): Interacts with login/onboarding
  App (Flutter)->>AuthProvider: Calls login()
  AuthProvider-->>RouterProvider: Notifies state change
  RouterProvider->>GoRouter: Triggers redirect
  GoRouter-->>App (Flutter): Navigates to contacts/chat screen
Loading

Poem

A new route hops in, the glitch theme shines bright,
Riverpod guides us through day and through night.
Buttons and borders, now stylish and neat,
Chats and contacts with colors replete.
CocoaPods join the warren, dependencies in tow,
The White Noise app’s ready—let’s give it a go!
🐇✨

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1889c03 and 846391f.

📒 Files selected for processing (4)
  • .cursor/rules/vibe-tools.mdc (1 hunks)
  • lib/config/providers/auth_provider.dart (1 hunks)
  • lib/ui/chat/widgets/chat_input.dart (17 hunks)
  • local-research/go_router_implementation_plan.md (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🧹 Nitpick comments (15)
macos/Runner.xcodeproj/project.pbxproj (2)

325-342: Hard-coded file-list paths are fragile

The embed-phase script assumes ${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist.
If the Podfile target name changes or a user employs custom build configurations (Staging, AdHoc, …), the glob will break and the frameworks won’t embed.

A defensive pattern is:

-inputFileListPaths = (
-  "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
-);
+inputFileListPaths = (
+  "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-$(CONFIGURATION)-input-files.xcfilelist",
+);

so the value is substituted by Xcode rather than by the shell.


381-424: [CP] Check Pods Manifest.lock script: quote paths containing spaces

The script references
"${PODS_PODFILE_DIR_PATH}/Podfile.lock" and "${PODS_ROOT}/Manifest.lock".
If either path contains spaces (common in $HOME when a user name has a space), the un-quoted diff fallback will fail.

Tiny hardening:

- diff "${PODS_PODFILE_DIR_PATH}/Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null
+ /usr/bin/env diff "${PODS_PODFILE_DIR_PATH}/Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null

(or wrap the whole command in set -euo pipefail).

.cursor/rules/vibe-tools.mdc (4)

6-8: Refine introduction for clarity and conciseness.
The first two sentences are repetitive (“vibe-tools is…”), consider combining them to flow smoothly and remove redundancy.


11-38: Use fenced code blocks for command examples.
Inline backticks within prose make long commands hard to read. For each command section (e.g., “Direct Model Queries,” “Ask Command Options,” etc.), wrap examples in triple-backtick blocks to preserve formatting.


92-101: Consider adding a table of contents at the top.
Given the length and number of command categories, a TOC would improve navigability.


108-121: Consolidate overlapping option descriptions.
The “General Command Options” (108–113) and “Repository Command Options” (114–121) share several flags (--provider, --model, --max-tokens). Consider inheriting from the general section or linking back, rather than duplicating descriptions.

lib/ui/contact_list/chat_list_screen.dart (1)

8-9: Remove or utilize unused imports
The go_router and Routes imports are added but not referenced in this file. Either remove these imports to clean up the code or implement the intended navigation logic (e.g., tapping a chat tile).

lib/ui/auth_flow/welcome_screen.dart (1)

102-102: Navigation updated to use go_router.

The direct GoRouter.go call is used appropriately here. For consistency with line 76, consider using a Routes helper method here as well (e.g., Routes.goToLogin(context)).

lib/config/providers/auth_provider.dart (1)

4-22: Consider adding persistence for authentication state

Currently, the authentication state is reset to false when the app restarts. For a production app, consider implementing persistence using shared preferences or another storage mechanism.

class AuthState extends ChangeNotifier {
-  bool _isAuthenticated = false;
+  bool _isAuthenticated = false;
+  
+  // Initialize from storage in constructor
+  AuthState() {
+    _loadAuthState();
+  }
+  
+  Future<void> _loadAuthState() async {
+    // Load from SharedPreferences or similar
+    // final prefs = await SharedPreferences.getInstance();
+    // _isAuthenticated = prefs.getBool('isAuthenticated') ?? false;
+    // notifyListeners();
+  }
+  
+  Future<void> _saveAuthState() async {
+    // Save to SharedPreferences or similar
+    // final prefs = await SharedPreferences.getInstance();
+    // await prefs.setBool('isAuthenticated', _isAuthenticated);
+  }

  bool get isAuthenticated => _isAuthenticated;

  void login() {
    _isAuthenticated = true;
    notifyListeners();
+   _saveAuthState();
  }

  void logout() {
    _isAuthenticated = false;
    notifyListeners();
+   _saveAuthState();
  }
}
lib/ui/chat/widgets/chat_input.dart (1)

187-191: Function name should follow Dart naming conventions.

The method deletePickedFiles should be renamed to follow Dart's camelCase naming convention.

-deletePickedFiles() {
+void deletePickedFiles() {
lib/ui/core/themes/colors.dart (1)

8-91: Consider documenting color usage patterns.

While the implementation is solid, it would be helpful to provide documentation on how different glitch colors should be used for different UI elements. This would help maintain consistency as the app grows.

Consider adding comments that describe the general usage pattern for these colors, such as:

// Color Usage Guidelines:
// - glitch50-100: Background colors for light surfaces
// - glitch200-300: Border and divider colors
// - glitch400-600: Secondary text and icon colors
// - glitch700-800: Primary text for dark mode
// - glitch900-950: Primary text for light mode and backgrounds for dark mode
.repomix-plan-filtered.txt (1)

1-1444: The .repomix-plan-filtered.txt file is a generated snapshot intended for AI analysis and should not be committed to the main codebase. It’s read-only and not part of the application logic. Please remove this file from the PR.

local-research/go_router_implementation_plan.md (3)

1-11: Remove local research document from production PR
This planning document is meant for internal research and not for production or user-facing documentation. Consider moving it to a separate docs directory or excluding it from this PR to keep the repository clean.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~7-~7: Possible missing comma found.
Context: ...to get file listing... Found 210 files, approx 133628 tokens. Asking openrouter to ide...

(AI_HYDRA_LEO_MISSING_COMMA)


311-311: Remove trailing colons in Markdown headings
Multiple headings end with a colon, which violates MD026 (no trailing punctuation). Please delete the trailing : in these headings for consistency:

  • ### Example for WelcomeScreen:
  • ### Example for LoginScreen:
  • ### For ChatScreen:
  • ### For Android (add to AndroidManifest.xml):
  • ### For iOS (update Info.plist):

Also applies to: 343-343, 384-384, 452-452, 469-469

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

311-311: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)


531-531: Add language identifier to fenced code block
The file-structure example uses a plain ``````` block; please specify a language (e.g., text or bash) to enable proper syntax highlighting and satisfy MD040.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

531-531: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 5e64c20 and 1889c03.

⛔ Files ignored due to path filters (2)
  • ios/Podfile.lock is excluded by !**/*.lock
  • macos/Podfile.lock is excluded by !**/*.lock
📒 Files selected for processing (40)
  • .context/01_rust_api.md (2 hunks)
  • .cursor/rules/vibe-tools.mdc (1 hunks)
  • .repomix-plan-filtered.txt (1 hunks)
  • lib/config/providers/auth_provider.dart (1 hunks)
  • lib/main.dart (3 hunks)
  • lib/routing/router.dart (0 hunks)
  • lib/routing/router_provider.dart (1 hunks)
  • lib/routing/routes.dart (2 hunks)
  • lib/shared/custom_button.dart (1 hunks)
  • lib/shared/custom_textfield.dart (1 hunks)
  • lib/ui/auth_flow/create_profile_screen.dart (4 hunks)
  • lib/ui/auth_flow/info_screen.dart (3 hunks)
  • lib/ui/auth_flow/key_created_screen.dart (4 hunks)
  • lib/ui/auth_flow/logged_screen.dart (3 hunks)
  • lib/ui/auth_flow/login_screen.dart (4 hunks)
  • lib/ui/auth_flow/welcome_screen.dart (3 hunks)
  • lib/ui/chat/chat_screen.dart (10 hunks)
  • lib/ui/chat/groupchat_screen.dart (9 hunks)
  • lib/ui/chat/widgets/chat_audio_item.dart (1 hunks)
  • lib/ui/chat/widgets/chat_input.dart (17 hunks)
  • lib/ui/chat/widgets/chat_reply_item.dart (2 hunks)
  • lib/ui/chat/widgets/contact_info.dart (1 hunks)
  • lib/ui/chat/widgets/message_widget.dart (3 hunks)
  • lib/ui/chat/widgets/reaction/reactions_dialog_widget.dart (6 hunks)
  • lib/ui/chat/widgets/reaction/stacked_reactions.dart (3 hunks)
  • lib/ui/chat/widgets/status_message_item_widget.dart (1 hunks)
  • lib/ui/contact_list/chat_invitation_sheet.dart (3 hunks)
  • lib/ui/contact_list/chat_list_screen.dart (1 hunks)
  • lib/ui/contact_list/group_chat_details_sheet.dart (7 hunks)
  • lib/ui/contact_list/new_chat_bottom_sheet.dart (1 hunks)
  • lib/ui/contact_list/start_chat_bottom_sheet.dart (1 hunks)
  • lib/ui/contact_list/widgets/chat_list_appbar.dart (1 hunks)
  • lib/ui/contact_list/widgets/chat_list_tile.dart (4 hunks)
  • lib/ui/contact_list/widgets/contact_list_tile.dart (3 hunks)
  • lib/ui/contact_list/widgets/empty_chat_widget.dart (1 hunks)
  • lib/ui/core/themes/colors.dart (1 hunks)
  • lib/ui/core/ui/custom_textfield.dart (1 hunks)
  • local-research/go_router_implementation_plan.md (1 hunks)
  • macos/Runner.xcodeproj/project.pbxproj (12 hunks)
  • macos/Runner.xcworkspace/contents.xcworkspacedata (1 hunks)
💤 Files with no reviewable changes (1)
  • lib/routing/router.dart
🧰 Additional context used
🪛 LanguageTool
local-research/go_router_implementation_plan.md

[uncategorized] ~7-~7: Possible missing comma found.
Context: ...to get file listing... Found 210 files, approx 133628 tokens. Asking openrouter to ide...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~561-~561: The grammatical number of this noun doesn’t look right. Consider replacing it.
Context: ...IDs (e.g., /chats/:id) - Use extra parameter for complex objects (state.extra) - ...

(AI_EN_LECTOR_REPLACEMENT_NOUN_NUMBER)

🪛 markdownlint-cli2 (0.17.2)
local-research/go_router_implementation_plan.md

311-311: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)


343-343: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)


384-384: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)


452-452: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)


469-469: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)


531-531: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)

🔇 Additional comments (145)
macos/Runner.xcodeproj/project.pbxproj (2)

188-201: Check-in of Pods xcconfig files may bloat the repo

A new Pods group referencing Target Support Files/…/*.xcconfig has been added to the main project.
If use_frameworks! or flutter_export_environment already takes care of the configuration, committing these support files can:

  1. Pollute diffs whenever a teammate runs pod install with a different CocoaPods version.
  2. Cause merge conflicts inside *.xcconfig that are auto-generated.

Consider adding Pods/ to .gitignore and relying on pod install in CI instead.


474-506: Ensure RunnerTests inherits Flutter flags after xcconfig switch

The three baseConfigurationReference lines now point to the Pods-generated xcconfigs.
Verify that the previous settings coming from Debug.xcconfig / Release.xcconfig (e.g. ENABLE_TESTABILITY, Swift version overrides) are still inherited via #include inside those Pod files; otherwise you could lose important compiler flags for the test bundle.

macos/Runner.xcworkspace/contents.xcworkspacedata (1)

7-9: Pods project correctly added to workspace

Adding Pods/Pods.xcodeproj ensures Xcode can resolve the schemes and build phases generated by CocoaPods. 👍

.cursor/rules/vibe-tools.mdc (1)

181-181: Verify version pinning.
The rule is tagged with vibe-tools-version: 0.60.9. Ensure this matches the installed version and consider auto-updating this field during releases.

lib/ui/contact_list/widgets/chat_list_appbar.dart (1)

15-17: Apply new glitch theme color to AppBar background
The background color has been correctly updated to AppColors.glitch950 to match the new theme palette.

lib/ui/chat/widgets/chat_audio_item.dart (1)

44-47: Update audio play button background to glitch600
The circular container’s background color has been successfully switched to AppColors.glitch600, aligning with the updated color scheme.

lib/ui/contact_list/widgets/empty_chat_widget.dart (1)

20-22: Standardize text color to glitch600
Both status messages now use AppColors.glitch600, ensuring consistent text styling across the empty state UI.

Also applies to: 26-28

lib/ui/core/ui/custom_textfield.dart (1)

30-39: Refresh TextField styling to new glitch palette
The hintStyle and border colors have been updated to the glitch palette (glitch600 for hints, glitch200 for borders) with multiline OutlineInputBorder, enhancing visual consistency.

lib/ui/contact_list/new_chat_bottom_sheet.dart (3)

88-91: Color theming update: group chat icon

The color filter for the group chat icon has been updated to use AppColors.glitch600 as part of the app-wide theming update, replacing the legacy color constant.


96-104: UI color consistency improvement

The "New Group Chat" text styling has been updated to use the new glitch color palette, maintaining consistency with the surrounding UI elements.


107-110: Color theming update: chevron icon

The chevron icon's color filter has been updated to match the new color scheme, ensuring visual consistency with the text and group chat icon.

lib/ui/auth_flow/create_profile_screen.dart (3)

4-4: Added go_router import

Appropriate import added for the go_router package used in navigation updates.


20-20: Navigation update with go_router

Navigation has been updated to use context.go() instead of Navigator.push(), aligning with the app-wide migration to go_router for more structured and centralized navigation.


61-61: TextField styling updated to match new theme

The fillColor for both TextFields has been updated from grey to the new glitch color palette, providing visual consistency across the app.

Also applies to: 84-84

lib/ui/chat/widgets/contact_info.dart (3)

9-9: Code formatting improvement

Constructor declaration has been condensed to a single line for better readability and consistent code style.


15-15: Widget instantiation formatting

CircleAvatar widget instantiation has been condensed to a single line for better readability.


17-17: Color theming update

The text color has been updated to use the new glitch color palette (AppColors.glitch200), aligning with the app-wide theming update.

lib/ui/contact_list/widgets/chat_list_tile.dart (3)

56-56: Color theming update: chat name

The chat name text color has been updated to use AppColors.glitch900 from the new color palette.


65-65: Color consistency for secondary text

Both the chat time and last message text colors have been updated to use AppColors.glitch600, providing visual consistency for secondary text elements.

Also applies to: 77-77


87-87: Color theming update: unread badge

The background color for the unread count badge has been updated to use AppColors.glitch950, maintaining the visual hierarchy while aligning with the new color scheme.

lib/ui/contact_list/start_chat_bottom_sheet.dart (4)

53-56: Clean code formatting!

The CircleAvatar widget is now formatted with proper indentation, which improves readability without changing functionality.


58-65: Good update to use the new color scheme

The Text widget for the name now uses the new glitch color palette (AppColors.glitch950) instead of the legacy color constants, consistent with the app-wide theming update.


67-70: Consistent color theming applied

The email text styling now uses AppColors.glitch600, aligning with the new color scheme and maintaining visual hierarchy with the name text above it.


77-77: Theming consistency maintained

The publicKey text now also uses AppColors.glitch600, ensuring consistent styling with the email field and maintaining the visual hierarchy in the bottom sheet.

lib/shared/custom_button.dart (2)

26-34: Thorough color scheme update for buttons

The button styling has been comprehensively updated to use the new glitch color palette, with careful attention to different states (primary/secondary, enabled/disabled) and proper opacity for disabled states.

The color mapping looks correct:

  • Primary buttons: dark background (glitch950) with light text (glitch50)
  • Secondary buttons: light background (glitch100) with dark text (glitch900)
  • Disabled states maintain appropriate contrast and visual hierarchy

42-42: Reformatted text style

The button text style has been cleanly reformatted while maintaining the same functionality and appearance.

lib/ui/chat/widgets/status_message_item_widget.dart (4)

10-15: Improved constructor formatting

The constructor parameters have been formatted more clearly with one parameter per line, improving readability without changing functionality.


22-22: Updated icon color for visual consistency

The icon color now uses AppColors.glitch600 instead of the legacy color constant, aligning with the app's new color scheme.


28-28: Updated highlighted text color

The highlighted text now uses AppColors.glitch950 instead of the legacy color constant, ensuring proper emphasis in the visual hierarchy.


32-33: Updated secondary text color

The secondary text color now uses AppColors.glitch600, creating proper visual differentiation from the highlighted text while maintaining the new color scheme.

lib/shared/custom_textfield.dart (2)

30-42: Complete text field styling update

The TextField styling has been comprehensively updated to use the new glitch color palette:

  • Hint text now uses AppColors.glitch600 for better readability
  • All border states (default, enabled, focused) use AppColors.glitch200 with explicit BorderSide construction
  • Content padding logic is preserved while improving code formatting

These changes maintain consistent styling with the rest of the app's UI components.


47-47: Minor formatting improvement

This minor formatting change improves code consistency.

lib/ui/auth_flow/info_screen.dart (4)

4-4: Added go_router import

Added the necessary import for go_router, which is used for the updated navigation approach.


10-10: Updated to use go_router for navigation

The navigation method has been updated from imperative (Navigator.push) to declarative (context.go) using go_router, aligning with the app-wide routing refactor.


38-38: Updated text color to match new theme

The subtitle text now uses AppColors.glitch400 instead of AppColors.grey3, consistent with the app's new color palette.


64-64: Standardized apostrophe in string

The text "What's unique\nabout White Noise" now uses straight apostrophes instead of typographic ones, ensuring consistent string formatting throughout the app.

lib/ui/auth_flow/welcome_screen.dart (2)

3-6: Import changes correctly support the new routing system.

The addition of go_router imports and routes.dart replaces the direct imports of screen files, which aligns with the centralized routing approach being implemented.


76-76: Navigation refactored to use Routes helper.

Good change replacing direct navigation with the centralized Routes helper. This makes navigation more maintainable and consistent across the app.

.context/01_rust_api.md (2)

23-28: Simplified account model reflects single-account approach.

The change from a list of accounts with an active account to a single account simplifies the state model and aligns with the current app architecture.


286-287: Multi-account support commented out for future implementation.

Good practice to comment out the function that's intended for future multi-account support while adding a descriptive comment that explains the future plan.

lib/ui/chat/widgets/chat_reply_item.dart (2)

17-17: Updated color scheme to use the new glitch palette.

The changes consistently apply the new glitch color theme throughout the widget, improving the visual consistency with the rest of the app. The color choices provide appropriate contrast for both sender and receiver messages.

Also applies to: 21-21, 34-35, 41-43


30-31: Added null coalescing operators for safer string handling.

Good addition of null coalescing operators to prevent potential null reference issues when accessing optional fields.

Also applies to: 38-39

lib/ui/auth_flow/key_created_screen.dart (4)

3-3: Updated import to support go_router navigation.

The import change supports the move to declarative routing with go_router.


9-9: Navigation updated to use go_router.

The navigation logic now uses go_router for a more consistent routing approach throughout the app.


45-48: Updated to use the new glitch color palette.

The styling has been updated to use the standardized glitch color scheme, improving visual consistency across the app.

Also applies to: 58-59, 89-93


25-26: Consider encrypting and storing the actual private key.

The dummy key shown in the UI should be replaced with the actual private key in production. Also, consider implementing proper security measures for displaying sensitive information.

Also applies to: 117-118

lib/config/providers/auth_provider.dart (2)

4-18: Clean state management implementation

The AuthState class follows best practices for state management with ChangeNotifier. The implementation is simple but effective for tracking authentication state.


20-22: Proper Riverpod provider implementation

The authProvider is correctly set up as a ChangeNotifierProvider to expose the authentication state throughout the application.

lib/ui/contact_list/chat_invitation_sheet.dart (5)

38-45: Improved code formatting

The builder function is now properly formatted across multiple lines, improving readability.


59-62: Improved widget formatting

The CircleAvatar widget is now properly formatted for better readability.


64-71: Updated to new color scheme

The text color has been updated from a legacy color to the new glitch950 theme color, aligning with the PR objective of updating colors throughout the app.


73-76: Updated to new color scheme

The email text color has been updated to use the new glitch600 theme color.


83-83: Updated to new color scheme

The public key text color has been updated to use the new glitch600 theme color.

lib/ui/auth_flow/logged_screen.dart (4)

2-3: Added go_router for navigation

Proper imports for go_router and routes have been added to support the new routing approach.


9-11: Implemented navigation with go_router

The previously empty _onContinuePressed method now correctly uses go_router to navigate to the contacts route.


29-29: Updated apostrophe style

Changed from curly to straight apostrophe for consistency.


39-44: Updated text styling and color scheme

The text styling has been updated to use the new glitch400 color from the updated theme, and the TextStyle is now properly formatted across multiple lines.

lib/main.dart (5)

4-4: Updated router import

Changed from importing the static router to the new router provider, which aligns with the go_router implementation objective.


14-14: Converted to ConsumerWidget for Riverpod integration

MyApp is now a ConsumerWidget, allowing it to access Riverpod providers.


18-18: Added WidgetRef parameter

The build method now correctly accepts a WidgetRef parameter, which is required for ConsumerWidget.


20-20: Using Riverpod to access the router

The router is now obtained from the routerProvider using ref.watch, which is the correct pattern for accessing Riverpod providers.


38-40: Updated AppBar theme color

The default AppBar color has been updated to use the new glitch950 color, aligning with the PR objective of updating colors throughout the app.

lib/ui/contact_list/widgets/contact_list_tile.dart (4)

35-39: Clean code formatting!

The Image.asset widget's code formatting has been improved for better readability, moving from inline to a multi-line format.


47-51: Consistent color scheme update

The text styles have been properly updated to use the new glitch color palette (AppColors.white, AppColors.glitch900, AppColors.glitch600) instead of legacy color constants, aligning with the app-wide theming overhaul.

Also applies to: 64-68, 80-83


93-99: Selection indicator colors aligned with new theme

The selection indicator colors have been properly updated to use the new glitch palette (AppColors.glitch950 and AppColors.glitch200), maintaining visual consistency with other UI elements.


100-103: Clean conditional formatting

The conditional rendering of the check icon has been nicely formatted, improving code readability.

lib/ui/chat/widgets/reaction/stacked_reactions.dart (4)

33-36: Improved code structure for emoji processing

The emoji mapping code has been nicely reformatted for better readability, making the transformation from map entries to a list of maps more explicit.


39-40: Clean reactionsToShow assignment

The simplified inline conditional makes the code more readable while maintaining the same functionality.


46-87: Updated reaction container colors and improved formatting

The reaction container background color has been properly updated from legacy colors to the new glitch palette (AppColors.glitch200), and the conditional logic has been reformatted for better readability.


90-138: Enhanced widget tree readability

The construction of reaction widgets and the overall widget tree structure have been reformatted with proper indentation and line breaks, making the code much easier to read and maintain without changing functionality.

lib/routing/routes.dart (2)

1-3: Added necessary imports for go_router integration

The import statements for Flutter material package and go_router package have been correctly added to support the new navigation functionality.


24-36: Implemented centralized navigation helpers

Great addition of navigation helper methods that centralize route construction logic and leverage the go_router API. These methods will make navigation more consistent across the app and reduce the chance of routing errors.

The three new methods provide a clean API for common navigation actions:

  • goToChat: Navigates to a specific chat by ID
  • goToContact: Navigates to a specific contact by ID
  • goToOnboarding: Navigates to the onboarding screen
lib/ui/chat/widgets/reaction/reactions_dialog_widget.dart (2)

85-160: Updated menu item colors and improved formatting

The destructive menu item colors have been updated from legacy colors to the new theme system (Colors.red and AppColors.glitch950). The code formatting has also been significantly improved with proper indentation and line breaks.


192-230: Enhanced reaction handling with proper formatting

The reaction handling code has been reformatted for better readability, and the color for the "⋯" reaction container has been updated from AppColors.grey1 to AppColors.glitch100 to align with the new color scheme.

lib/ui/contact_list/group_chat_details_sheet.dart (6)

17-17: Good use of trailing comma

This follows Dart best practices for constructor parameters, making future modifications easier and improving code formatting.


28-30: Formatting improvement: builder parameter

The improved indentation for the builder parameter makes the code more readable.


81-81: Color scheme update

Updated to the new "glitch" color palette, consistent with the PR objective to update colors throughout the app.


84-101: Better conditional rendering structure

The improved indentation and structure for this conditional rendering makes the code more maintainable.


116-116: Color scheme consistency

Consistent implementation of the new glitch color palette for text styling.

Also applies to: 136-136


147-147: Widget simplification

Good simplification of the ContactListTile widget instantiation.

lib/ui/chat/widgets/message_widget.dart (7)

17-18: Good use of trailing comma

Adding trailing commas follows Dart best practices and makes code more maintainable.


36-61: Improved conditional structure

The enhanced formatting of this complex conditional logic makes the group message avatar display logic much more readable.


84-92: Better variable calculation format

The calculation of bottomPadding is now better formatted with improved readability.


140-141: Color scheme update

Updated from legacy colors (AppColors.color202320, AppColors.colorE2E2E2) to the new glitch theme palette (AppColors.glitch950, AppColors.glitch200), consistent with the PR objective.

Also applies to: 143-143


155-175: Improved conditional rendering

Better formatting for the conditional rendering of sender name in group messages improves code readability.


208-245: Structured message content display

The improved formatting for the message content conditional rendering makes this complex widget structure much easier to understand.


238-239: Consistent icon color updates

Icons consistently updated to use the new glitch color palette.

Also applies to: 268-269

lib/routing/router_provider.dart (6)

16-18: Well-structured router provider with Riverpod integration

The router provider correctly uses Riverpod to access and watch the authentication state, enabling dynamic routing based on login status.


23-37: Proper authentication-based routing

The redirect logic correctly handles authentication state to ensure users are directed to appropriate screens based on their login status.


40-67: Well-organized auth flow routes

Auth flow routes are logically structured with proper nesting, following go_router best practices.


69-83: Contact routes implementation

The contacts route structure is implemented correctly with dynamic ID parameter handling.


84-101: Chat routes implementation

Chat routes are properly implemented with dynamic chat ID routing and a dedicated path for creating new group chats.


92-93: TODO items for future completion

These TODOs should be addressed in future PRs to complete the chat routing implementation.

Are there any specific tasks or tickets created to handle these TODOs for passing chat data via state.extra and updating the ChatScreen to accept a chatId parameter?

lib/ui/auth_flow/login_screen.dart (4)

2-4: Required imports for Riverpod integration

The correct imports for Riverpod, go_router, and the auth provider have been added.


7-11: Converting to ConsumerStatefulWidget

Proper conversion from StatefulWidget to ConsumerStatefulWidget for Riverpod integration.


25-26: Improved login implementation with Riverpod

The login logic now correctly uses the Riverpod auth provider instead of direct navigation, allowing go_router to handle redirects based on authentication state.


83-83: Color scheme update

Updated from legacy colors to the new glitch theme palette, consistent with the PR objective to update colors throughout the app.

Also applies to: 95-95

lib/ui/chat/groupchat_screen.dart (13)

16-17: Good implementation of go_router for navigation.

You've correctly imported the necessary packages for implementing go_router-based navigation.


28-44: Method refactoring looks good.

Clean refactoring of the emoji bottom sheet functionality while maintaining the existing behavior.


56-60: Clean refactoring of message handling.

The message insertion logic is clear and consistent with the pattern used throughout the app.


79-84: Navigation pattern correctly implemented.

Good job replacing the imperative navigation with go_router. This approach is more consistent with the app-wide navigation strategy.


85-88: Nice UI component refactoring.

The ContactInfo widget usage provides better code organization and reusability.


91-95: Consistent navigation pattern applied.

Using the centralized Routes helper for navigation is a good practice that ensures consistency throughout the app.


108-136: Theme colors correctly applied to user profile section.

Good job updating the colors to use the new glitch theme palette for better visual consistency.


137-165: Status message items look good.

The StatusMessageItemWidget usage creates a consistent UI pattern for different notification types.


182-186: Clean conditional expression.

The conditional expression for menu items is well-formatted and easy to read.


192-196: Emoji reaction handling looks good.

Clean refactoring of the emoji picker interaction flow.


210-214: Alignment logic is clear and well-formatted.

The conditional alignment based on message ownership is well-structured.


222-227: Message widget properties are well organized.

The message widget properties are clearly defined and properly structured.


236-240: ChatInput integration looks good.

Clean integration of the ChatInput component with proper properties.

lib/ui/chat/widgets/chat_input.dart (18)

72-78: Date formatting is well organized.

The date formatting is now more readable with clear indentation.


87-96: ContactModel construction is well formatted.

The model construction is now much more readable with proper indentation.


108-115: ContactModel formatting is consistent.

Good consistent formatting with the other model construction in the file.


117-120: Image URL assignment is clear.

The image URL assignment is now properly formatted with clear indentation.


197-205: Recording timer formatting looks good.

The time formatting code is now more readable with proper indentation.


246-248: Waveform colors updated to match theme.

Good job updating the waveform colors to use the glitch theme for visual consistency.


271-275: Waveform style updated correctly.

The waveform style color is properly updated to use the glitch theme.


280-285: Animation transition builder is well formatted.

The transition builder code is now more readable with proper indentation.


286-289: Conditional widget selection is clear.

The conditional widget selection based on recording state is well structured.


316-319: Container styling updated to match theme.

Good job updating the container color to use the glitch theme.


321-325: Icon color updated for better theming.

The microphone icon now uses the theme's color scheme for better visual consistency.


329-333: Text styling updated to match theme.

Good job updating the text styling to use the glitch color palette.


339-341: Text styling updated to match theme.

The "Swipe to Stop" text color now uses the glitch theme.


381-385: Recording button styling uses theme colors.

Good job using the theme's error color for the recording button.


443-444: Icon styling updated to match theme.

Good job updating the icon color to use the glitch theme.


452-454: Container styling updated to match theme.

The text input container color now uses the glitch theme.


480-481: Icon styling updated correctly.

The emoji icon color now uses the glitch theme for visual consistency.


500-502: Platform check is well formatted.

The platform check for emoji size is now properly formatted.

lib/ui/chat/chat_screen.dart (12)

27-43: Emoji bottom sheet handling is well structured.

The emoji picker implementation is clean and consistent with the groupchat screen.


55-59: Message handling is consistently implemented.

The message insertion logic matches the pattern used in groupchat_screen.dart.


77-82: Navigation pattern correctly implemented.

Good job replacing the imperative navigation with go_router. This is consistent with the app-wide navigation strategy.


83-84: ContactInfo usage provides good component reuse.

Using the ContactInfo widget creates consistency across the app.


86-90: Routes helper usage is consistent.

Using the centralized Routes helper for navigation ensures consistency.


117-130: Text styling updated to match theme.

Good job updating all text styling to use the glitch color palette.


134-136: Text styling follows theme pattern.

Email text styling now uses the glitch theme color.


134-207: TextSpan styling consistently updated.

All text span colors now use the glitch theme, maintaining a consistent visual hierarchy with alternating colors.


215-246: Status message styling updated correctly.

The status message styling uses the new color scheme appropriately.


263-295: Message interaction handling is well formatted.

The reaction dialog logic is cleanly formatted and consistent with the groupchat screen.


303-308: MessageWidget construction is clean and consistent.

The properties are well organized and match the pattern used in groupchat_screen.dart.


317-321: ChatInput integration is consistent.

The ChatInput usage matches the pattern in groupchat_screen.dart.

lib/ui/core/themes/colors.dart (3)

8-20: Great implementation of a comprehensive color palette.

The glitch color palette provides a consistent gradient from light to dark that can be used throughout the app. This structured approach will make theming more maintainable.


21-55: Well-structured light color scheme.

The light color scheme makes good use of the glitch palette, providing semantic meaning to each color through the Material color roles. All required color scheme properties are properly defined.


57-91: Well-structured dark color scheme.

The dark color scheme correctly inverts the color relationships from the light scheme while maintaining the same semantic structure. This will ensure consistent theming in both light and dark modes.

local-research/go_router_implementation_plan.md (2)

217-224: Verify route constants for onboarding flows
The plan adds static const onboarding, createProfile, and keyCreated in Routes, but your current lib/routing/routes.dart may not define these. Please ensure that these new path constants (and any corresponding helper methods) are present in the actual routes file.


297-299: Ensure new glitch color exists in theme
The example sets AppBarTheme.backgroundColor = AppColors.glitch950. Confirm that glitch950 is defined in AppColors (in lib/ui/core/themes/colors.dart) to avoid build errors.

Comment on lines +24 to 32
02E9B9081F95BB7F190F86A2 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5795D915D1078E2C3726E6F0 /* Pods_RunnerTests.framework */; };
331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C80D7294CF71000263BE5 /* RunnerTests.swift */; };
335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; };
33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; };
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
59A87F43D93CD958D454F786 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D291749B5EE3DF52BA2B2E1B /* Pods_Runner.framework */; };
/* End PBXBuildFile section */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Potential double-linking of CocoaPods aggregate frameworks

Pods_Runner.framework and Pods_RunnerTests.framework are now added manually to the Frameworks build phase.
CocoaPods already injects these frameworks through the generated xcconfigs (OTHER_LDFLAGS, FRAMEWORK_SEARCH_PATHS) and later embeds them via the [CP] Embed Pods Frameworks phase. Manually adding them here can lead to

• duplicate symbol / multiple definition errors,
• “linked twice” warnings, or
• brittle merge conflicts when pod install re-generates paths.

Unless you have a very specific reason, it’s safer to let CocoaPods own the linkage entirely and remove these PBXBuildFile + PBXFileReference entries.

Also applies to: 98-107

🤖 Prompt for AI Agents
In macos/Runner.xcodeproj/project.pbxproj around lines 24 to 32 and also lines
98 to 107, the Pods_Runner.framework and Pods_RunnerTests.framework are manually
added to the Frameworks build phase, which can cause duplicate linking issues
and conflicts with CocoaPods management. Remove the PBXBuildFile and
PBXFileReference entries for these frameworks from the project.pbxproj file to
avoid double-linking and let CocoaPods handle the framework linkage and
embedding automatically.

Comment on lines +9 to +10
<vibe-tools Integration>
# Instructions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Replace HTML-like wrapper tags with Markdown section headings.
Using <vibe-tools Integration> and </vibe-tools Integration> breaks Markdown tooling. Change to a level-1 or level-2 heading (e.g., # Vibe-Tools Integration).

🤖 Prompt for AI Agents
In .cursor/rules/vibe-tools.mdc around lines 9 to 10, replace the HTML-like
wrapper tags <vibe-tools Integration> and </vibe-tools Integration> with a
proper Markdown heading such as "# Vibe-Tools Integration" to ensure
compatibility with Markdown tooling.

Comment on lines +1 to +5
---
description: Global Rule. This rule should ALWAYS be loaded
globs: *,**/*
alwaysApply: true
---
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Validate YAML front matter for consistency and correctness.
The globs field should use a YAML list (e.g., globs: ["*", "**/*"]) or properly quote comma‐separated patterns to avoid parsing errors.

--- a/.cursor/rules/vibe-tools.mdc
+++ b/.cursor/rules/vibe-tools.mdc
@@ 1,5c1,6
- ---
- description: Global Rule. This rule should ALWAYS be loaded
- globs: *,**/*
- alwaysApply: true
- ---
+ ---
+ description: "Global Rule. This rule should ALWAYS be loaded"
+ globs:
+   - "*"
+   - "**/*"
+ alwaysApply: true
+ ---
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
---
description: Global Rule. This rule should ALWAYS be loaded
globs: *,**/*
alwaysApply: true
---
---
description: "Global Rule. This rule should ALWAYS be loaded"
globs:
- "*"
- "**/*"
alwaysApply: true
---
🤖 Prompt for AI Agents
In .cursor/rules/vibe-tools.mdc at lines 1 to 5, the YAML front matter's globs
field is currently a comma-separated string which can cause parsing errors.
Change the globs field to a proper YAML list format by using square brackets and
quoting each pattern, for example: globs: ["*", "**/*"] to ensure correct
parsing and consistency.

import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';

class AuthState extends ChangeNotifier {
Copy link
Contributor

@Quwaysim Quwaysim May 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ChangeNotifierProvider/ChangeNotifier are now discouraged in the latest Riverpod. We can update this later since this is just a skeleton/dummy impl.

Use NotifierProvider/Notifier instead.

child: Icon(
Icons.mic,
size: 30,
color: AppColors.glitch950 ?? AppColors.glitch200,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CodeRabbit's suggestion here is correct. AppColors.glitch950 cannot be null so color: AppColors.glitch950, suffices.

@erskingardner erskingardner merged commit dc7a383 into master May 22, 2025
1 check was pending
@erskingardner erskingardner deleted the router-updates branch May 22, 2025 06:51
untreu2 pushed a commit that referenced this pull request May 22, 2025
* Implement go_router and update colors everywhere

* A few small updates
untreu2 added a commit that referenced this pull request May 22, 2025
Implement go_router and update colors everywhere (#16)
@coderabbitai coderabbitai bot mentioned this pull request May 27, 2025
@untreu2 untreu2 mentioned this pull request Aug 29, 2025
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.

3 participants