Merged
Conversation
Entire-Checkpoint: d1403971e2a9
Entire-Checkpoint: 6fcc37f3f65e
Entire-Checkpoint: 48f7bfda75ed
Entire-Checkpoint: b586effcbc5e
- Mark loop iterations with an explicit isLoopIter flag on Span and
serialize them via that flag rather than parent/child name equality.
Same-name nested spans are no longer mistaken for loop iterations.
- Inline childStepPath into appendChildStepAttrs and drop the stale
attrs capacity hint that no longer matched the recursive walk.
- Collapse the trace renderer width pass and render pass into one walk
that builds a flat traceRenderRow list, removing duplicate connector
and label computation.
- Use lipgloss.Width in the renderer for visible-width math, matching
auth.go and activity_render.go, and drop the local displayWidth
wrapper.
- Rewrite traceStepParent as a clearer for { ... } loop.
Entire-Checkpoint: cf260362883f
Contributor
There was a problem hiding this comment.
Pull request overview
Improves performance trace serialization and rendering so nested spans remain named and readable (instead of collapsing into numeric substeps), while preserving numeric loop-iteration step keys.
Changes:
- Recursively serializes child spans into dotted
steps.*attribute keys, preserving loop iteration numbering and sibling-name disambiguation (~N). - Rebuilds a nested step tree in
entire traceparsing to support arbitrary-depth substeps. - Updates trace rendering to display nested substeps with proper alignment for box-drawing connectors, plus adds/extends unit tests.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
perf/span.go |
Serializes nested spans recursively into dotted steps.* keys; adds loop-iteration marker to preserve numeric iteration keys. |
perf/span_test.go |
Adds coverage for nested-span serialization, loop iteration keys, sibling deduplication, and nested error flags. |
cmd/entire/cli/trace.go |
Parses dotted steps.* keys into an arbitrary-depth tree and renders nested steps with width-aware alignment. |
cmd/entire/cli/trace_test.go |
Adds/extends tests for nested named spans in parsing and rendering. |
Entire-Checkpoint: ad605be45532
Contributor
Author
|
Bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 9f713da. Configure here.
gtrrz-victor
previously approved these changes
Apr 30, 2026
Match the rest of the repo's lipgloss import path. Avoids dragging github.com/charmbracelet/lipgloss back into go.mod and unblocks lint + tests on CI. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
computermode
approved these changes
Apr 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://entire.io/gh/entireio/cli/trails/260
What
Improves perf trace output so nested named spans remain readable instead of being rendered as anonymous numeric substeps.
How
steps.*keys.StartLoop()iteration keys likesteps.process_sessions.0_ms.entire traceand renders arbitrary-depth substeps.~Nsuffix behavior.Verification
mise run buildmise run checkNote
Medium Risk
Changes the serialized shape of perf trace log keys and the CLI reconstruction/rendering logic, which could break trace parsing/consumers or subtly reorder/mis-group steps if assumptions differ.
Overview
Improves perf tracing to preserve arbitrary-depth nested spans instead of collapsing them into anonymous numeric substeps.
On the logging side (
perf/span.go), span serialization is now recursive, emitting dottedsteps.<parent>.<child>_ms(and_err) keys for nested named spans while preserving loop iteration numbering viasteps.<loop>.0_ms,steps.<loop>.1_ms, etc., and keeping the existing~Nsibling de-duplication behavior.On the CLI side (
cmd/entire/cli/trace.go),entire tracenow rebuilds a nested step tree from dotted keys, sorts numeric children numerically, and renders a tree table for any depth with correct column alignment (usinglipgloss.Width). Tests add coverage for nested named spans, nested error flags, duplicate nested sibling names, and deep rendering.Reviewed by Cursor Bugbot for commit 9f713da. Configure here.