Skip to content

fix(signals): reset a stale kind filter and forget picks of closed pages - #291

Merged
erkamyaman merged 4 commits into
mainfrom
signals/kind-filter-reset
Oct 11, 2026
Merged

erkamyaman merged 4 commits into
mainfrom
signals/kind-filter-reset

Conversation

@erkamyaman

@erkamyaman erkamyaman commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

What and why

  • A kind filter chosen on one graph stayed active after picking a component without that kind. The chips only list kinds in the current graph, so the list said "No signals match" with no pressed chip. The kind filter is now a linkedSignal on the graph owner: it keeps the choice when the new graph has that kind, otherwise it goes back to All. An active kind with no matches in the same graph renders as a pressed chip with a count of 0.
  • pickedByPage only grew over a session. It now drops entries for pages that leave the signal graph state.
  • Docs: the Signals page's "Node cards" section describes both chip behaviours.

How it was verified

  • pnpm format:check
  • pnpm typecheck
  • pnpm test:panel (246 passed; 4 new tests, 3 fail without the fix)
  • pnpm test:devtools (1508 passed)
  • pnpm docs:build
  • pnpm extension:build and committed extension/ui
  • axe on every panel view, dark and light (28 views, 0 violations)
  • Signals tab at 360px with a chip pressed: no overflow, no axe violations
  • pnpm commit:check

Screenshots

None attached.

Notes for reviewers

  • PR fix(ui): keep focus on the filter box after Clear filters #278 also edits app/src/pages/signal-inspector.ts (Escape and clear focus). This change stays in the kind signal, the chip loop and notePageGone, so any conflict should be small.
  • Picks are removed only for pages that were in the previous page map and are gone from the new one, so a pick made before a page's first graph arrives is kept.

Summary by CodeRabbit

  • Bug Fixes
    • When switching components or injectors, the kind filter now resets to All if the new selection has no matching nodes.
    • If matching nodes disappear from the current selection, the active kind remains selected with a count of 0, and the no-matches message is shown.
    • Closing a page now clears its saved component selection.
  • Documentation
    • Clarified how kind filters behave when selections change or matching nodes disappear.

A kind chosen on one graph stayed active after picking a component that
has no node of that kind. The chips only list kinds in the current
graph, so the list said "No signals match" with no pressed chip and no
visible cause. The kind filter is now a linkedSignal on the graph owner:
it keeps the choice when the new graph has that kind and goes back to
All otherwise. An active kind with no matches in the same graph still
renders as a pressed chip with a count of 0.

pickedByPage only grew. It now drops the entries of pages that leave
the signal graph state, so a long session does not keep picks for
closed tabs.
@github-actions github-actions Bot added area: panel The devtools panel app (app/) area: extension The Chrome extension area: docs The documentation site labels Oct 11, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Failed ❌

View logs ↗
994ff0a 2026-10-11T05:41:04.365Z View logs ↗
  • Build: Failed ❌

View logs ↗
e5956f6 2026-10-11T05:35:54.767Z View logs ↗
  • Build: Failed ❌

View logs ↗
0fb5a98 2026-10-11T03:28:22.935Z View logs ↗

@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f306d79d-81d3-4d0c-8e3a-7cedc21af29a

📥 Commits

Reviewing files that changed from the base of the PR and between 0fb5a98 and e5956f6.


⛔ Files ignored due to path filters (1)
  • extension/ui/assets/index-ArURljXw.js is excluded by !**/assets/index-[0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-].js

📒 Files selected for processing (3)
  • app/src/pages/signal-inspector.ts
  • extension/ui/assets/browser-agent-rpc-BXhoSh1z-WN-bdD9U.js
  • extension/ui/index.html

 _________________________________________________
< SNAFU: Situation Normal, All Faults Understood. >
 -------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 62f2d010-9018-464f-8f31-cba58c9a3a81


📥 Commits

Reviewing files that changed from the base of the PR and between 58273c6 and 0fb5a98.



⛔ Files ignored due to path filters (1)
  • extension/ui/assets/index-DhT-nDqh.js is excluded by !**/assets/index-[0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-].js


📒 Files selected for processing (5)
  • app/src/__tests__/signal-inspector.test.ts
  • app/src/pages/signal-inspector.ts
  • apps/docs/src/content/inspectors/signals.md
  • extension/ui/assets/browser-agent-rpc-BXhoSh1z-vUsF80GK.js
  • extension/ui/index.html


Limit details: You’ve used all 10 included reviews currently available.




📝 Walkthrough
📝 Walkthrough

Walkthrough

Signal Inspector now handles missing page maps and updates component selections and kind filters as graph state changes. Tests and documentation cover these behaviors. The extension UI entry point and browser-agent RPC bridge reference an updated JavaScript asset.

Changes

Signal Inspector state

Layer / File(s) Summary
Graph page fallback and selection cleanup
app/src/pages/signal-inspector.ts, app/src/__tests__/signal-inspector.test.ts
A shared helper falls back to the current graph when the page map is empty. Graph updates use the fallback when checking removed pages and clean up selections for removed pages. A test covers restoring a page after it closes.
Kind filter state and rendering
app/src/pages/signal-inspector.ts, app/src/__tests__/signal-inspector.test.ts, apps/docs/src/content/inspectors/signals.md
The selected kind persists when the new graph has that kind and resets otherwise. If the selected kind has no current matches, its chip remains active with a count of zero. Tests and documentation describe these states.

Extension UI bundle references

Layer / File(s) Summary
Updated JavaScript asset references
extension/ui/index.html, extension/ui/assets/browser-agent-rpc-BXhoSh1z-vUsF80GK.js
The module script and browser-agent RPC import now reference index-DhT-nDqh.js.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Bug fix



Merge Risk: ⚪ Minimal · up to 0fb5a

The changed page-selection, kind-filter, and extension asset behavior is ready to merge after normal checks.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 0fb5a

The changes adjust page-local selection and filtering without an observed increase in access or permissions. Legacy page-identity and failure-handling edge cases remain incompletely verified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The demonstrated change is confined to inspector presentation and local selections for graph pages exposed through the existing devtools connection. The reviewed source does not establish increased RPC authority or a new cross-service attack path.

Trust Boundaries and Controls

  • observed — Graph data still enters through the existing pangular shared-state channel. User selection reaches the unchanged handler, which normalizes component and environment strings before broadcasting the selection request. The PR neither adds this sink nor changes that control.

Resilience and Maintainability Implications

  • inferred — Overlapping graph loads could apply stale completions because loading has no generation guard, but that behavior predates the PR. The inspected application sets its RPC client once during initialization, so a new production overlap path was not established. Successful loads check destruction before application and register subscription cleanup.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 3 files. (2 skipped: 2… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes both main changes: resetting stale kind filters and removing picks for closed pages.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.


Full details: Docstring Coverage

Explanation

Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 3 files. (2 skipped: 2 unsupported.)




  • Fix all pre-merge checks with AI
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR



🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

…-reset

# Conflicts:
#	app/src/pages/signal-inspector.ts
#	extension/ui/assets/browser-agent-rpc-BXhoSh1z-CFmADKyK.js
#	extension/ui/assets/browser-agent-rpc-BXhoSh1z-CQUbrXfP.js
#	extension/ui/assets/browser-agent-rpc-BXhoSh1z-vUsF80GK.js
#	extension/ui/assets/index-CgvJVwtz.js
#	extension/ui/assets/index-DhT-nDqh.js
#	extension/ui/assets/index-RHlVGXjX.js
#	extension/ui/index.html
The merge with main changed the panel, so the committed bundle is rebuilt to match.
…-reset

# Conflicts:
#	extension/ui/assets/browser-agent-rpc-BXhoSh1z-CFmADKyK.js
#	extension/ui/assets/browser-agent-rpc-BXhoSh1z-WN-bdD9U.js
#	extension/ui/assets/browser-agent-rpc-BXhoSh1z-m2f3iI1o.js
#	extension/ui/assets/index-ArURljXw.js
#	extension/ui/assets/index-DXC3boOi.js
#	extension/ui/assets/index-RHlVGXjX.js
#	extension/ui/index.html
@erkamyaman
erkamyaman merged commit d99cebf into main Oct 11, 2026
5 of 6 checks passed
@erkamyaman
erkamyaman deleted the signals/kind-filter-reset branch October 11, 2026 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: docs The documentation site area: extension The Chrome extension area: panel The devtools panel app (app/)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant