fix: resolve storage entry collision by adding storeId and refactor s… - #20
Conversation
…tate inspector with tabbed JSON view
|
Warning Review limit reached
Next review available in: 27 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR adds instance-specific storage identity across reporting, parsing, modeling, and retention. It also preserves selected event details during refreshes, replaces console entries consistently, and gives Before and After state views independent Tree/Pretty tabs. ChangesStorage identity flow
Event selection persistence
Console refresh handling
State inspection viewers
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant MMKVReporter
participant WebSocketHandler
participant StorageEntry
participant StorageNotifier
MMKVReporter->>WebSocketHandler: send mmkv:<label> storage type
WebSocketHandler->>StorageEntry: parse storage type and storeId
StorageEntry->>StorageNotifier: append distinct storage event
Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
lib/features/state_inspector/presentation/pages/state_inspector_page.dart (2)
609-628: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winShow the required saved toast after capture succeeds.
Line 635 captures the composed widget, but
_takeScreenshotdoes not callshowScreenshotSavedToastfromtoast_utils. Await successful capture and show the toast before returning control to the user.As per path instructions, “Screenshot should use showScreenshotSavedToast from toast_utils.”
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@lib/features/state_inspector/presentation/pages/state_inspector_page.dart` around lines 609 - 628, Update _takeScreenshot to await the composed-widget capture successfully, then call showScreenshotSavedToast from toast_utils before returning control to the user. Keep the toast invocation after capture completion so it is shown only when the screenshot is saved.Source: Path instructions
609-628: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick winUse a non-flex state view for screenshot capture.
Lines 609 and 628 insert
_StateJsonTabViewintoscreenshotWidget._StateJsonTabViewcontainsExpandedat Line 752, but the screenshotColumnhas intrinsic-height constraints. Flutter can throw a RenderFlex unbounded-height exception when the user captures a screenshot.Use a screenshot-only state viewer without
Expanded, or give each captured tab view a finite height.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@lib/features/state_inspector/presentation/pages/state_inspector_page.dart` around lines 609 - 628, The screenshot layout around the “Before” and “After” _StateJsonTabView instances must avoid unbounded-height flex constraints from the Expanded used inside _StateJsonTabView. Provide a screenshot-specific state viewer without Expanded, or constrain each captured state view to a finite height, while preserving the existing interactive viewer behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@lib/features/all_events/presentation/pages/all_events_page.dart`:
- Around line 75-82: The refresh synchronization around `_selectedEventId` must
not clear `_pinnedSelectedEvent` when `_findEvent(selectedId)` returns null
because the refreshed `_events` omits the selected entry. Update this block to
replace the pinned event only when a matching event is found, while preserving
the existing pinned value otherwise; continue clearing it only through explicit
selection or reset paths.
---
Outside diff comments:
In `@lib/features/state_inspector/presentation/pages/state_inspector_page.dart`:
- Around line 609-628: Update _takeScreenshot to await the composed-widget
capture successfully, then call showScreenshotSavedToast from toast_utils before
returning control to the user. Keep the toast invocation after capture
completion so it is shown only when the screenshot is saved.
- Around line 609-628: The screenshot layout around the “Before” and “After”
_StateJsonTabView instances must avoid unbounded-height flex constraints from
the Expanded used inside _StateJsonTabView. Provide a screenshot-specific state
viewer without Expanded, or constrain each captured state view to a finite
height, while preserving the existing interactive viewer behavior.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 291038fb-5801-42c4-9ee8-39fdca1efc56
⛔ Files ignored due to path filters (5)
docs/superpowers/specs/2026-08-07-state-page-tree-json-tabbar-design.mdis excluded by none and included by nonelib/models/storage/storage_entry.freezed.dartis excluded by!**/*.freezed.dartand included bylib/**lib/models/storage/storage_entry.g.dartis excluded by!**/*.g.dartand included bylib/**test/features/storage_viewer/storage_notifier_test.dartis excluded by none and included by nonetest/server/ws_message_handler_test.dartis excluded by none and included by none
📒 Files selected for processing (7)
client_sdks/devconnect-react-native/src/reporters/mmkvReporter.tslib/features/all_events/presentation/pages/all_events_page.dartlib/features/console/presentation/pages/console_page.dartlib/features/state_inspector/presentation/pages/state_inspector_page.dartlib/features/storage_viewer/provider/storage_providers.dartlib/models/storage/storage_entry.dartlib/server/ws_message_handler.dart
…tate inspector with tabbed JSON view
Description
Related Issue
Type of Change
Testing
Screenshots (if applicable)
Summary by CodeRabbit