Skip to content

Conversation

@joelmuraguri
Copy link
Collaborator

No description provided.

@joelmuraguri joelmuraguri requested a review from tunjid November 26, 2025 04:36
@gemini-code-assist
Copy link

Summary of Changes

Hello @joelmuraguri, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request lays the groundwork for a 'Muted Accounts' feature by creating the necessary UI state management and presentation components. It defines the data models, actions, and a state holder using ActionStateMutator to manage a list of muted accounts, along with a basic Composable UI for the bottom sheet. The core business logic for loading, adding, and removing accounts is intentionally left as TODOs, indicating that this PR focuses on establishing the architectural structure for subsequent development.

Highlights

  • New MutedAccount SheetState: Introduced a new MutedAccountSheetState.kt file, establishing the foundational structure for managing muted accounts within a UI bottom sheet.
  • Data Structures and Actions: Defined MutedAccount data class, MutedAccountAction sealed class (with Load, Add, Remove actions), and MutedAccountState data class to model the state and interactions for muted accounts.
  • State Management Integration: Integrated with ActionStateMutator via mutedAccountMutator for reactive state management, though the core logic for handling actions is currently marked with TODOs for future implementation.
  • Composable UI Placeholder: Provided a MutedAccountsBottomSheet Composable function that displays a basic placeholder text within a ModalBottomSheet, ready for the actual UI implementation.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces the state management structure for a new 'Muted Accounts' bottom sheet. The overall approach is sound and aligns with the project's architecture. However, the implementation is incomplete, with key business logic missing. My review provides feedback on implementing the missing logic and simplifying the state handling to prevent potential bugs.

Comment on lines +49 to +61
when (val action = type()) {
MutedAccountAction.Load -> {
TODO("Implement Load action")
}

is MutedAccountAction.Add -> {
TODO("Implement Add Account action")
}

is MutedAccountAction.Remove -> {
TODO("Implement Remove Account action")
}
}

Choose a reason for hiding this comment

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

high

The core logic for handling MutedAccountActions is missing and is currently stubbed with TODOs. Please implement the logic for loading, adding, and removing muted accounts to make this feature functional.

scope: BottomSheetScope,
) : BottomSheetState(scope) {

internal var currentAccounts by mutableStateOf<List<MutedAccount>>(emptyList())

Choose a reason for hiding this comment

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

medium

The currentAccounts property appears to be unused and duplicates state that should be managed by the MutedAccountStateHolder. To maintain a single source of truth, this property should be removed.

The list of muted accounts can be collected directly from the mutator's state flow within the MutedAccountsBottomSheet composable, for example:

@Composable
private fun MutedAccountsBottomSheet(state: MutedAccountsSheetState) {
    val mutedAccountsState by state.mutator.state.collectAsStateWithLifecycle()
    state.ModalBottomSheet {
        // Use mutedAccountsState.mutedAccounts here
    }
}

@joelmuraguri joelmuraguri linked an issue Nov 26, 2025 that may be closed by this pull request
@tunjid
Copy link
Owner

tunjid commented Nov 26, 2025

Let's put a pause on this. We still need to fully establish the pattern for these bottom sheets that have their own state holders. Lets finish building out the full muted words feature before adding more stubs.

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.

Create MutedAccountsSheetState

3 participants