Tags: apstndb/spannerplan
Tags
refactor: share scalar appendix rendering Summary: - Move scalar appendix section parsing, validation, rendering, and scalar-variable resolution into a shared internal package. - Reuse the shared scalar appendix implementation from both `cmd/rendertree` and `plantree/reference`. - Add public `plantree/reference` appendix controls for section selection, scalar variable display, and direct/recursive scalar variable resolution. - Preserve explicit empty appendix sections in JSON config while keeping omitted/null config on the default predicates appendix. - Relax `treerender` hanging-indent validation so anchor callbacks are required only when wrapping is active. - Add Gemini review style-guide guidance against readability-reducing micro-optimizations and context-free JSON tag suggestions. Validation: - `go test ./...` - `git diff --check origin/main` - GitHub checks `test` and `lint` passed on `7bc984e8f73019800acbcad81b0b0e032e915f28`. - Copilot reviewed current HEAD and generated no new comments. - Gemini reviewed current HEAD and reported no feedback. - No unresolved review threads, unpublished replies, or pending review drafts remained before merge.
feat: expose all parent links Summary: - Add ResolvedParentLink and QueryPlan.ParentLinks(childIndex) to expose every incoming child link for a node. - Preserve existing GetParentNodeByChildIndex last-parent behavior by keeping the single-parent map unchanged. - Store and return ResolvedParentLink values so the returned slice does not expose internal wrapper state. - Add tests for duplicate incoming links, multiple parents, empty/out-of-range lookups, slice isolation, and single-parent compatibility. Validation: - go test -v ./... - git diff --check - GitHub Actions lint/test passed - OpenCode diff review with opencode-go/qwen3.6-plus: no material issues - Copilot current-head review: no new comments - Gemini value-slice feedback addressed and resolved
docs: add browser and wasm embedding guidance
Add official browser and WebAssembly embedding guidance around the serialization-friendly render config API.
- document plantree/reference as the recommended high-level browser renderer entrypoint
- add a small js/wasm syscall/js example that decodes QueryPlan JSON and returns explicit {output}/{error} results
- harden the wasm example with panic recovery, Uint8Array support, strict config decoding, and a non-js/wasm stub
- update README and package docs with build and usage guidance for browser-facing integrations
Closes #29
fix: keep hanging-indent child guides Preserve descendant guide lines on wrapped hanging-indent continuation lines, and keep the renderer tests aligned with stable TrimTrailingSpace behavior. Summary: - keep a child guide in hanging-indent padding when a wrapped node has descendants - add treerender and plantree regression coverage for the connected guide behavior - remove trailing-space-dependent expectations from hanging-indent renderer tests
feat: prefer hanging indent option (#25) Add WithHangingIndent as the preferred public plantree API, keep the older continuation-indent surface as a deprecated compatibility path, and switch reference and rendertree to the new option. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
feat: add structured custom column flag (#24) ## Summary\n- add repeatable --custom-column flags that accept the same YAML/JSON schema as --custom-file\n- deprecate the delimiter-based --custom syntax while keeping it temporarily for compatibility\n- add a repository Gemini style guide to bias reviews toward correctness and CLI behavior over micro-allocation noise
feat: Add reference implementation (#9) Add reference implementation for plantree rendering Implements a reference implementation for rendering Spanner query plans as ASCII tables. ## Features - Main API: `RenderTreeTable(planNodes, mode, format, wrapWidth)` - Three render modes: AUTO, PLAN, PROFILE - Three format styles: TRADITIONAL, CURRENT, COMPACT - Configurable text wrapping - Parse functions for string conversion: `ParseRenderMode`, `ParseFormat` ## Implementation Details - Validates input (empty planNodes, negative wrapWidth) - Optimized predicates rendering with direct strings.Builder writes - Column alignment configuration based on statistics availability - Comprehensive error handling with context - Helper functions for predicates detection and column alignments
PreviousNext