fix: trace indentation in info view (#6597)

This PR fixes the indentation of nested traces nodes in the info view.


![image](https://github.com/user-attachments/assets/c13ac2a2-e994-4900-9201-0d86889f6a1b)

Fixes #6389
This commit is contained in:
Sebastian Ullrich 2025-01-13 11:36:01 +01:00 committed by GitHub
parent 2421f7f799
commit 5f41cc71ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -207,7 +207,9 @@ partial def msgToInteractive (msgData : MessageData) (hasWidgets : Bool) (indent
| .widget wi alt =>
return .tag (.widget wi (← fmtToTT alt col)) default
| .trace cls msg collapsed children => do
let col := col + tt.stripTags.length - 2
-- absolute column = request-level indentation (e.g. from nested lazy trace request) +
-- offset inside `fmt`
let col := indent + col
let children ←
match children with
| .lazy children => pure <| .lazy ⟨{indent := col+2, children := children.map .mk}⟩