Feature: Open callback implementation in editor#959
Merged
srzeszut merged 18 commits intoApr 3, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds “Open in editor” support for callback traces by resolving a trace’s source file/line from BEAM debug info and wiring UI buttons to invoke the configured editor command.
Changes:
- Introduces
LiveDebugger.Utils.FunctionMatcherto resolve the matching function clause and return a%SourceLocation{}. - Persists resolved source locations onto function traces and exposes an “open in editor” button across trace views (inline + fullscreen).
- Refactors editor-opening logic into
Editor.open_in_editor/4, adds JS tooltip behavior to hide on scroll, and expands tests.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test/utils/function_matcher_test.exs | Adds tests for clause/guard matching and source resolution. |
| test/app/debugger/utils/editor_test.exs | Adds tests for editor command success/failure flash behavior. |
| lib/live_debugger/utils/function_matcher.ex | Implements clause matching + source location extraction from debug info. |
| lib/live_debugger/structs/trace/function_trace.ex | Adds SourceLocation struct and :source field to traces. |
| lib/live_debugger/app/debugger/web/live_components/node_basic_info.ex | Switches “open in editor” handling to Editor.open_in_editor/4 and centralizes docs URL. |
| lib/live_debugger/app/debugger/utils/editor.ex | Adds docs URL helper + async open-in-editor with flash-on-error. |
| lib/live_debugger/app/debugger/callback_tracing/web/node_traces_live.ex | Passes editor config through trace components. |
| lib/live_debugger/app/debugger/callback_tracing/web/hook_components/trace_wrapper.ex | Adds open-in-editor event handling and source resolution/persistence when expanding traces. |
| lib/live_debugger/app/debugger/callback_tracing/web/global_traces_live.ex | Passes editor config through trace components. |
| lib/live_debugger/app/debugger/callback_tracing/web/components/trace.ex | Adds “open in editor” UI button in multiple trace layouts. |
| lib/live_debugger/app/debugger/callback_tracing/structs/trace_display.ex | Surfaces trace source location into display struct. |
| dev/live_views/main.ex | Adds a guarded clause to support guard-matching test coverage. |
| assets/app/hooks/tooltip.js | Hides tooltip on scroll via a window scroll listener. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
srzeszut
commented
Mar 26, 2026
srzeszut
commented
Mar 27, 2026
…e-callback-is-implemented-in-callback-traces merge origin
…e-callback-is-implemented-in-callback-traces
hhubert6
reviewed
Mar 31, 2026
…e-callback-is-implemented-in-callback-traces
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.