Skip to content

Remove serialization from Table<T> and make TaggedValue only store tooling/widget node inputs#4129

Merged
Keavon merged 20 commits intomasterfrom
no-serialized-tables
May 8, 2026
Merged

Remove serialization from Table<T> and make TaggedValue only store tooling/widget node inputs#4129
Keavon merged 20 commits intomasterfrom
no-serialized-tables

Conversation

@Keavon
Copy link
Copy Markdown
Member

@Keavon Keavon commented May 8, 2026

Split commit by commit.

Partly closes #3779.

@Keavon Keavon requested review from TrueDoctor and adamgerhant and removed request for adamgerhant May 8, 2026 12:56
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 35 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the TaggedValue enum and its associated serialization/deserialization logic to move away from storing large, type-erased Table<T> structures in favor of more compact, type-specific variants. It introduces TypeDefault to handle default values for types where the specific variant has been removed, and implements custom migration logic for legacy document formats. I have identified a potential infinite recursion issue in the to_dynany and to_any methods regarding TypeDefault handling, which should be refactored into a shared helper function.

Comment thread node-graph/graph-craft/src/document/value.rs
Keavon added 19 commits May 8, 2026 15:12
…peDefault on load

Documents written before the TypeDefault mechanism existed have empty Table<Vector>/<Raster>/<Graphic>/<Artboard> values baked into every unwired exposed input. Walk each migrated node's inputs and rewrite any such placeholder NodeInput::Value into the equivalent NodeInput::type_default, so re-saved documents shed the placeholder payloads. Marked with a TODO for eventual removal once enough documents have been re-saved.
@Keavon Keavon merged commit cb21e59 into master May 8, 2026
11 checks passed
@Keavon Keavon deleted the no-serialized-tables branch May 8, 2026 23:11
@Keavon
Copy link
Copy Markdown
Member Author

Keavon commented May 8, 2026

22.92 MB -> 22.24 MB Wasm bundle size, nice!

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.

Data trees

1 participant