Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.1.0 #123

Merged
merged 7 commits into from
Dec 23, 2024
Merged

3.1.0 #123

merged 7 commits into from
Dec 23, 2024

Conversation

Nek-12
Copy link
Member

@Nek-12 Nek-12 commented Dec 23, 2024

Summary by CodeRabbit

  • New Features

    • Enhanced documentation generation and release process with stricter error handling.
    • Introduced a changelog generation step in the release workflow.
    • Added new project configuration for Android integration.
    • Updated documentation to clarify the FlowMVI framework usage and state management.
  • Bug Fixes

    • Improved error handling in store initialization and recovery processes.
  • Style

    • Updated layout constraints for various UI components to improve readability and presentation.
    • Enhanced styling of text components for better appearance.
  • Chores

    • Updated dependency versions and Gradle wrapper to the latest stable releases.

@Nek-12 Nek-12 added the autorelease Automatically create a release using PR title label Dec 23, 2024
Copy link
Contributor

coderabbitai bot commented Dec 23, 2024

Warning

Rate limit exceeded

@Nek-12 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 10 minutes and 57 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between b9e423c and f5fb170.

📒 Files selected for processing (2)
  • build.gradle.kts (1 hunks)
  • buildSrc/src/main/kotlin/dokkaDocumentation.gradle.kts (0 hunks)
📝 Walkthrough

Walkthrough

This pull request introduces a comprehensive set of changes across multiple files in the FlowMVI project, focusing on workflow configurations, documentation updates, dependency version upgrades, and UI layout improvements. The modifications span GitHub Actions workflows, build configurations, sample application screens, and core library components. Key areas of change include stricter error handling in workflows, updating dependency versions, enhancing UI layout constraints, and refining state management strategies.

Changes

File Change Summary
.github/workflows/docs.yml Removed continue-on-error: true from documentation generation steps
.github/workflows/publish.yml Added changelog generation, updated release process, removed continue-on-error
README.md Updated State interface, store initialization, copyright year
buildSrc/src/main/kotlin/Config.kt Removed beta version postfix
core/src/commonMain/kotlin/pro/respawn/flowmvi/dsl/StoreDsl.kt Added new store function overloads, removed immutable extension property
gradle/libs.versions.toml Updated multiple dependency versions
gradle/wrapper/gradle-wrapper.properties Updated Gradle wrapper to version 8.12
Multiple sample screens Added widthIn modifier to constrain text and layout widths

Sequence Diagram

sequenceDiagram
    participant Workflow as GitHub Actions
    participant Docs as Documentation Generation
    participant Publish as Release Process
    
    Workflow->>Docs: Generate documentation
    activate Docs
    Docs-->>Workflow: Documentation generated
    deactivate Docs
    
    Workflow->>Publish: Prepare release
    activate Publish
    Publish->>Publish: Generate changelog
    Publish->>Publish: Create GitHub release
    Publish-->>Workflow: Release completed
    deactivate Publish
Loading

Possibly related PRs

Poem

🐰 A Rabbit's Release Rhyme 🚀

Workflows dance with stricter grace,
Dependencies leap to a newer pace,
Widths constrained with careful might,
Our code now shines so crisp and bright!
Release the magic, let errors flee! 🌟


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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. (Beta)
  • @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: 1

🧹 Nitpick comments (3)
README.md (1)

408-408: Updated license year
No functional impact, but do confirm consistency across other legal or licensing references in your repository.

docs/quickstart.md (1)

346-355: Revised stateStrategy usage
Replacing atomicStateUpdates with stateStrategy clarifies the concurrency approach. The new strategic options (Immediate, Atomic, etc.) offer more control. Make sure your team is informed about the performance and thread-safety tradeoffs of the chosen strategy.

🧰 Tools
🪛 Markdownlint (0.37.0)

347-347: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


351-351: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


354-354: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

docs/CONTRIBUTING.md (1)

15-15: Fix markdown list indentation.

The unordered list item has incorrect indentation (4 spaces instead of 2).

-    * Android Studio latest Stable or Beta, depending on the current project's AGP.
+  * Android Studio latest Stable or Beta, depending on the current project's AGP.
🧰 Tools
🪛 Markdownlint (0.37.0)

15-15: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between e7bfd17 and f84da3e.

