diff --git a/FIX_PROPOSAL.md b/FIX_PROPOSAL.md new file mode 100644 index 0000000..589c1d1 --- /dev/null +++ b/FIX_PROPOSAL.md @@ -0,0 +1,33 @@ +To fix the issue, we need to modify the `CallStackPanel` component to handle `presentationHint: "label"` rows differently. We should prevent these rows from being clickable and selectable. Here's the exact code fix: + +```tsx +// /src/components/debugger/CallStackPanel.tsx + +// ... + +const isLabel = () => props.frame.presentationHint === "label"; + +// ... + +return ( +
+ {/* render label-style text for presentationHint: "label" rows */} + {isLabel() ? ( + {props.frame.name} + ) : ( + // render normal frame content + {props.frame.name} + )} +
+); + +// ... +``` + +In this code, we've added a conditional statement to the `onClick` and `onDblClick` event handlers. If the row is a label row (`isLabel()` returns `true`), we set the event handlers to `undefined`, effectively preventing the row from being clickable and selectable. We've also added a conditional statement to render label-style text for `presentationHint: "label"` rows. + +With this fix, `presentationHint: "label"` rows will be rendered as visual labels/separator rows and will not behave like normal selectable/navigable frames. \ No newline at end of file