Commit Graph

7 Commits

Author SHA1 Message Date
Austin Mroz
3187694a31 Simplify proxy handler code 2025-09-15 17:57:47 -05:00
Austin Mroz
9b6611dd20 Move schema to dedicated file, remove cast 2025-09-15 16:35:25 -05:00
Austin Mroz
ccc8d6e441 serialize to string at proxyWidgets boundry
While node.properties function with anything serializeable, the format
for proxyWidgets is not a valid option for type. After great
consideration, all access to and from this value goes through a JSON
serialization and parsing always includes a zod validation step.

This is sturdier to outside misuse, has even lower risk of custom node
breakage, and means that there's now proper type checking at the
boundries of interaction.

Performance was a major concern against this, but the path is quite
cold. I estimate the value of optimization here to be 3-4 orders of
magnitude less important than anything occuring during the draw loop
(like access to proxyWidget elements)
2025-09-15 15:44:15 -05:00
Austin Mroz
166cdc385c Fix type checking on ProxyWidget implementation 2025-09-13 13:05:27 -05:00
Austin Mroz
ed2cc26cff Implement a DisconnectedWidget, refactor to use 2025-09-13 10:33:31 -05:00
Austin Mroz
073175a719 Fix typechecking and linting
Note: the proxywidget code is still marked as ignored. This will require
further careful review in the future.
2025-09-12 13:19:47 -05:00
Austin Mroz
ec06e28af7 Pull proxyWidget code out of SubgraphNode
This was needed from an organizational standpoint. For now, it requires
an ugly setTimeout to prevent proxyWidgets from being clobbered during
initialization, but this will be cleaned up later.

This also allows for the proxy widget code to have type checks ignored.
I fully intend to find a functional solution here, but this provides a
migration path where typechecking can be enabled for the rest of the PR
first

Also cleans up type checking on graph change in scripts/app.ts
2025-09-12 09:42:08 -05:00