📒 Files selected for processing (25)
  • .github/workflows/docs.yml (0 hunks)
  • .github/workflows/publish.yml (0 hunks)
  • .idea/AndroidProjectSystem.xml (1 hunks)
  • README.md (4 hunks)
  • buildSrc/src/main/kotlin/Config.kt (1 hunks)
  • core/src/commonMain/kotlin/pro/respawn/flowmvi/dsl/StoreDsl.kt (0 hunks)
  • core/src/jvmTest/kotlin/pro/respawn/flowmvi/test/store/NestedRecoverTest.kt (1 hunks)
  • core/src/jvmTest/kotlin/pro/respawn/flowmvi/test/store/StoreExceptionsTest.kt (3 hunks)
  • debugger/ideplugin/src/main/resources/LiveTemplates.xml (1 hunks)
  • docs/CONTRIBUTING.md (1 hunks)
  • docs/quickstart.md (3 hunks)
  • gradle/libs.versions.toml (3 hunks)
  • gradle/wrapper/gradle-wrapper.properties (1 hunks)
  • gradlew (1 hunks)
  • metrics/build.gradle.kts (1 hunks)
  • sample/src/commonMain/kotlin/pro/respawn/flowmvi/sample/arch/configuration/TestConfigurationFactory.kt (2 hunks)
  • sample/src/commonMain/kotlin/pro/respawn/flowmvi/sample/features/decompose/DecomposeScreen.kt (2 hunks)
  • sample/src/commonMain/kotlin/pro/respawn/flowmvi/sample/features/diconfig/DIConfigScreen.kt (2 hunks)
  • sample/src/commonMain/kotlin/pro/respawn/flowmvi/sample/features/home/HomeScreen.kt (2 hunks)
  • sample/src/commonMain/kotlin/pro/respawn/flowmvi/sample/features/lce/LCEScreen.kt (2 hunks)
  • sample/src/commonMain/kotlin/pro/respawn/flowmvi/sample/features/logging/LoggingScreen.kt (3 hunks)
  • sample/src/commonMain/kotlin/pro/respawn/flowmvi/sample/features/savedstate/SavedStateScreen.kt (2 hunks)
  • sample/src/commonMain/kotlin/pro/respawn/flowmvi/sample/features/simple/SimpleScreen.kt (2 hunks)
  • sample/src/commonMain/kotlin/pro/respawn/flowmvi/sample/features/undoredo/UndoRedoScreen.kt (2 hunks)
  • sample/src/commonMain/kotlin/pro/respawn/flowmvi/sample/ui/widgets/CodeView.kt (4 hunks)
💤 Files with no reviewable changes (3)
  • .github/workflows/docs.yml
  • .github/workflows/publish.yml
  • core/src/commonMain/kotlin/pro/respawn/flowmvi/dsl/StoreDsl.kt
✅ Files skipped from review due to trivial changes (4)
  • gradle/wrapper/gradle-wrapper.properties
  • metrics/build.gradle.kts
  • gradlew
  • .idea/AndroidProjectSystem.xml
🧰 Additional context used
📓 Learnings (2)
sample/src/commonMain/kotlin/pro/respawn/flowmvi/sample/arch/configuration/TestConfigurationFactory.kt (1)
Learnt from: Nek-12
PR: respawn-app/FlowMVI#115
File: core/src/commonMain/kotlin/pro/respawn/flowmvi/api/StoreConfiguration.kt:31-35
Timestamp: 2024-12-08T14:20:26.690Z
Learning: In `StoreConfiguration.kt`, when deprecating properties, if migration guidance and performance implications are already documented in the corresponding strategy code, additional context in the deprecation message is unnecessary.
core/src/jvmTest/kotlin/pro/respawn/flowmvi/test/store/StoreExceptionsTest.kt (1)
Learnt from: Nek-12
PR: respawn-app/FlowMVI#112
File: core/src/commonMain/kotlin/pro/respawn/flowmvi/StoreImpl.kt:81-84
Timestamp: 2024-11-28T12:15:12.134Z
Learning: In the FlowMVI project, within `Store` implementations (e.g., in `StoreImpl.kt`), use the custom `catch { }` function defined in `RecoverModule` for exception handling, instead of using standard `try-catch` blocks.
🪛 Markdownlint (0.37.0)
docs/quickstart.md

347-347: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


351-351: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


354-354: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

docs/CONTRIBUTING.md

15-15: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

🔇 Additional comments (46)
sample/src/commonMain/kotlin/pro/respawn/flowmvi/sample/features/simple/SimpleScreen.kt (2)

10-10: Good import addition.
This import for widthIn is consistent with the approach to constrain layout widths.


87-87: Layout width constraint aligns with UI consistency.
The new widthIn(max = 600.dp) ensures the content doesn't stretch too widely. Confirm this still renders well on all target devices.

✅ Verification successful

Let me search for similar width constraints in the codebase to verify if this aligns with the project's UI consistency patterns.


Width constraint of 600.dp is consistently used across the application

The widthIn(max = 600.dp) constraint is consistently applied throughout the codebase for content containers, text elements, and input fields. This pattern appears in multiple screens and components:

  • Text inputs (RTextInput.kt)
  • Menu items (RMenuItem.kt)
  • Error views (RErrorView.kt)
  • Multiple screen components including SimpleScreen, UndoRedoScreen, LoggingScreen, and others

The implementation aligns with the established UI consistency patterns in the project.

🏁 Scripts executed

The following scripts were executed for the analysis:

Error: No shell scripts found


Script:

#!/bin/bash
# Search for width constraints in Compose UI code
rg "widthIn|width\s*=" -A 2 --type kotlin

Length of output: 14189

sample/src/commonMain/kotlin/pro/respawn/flowmvi/sample/features/diconfig/DIConfigScreen.kt (2)

11-11: Import for layout width constraint recognized.
Introducing the widthIn import aligns with other usage throughout the codebase.


104-104: Applying widthIn to Text.
Confining the text to a maximum width of 600.dp improves readability and maintains visual consistency.

sample/src/commonMain/kotlin/pro/respawn/flowmvi/sample/features/savedstate/SavedStateScreen.kt (2)

12-12: Import for widthIn.
Brings consistency by matching other screens that also constrain UI elements.


104-104: Proposed widthIn for text is a solid improvement.
Limiting the maximum width reduces horizontal scrolling and makes text easier to read.

sample/src/commonMain/kotlin/pro/respawn/flowmvi/sample/features/lce/LCEScreen.kt (3)

11-11: Ensuring layout control with widthIn.
This import is in line with the consistent use of constrained widths across composables.


114-114: Center alignment.
Adding horizontalAlignment = Alignment.CenterHorizontally improves readability in wide layouts.


121-121: Limiting text width to 600.dp.
Prevents overly wide paragraphs and maintains visual consistency across screens.

sample/src/commonMain/kotlin/pro/respawn/flowmvi/sample/features/logging/LoggingScreen.kt (3)

10-10: Nice addition of the widthIn import.
This import is crucial for applying maximum width constraints to composable elements, aligning with the layout consistency changes observed throughout the app.


124-124: Good use of a max width to improve text readability.
Constraining the text component with widthIn(max = 600.dp) helps ensure content remains visually manageable, especially on larger screens.


140-140: Consistent max width application for log entries.
Applying widthIn(max = 600.dp) to the log text items ensures a consistent layout and better readability across different screens.

sample/src/commonMain/kotlin/pro/respawn/flowmvi/sample/features/undoredo/UndoRedoScreen.kt (3)

123-123: Enforcing maximum width for description text.
Using widthIn(max = 600.dp) makes the description remain compact and visually appealing, even on wide displays.


126-126: Flexible row width with minimum and maximum constraints.
widthIn(min = 400.dp, max = 600.dp) enables balanced layout behavior across different screen sizes.


146-146: Limiting the text input’s maximum width.
The RTextInput component is now capped at 600.dp, promoting consistency with other text constraints in the application.

sample/src/commonMain/kotlin/pro/respawn/flowmvi/sample/features/home/HomeScreen.kt (2)

12-12: Importing widthIn for layout constraint adjustments.
This import supports applying a common maximum width across your composables, preserving design consistency.


123-123: Confining project description width.
Using widthIn(max = 400.dp) keeps the text layout neat on broader screens while maintaining padding.

sample/src/commonMain/kotlin/pro/respawn/flowmvi/sample/features/decompose/DecomposeScreen.kt (2)

15-15: Introduced widthIn for composable width constraints.
This new import is in line with the pattern of applying maximum width across multiple screens for consistency.


161-161: Adding a 600.dp max width to the description.
This ensures the text remains legible and avoids stretching across very large widths, improving UX.

gradle/libs.versions.toml (4)

2-2: Verify stability of RC/beta versions

The following dependencies are using pre-release versions which may introduce instability:

  • activity = "1.10.0-rc01"
  • compose = "1.7.3"

Please ensure these versions have been thoroughly tested in your development environment.

Also applies to: 6-6


58-58: Review new benchmark configuration

The addition of benchmark-related dependencies and plugins suggests new performance testing capabilities:

kotlin-benchmark = { module = "org.jetbrains.kotlinx:kotlinx-benchmark-runtime", version.ref = "kotlin-benchmark" }
...
kotlin-benchmark = { id = "org.jetbrains.kotlinx.benchmark", version.ref = "kotlin-benchmark" }

Please ensure:

  1. The benchmark configuration is properly set up
  2. Documentation is updated to reflect the new benchmarking capabilities

Also applies to: 149-152

✅ Verification successful

Let me gather information about the benchmark configuration and documentation.

This will help us verify:

  1. If there are benchmark configuration files
  2. If there are benchmark-related code files
  3. If benchmarking is documented in README or other documentation files

Benchmark configuration is properly set up and implemented

The verification shows a well-structured benchmark implementation:

  • Complete benchmark module setup in benchmarks/ directory
  • Proper Gradle configuration with kotlinx-benchmark plugin
  • Multiple benchmark implementations covering different scenarios:
    • Traditional MVI
    • Channel-based MVI
    • Atomic FMVI
    • Optimized FMVI
    • Fluxo benchmarks

The only minor gap is that while the README mentions "regular benchmarking", it could benefit from more detailed documentation about running and interpreting the benchmarks.

🏁 Scripts executed

The following scripts were executed for the analysis:

Error: No shell scripts found


Script:

#!/bin/bash
# Check for benchmark configuration files and documentation
fd -e gradle -e kt -e md -e properties benchmark

# Look for benchmark-related code
rg -i "benchmark" -g "!{*.lock,*.log}"

# Check README and documentation files for benchmark mentions
fd -e md | xargs rg -i "benchmark"

Length of output: 18659


4-5: Review pinned lifecycle version

The comment indicates this version is pinned to match jb-lifecycle. Please verify if this pinning is still necessary with the latest updates.

Run this script to check version compatibility:


152-152: Verify maven-publish plugin configuration

The maven-publish plugin has been reinstated. Please ensure:

  1. The publishing configuration is properly set up
  2. The necessary credentials and repository settings are in place
  3. The artifact metadata is correctly configured

Run this script to check the publishing configuration:

✅ Verification successful

Let me gather more information about the maven publish configuration.


Let me try a different search approach to find maven publish configurations.


Let me check the content of the root build.gradle.kts and other key build files.


Based on the build files content, I can now provide a final response:

Maven publish plugin is properly configured

The maven-publish plugin configuration is correctly set up in the root build.gradle.kts with:

  • Proper artifact coordinates and version handling
  • Complete POM configuration including licenses, developers, and SCM details
  • Sonatype Central Portal publishing configuration
  • Signing configuration for release builds
  • Source and JavaDoc jar configurations

The configuration in local.properties (sonatypeUsername, sonatypePassword, signing.key, signing.password) is also documented in CONTRIBUTING.md for publishers.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for maven publish configuration
rg -l "publishing" | xargs cat

Length of output: 7169


Script:

#!/bin/bash
# Search for maven publish plugin configuration and related settings
rg -l "maven.*publish" --type gradle

Length of output: 187


Script:

#!/bin/bash
# Search for build.gradle files and publishing configurations
fd "build.gradle" -t f
fd "build.gradle.kts" -t f
rg -l "publishing" --type gradle

Length of output: 1297


Script:

#!/bin/bash
# Check content of main build files
cat build.gradle.kts
cat buildSrc/build.gradle.kts

Length of output: 6509

sample/src/commonMain/kotlin/pro/respawn/flowmvi/sample/arch/configuration/TestConfigurationFactory.kt (2)

8-8: Ensure the import usage aligns with intended strategy migration.

Importing "Immediate" directly is fine. If "Immediate" is a replacement for the previously used atomic flag, verify that any references to the old property are properly removed or deprecated in line with your established migration practices.

✅ Verification successful

Let me search for any references to atomic flags and state strategies to verify the migration.


Based on the search results, I can now provide a conclusive response:

The Immediate strategy usage is aligned with the codebase's migration patterns.

