Provides build commands, architecture overview, and code organization
for future Claude Code instances working in this repository.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit introduces a new bottom sheet that allows users to add or remove members from a group directly from the channel info screen.
- A new "Add Members" button is now available in the `ChannelInfoSheet` for group chats.
- Tapping this button opens the `AddMemberToGroupSheet`, which lists all friends.
- Users can search for friends and add or remove them from the group.
- The "Manage Notifications" button is now hidden for group chats.
Additionally, this commit includes the following changes:
- **Changelog**: The changelog fetching and display functionality has been temporarily disabled.
- **Splash Screen**: The splash screen icon has been updated and now uses an inset drawable (`splash_screen_icon_square.xml`) to adjust its padding, which also resolves an icon display issue on Android 13.
- **Build**: All build variants are now signed with the debug key to simplify development builds.
This change ensures that the last selected channel remains highlighted
in the channel list even when navigating to other screens like server
settings.
The `lastSelectedChannelId` is updated whenever a channel destination
is navigated to. This stored ID is then used to determine the
`selectedChannelId` for the `ServerChannels` composable, ensuring
the correct channel remains visually selected.
This commit introduces several improvements to the navigation and user interface, primarily focused on the channel screen and login/registration flows.
**Channel Screen & Navigation:**
- Implement swipe-to-go-back gesture on the ChannelScreen.
- Persist the ChannelSideDrawer as a background layer when a channel is open. This allows for a smoother transition when returning to the channel list.
- Allow swiping from the left edge of the screen (when not in a channel view) to reopen the last viewed channel.
- Ensure the correct channel is highlighted in the ChannelSideDrawer when a channel is active.
- The back button on the ChannelScreen now navigates to the previous non-channel screen or the server's channel list, providing a more intuitive backstack behavior.
**Login/Registration:**
- Disable HTTP request retries for login attempts to prevent unexpected behavior with MFA or incorrect credentials.
- Add loading indicators to the Login and RegisterDetails screens to provide visual feedback during network operations.
- Display error messages more prominently on the Login and RegisterDetails screens.
- Adjust the soft input mode on the LoginScreen to `SOFT_INPUT_ADJUST_PAN` to prevent UI elements from being obscured by the keyboard.
- Fix a bug where the default notification type was incorrectly mapped.
**Other Changes:**
- Update the monochrome notification icon.
- Modify the primary color in `colors.xml`.
- Minor cleanups and toast message improvements in ChannelScreen camera handling.
- Set softInputMode to SOFT_INPUT_ADJUST_PAN to prevent keyboard from obscuring UI elements.
- Use `SecureTextField` for password input to provide obfuscation and a toggle to show/hide password.
- Make the screen vertically scrollable.
This commit removes the Sentry error reporting integration from the application.
Specific changes:
- Removed Sentry dependencies and plugin from `app/build.gradle.kts`.
- Commented out Sentry initialization and usage in `MainActivity.kt`.
- Commented out Sentry API calls in various files:
- `OverviewScreen.kt`
- `ChatRouterScreen.kt`
- `AppAPI.kt`
- Commented out Sentry meta-data in `AndroidManifest.xml`.
- Removed `sentry.properties` from `.gitignore`.
- Updated `lintOptions` in `app/build.gradle.kts` to set `checkReleaseBuilds = false`.
- In `ChatRouterScreen.kt`, when `showChannelUnavailableAlert` is dismissed or confirmed, set the destination to `ChatRouterDestination.Discover`.
This commit introduces a new page to the server context sheet that allows users to manage their notification settings for the server.
Users can now choose between the following notification options:
- Use default
- Muted
- All messages
- Mentions only
- None
The sheet now uses an `AnimatedContent` composable to switch between the main server information page and the new notification settings page.
This commit introduces the following changes:
- Adds a new vector drawable `icn_message_to_user.xml`.
- Updates `UserInfoSheet.kt`:
- Removes the user card feature flag check for displaying server identity options.
- Changes the message button text from "Message Friends" to "Message".
- Updates the message button icon to the new `icn_message_to_user` drawable.
- Adds a new string resource "message".
This commit adds the ability to open a direct message (DM) screen from the UserInfoSheet.
- Introduced a new onClick handler for the DM button that fetches the DM channel for the selected user.
- Implemented caching for the DM channel in PeptideAPI to improve performance.
- Added error handling to display a toast message if the DM channel cannot be opened.
- Cleaned up code for better readability and maintainability in UserInfoSheet.
This commit refines the user interaction handling in ChannelSideDrawer and ServerContextSheet components.
- Improved the layout and click handling in ChannelSideDrawer for better user experience.
- Updated ServerContextSheet to handle server actions more efficiently, including copying server IDs and marking servers as read.
- Introduced a confirmation dialog for leaving servers and improved error handling during server actions.
- Cleaned up code for better readability and maintainability across the affected files.
This commit enhances the user context management in UserInfoSheet and UserButtons components.
- Removed unused parameters and improved the handling of user relationships in UserButtons.
- Updated UserInfoSheet to fetch user data more efficiently and reflect relationship changes.
- Introduced loading indicators for friend request actions in UserButtons to enhance user experience.
- Adjusted ModalBottomSheet states in MemberListSheet and ChatRouterScreen to skip partially expanded states for better usability.
- Cleaned up code and improved overall readability in the affected files.
This commit refines the user context handling in ShareTargetActivity and ChannelSideDrawer components.
- Modified the onOpenUserInfoSheet callback in ShareTargetActivity to accept a user ID parameter.
- Enhanced ChannelSideDrawer to utilize the updated onOpenUserInfoSheet callback for better user context interactions.
- Adjusted the ModalBottomSheet state in ChannelSideDrawer to skip partially expanded states for improved user experience.
- Cleaned up unused code and improved overall readability in the affected files.
This commit introduces a new UserInfoSheet for displaying user details and updates the ChannelSideDrawer to support user context interactions.
- Implemented UserInfoSheet to fetch and display user profiles, including error handling for user retrieval.
- Enhanced ChannelSideDrawer to manage user context sheets, allowing users to view detailed information about other users.
- Updated existing components to replace channel context interactions with user context interactions where applicable.
- Refactored related functions to maintain clean architecture principles and improve code organization.
This commit introduces a notifications page within the ChannelContextSheet, allowing users to manage notification preferences for channels. It also adds an invite dialog for inviting users to the channel.
- Implemented animated content transitions between the main actions and notifications page.
- Added notification options for default, muted, all messages, mentions only, and none.
- Created a reusable NotificationRadioRow component for managing notification settings.
- Integrated an invite dialog that can be triggered from the channel context sheet.
- Updated string resources to include labels for notification options.
The following imports were removed as they were not being used in the code:
- androidx.compose.foundation.interaction.MutableInteractionSource
- androidx.compose.material3.TextButton
This commit refactors button components across the application to use `PepTextButton` and `SquareButton` for consistency in UI design. Additionally, it updates the lint settings in `build.gradle.kts` to disable warnings for `NullSafeMutableLiveData`.
- Replaced instances of `TextButton` and `Button` with `PepTextButton` and `SquareButton` in various composables and screens.
- Adjusted lint settings to disable warnings for `NullSafeMutableLiveData`.
- Improved color usage in `Reaction` composable for better visual consistency.
- Updated drawable resources and string resources for better clarity and organization.
This commit includes various updates to project assets and documentation for better clarity and organization.
- Added new drawable resources for the application, including logos and icons.
- Introduced new font resources to enhance typography across the app.
- Updated `README.md` and `README_APP_LINKS.md` to provide clearer instructions and troubleshooting tips.
- Refactored `AndroidManifest.xml` to streamline asset references and ensure proper integration.
- Improved localization support by updating multiple `strings.xml` files for various languages.
- Removed obsolete drawable resources to reduce clutter and improve maintainability.
This commit adds CameraX functionality to the ChannelScreen, enabling users to capture photos directly within the app.
- Introduced CameraX dependencies in `build.gradle.kts` for camera features.
- Updated `AndroidManifest.xml` to include the necessary camera permission.
- Implemented a full-screen camera preview using `PreviewView` and a floating action button for capturing photos.
- Refactored the photo capture logic to handle image saving and error handling effectively.
- Enhanced user experience by providing feedback on camera permission status and capture success or failure.
This commit updates the project name across various files to reflect the new branding.
- Changed the root project name in `settings.gradle.kts` from "Revolt" to "PepChat".
- Updated the project name in the `.idea/.name` file to "PepChat".
- Modified `ChatRouterScreen` to use a `Box` layout instead of `Column` for better UI structure.
- Adjusted the `SettingsScreen` to utilize `LargeTopAppBar` for improved design consistency.
- Removed unnecessary size specification in `ChannelScreen` for better visual clarity.
This commit enhances the pagination logic in the ChannelScreen to improve message loading behavior.
- Introduced a new `isNearBottom` state to detect when the user is near the bottom of the message list, triggering loading of newer messages.
- Refactored the existing pagination logic to handle both loading older messages when near the top and newer messages when near the bottom.
- Added logic to preserve the scroll position when new messages are loaded, ensuring a smoother user experience.
- Improved logging for better debugging and tracking of pagination events.
This commit introduces improvements to the channel navigation and message handling within the chat application.
- Updated `ActionChannel` to include an optional `messageId` parameter in the `SwitchChannel` action for better context during channel switches.
- Modified `ChatRouterScreen` to parse and handle the new `messageId` parameter when navigating to channels.
- Enhanced `ChannelScreen` to load messages around a specified `messageId`, allowing users to jump directly to important messages.
- Implemented highlighting for the targeted message in the `ChannelScreen` to improve user experience.
- Updated `ChannelScreenViewModel` to support the new message loading logic based on the `messageId` parameter.
- Refactored related components to ensure clean architecture principles are maintained and improve overall code organization.
This commit refactors various components across the application to improve maintainability and readability.
- Updated `AndroidManifest.xml` to streamline activity declarations and intent filters.
- Refined `build.gradle.kts` for better dependency management and project configuration.
- Improved proguard rules for better code obfuscation and optimization.
- Enhanced documentation in `README.md` and `README_APP_LINKS.md` for clarity on app links and setup.
- Refactored multiple Kotlin files to adhere to clean architecture principles, ensuring better separation of concerns and modularity.
- Optimized imports and removed unused code across various files to reduce clutter and improve performance.
- Updated UI components to align with Material 3 design guidelines, enhancing the overall user experience.
This commit introduces deep linking capabilities to the application.
- Added `DeepLinkActivity` to handle incoming deep links and navigate users to the appropriate content within the app.
- Created `DeepLinkUtils` to provide utility functions for parsing and creating deep link URIs.
- Updated `MainActivity` to receive and process deep link data from `DeepLinkActivity`.
- Modified `ChatRouterScreen` and its `ViewModel` to handle navigation based on deep link parameters.
- Updated `AndroidManifest.xml` to include intent filters for `DeepLinkActivity` to capture relevant URL schemes and paths.
- Added `assetlinks.json` and `README_APP_LINKS.md` to support Android App Links verification.
- Changed the `applicationId` in `app/build.gradle.kts` from "chat.revolt" to "chat.peptide".
- Renamed project in `.idea/.name` from "PEP" to "Revolt".
- Changed the default route in `ChatRouterScreen` from `Settings` to `Home`.
This commit introduces deep linking capabilities to the application.
- Added `DeepLinkActivity` to handle incoming deep links and navigate users to the appropriate content within the app.
- Created `DeepLinkUtils` to provide utility functions for parsing and creating deep link URIs.
- Updated `MainActivity` to receive and process deep link data from `DeepLinkActivity`.
- Modified `ChatRouterScreen` and its `ViewModel` to handle navigation based on deep link parameters.
- Updated `AndroidManifest.xml` to include intent filters for `DeepLinkActivity` to capture relevant URL schemes and paths.
- Added `assetlinks.json` and `README_APP_LINKS.md` to support Android App Links verification.
- Changed the `applicationId` in `app/build.gradle.kts` from "chat.revolt" to "chat.peptide".
- Renamed project in `.idea/.name` from "PEP" to "Revolt".
- Changed the default route in `ChatRouterScreen` from `Settings` to `Home`.
- Add `setDefaultPlatformOnCreate` function to `MainActivityViewModel` to initialize the application platform from storage when the app starts. If the platform is not found or invalid, the user is logged out.
- Call `setDefaultPlatformOnCreate` in `MainActivity.onCreate`.
- Add `fromName` companion function to `ApplicationPlatform` enum to retrieve a platform by its name string.
This commit enhances the error handling and user interface in `DiscoverServersList.kt`.
- Improved loading indicator alignment by centering it within a `Box` that takes up available space.
- Added a retry mechanism for scenarios where loading servers fails or no servers are found. This includes:
- Displaying an error message.
- Providing a "Retry" button (`SquareButton`) that triggers `viewModel::loadServers` on click.
- Centering the error message and retry button within the screen.
This commit adds two new composable functions, SquareButton and SquareElevatedButton, to standardize button styling across the application. The new components encapsulate the button shape and styling, promoting code reuse and cleaner UI implementation.
- Created SquareButton for standard button functionality with customizable onClick and content.
- Created SquareElevatedButton for elevated button functionality with similar customization options.
- Replaced instances of Button and ElevatedButton in various screens with the new SquareButton and SquareElevatedButton components for consistency and improved maintainability.