Add components tree as filter to global callback traces#945
Merged
Conversation
…ee-as-filter-to-global-callback-traces
There was a problem hiding this comment.
Pull request overview
Adds a “components tree” filter to Global Callback Traces so users can include/exclude traces from specific LiveViews/LiveComponents, and wires that filter through to both historical trace fetching and live trace streaming.
Changes:
- Add components selection to callback trace filters (UI + filters helper) and render a selectable components tree in the global filters form.
- Extend traces storage querying to support filtering by selected component IDs.
- Add tests for components filtering and introduce a new Global Traces e2e spec.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
lib/live_debugger/app/debugger/callback_tracing/web/live_components/filters_form.ex |
Renders components tree filter and loads tree asynchronously for global traces. |
lib/live_debugger/app/debugger/components_tree/web/components.ex |
Adds recursive filters_tree_node component to render tree checkboxes. |
lib/live_debugger/app/debugger/callback_tracing/web/helpers/filters.ex |
Adds components defaults + helpers to encode IDs and extract active components. |
lib/live_debugger/api/traces_storage.ex |
Adds :components option and builds ETS match specs to filter by pid/cid. |
lib/live_debugger/app/debugger/callback_tracing/web/hooks/filter_new_traces.ex |
Filters incoming trace events by selected components in Global Traces. |
lib/live_debugger/app/debugger/callback_tracing/web/hooks/existing_traces.ex |
Passes active components into historical traces query. |
lib/live_debugger/app/debugger/callback_tracing/web/hook_components/load_more_button.ex |
Passes active components into “load more” query. |
lib/live_debugger/app/debugger/callback_tracing/web/global_traces_live.ex |
Triggers filters form refresh on component create/delete events. |
lib/live_debugger/app/debugger/callback_tracing/web/hook_components/filters_sidebar.ex |
Plumbs lv_process into sidebar filters form. |
lib/live_debugger/app/debugger/callback_tracing/web/hook_components/filters_fullscreen.ex |
Minor alias/comment adjustments. |
lib/live_debugger/app/debugger/callback_tracing/web/components/filters.ex |
Small layout tweak to group header wrapper. |
test/app/debugger/callback_tracing/web/helpers/filters_test.exs |
Adds tests for active components and components-aware filter counting/group checks. |
test/api/traces_storage_test.exs |
Adds tests for component-based filtering in TracesStorage.get!/2. |
e2e/tests/global_traces.spec.ts |
Adds new Playwright spec for global traces behaviors (currently has compile/locator issues). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
test/app/debugger/callback_tracing/web/helpers/filters_test.exs
Outdated
Show resolved
Hide resolved
lib/live_debugger/app/debugger/callback_tracing/web/live_components/filters_form.ex
Outdated
Show resolved
Hide resolved
lib/live_debugger/app/debugger/callback_tracing/web/live_components/filters_form.ex
Outdated
Show resolved
Hide resolved
lib/live_debugger/app/debugger/callback_tracing/web/hooks/filter_new_traces.ex
Outdated
Show resolved
Hide resolved
lib/live_debugger/app/debugger/callback_tracing/web/live_components/filters_form.ex
Outdated
Show resolved
Hide resolved
kraleppa
reviewed
Mar 11, 2026
lib/live_debugger/app/debugger/callback_tracing/web/helpers/filters.ex
Outdated
Show resolved
Hide resolved
lib/live_debugger/app/debugger/callback_tracing/web/helpers/filters.ex
Outdated
Show resolved
Hide resolved
kraleppa
reviewed
Mar 12, 2026
lib/live_debugger/app/debugger/callback_tracing/web/live_components/filters_form.ex
Outdated
Show resolved
Hide resolved
lib/live_debugger/app/debugger/callback_tracing/web/live_components/filters_form.ex
Outdated
Show resolved
Hide resolved
hhubert6
reviewed
Mar 12, 2026
Contributor
hhubert6
left a comment
There was a problem hiding this comment.
I don't know why but traces in global traces are being updated despite being stopped.
Nagranie.z.ekranu.2026-03-12.o.13.23.55.mov
lib/live_debugger/app/debugger/callback_tracing/web/global_traces_live.ex
Outdated
Show resolved
Hide resolved
hhubert6
approved these changes
Mar 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


No description provided.