Skip to content

Conversation

AustinMroz
Copy link
Collaborator

@AustinMroz AustinMroz commented Sep 23, 2025

NodeId, NodeExecutionId, and NodeLocatorId can all be strings. NodeId, LinkId, and RerouteId can all be numbers. As a result, Typescript will freely allow these values to be cast between one another.

To force these types to be mutually incompatible, they are defined as being extended from "number" and "string" with an additional optional type property. Actually extending primitives is a bad idea. Simply declaring types as extending primitives feels a little ick. Feedback on if such a change should actually be merged, or simply used as a temporary change for testing is appreciated.

Throughout the entire code base, only 1 actual issue was found, which was far fewer than expected: Left clicking on the center dot of a link prior to a reroute will only delete one link instead of all grouped links
reroute-link-deletion

┆Issue is synchronized with this Notion page by Unito

Copy link

github-actions bot commented Sep 23, 2025

🎭 Playwright Test Results

⚠️ Tests passed with flaky tests

⏰ Completed at: 09/23/2025, 11:56:47 PM UTC

📈 Summary

  • Total Tests: 460
  • Passed: 430 ✅
  • Failed: 0
  • Flaky: 1 ⚠️
  • Skipped: 29 ⏭️

📊 Test Reports by Browser

  • chromium: View Report • ✅ 423 / ❌ 0 / ⚠️ 1 / ⏭️ 29
  • chromium-2x: View Report • ✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • chromium-0.5x: View Report • ✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • mobile-chrome: View Report • ✅ 4 / ❌ 0 / ⚠️ 0 / ⏭️ 0

🎉 Click on the links above to view detailed test results for each browser configuration.

LinkSegment.id can be either a RerouteId or a LinkId. but guarding the
type of instance as "not Reroute" or "not LLink" was not sufficient to
narrow the type of id. It is split into an interface, and an instance
type to ensure that any future changes create type errors instead of
runtime errors.

This also reverts the change to the createReroute code. The change was
incorrect.
@AustinMroz AustinMroz marked this pull request as ready for review September 23, 2025 17:40
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Sep 23, 2025
@DrJKL
Copy link
Contributor

DrJKL commented Sep 23, 2025

I'd rather brand them with unique symbols, if feasible.

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Sep 23, 2025
@AustinMroz
Copy link
Collaborator Author

Agreed. That's a better approach.

I'd be nice if there was a way to also have the "value" of the "brand" property symbol to be a unique symbol itself, but this didn't seem possible from testing.

@DrJKL
Copy link
Contributor

DrJKL commented Sep 24, 2025

Agreed. That's a better approach.

I'd be nice if there was a way to also have the "value" of the "brand" property symbol to be a unique symbol itself, but this didn't seem possible from testing.

I would make a symbol adjacent to each type declaration instead of having the utility type.

@AustinMroz AustinMroz marked this pull request as draft September 24, 2025 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants