Skip to content

Add components tree as filter to global callback traces#945

Merged
srzeszut merged 27 commits intomainfrom
771-add-components-tree-as-filter-to-global-callback-traces
Mar 13, 2026
Merged

Add components tree as filter to global callback traces#945
srzeszut merged 27 commits intomainfrom
771-add-components-tree-as-filter-to-global-callback-traces

Conversation

@srzeszut
Copy link
Contributor

@srzeszut srzeszut commented Mar 6, 2026

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@srzeszut srzeszut marked this pull request as ready for review March 9, 2026 11:29
@srzeszut srzeszut requested review from hhubert6 and kraleppa March 9, 2026 11:29
Copy link
Member

@kraleppa kraleppa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a UI issue with longer names of LiveComponents, that is not present in the original tree

Image Image

@srzeszut srzeszut requested a review from kraleppa March 12, 2026 10:28
Copy link
Contributor

@hhubert6 hhubert6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@srzeszut srzeszut requested a review from hhubert6 March 12, 2026 13:55
Copy link
Member

@kraleppa kraleppa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 🦈

@srzeszut srzeszut merged commit 48eed62 into main Mar 13, 2026
4 checks passed
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.

Add components tree as filter to global callback traces

4 participants