Skip to content

refactor: solidart devtools#169

Open
nank1ro wants to merge 3 commits intomainfrom
refactor/solidart_devtools
Open

refactor: solidart devtools#169
nank1ro wants to merge 3 commits intomainfrom
refactor/solidart_devtools

Conversation

@nank1ro
Copy link
Owner

@nank1ro nank1ro commented Dec 17, 2025

closes #161

Summary by CodeRabbit

  • New Features

    • DevTools: toggle to show only active duplicate items, plus checkbox and "Clear All" control.
    • DevTools: improved two-column search/input layout with preserved clear button and updated visible-count showing “(duplicates only)” when enabled.
    • DevTools: better handling of hot-restart events so state is cleared appropriately.
  • Refactor

    • Example app: internal signal naming clarified for consistency (no behavioral changes).

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 17, 2025

Walkthrough

Adds explicit names to several Signals/Computed in the todos example and extends the devtools extension with an "active duplicates" filter, hot-restart handling to clear signals, new UI controls (checkbox, Clear All), and search layout updates.

Changes

Cohort / File(s) Summary
Todos example — signal/computed naming
examples/todos/lib/controllers/todos.dart, examples/todos/lib/widgets/todos_body.dart, examples/todos/lib/widgets/toolbar.dart
Added explicit name arguments to signal/computed initializations (e.g., ListSignal(..., name: 'todos'), Signal(..., name: 'todosFilter'), Computed(..., name: 'completedTodos')). No control-flow or disposal changes.
DevTools extension — UI, filtering, lifecycle, state
packages/solidart_devtools_extension/lib/main.dart
Added showOnlyActiveDuplicates signal and isolateEventSub subscription; handle isolate hot-restart events to clear signals; added "Active duplicates" checkbox and "Clear All" button; reorganized search input into expanded two-column layout; filtering now supports "active duplicates only" and sorts active before disposed; ensured disposal of new subscription/state; adjusted item rendering to use filteredSignals indexing.

Sequence Diagram(s)

mermaid
sequenceDiagram
participant UI as DevTools UI
participant State as Signals State
participant VM as VM/Isolate Events
participant Store as Signal Store

Note over UI,State: User toggles controls or searches
UI->>State: toggle "Active duplicates" checkbox / update search
State->>Store: request filteredSignals(showDuplicatesOnly, searchQuery)
Store-->>State: return filtered & sorted signals
State-->>UI: render filteredSignals

Note over UI,State: Clear action
UI->>State: click "Clear All"
State->>Store: clear all signals
Store-->>State: signals cleared
State-->>UI: update (empty) list

Note over VM,State: Hot-restart handling
VM->>State: IsolateReload / IsolateStart event
State->>Store: clear signals on hot-restart
Store-->>UI: refreshed (empty) list

rect rgba(46,125,50,0.06)
Note right of UI: New controls: "Active duplicates" checkbox, "Clear All", search layout
end

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I gave my signals tidy names tonight,
So devtools finds duplicates in plain sight.
A checkbox, clear, and restart's small thrum —
I hop through lists and tidy them, then drum.
Hooray for clearer debugging, hop! 🥕

🚥 Pre-merge checks | ✅ 3 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning Changes to signal naming in examples (todos.dart, todos_body.dart, toolbar.dart) appear unrelated to the devtools improvements specified in issue #161. Review whether naming changes to example signals should be in separate PR or clarify relationship to devtools improvements; consider creating dedicated PR for naming consistency changes.
Title check ❓ Inconclusive The title 'refactor: solidart devtools' is vague and generic, using a broad term without specifying what aspect of the devtools was refactored or what the main changes accomplish. Consider a more specific title that highlights key changes, such as 'refactor: improve devtools signal filtering and display' or 'refactor: add devtools signal management features'.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed The PR implements all three requirements from issue #161: adds clear all signals/hot-restart reset, adds active duplicates checkbox filter, and updates signal display layout.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Dec 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (40119f4) to head (0c1950c).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #169   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           18        18           
  Lines          931       931           
=========================================
  Hits           931       931           
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nank1ro nank1ro marked this pull request as ready for review January 7, 2026 10:33
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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/solidart_devtools_extension/lib/main.dart (1)

346-353: Sorting inside itemBuilder causes redundant work.

The filteredSignals.value list is sorted on every call to itemBuilder, meaning the entire list is sorted once per visible grid item. This should be moved outside the builder or computed once.

♻️ Proposed fix

Sort once before iterating:

                 child: SignalBuilder(
                   builder: (context, _) {
+                    final sortedSignals = filteredSignals.value
+                      ..sort(
+                        (a, b) => b.value.lastUpdate.compareTo(
+                          a.value.lastUpdate,
+                        ),
+                      )
+                      ..sort((a, b) => a.value.disposed ? 1 : -1);
                     return GridView.builder(
                       gridDelegate:
                           SliverGridDelegateWithMaxCrossAxisExtent(
                             maxCrossAxisExtent: 500,
                             childAspectRatio: 5,
                             mainAxisSpacing: 8,
                             crossAxisSpacing: 8,
                           ),
-                      itemCount: filteredSignals.value.length,
+                      itemCount: sortedSignals.length,
                       padding: EdgeInsets.symmetric(horizontal: 4),
                       itemBuilder: (BuildContext context, int index) {
-                        final sortedSignals = filteredSignals.value
-                          ..sort(
-                            (a, b) => b.value.lastUpdate.compareTo(
-                              a.value.lastUpdate,
-                            ),
-                          )
-                          ..sort((a, b) => a.value.disposed ? 1 : -1);
-
                         final entry = sortedSignals.elementAt(index);
🤖 Fix all issues with AI agents
In @packages/solidart_devtools_extension/lib/main.dart:
- Around line 171-177: Store the StreamSubscription returned by
vmService.onIsolateEvent.listen so you can cancel it when the widget is
disposed: assign the result of vmService.onIsolateEvent.listen(...) to a field
(e.g., _isolateEventSub), keep the existing listener body that calls
signals.clear() on 'IsolateReload'/'IsolateStart', and override dispose() to
call await _isolateEventSub.cancel() (or _isolateEventSub.cancel();) before
calling super.dispose();.
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 40119f4 and 6840695.

📒 Files selected for processing (4)
  • examples/todos/lib/controllers/todos.dart
  • examples/todos/lib/widgets/todos_body.dart
  • examples/todos/lib/widgets/toolbar.dart
  • packages/solidart_devtools_extension/lib/main.dart
🧰 Additional context used
📓 Path-based instructions (1)
examples/**

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Build and run example applications (counter, todos, github_search, toggle_theme) to validate real user scenarios

Files:

  • examples/todos/lib/widgets/toolbar.dart
  • examples/todos/lib/widgets/todos_body.dart
  • examples/todos/lib/controllers/todos.dart
🧠 Learnings (7)
📚 Learning: 2025-09-10T15:36:53.390Z
Learnt from: CR
Repo: nank1ro/solidart PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-10T15:36:53.390Z
Learning: Applies to packages/flutter_solidart/{lib,test}/**/*.dart : For Flutter Solidart changes, ensure widget tests cover `SignalBuilder`, `Provider`, and `Show` behaviors

Applied to files:

  • examples/todos/lib/widgets/toolbar.dart
  • examples/todos/lib/widgets/todos_body.dart
  • packages/solidart_devtools_extension/lib/main.dart
📚 Learning: 2025-09-10T15:36:53.390Z
Learnt from: CR
Repo: nank1ro/solidart PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-10T15:36:53.390Z
Learning: Applies to packages/{solidart,flutter_solidart}/lib/**/*.dart : Use Signals for state, Effects for side effects, and Computed for derived values in library code

Applied to files:

  • examples/todos/lib/widgets/toolbar.dart
  • packages/solidart_devtools_extension/lib/main.dart
📚 Learning: 2025-12-21T03:28:51.442Z
Learnt from: medz
Repo: nank1ro/solidart PR: 167
File: packages/solidart/lib/src/solidart.dart:1396-1396
Timestamp: 2025-12-21T03:28:51.442Z
Learning: In Dart 3.10+, dot shorthand syntax such as identifier = ._(name) or Type x = .constructor() is valid when the type can be inferred from context (e.g., field type, variable declaration, parameter type). Do not flag these as syntax errors when the SDK version is >= 3.10.0. This applies to enum values, static members, and constructors; apply this guidance broadly to Dart files across the repository.

Applied to files:

  • examples/todos/lib/widgets/toolbar.dart
  • examples/todos/lib/widgets/todos_body.dart
  • examples/todos/lib/controllers/todos.dart
  • packages/solidart_devtools_extension/lib/main.dart
📚 Learning: 2025-09-10T15:36:53.390Z
Learnt from: CR
Repo: nank1ro/solidart PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-10T15:36:53.390Z
Learning: Applies to packages/solidart/test/solidart_test.dart : After Signal changes, always run `packages/solidart/test/solidart_test.dart`

Applied to files:

  • packages/solidart_devtools_extension/lib/main.dart
📚 Learning: 2025-09-10T15:36:53.390Z
Learnt from: CR
Repo: nank1ro/solidart PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-10T15:36:53.390Z
Learning: Applies to packages/solidart/test/**/*.dart : Write unit tests covering Signal operations and state transitions

Applied to files:

  • packages/solidart_devtools_extension/lib/main.dart
📚 Learning: 2025-09-10T15:36:53.390Z
Learnt from: CR
Repo: nank1ro/solidart PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-10T15:36:53.390Z
Learning: Applies to packages/{solidart,flutter_solidart}/lib/**/*.dart : Ensure proper memory management: Signals auto-dispose in Flutter contexts; manually dispose in pure Dart code

Applied to files:

  • packages/solidart_devtools_extension/lib/main.dart
📚 Learning: 2025-10-08T11:10:13.808Z
Learnt from: nank1ro
Repo: nank1ro/solidart PR: 151
File: packages/solidart_hooks/CHANGELOG.md:12-16
Timestamp: 2025-10-08T11:10:13.808Z
Learning: In solidart/flutter_solidart, SignalBuilder supports automatic signal tracking where signals are detected when accessed inside the builder. The builder signature for automatic tracking is `(BuildContext, Widget? child)`, not requiring an explicit signal parameter or value parameter. Example: `SignalBuilder(builder: (context, child) => Text('${counter.value}'))`.

Applied to files:

  • packages/solidart_devtools_extension/lib/main.dart
🔇 Additional comments (5)
examples/todos/lib/widgets/toolbar.dart (1)

20-31: LGTM! Explicit signal names added for improved dev tools debugging.

The naming convention is consistent—each Computed signal's name matches its variable name, which will make debugging and tracking signals in the dev tools extension straightforward.

examples/todos/lib/controllers/todos.dart (1)

21-36: LGTM! Signal naming improves debuggability.

The explicit names for todos, completedTodos, and incompleteTodos signals are consistent with the variable names and will help identify these signals in the dev tools extension.

examples/todos/lib/widgets/todos_body.dart (1)

9-11: LGTM! Named signal for the filter provider.

Adding the explicit name to the todosFilter signal aligns with the PR's goal of improving signal identification in dev tools.

packages/solidart_devtools_extension/lib/main.dart (2)

184-195: Good: Comprehensive disposal of all signals.

All signals including the new showOnlyActiveDuplicates and filteredSignals are properly disposed. This ensures no memory leaks from the signal subscriptions.


302-317: LGTM! UI controls implement the PR objectives.

The "Active duplicates" checkbox and "Clear All" button address the requirements from issue #161. The layout is clean and the controls are appropriately placed.

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: 0

🧹 Nitpick comments (1)
packages/solidart_devtools_extension/lib/main.dart (1)

127-134: Consider pre-computing duplicate counts for better performance.

The current duplicate filter iterates through all signals for each entry, resulting in O(n²) complexity. While acceptable for typical devtools usage, this could be optimized by pre-computing a name-to-count map.

⚡ Suggested optimization
 late final filteredSignals = Computed(() {
   final lowercasedSearch = searchText.value.toLowerCase();
   final type = filterType.value;
   final viewDisposed = showDisposed.value;
   final onlyActiveDuplicates = showOnlyActiveDuplicates.value;
+  
+  // Pre-compute duplicate counts for active signals
+  final nameCounts = onlyActiveDuplicates
+      ? signals.value.values
+          .where((s) => !s.disposed)
+          .groupFoldBy<String, int>(
+            (s) => s.name,
+            (count, _) => (count ?? 0) + 1,
+          )
+      : <String, int>{};
+
   return signals.value.entries
       .where(
         (entry) =>
             entry.value.name.toString().toLowerCase().contains(
               lowercasedSearch,
             ) ||
             entry.value.matchesSearch(lowercasedSearch),
       )
       .where((entry) => type == null || entry.value.type == type)
       .where((entry) => viewDisposed || !entry.value.disposed)
       .where((entry) {
         if (!onlyActiveDuplicates) return true;
-        // Count signals with same name
-        final sameName = signals.value.values
-            .where((s) => s.name == entry.value.name);
-        // Show only if: has duplicates AND is active
-        return sameName.length > 1 && !entry.value.disposed;
+        // Show only if: has duplicates AND is active
+        final count = nameCounts[entry.value.name] ?? 0;
+        return count > 1 && !entry.value.disposed;
       })
       .toList();
 });

Note: groupFoldBy is already available from the collection package imported at line 4.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6840695 and c50dfe7.

📒 Files selected for processing (1)
  • packages/solidart_devtools_extension/lib/main.dart
🧰 Additional context used
🧠 Learnings (7)
📚 Learning: 2025-09-10T15:36:53.390Z
Learnt from: CR
Repo: nank1ro/solidart PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-10T15:36:53.390Z
Learning: Applies to packages/flutter_solidart/{lib,test}/**/*.dart : For Flutter Solidart changes, ensure widget tests cover `SignalBuilder`, `Provider`, and `Show` behaviors

Applied to files:

  • packages/solidart_devtools_extension/lib/main.dart
📚 Learning: 2025-09-10T15:36:53.390Z
Learnt from: CR
Repo: nank1ro/solidart PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-10T15:36:53.390Z
Learning: Applies to packages/{solidart,flutter_solidart}/lib/**/*.dart : Use Signals for state, Effects for side effects, and Computed for derived values in library code

Applied to files:

  • packages/solidart_devtools_extension/lib/main.dart
📚 Learning: 2025-09-10T15:36:53.390Z
Learnt from: CR
Repo: nank1ro/solidart PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-10T15:36:53.390Z
Learning: Applies to packages/solidart/test/**/*.dart : Write unit tests covering Signal operations and state transitions

Applied to files:

  • packages/solidart_devtools_extension/lib/main.dart
📚 Learning: 2025-09-10T15:36:53.390Z
Learnt from: CR
Repo: nank1ro/solidart PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-10T15:36:53.390Z
Learning: Applies to packages/solidart/test/solidart_test.dart : After Signal changes, always run `packages/solidart/test/solidart_test.dart`

Applied to files:

  • packages/solidart_devtools_extension/lib/main.dart
📚 Learning: 2025-09-10T15:36:53.390Z
Learnt from: CR
Repo: nank1ro/solidart PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-10T15:36:53.390Z
Learning: Applies to packages/{solidart,flutter_solidart}/lib/**/*.dart : Ensure proper memory management: Signals auto-dispose in Flutter contexts; manually dispose in pure Dart code

Applied to files:

  • packages/solidart_devtools_extension/lib/main.dart
📚 Learning: 2025-10-08T11:10:13.808Z
Learnt from: nank1ro
Repo: nank1ro/solidart PR: 151
File: packages/solidart_hooks/CHANGELOG.md:12-16
Timestamp: 2025-10-08T11:10:13.808Z
Learning: In solidart/flutter_solidart, SignalBuilder supports automatic signal tracking where signals are detected when accessed inside the builder. The builder signature for automatic tracking is `(BuildContext, Widget? child)`, not requiring an explicit signal parameter or value parameter. Example: `SignalBuilder(builder: (context, child) => Text('${counter.value}'))`.

Applied to files:

  • packages/solidart_devtools_extension/lib/main.dart
📚 Learning: 2025-12-21T03:28:51.442Z
Learnt from: medz
Repo: nank1ro/solidart PR: 167
File: packages/solidart/lib/src/solidart.dart:1396-1396
Timestamp: 2025-12-21T03:28:51.442Z
Learning: In Dart 3.10+, dot shorthand syntax such as identifier = ._(name) or Type x = .constructor() is valid when the type can be inferred from context (e.g., field type, variable declaration, parameter type). Do not flag these as syntax errors when the SDK version is >= 3.10.0. This applies to enum values, static members, and constructors; apply this guidance broadly to Dart files across the repository.

Applied to files:

  • packages/solidart_devtools_extension/lib/main.dart
🔇 Additional comments (3)
packages/solidart_devtools_extension/lib/main.dart (3)

172-178: LGTM! Hot restart handling correctly implemented.

The subscription to onIsolateEvent is now properly stored in isolateEventSub and cancelled in dispose(), addressing the subscription leak identified in the previous review. Clearing signals on IsolateReload or IsolateStart correctly handles hot restart scenarios.

Also applies to: 188-188


236-320: LGTM! UI changes correctly implement PR objectives.

The layout successfully addresses all three requirements:

  1. Search input and type selector now share the same row (lines 236-288)
  2. "Active duplicates" checkbox added (lines 304-314)
  3. "Clear All" button clears the devtools signal cache (line 316)

The use of Expanded widgets with appropriate flex ratios provides good space allocation.


190-196: LGTM! Proper resource cleanup.

All signals (including the new showOnlyActiveDuplicates) and subscriptions are correctly disposed, ensuring no memory leaks.

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: 0

🧹 Nitpick comments (3)
packages/solidart_devtools_extension/lib/main.dart (3)

102-103: Consider simplifying the subscription field declarations.

Both subscription fields use late final with nullable types. This pattern works but could be simplified to just nullable fields (removing late final) for clarity, since they're conditionally initialized in an async method and already handled safely with ?.cancel() in dispose.

♻️ Optional simplification
-  late final StreamSubscription<Object>? sub;
-  late final StreamSubscription<Object>? isolateEventSub;
+  StreamSubscription<Object>? sub;
+  StreamSubscription<Object>? isolateEventSub;

127-134: Duplicate filtering logic is correct.

The logic correctly identifies signals with duplicate names and filters to show only active (not disposed) ones. The nested iteration for counting duplicates is O(n²), but acceptable for a dev tools extension with a limited number of signals.

💡 Optional performance optimization

If the number of signals grows large, consider pre-computing name counts outside the filter chain:

final filtered = signals.value.entries
    .where(...)
    .where((entry) => type == null || entry.value.type == type)
    .where((entry) => viewDisposed || !entry.value.disposed);

// Pre-compute name counts if active duplicates filter is enabled
Map<String, int>? nameCounts;
if (onlyActiveDuplicates) {
  nameCounts = <String, int>{};
  for (final signal in signals.value.values) {
    if (!signal.disposed) {
      nameCounts[signal.name] = (nameCounts[signal.name] ?? 0) + 1;
    }
  }
}

final result = onlyActiveDuplicates
    ? filtered.where((entry) => 
        (nameCounts![entry.value.name] ?? 0) > 1 && !entry.value.disposed
      ).toList()
    : filtered.toList();

However, this adds complexity and may not be necessary for typical usage.


340-340: Consider making the filter description more precise.

The text appends "(duplicates only)" when the active duplicates filter is enabled, but the filter specifically shows only active duplicates (not disposed). Consider "(active duplicates only)" for clarity.

📝 Suggested text improvement
-'${filteredSignals.value.length} visible of ${signals.value.length}${showOnlyActiveDuplicates.value ? ' (duplicates only)' : ''}',
+'${filteredSignals.value.length} visible of ${signals.value.length}${showOnlyActiveDuplicates.value ? ' (active duplicates only)' : ''}',
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c50dfe7 and 0c1950c.

📒 Files selected for processing (1)
  • packages/solidart_devtools_extension/lib/main.dart
🧰 Additional context used
🧠 Learnings (7)
📚 Learning: 2025-09-10T15:36:53.390Z
Learnt from: CR
Repo: nank1ro/solidart PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-10T15:36:53.390Z
Learning: Applies to packages/flutter_solidart/{lib,test}/**/*.dart : For Flutter Solidart changes, ensure widget tests cover `SignalBuilder`, `Provider`, and `Show` behaviors

Applied to files:

  • packages/solidart_devtools_extension/lib/main.dart
📚 Learning: 2025-09-10T15:36:53.390Z
Learnt from: CR
Repo: nank1ro/solidart PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-10T15:36:53.390Z
Learning: Applies to packages/{solidart,flutter_solidart}/lib/**/*.dart : Use Signals for state, Effects for side effects, and Computed for derived values in library code

Applied to files:

  • packages/solidart_devtools_extension/lib/main.dart
📚 Learning: 2025-09-10T15:36:53.390Z
Learnt from: CR
Repo: nank1ro/solidart PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-10T15:36:53.390Z
Learning: Applies to packages/solidart/test/solidart_test.dart : After Signal changes, always run `packages/solidart/test/solidart_test.dart`

Applied to files:

  • packages/solidart_devtools_extension/lib/main.dart
📚 Learning: 2025-09-10T15:36:53.390Z
Learnt from: CR
Repo: nank1ro/solidart PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-10T15:36:53.390Z
Learning: Applies to packages/solidart/test/**/*.dart : Write unit tests covering Signal operations and state transitions

Applied to files:

  • packages/solidart_devtools_extension/lib/main.dart
📚 Learning: 2025-09-10T15:36:53.390Z
Learnt from: CR
Repo: nank1ro/solidart PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-10T15:36:53.390Z
Learning: Applies to packages/{solidart,flutter_solidart}/lib/**/*.dart : Ensure proper memory management: Signals auto-dispose in Flutter contexts; manually dispose in pure Dart code

Applied to files:

  • packages/solidart_devtools_extension/lib/main.dart
📚 Learning: 2025-10-08T11:10:13.808Z
Learnt from: nank1ro
Repo: nank1ro/solidart PR: 151
File: packages/solidart_hooks/CHANGELOG.md:12-16
Timestamp: 2025-10-08T11:10:13.808Z
Learning: In solidart/flutter_solidart, SignalBuilder supports automatic signal tracking where signals are detected when accessed inside the builder. The builder signature for automatic tracking is `(BuildContext, Widget? child)`, not requiring an explicit signal parameter or value parameter. Example: `SignalBuilder(builder: (context, child) => Text('${counter.value}'))`.

Applied to files:

  • packages/solidart_devtools_extension/lib/main.dart
📚 Learning: 2025-12-21T03:28:51.442Z
Learnt from: medz
Repo: nank1ro/solidart PR: 167
File: packages/solidart/lib/src/solidart.dart:1396-1396
Timestamp: 2025-12-21T03:28:51.442Z
Learning: In Dart 3.10+, dot shorthand syntax such as identifier = ._(name) or Type x = .constructor() is valid when the type can be inferred from context (e.g., field type, variable declaration, parameter type). Do not flag these as syntax errors when the SDK version is >= 3.10.0. This applies to enum values, static members, and constructors; apply this guidance broadly to Dart files across the repository.

Applied to files:

  • packages/solidart_devtools_extension/lib/main.dart
🔇 Additional comments (6)
packages/solidart_devtools_extension/lib/main.dart (6)

109-109: LGTM!

The new signal for the "Active duplicates" filter is correctly declared and initialized, following the existing pattern for showDisposed.


137-145: LGTM!

The sorting logic correctly prioritizes active (not disposed) signals and orders by newest update first. The implementation is clear and efficient.


184-190: Hot restart handling looks good!

The isolate event listener correctly clears signals on hot restart events, and the subscription is properly stored for lifecycle management.


200-208: LGTM!

All resources are properly disposed, including the new isolateEventSub subscription and showOnlyActiveDuplicates signal. The memory management is thorough and follows best practices.

Based on learnings, proper memory management is essential in Flutter contexts.


248-332: LGTM!

The UI reorganization improves the layout with a clear two-column structure for the search and type filter. The new "Active duplicates" checkbox and "Clear All" button are well-integrated and follow existing patterns.


361-361: LGTM!

Direct indexed access is correct and efficient since filteredSignals already contains the sorted results from the computed signal.

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.

[chore] improve dev tools

1 participant