Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions FIX_PROPOSAL.md
Original file line number Diff line number Diff line change
@@ -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 (
<div
className={`call-stack-row ${isLabel() ? 'label' : ''}`}
onClick={isLabel() ? undefined : props.onSelect}
onDblClick={isLabel() ? undefined : props.onNavigate}
>
{/* render label-style text for presentationHint: "label" rows */}
{isLabel() ? (
<span className="label-text">{props.frame.name}</span>
) : (
// render normal frame content
<span>{props.frame.name}</span>
)}
</div>
);

// ...
```

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.
Comment on lines +1 to +33
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Blocking: this PR currently documents a fix but does not implement it.

FIX_PROPOSAL.md only describes a change; it does not modify /src/components/debugger/CallStackPanel.tsx (or tests) in the provided patch, so the bug behavior will remain unchanged after merge. Please include the actual TSX code change and corresponding test updates in this PR.

🧰 Tools
🪛 LanguageTool

[style] ~1-~1: Consider using a different verb for a more formal wording.
Context: To fix the issue, we need to modify the `CallS...

(FIX_RESOLVE)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@FIX_PROPOSAL.md` around lines 1 - 33, The PR only documents the change;
implement it in the CallStackPanel component by adding an isLabel helper that
checks props.frame.presentationHint === "label", use it to add a "label" CSS
class and render label-style text (e.g., span with class "label-text") when
true, and conditionally set onClick and onDblClick to undefined for label rows
so props.onSelect and props.onNavigate are not invoked; update or add tests for
CallStackPanel to assert that rows with presentationHint "label" are not
selectable/navigable and render the label-text styling.