feat: add event detail inspector panel - #66
Conversation
Signed-off-by: atharrva01 <atharvaborade568@gmail.com>
|
hi @ashu8912 I've fixed both! swapped the hardcoded dark color with
also cleaned up a few extra things i noticed , ripped out |
There was a problem hiding this comment.
Pull request overview
Adds an “event detail inspector” side panel to improve trace/event usability by letting users drill into all fields for a selected table row, including nested fields.
Changes:
- Attach raw event payloads to buffered rows to support a full-detail inspector view.
- Add an inspect (magnifying glass) action column + overlay panel wiring, plus an event count chip above the table.
- Introduce
EventDetailPanelcomponent with formatted (flattened) view, raw JSON toggle, copy-to-clipboard, and Escape/backdrop close behavior.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| src/gadgets/utility.tsx | Attaches raw event payload (__raw) to each buffered row for inspector use. |
| src/common/GadgetWithDataSource/index.tsx | Adds inspect action column, overlay/panel mounting, body scroll locking, and an “N events” chip. |
| src/common/EventDetailPanel/index.tsx | New inspector panel UI: flatten nested fields, show raw JSON, copy, close actions. |
| package.json | Updates build script to write dist/package.json; removes react-json-pretty. |
| package-lock.json | Lockfile updates consistent with dependency/script changes and version bump. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // keep raw event for the detail inspector | ||
| massagedData.__raw = data; | ||
| setBufferedGadgetData(prevData => { | ||
| const newData = [...(prevData[dsID] || []), massagedData]; | ||
| return { |
There was a problem hiding this comment.
massagedData.__raw = data stores the full raw event object on every buffered row (up to MAX_DATA_LIMIT). For high-volume traces this can significantly increase memory usage and slow down rendering/GC. Consider storing a pruned/raw-string representation (e.g., __rawJson), storing raw only for the last N rows, or making raw attachment conditional on the inspector being enabled.
|
hey @ashu8912 @illume , pushed a fix commit addressing the Copilot suggestions that actually mattered,
skipped the __raw memory concern for now, at MAX_DATA_LIMIT it's a known trade-off and i'd rather not over-engineer it at this stage. happy to revisit if it's a blocker. lmk if anything else needs a look! |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
src/gadgets/utility.tsx:143
- Storing the full raw event object on every buffered row (
massagedData.__raw = data) can significantly increase memory usage and UI cost, especially withMAX_DATA_LIMITset to 20000. Consider a lighter approach (e.g., storing only a JSON string, storing only a subset of raw fields, reducing the limit when__rawis present, or keeping raw events in a separate bounded store keyed by row id).
// keep raw event for the detail inspector
massagedData.__raw = data;
setBufferedGadgetData(prevData => {
const newData = [...(prevData[dsID] || []), massagedData];
return {
...prevData,
[dsID]: newData.slice(-MAX_DATA_LIMIT),
};
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.




was doing a gap analysis between ig-desktop and the plugin. one thing that stood out , ig-desktop lets you click any row and inspect all its fields. plugin had nothing like that. if you're running
trace_execwith 15+ columns you literally can't drill into a single event.built the inspector panel for this.
magnifying glass on any row → side panel with all event fields. header shows event details +
proc.commsubtitle, formatted/raw JSON toggle, copy button, close on backdrop click. also added event count chip in the toolbar.side note, nested fields like
k8s.ownerwere showing[object Object]. fixed that too with a recursive flatten.files:
utility.tsx- attaches__rawto each rowGadgetWithDataSource/index.tsx- icon column, overlay, count chipEventDetailPanel/index.tsx- new componentheads up on impl: MUI
<Drawer>silently fails here,.MuiDrawer-papernever mounts in Headlamp's bundled MUI. debugged to the DOM level, ended up using a plainposition: fixeddiv instead.screenshots + recording 👇
Before :-
After :-
hp-feature.mp4