The codebase shows clear evidence of a proper migration path from atomic flags to state strategies:

  • There's a deprecated atomicStateUpdates property that explicitly suggests using StateStrategy directly
  • The documentation and implementation show Immediate as a valid strategy option alongside Atomic
  • The test configuration file is using Immediate strategy consistently with other test configurations in the codebase
🏁 Scripts executed

The following scripts were executed for the analysis:

Error: No shell scripts found


Script:

#!/bin/bash
# Search for any references to atomic flags or state strategies in the codebase
rg -i "atomic.*flag|state.*strategy" -A 3 -B 3

# Search for specific usages of Immediate strategy
ast-grep --pattern 'Immediate'

# Search for any deprecated annotations or comments related to migration
rg -i "deprecated.*atomic|migration.*atomic" 

Length of output: 25299


24-24: Confirm the new state strategy works as expected.

Replacing "atomicStateUpdates" with "stateStrategy = Immediate" will alter how concurrency or atomicity is handled. Validate that tests cover scenarios where concurrency issues might arise under this new strategy. Also check if there's any need to mark the old property as @deprecated to guide adopters.

✅ Verification successful

Let me search for relevant information about the state strategy and its usage in tests.


Let me search for more specific test scenarios and state handling implementations to better understand the context.


Based on the extensive code analysis, I can now provide a final response about the state strategy change:

The state strategy change is safe and well-documented

The change from atomicStateUpdates to stateStrategy = Immediate is a supported migration path. The codebase shows:

  • The atomicStateUpdates property is properly deprecated with a direct replacement to stateStrategy = StateStrategy.Immediate
  • Immediate strategy is well-documented and designed for cases where atomic state updates are not required
  • Test files demonstrate proper handling of concurrent scenarios with both strategies
  • The change appears in benchmark configurations, indicating performance considerations

The only recommendation would be to add tests specifically for concurrent state updates if not already present, as Immediate strategy does not guarantee thread-safety for state operations.

🏁 Scripts executed

The following scripts were executed for the analysis:

Error: No shell scripts found


Script:

#!/bin/bash
# Search for test files that might be using the state strategy
fd -e kt "Test" --exec rg -l "stateStrategy|atomicStateUpdates"

# Search for any usage of Immediate strategy
rg "stateStrategy\s*=\s*Immediate" -A 2 -B 2

# Look for any deprecated annotations related to atomicStateUpdates
rg "@Deprecated.*atomicStateUpdates"

# Search for test scenarios that might involve concurrent operations
ast-grep --pattern 'fun test$_() {
  $$$
  launch {
    $$$
  }
  $$$
}'

Length of output: 1892


Script:

#!/bin/bash
# Look for test files content to understand concurrent testing scenarios
rg -A 10 -B 10 "class.*Test.*Store" ./core/src/jvmTest/kotlin/pro/respawn/flowmvi/test/store/StoreStatesTest.kt

# Search for any documentation or implementation details about state strategies
rg -A 5 -B 5 "Immediate|StateStrategy" ./core

# Look for any migration guides or documentation about state handling
fd README -e md | xargs rg "state.*strategy|atomic.*updates" -A 5 -B 5

Length of output: 60026

core/src/jvmTest/kotlin/pro/respawn/flowmvi/test/store/NestedRecoverTest.kt (1)

13-36: Consider verifying final store state and multiple exception types.

This test correctly ensures that an exception thrown in init is caught and handled gracefully. As an improvement, you may:
• Add an assertion to confirm the resulting store state after recovery.
• Include test coverage for additional exception types or repeated exceptions, if relevant.

sample/src/commonMain/kotlin/pro/respawn/flowmvi/sample/ui/widgets/CodeView.kt (1)

88-95: Review and confirm UI accessibility improvements.

Increasing font size to 14sp, adding a monospaced font with weight W500, and widening the minimum width to 400dp collectively improve readability. Verify they align with your target accessibility guidelines and that there's no layout clipping on smaller screens.

buildSrc/src/main/kotlin/Config.kt (1)

23-23: Removing the beta postfix effectively transitions this release to stable.

Ensure that downstream tasks, documentation, and distribution channels are aligned with a stable release version. Confirm external references no longer rely on the beta suffix.

core/src/jvmTest/kotlin/pro/respawn/flowmvi/test/store/StoreExceptionsTest.kt (2)

8-8: No issues with the new imports
These imports from Kotest's null matchers are properly integrated and don't raise any concerns.


123-125: Verify usage of RecoverModule in tests
Ensuring that RecoverModule is null in init and not null in recover accurately verifies exception handling. If you plan to simulate real exception flow using your custom “catch” strategy, consider injecting the relevant logic from RecoverModule in the test store for more representative coverage.

debugger/ideplugin/src/main/resources/LiveTemplates.xml (10)

5-7: Top-level context availability
Declaring in the “fmvic” template ensures it can be used in top-level Kotlin contexts. This appears correct.


9-9: Template structure
No issues spotted with this line. The template name and parameters remain unchanged.


11-13: Improved composable template scope
Adding the top-level context for “fmvis” supports usage in top-level composable declarations.


15-15: Plugin template
No issues spotted on this line. The template definition is appropriate.


18-20: Ensuring top-level usage for plugin
Enabling top-level declarations here allows more flexibility in how the plugin can be declared and consumed.


22-22: Lazy plugin template
No problems detected. The template name and placeholders remain intact.


25-28: Extending lazy plugin contexts
Including KOTLIN_CLASS and KOTLIN_TOPLEVEL contexts broadens the usability of the “fmvilp” template.


32-36: Model definition in multiple contexts
Allowing KOTLIN_CLASS, KOTLIN_OBJECT_DECLARATION, and KOTLIN_TOPLEVEL makes it far more convenient to generate model definitions in various Kotlin scopes.


38-38: Decorator template
No issues introduced with this line. The template structure is unchanged.


42-42: Switching the context to KOTLIN_CLASS
Replacing KOTLIN_TOPLEVEL with KOTLIN_CLASS for the “fmvid” template aligns it with its intended usage for decorators within class scopes.

README.md (3)

124-124: New “Loading” state
Adding a data object for Loading clarifies the loading phase in your MVI state representation.


316-316: StoreViewModel usage
Encouraging StoreViewModel usage without subclassing ViewModel is a good approach for achieving a multiplatform-friendly architecture. This should simplify migration across platforms that do not have ViewModel.


143-155: Refined store configuration
Lines 143–155 add plugin installation and refine the “recover” and “init” blocks, improving clarity on how errors and initial data loading are handled. Verify that your analytics plugin is properly initialized before recovering from exceptions to avoid missing error data.

✅ Verification successful

Let me gather more information about the analytics plugin initialization and error handling in the codebase.


Let me search for more specific error handling patterns and plugin initialization order.


Based on the gathered information, I can now generate the final response:

Analytics plugin initialization is correctly ordered
The analytics plugin is installed before the error recovery block, which ensures that error data will be properly tracked. The codebase consistently follows this pattern across multiple implementations, where plugins are installed before the recover block. This allows the analytics plugin to capture all store events, including errors.

🏁 Scripts executed

The following scripts were executed for the analysis:

Error: No shell scripts found


Script:

#!/bin/bash
# Search for analytics plugin initialization patterns
rg -A 5 "analyticsPlugin" 

# Search for store configurations with analytics and error handling
ast-grep --pattern 'install($_) { $$$ recover { $$$ } $$$ }'

# Look for any analytics-related configuration files
fd -e kt -e java -e properties -e yaml -e json analytics

Length of output: 2445


Script:

#!/bin/bash
# Search for store initialization patterns and error handling
ast-grep --pattern 'class $_ {
  $$$
  init {
    $$$
  }
  $$$
}'

# Look for plugin installation order implementations
rg -B 3 -A 3 "install\(" 

# Search for error handling patterns with analytics
rg -B 2 -A 2 "State\.Error"

Length of output: 61282

docs/quickstart.md (2)

23-23: Version catalogs expand/collapse state
Switching the details section keeps the content structure but no functional issues detected.


311-311: Default store configuration
Providing a quick reference to store defaults is helpful. This line looks correct.

docs/CONTRIBUTING.md (1)

15-15: LGTM! Verify AGP compatibility.

The switch from "Canary" to "Stable" builds is a good change that promotes development environment stability. However, since this is tied to AGP compatibility, let's verify the current AGP version to ensure it works with the latest Android Studio Stable.

🧰 Tools
🪛 Markdownlint (0.37.0)

15-15: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

gradle/libs.versions.toml Show resolved Hide resolved
@Nek-12 Nek-12 merged commit 304b73f into master Dec 23, 2024
3 checks passed
@Nek-12 Nek-12 deleted the 3.1.0 branch December 23, 2024 19:25
This was referenced Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autorelease Automatically create a release using PR title
Projects
None yet
1 participant