fix: address technical debt - memory leaks, stub implementations, refactor AppBar and MultiPanelLayout#81
Conversation
Generated documentation for: - STACK.md: Technology stack and dependencies - INTEGRATIONS.md: External services and API integrations - ARCHITECTURE.md: Architectural patterns and data flow - STRUCTURE.md: Directory layout and code organization - CONVENTIONS.md: Coding standards and style guide - TESTING.md: Testing patterns and frameworks - CONCERNS.md: Technical debt and known issues
…actor AppBar and MultiPanelLayout - Add dispose() to LdMonkeyShellState and LdMonkeyShell to fix StreamController leaks - Fix LdSelectableList to dispose FocusNodes and clear maps - Remove LdScaffoldSlotExtension stub and fix level/effectiveHeight methods - Fix maybePopContextMenu to return actual pop result - Remove dead code from repository.create() - Extract scroll behavior and decoration logic from LdAppBar - Extract drag gesture handler from LdMultiPanelLayout
- Extract LdSelectableListSelectionController into separate file - Reduce selectable_list.dart from 777 to 508 lines - Controller manages all selection state with ChangeNotifier pattern - Preserve Stage 1 dispose() logic in controller's dispose method
Code Review FindingsMedium: Not IntegratedFile: multi_panel_layout.dart The extracted handler class in exists but is never imported/used by . Drag state still duplicates the extracted logic. Documentation Gaps for Extracted Code
Type Invariant IssueFile: Test Coverage Gaps
|
ElectricCookie
left a comment
There was a problem hiding this comment.
Code Review - Overall Assessment
PR #81 addresses technical debt cleanup for issue #75 with good progress on memory leak fixes and refactoring. However, there are some items to address before merge.
Findings Summary
-
Medium: extracted but not integrated into - code duplication remains
-
Nitpick: Documentation gaps for 3 substantial extractions totaling ~676 lines
-
Nitpick: invariant violation when
-
Test gaps: Memory leak fixes and behavior changes lack regression tests
What's Done Well
- Memory leak fixes properly implemented (dispose patterns correct)
- Stub implementations removed
- Refactoring is clean with good separation
- now returns actual pop result
Code Review Findings1. Orphaned removeListener (monkey_shell.dart:310) 2. Inconsistent exception handling (repository.dart:338-358) 3. Silent Failure: Missing await (repository.dart:347) 4. Silent Failure: Secondary exception swallowed (repository.dart:382-384) 5. Test Coverage Gap |
|
Fixed issues 1, 2, and 3:
|
|
Fixed 3 review findings in commit 28cbdcb:
Ready for re-review. |
Summary
LdMonkeyShellStateandLdMonkeyShell(StreamControllers now properly disposed)LdSelectableListFocusNode and GlobalKey leaks in dispose()LdScaffoldSlotExtensionstub and fix broken level/effectiveHeight methodsmaybePopContextMenuto return actual pop result instead of always truerepository.create()LdAppBar(~231 lines)LdMultiPanelLayoutLdSelectableListSelectionControllerinto separate file (~269 lines)Test plan
dart analyzepasses with no issuesFixes #75