Repository navigation
fix(cli): preserve nested table values - #86
ThomasRooney wants to merge 5 commits into
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 11 files
Shadow auto-approve: would not auto-approve because issues were found.
View guided diff | Turn on auto-fix | Re-trigger cubic
There was a problem hiding this comment.
0 issues found across 6 files (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Shadow auto-approve: would auto-approve. Focused, well-tested renderer fix restores previously omitted nested struct/map/array fields in single-object and streaming table output as compact JSON, with wire-name and custom-marshaler handling preserved; machine-format output and existing section columns remain unchanged.
View guided diff | Turn on auto-fix | Re-trigger cubic
2ynn
left a comment
There was a problem hiding this comment.
Reviewed; no blocking findings.
|
Issues;
Minor:
|
The first three are legitimate issues with actual generated types, although all three predate PR #86:
|
|
Addressed in
The generated Validation: 651 review tests passed (2 skipped), all 1,705 primary tests passed, and product validation, output comparisons, formatting, template checks, and lint passed. The full suites used isolated mock ports after shared-port mock failures. |
There was a problem hiding this comment.
All reported issues were addressed across 11 files (changes from recent commits).
Shadow auto-approve: would not auto-approve because issues were found.
View guided diff | Turn on auto-fix | Re-trigger cubic
There was a problem hiding this comment.
0 issues found across 7 files (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Shadow auto-approve: would auto-approve. Focused, well-tested table renderer fix restores previously omitted nested struct/map/array values in single-object and section output as compact JSON cells with wire names and custom marshalers preserved; machine formats stay unchanged and nil-section (empty) display is intentionally retained.
View guided diff | Turn on auto-fix | Re-trigger cubic
Render complex single-object fields as JSON and append indexed details below section tables while retaining their scalar columns. Complex list wrappers also gain details, including pagination without a results path. Direct arrays and declared-results aggregation retain their existing output.
Verify compact JSON data cells for streamed union events and document the per-item pretty fallback and single-result error behavior.
Use custom JSON wire values for single-object scalar cells, including pointer-receiver values in interface arrays. Preserve timestamp and direct-list formatting.
9c9dba4 to
5c7b42c
Compare
Why
Single-object table output omitted nested objects and maps. Arrays rendered as sections could show a row's scalar fields while dropping its nested payload.
What changed
Single objects render as
FIELD/VALUEtables with JSON field names. Nested objects and maps occupy compact JSON cells. Arrays of objects render as titled tables with one row per entry, including columns for nested payloads.Root custom marshalers define the displayed fields, including flattened additional properties. Section columns come from each row's JSON representation, preserving custom marshalers and generated union wire shapes without exposing internal discriminator fields. Columns introduced by later rows are included, omitted fields have blank cells, and nested arrays use compact JSON. Top-level primitive arrays retain comma-separated cells. This also applies to list wrappers and whole-page pagination without a declared results path. Direct array tables and declared-results aggregation retain their existing columns, with control characters now escaped in row cells. Map keys and values also escape control characters.
Single-object tables exclude JSON-hidden storage fields, escape control characters, and preserve exact JSON numbers. Custom-serialized strings, including dates, display without JSON quotes. Serialization errors include object, field, or row context and do not emit a partial single-result table. Streaming uses the same layout for each event. JSON, YAML, TOON, and pretty output are unchanged.
The change includes renderer regressions, runtime coverage using generated union models, regenerated review output, documentation, and a patch changeset.
Example
For this single-object response:
{ "id": "widget-1", "metadata": {"owner": "demo"}, "entries": [ {"kind": "note", "payload": {"text": "hello"}} ] }Before,
--output-format tableomitted the metadata and the entry's payload:After:
The nested payload stays in the entry's row, under
PAYLOAD. Both outputs were captured from the renderer using the same synthetic typed response.Testing
2d69199b: 651 review tests passed with 2 skips; all 1,705 primary tests passed.BaseUserbefore/after regression, and regenerated CLI checks/output comparisons.Metadata,Vehicle, andDatereproductions fail before the fix and pass afterward.git diff --checkpassed.Public-safety check
git diff --check.