Skip to content

Conversation

@Kyle-Ye
Copy link
Collaborator

@Kyle-Ye Kyle-Ye commented Dec 28, 2025

No description provided.

@Kyle-Ye Kyle-Ye changed the title Implement CustomRecursiveStringConvertible [Feature] Implement CustomRecursiveStringConvertible Dec 28, 2025
@augmentcode
Copy link

augmentcode bot commented Dec 28, 2025

🤖 Augment PR Summary

Summary: This PR introduces a package-scoped, SwiftUI-style “recursive description” facility to produce stable, XML-like debug output for view/graph structures.

Changes:

  • Added CustomRecursiveStringConvertible and helpers to render a tree of objects into an indented, escaped string representation.
  • Implemented attribute rounding (1/256 quantization) plus tuple parsing to normalize numeric outputs for snapshot-style comparisons.
  • Added color-name detection for common quantized RGBA tuples and a Color.Resolved.name convenience.
  • Introduced DefaultDescriptionAttribute to centrally control which attributes appear by default, based on _TestApp intents.
  • Updated test app environment initialization to use configureEmptyEnvironment.
  • Added comprehensive unit tests covering recursive formatting, escaping, rounding, tuple parsing, and color naming.
  • Updated .gitignore to ignore /.augments.

Technical Notes: Output is deterministic via attribute sorting and escaping; “rounded” mode normalizes floating-point noise to improve test stability.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

.joined(separator: "_")
.escapeXML()
let mark = "\(indentString)<\(escapedName)\(attributeString)"
if descriptionChildren.isEmpty {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The decision to emit a self-closing tag is based on descriptionChildren.isEmpty before filtering hideFromDescription; if all children are hidden you’ll currently emit an open/close pair with no body. Consider basing this on the set of visible children to avoid surprising output differences in that edge case.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

@codecov
Copy link

codecov bot commented Dec 28, 2025

Codecov Report

❌ Patch coverage is 80.69307% with 39 lines in your changes missing coverage. Please review.
✅ Project coverage is 14.25%. Comparing base (51197b7) to head (c643000).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
...SwiftUICore/Util/DefaultDescriptionAttribute.swift 0.00% 24 Missing ⚠️
...UICore/Util/CustomRecursiveStringConvertible.swift 93.06% 12 Missing ⚠️
Sources/OpenSwiftUICore/Util/CoreGlue.swift 0.00% 2 Missing ⚠️
Sources/OpenSwiftUICore/Test/TestApp.swift 0.00% 1 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (51197b7) and HEAD (c643000). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (51197b7) HEAD (c643000)
2 1
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #687       +/-   ##
===========================================
- Coverage   28.45%   14.25%   -14.20%     
===========================================
  Files         586      562       -24     
  Lines       35504    33064     -2440     
===========================================
- Hits        10101     4712     -5389     
- Misses      25403    28352     +2949     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Kyle-Ye Kyle-Ye merged commit c280be1 into main Dec 28, 2025
8 of 11 checks passed
@Kyle-Ye Kyle-Ye deleted the feature/CustomRecursiveStringConvertible branch December 28, 2025 16:27
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.

2 participants