()
| 623 | } |
| 624 | |
| 625 | func (m *harness) renderDebugDetail() { |
| 626 | e, ok := debug.FindByID(m.debugSelected) |
| 627 | if !ok { |
| 628 | m.debugView.SetContent(Dimmed(fmt.Sprintf("(event #%d is not in the ring anymore)", m.debugSelected))) |
| 629 | return |
| 630 | } |
| 631 | body := e.Payload |
| 632 | if body == "" { |
| 633 | body = Dimmed("(no payload for this event)") |
| 634 | m.debugView.SetContent(body) |
| 635 | m.debugView.GotoTop() |
| 636 | return |
| 637 | } |
| 638 | // Syntax-highlight JSON payloads and wrap long lines to the viewport |
| 639 | // width so values, URLs, and no-break tool output snap into the modal |
| 640 | // instead of spilling off the right edge. The modal's title bar is |
| 641 | // rendered by viewDebugModal itself — viewport content is only the |
| 642 | // payload. |
| 643 | m.debugView.SetContent(HighlightPayload(body, m.debugView.Width)) |
| 644 | m.debugView.GotoTop() |
| 645 | } |
| 646 | |
| 647 | // toggleDebugFocus flips focus between the input box and the debug panel. |
| 648 | // On the first focus, picks the latest event as the selection so ↑/↓ has a |
no test coverage detected