Skip to content

feat: Multidimensional array captures now show their shape instead of a flat list - #1906

Merged
hatayama merged 2 commits into
feature/pause-point-round5-integrationfrom
feat/pause-point-array-shape-preview
Jul 21, 2026
Merged

feat: Multidimensional array captures now show their shape instead of a flat list#1906
hatayama merged 2 commits into
feature/pause-point-round5-integrationfrom
feat/pause-point-array-shape-preview

Conversation

@hatayama

@hatayama hatayama commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • A 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

  • Before: a captured 2D board (e.g. 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.
  • After: the same value renders as {"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 a Array.Rank > 1 branch that wraps the existing element-array preview with Shape/TotalElements metadata; the existing element cap and truncation flag behavior are unchanged.
  • Documented the new shape annotation in the pause-point skill's captured-variables.md reference and regenerated the .claude/.agents skill copies.
  • Added tests covering multidimensional, single-dimensional, and jagged array previews.

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.
  • This PR targets the integration branch, so repository CI workflows are not expected to trigger (as with the prior PRs in this series); verification here is the local compile/test run above.

Review in cubic

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.
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@hatayama, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 38 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0a22e90c-31b6-4a06-b8cc-f86b44460d14

📥 Commits

Reviewing files that changed from the base of the PR and between 2b68047 and d3c5ec3.

📒 Files selected for processing (5)
  • .agents/skills/uloop-pause-point/references/captured-variables.md
  • .claude/skills/uloop-pause-point/references/captured-variables.md
  • Assets/Tests/Editor/SourcePausePointCapture/SourcePausePointVariableFormatterTests.cs
  • Packages/src/Editor/CliOnlyTools~/PausePoint/Skill/references/captured-variables.md
  • Packages/src/Editor/FirstPartyTools/PausePoint/SourcePausePointCollectionPreviewSerializer.cs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/pause-point-array-shape-preview

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.
@hatayama
hatayama merged commit c86bb70 into feature/pause-point-round5-integration Jul 21, 2026
@hatayama
hatayama deleted the feat/pause-point-array-shape-preview branch July 21, 2026 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant