Sy 4427 refactor arc pluto console code for cleanliness and#2539
Merged
emilbon99 merged 301 commits intoJun 28, 2026
Conversation
Fix graph.Node{Type,Config} literals in runtime/node and stl/* test
suites (channels, constant, control, math, op, selector, stable, time,
wasm). Full arc/go ginkgo suite (53 suites) passes.
The Ternaryf key was already the wire name; align the message text so both read the schema's snake_case name (invalid label_level, not invalid LabelLevel).
…https://github.com/synnaxlabs/synnax into sy-4379-oracle-default-and-validation-refactor-rfc-3
The nullable change alters the positional orc layout (adds a presence byte), so released value-color ranges can't be read by the new codec. Pin msgpack_to_orc to the v0 (value-color) snapshot so it's deterministic, then add a range_color_nullable migration that re-encodes value->pointer (zero color -> nil). Adds an optional deps arg to gorp.NewEntryMigration to order it after the codec migration.
…nto sy-4379-oracle-default-and-validation-refactor-rfc-3
…and-validation-refactor-rfc-2
…nto sy-4379-oracle-default-and-validation-refactor-rfc-3 Cascade-backmerge rc: adopt schema folder reorg (synnax/ + x/) and nested import paths; keep part3 schema semantics (single optionality, defaults, author purge). Resolve arc/ir, arc/types, project conflicts in favor of part3's migration.
…nto sy-4379-oracle-default-and-validation-refactor-rfc-3
The generated Go ApplyDefaults and Validate methods were flat: they filled and checked a struct's own scalar fields but never descended into nested struct, slice, map, or union-variant fields, and were absent entirely on container types whose own fields all default to the zero value. This diverged from the cross-language model, where zod, pydantic, and C++ member init all apply nested defaults during decode. Make both methods recurse: - Add a transitive needs-method predicate (typeNeedsMethod) over struct fields, slice/array elements, map values, and union variant payloads, with a visited guard for recursive types. Generic types and type parameters are excluded. A type now emits a method when it has an own fill/check or any reachable nested type does. - Emit per-field recursion: value and nil-guarded pointer struct fields, slice and array elements, and map values. - Emit per-variant ApplyDefaults/Validate for discriminated unions plus a wrapper method that dispatches on the active variant. Embedded payloads take no Validate path segment, since their fields are promoted to the variant. Validate composes nested error paths via validate.PathedError with wire field names and slice indices. PathedError previously collapsed a joined error to its first member, dropping the rest; it now prefixes every member, backed by a new errors.UnwrapMulti primitive in x/errors that looks through the stack wrapper Join adds.
…nto sy-4379-oracle-default-and-validation-refactor-rfc-3
Propagate the base struct's generic type parameters onto the synthesized New so a generic @create type derives a generic New, and fold defaulted base fields into the concrete factory's partial set so defaults drive optionality on the input type (the concrete path uses an optional.Optional wrapper rather than z.input, which already handles this for the non-concrete path).
…nto sy-4379-oracle-default-and-validation-refactor-rfc-3
…nto sy-4379-oracle-default-and-validation-refactor-rfc-3
…nto sy-4379-oracle-default-and-validation-refactor-rfc-3
…types The Go plugin emitted no @Validate constraints, so required/min/max checks were hand-written per service (e.g. Device.Validate). The TypeScript plugin emitted constraints but classified numeric/string by the surface type name, so it skipped constraints on named types like a distinct Key over uint32. - Add resolution.PrimitiveBase, which follows distinct-type and alias chains to the underlying primitive name. - Generate Go constraint checks in Validate: required and min_length/max_length on strings, min/max on numbers, classified against the primitive base so a distinct numeric type validates as a number. A field carrying constraints now also makes its containing type emit Validate and parents recurse into it. - TypeScript classifies named types by their primitive base too, so @Validate on a wrapped numeric/string emits the zod constraint instead of being dropped.
…nto sy-4379-oracle-default-and-validation-refactor-rfc-3
…field names
- required on a numeric field now generates a non-zero check (Go validate.NonZero,
TypeScript .refine((v) => v !== 0, ...)), so a required Key validates as set.
- Validation messages embed the raw snake_case field name instead of a
capitalized human form ("first_name is required", not "First Name is required").
…nto sy-4379-oracle-default-and-validation-refactor-rfc-3
…aults
A field default written as a struct literal (e.g. `x1 Axis = { key = AxisKeyX1 }`)
was dropped by the Go plugin: ApplyDefaults only filled scalar zero-values and
recursed, never applying a whole-struct default assigned to a field. The nested
component (axis key) stayed empty and the generated Validate then rejected it.
goDefaultFills now walks a struct-literal default and emits one fill per non-zero
leaf component, keyed by a nested selector (X1.Key), before the recursion call so
the component is set first and recursion fills the remaining zero fields.
…pendencies' into sy-4416-separate-nav-slice-and-componentry-from-layout-in-console
…6-separate-nav-slice-and-componentry-from-layout-in-console
…in-console' of https://github.com/synnaxlabs/synnax into sy-4427-refactor-arc-pluto-console-code-for-cleanliness-and
…6-separate-nav-slice-and-componentry-from-layout-in-console
Add direct specs for Cursor.useDrag and Cursor.useVirtualDrag, which previously had no dedicated coverage. The specs install a faithful pointer-capture implementation so the capture/release lifecycle is asserted rather than mocked away. Harden useVirtualDrag to match useDrag: guard against non-primary buttons/pointers on press, filter moves and the terminating up by the captured pointerId, and drop the once-only pointerup listener that a stray second pointer could prematurely consume.
The controls toggle only renders on macOS/Windows, so on a Linux CI
runner the findByText("Controls") assertions timed out. Mock OS.use to
a fixed value so the controls tests are deterministic across hosts.
…, and Long Term Architecture
…omponentry-from-layout-in-console' into sy-4427-refactor-arc-pluto-console-code-for-cleanliness-and
…in-console' of https://github.com/synnaxlabs/synnax into sy-4427-refactor-arc-pluto-console-code-for-cleanliness-and
…uto-console-code-for-cleanliness-and
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## rc #2539 +/- ##
==========================================
- Coverage 69.19% 69.13% -0.06%
==========================================
Files 2627 2620 -7
Lines 129503 128716 -787
Branches 9264 9192 -72
==========================================
- Hits 89606 88992 -614
+ Misses 33207 33061 -146
+ Partials 6690 6663 -27
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Go to the
Previewtab and select the appropriate template for your pull request:Greptile Summary
This PR moves Arc console code into the layered service and session structure. The main changes are:
Confidence Score: 4/5
The Arc session cleanup path needs a small fix before merging.
console/src/store.ts and the Arc session middleware export.
Important Files Changed
Comments Outside Diff (1)
console/src/store.ts, line 160-164 (link)Closing an Arc layout or switching projects no longer dispatches the Arc session
removecleanup that the old middleware handled. Because the new Arc session slice is persisted with an empty exclude list, stalestate.arc.arcsentries can survive tab close/project switch and later restore old viewport, selection, and toolbar state for the same Arc key.Reviews (1): Last reviewed commit: "checkpoint" | Re-trigger Greptile
Context used: