fix(central-ui): Flow Debugger prediction overlay matches by kind and title (arch-review F10)
Claude-Session: https://claude.ai/code/session_01NcMG6xXdsJbmD2wYAgkK29
This commit is contained in:
@@ -410,11 +410,15 @@ public partial class FlowGraphView : ComponentBase
|
||||
|
||||
if (hasPredicted)
|
||||
{
|
||||
// Overlay: match predicted nodes to real steps by kind, in order; the leftovers are ghosts.
|
||||
// Overlay: match predicted nodes to real steps by (kind, title) first, falling back to kind
|
||||
// alone; the leftovers are ghosts. Kind-only matching pairs steps to predicted nodes in
|
||||
// declaration order, which mismatches a method with multiple same-kind calls when only some
|
||||
// of them actually ran (arch-review F10).
|
||||
var unmatched = predicted!.Nodes.ToList();
|
||||
foreach (var s in graph.Steps)
|
||||
{
|
||||
var m = unmatched.FirstOrDefault(p => p.Kind == s.Kind);
|
||||
var m = unmatched.FirstOrDefault(p => p.Kind == s.Kind && string.Equals(p.Title, s.Title, StringComparison.OrdinalIgnoreCase))
|
||||
?? unmatched.FirstOrDefault(p => p.Kind == s.Kind);
|
||||
if (m != null)
|
||||
{
|
||||
unmatched.Remove(m);
|
||||
|
||||
Reference in New Issue
Block a user