Conversation
refactor: create SnackbarManager and AppSnackbarModel for better state management
Summary:
This commit introduces a snackbar system to display user notifications within the app. It includes the creation of `SnackbarManager` to manage snackbar messages and `AppSnackbarModel` to define the structure of snackbar data.
Key changes:
- **Snackbar Management:**
- Added `SnackbarManager` to handle snackbar messages using a `MutableSharedFlow`.
- Introduced `AppSnackbarModel` to encapsulate snackbar properties such as message, action label, and action callback.
- **UI Integration:**
- Integrated snackbar functionality into the main app UI, allowing for dynamic display of notifications based on user actions.
- Implemented `AppSnackBar` composable to render the snackbar at the bottom of the screen.
- Add early exit to .githooks/pre-commit to disable linting checks without deleting the hook - Remove smoke-tests, regression-tests, and test-summary jobs from android_build_unified.yml; also remove test_suite workflow_dispatch input and the build artifact upload step that only served UI tests - Add .github/workflows/ui_tests.yml with manual-only (workflow_dispatch) trigger for smoke and regression UI tests; UI tests are no longer required for PRs or merges https://claude.ai/code/session_01A2nLtngsixsDMJrHY1X7Ff
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5a2016015d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| val snackbar: SharedFlow<AppSnackbarModel> = _snackbar.asSharedFlow() | ||
|
|
||
| fun showSnackbar(model: AppSnackbarModel) { | ||
| _snackbar.tryEmit(model) |
There was a problem hiding this comment.
Avoid dropping snackbar events when collector is busy
SnackbarManager.showSnackbar uses MutableSharedFlow() with no buffer and calls tryEmit, but the only collector in App is suspended inside SnackbarHostState.showSnackbar until the current snackbar is dismissed. In that state, tryEmit returns false, so any additional notifications triggered while one snackbar is visible are silently lost (for example, two rapid user actions that each call showSnackbar).
Useful? React with 👍 / 👎.
- Upgrade actions/setup-java from @V3 to @v4 in android_build_unified.yml, android_deploy_beta.yml, android_deploy_prod.yml - Pin ad-m/github-push-action to @v0.8.0 (was @master) in android_deploy_beta.yml, android_deploy_prod.yml, version_updater.yml - Fix junit BOM version from non-existent 6.0.1 to 5.13.4 (matching junitJupiter); remove now-redundant junitJupiter entry https://claude.ai/code/session_01A2nLtngsixsDMJrHY1X7Ff
This commit updates the Gradle wrapper to version 9.4.1 and modifies various Kotlin and Android plugin versions for improved compatibility. Additionally, it refactors the configuration of common extensions and applies lint settings more efficiently.
…ts-V6nas' into claude/disable-pre-commit-ui-tests-V6nas
fix: disable failing test discovery for JUnit tests Summary: This commit refactors the test code to use more specific array types, enhancing type safety. Additionally, it disables the failing test discovery feature in the test configuration to prevent build failures when no tests are discovered.
- Add early exit to .githooks/pre-commit to disable linting checks without deleting the hook - Remove smoke-tests, regression-tests, and test-summary jobs from android_build_unified.yml; also remove test_suite workflow_dispatch input and the build artifact upload step that only served UI tests - Add .github/workflows/ui_tests.yml with manual-only (workflow_dispatch) trigger for smoke and regression UI tests; UI tests are no longer required for PRs or merges https://claude.ai/code/session_01A2nLtngsixsDMJrHY1X7Ff
refactor: create SnackbarManager and AppSnackbarModel for better state management
Summary:
This commit introduces a snackbar system to display user notifications within the app. It includes the creation of
SnackbarManagerto manage snackbar messages andAppSnackbarModelto define the structure of snackbar data.Key changes:
SnackbarManagerto handle snackbar messages using aMutableSharedFlow.AppSnackbarModelto encapsulate snackbar properties such as message, action label, and action callback.AppSnackBarcomposable to render the snackbar at the bottom of the screen.