feat: Multidimensional array captures now show their shape instead of a flat list - #1906
Conversation
Array.GetEnumerator() flattens every rank in row-major order with no
dimension info, so a T[,] capture previewed as a flat list indistinguishable
from an empty or truncated 1D collection. Multidimensional arrays now
preview as {"Shape":"Int32[2,3]","TotalElements":6,"Elements":[...]} while
1D and jagged arrays are unaffected (Rank == 1). Documented the new shape
in captured-variables.md and regenerated the .claude/.agents skill copies.
|
Warning Review limit reached
Next review available in: 38 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Array.GetType().GetElementType() is never null for an actual array instance, so the "?? \"object\"" fallback guarded a scenario that cannot occur. Addressed per advisor review nit on PR #1906.
Summary
T[,]/T[,,]field or local captured at a pause point now previews with its rank and dimensions, instead of a flat list you couldn't tell apart from an empty or truncated collection.User Impact
int[2,3]) rendered as a bare[1,2,3,4,5,6]— no way to tell whether it was a 1D array, a truncated preview, or a multidimensional array flattened in row-major order.{"Shape":"Int32[2,3]","TotalElements":6,"Elements":[1,2,3,4,5,6]}, so the shape and true element count are visible directly in the preview. Plain 1D arrays and jagged arrays are unaffected.Changes
SourcePausePointCollectionPreviewSerializer: added aArray.Rank > 1branch that wraps the existing element-array preview withShape/TotalElementsmetadata; the existing element cap and truncation flag behavior are unchanged.captured-variables.mdreference and regenerated the.claude/.agentsskill copies.Verification
dist/darwin-arm64/uloop compile --project-path .— 0 errors, 0 warnings.dist/darwin-arm64/uloop run-tests --project-path . --filter-type regex --filter-value "SourcePausePointVariableFormatterTests" --test-mode EditMode— 35/35 passed.