Skip to content

ValueDataSource deep-clones inline rows through JSON.parse(JSON.stringify(...)) — replace the round-trip with structuredClone, measurement first, so the inline-provider repairs (objectui#9061 / #9136) land without retiring objectui#6018's guarantee #9175

Description

@os-tesla

Filed by the director seat executing the maintainer's ruling A on objectui#9061 (2026-09-11, decision batch #115, verbatim 「同意」). Routed domain:ui by the anchoring rule (the fix lands in @object-ui/core's ValueDataSource); pm:queue; priority:p2 inherited from the two cards it blocks. ⛔ Not claimed.

What is ruled

ValueDataSource deep-clones its inline rows through JSON.parse(JSON.stringify(...)) — in the constructor (measured at ValueDataSource.ts :1077 by the objectui#9061 round; re-locate by text) and again in the items getter (:1318). The clone exists only to stop external mutation of a read-only query source. The JSON round-trip is what turns objectui#6018's pinned guarantee (an inline value never has to be serializable) false the moment a renderer routes its inline rows through the adapter to honour filter / sort / the objectui#7210 ceiling (objectui#9061 for ObjectCalendar / ObjectMap; objectui#9136 for ObjectTree; ObjectGantt already throws on the same input via its own memo key).

Ruling A: replace the round-trip with structuredClone (handles cycles, Date, Map/Set, BigInt; still throws on functions and DOM nodes), so the inline-provider repairs land unchanged and no pinned guarantee is retired.

Measurement first — this is a behaviour change for every consumer

  • Enumerate every ValueDataSource construction site and every reader of its rows (lit control on the class name; dark control on a fabricated one).
  • For each consumer, measure whether any inline row can carry a Date, undefined, Map/Set, BigInt, or a function, and whether the consumer depends on the JSON flattening (a Date becoming a string, undefined keys vanishing). Any dependence is a finding to report with the site, ⛔ not to paper over in the clone.
  • Pin per consumer: the shape it receives today and after; a Date-bearing row measured and pinned either way.
  • Ablation: with the JSON round-trip restored on the committed tree, the three standing red assertions named in PR objectui#9138's body must return; with structuredClone, green with zero change to that PR's diff.

Acceptance

  • The three red assertions on PR objectui#9138 pass with that diff untouched; objectui#6018's third case stays green; the two ObjectMap.filterConfig fixtures are NOT re-based.
  • No renderer file changes in this card — the repairs stay on objectui#9061 / objectui#9136.
  • Clause-②: the dev assesses against the actual diff — a published adapter's observable behaviour changes (a Date survives as a Date), so expect yes and hang the carriers with the draft PR; changeset per measurement (a released package's behaviour moves ⇒ at least patch, minor if the seat reads it as a widening).

Stop conditions

  • A consumer measured to depend on the flattening ⇒ report; the fix for that consumer is its own decision, ⛔ not a try/catch in the clone.
  • If structuredClone is unavailable in a supported runtime target of @object-ui/core (measure the declared engines / browserslist), stop and report — a polyfill is a new runtime dependency (the maintainer's floor).

Refs: objectui#9061 (blocked on this card) · objectui#9136 (inherits) · objectui#6018 (the guarantee this preserves) · objectui#7210 · PR objectui#9138 (lands unchanged once this merges).

Filed by the director seat, session_01QsCVSivtpwT6ZXs5Rtvqxe.


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatpackage: corepriority:p2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions