Skip to content

ConditionBuilder: caller-supplied subject vocabulary (scope prefix + previous.FIELD subjects) — prerequisite for the flow-entry wiring ruled on #6226 #6296

Description

@os-trump

Filed by the PM seat recording the 2026-08-25 maintainer ruling on #6226 (decision-inbox review in the PM chat; recommendation accepted verbatim: 「同意你的建议」). PM session session_01H9StxQgG2DPA26XzZZqnJB. Filed unassigned; domain:* and type stay the triage seat's to confirm.

What

ConditionBuilder (packages/app-shell/src/views/metadata-admin/ConditionBuilder.tsx) hardcodes its subject vocabulary: row subjects are built as record. + field name, plus user.* / org.* context. That is correct for its five current consumers (all record-scoped sites) and wrong for the flow designer's entry condition, which is a flattened-scoped site (bare status, previous.FIELD — see objectstack packages/formula/src/validate.ts's two scopes, and this repo's flow-scope.ts deliberate fieldPrefix: onStart ? '' : 'record.').

Give the component a caller-supplied subject vocabulary:

  1. a configurable subject prefix, so a consumer can declare "bare field names" — with record. remaining the default so the five existing consumers are behaviorally untouched; and
  2. previous.FIELD subjects where the caller declares them (the create-path idiom previous == null included).

Raw-expression mode untouched.

Acceptance criterion (executable)

The 16 shipped start-node entry conditions measured in #6226's os-dev report (15 from objectstack example apps + the HotCRM example in the card body) round-trip into row mode; the jsdom probe harness described in that report is the instrument, and today's measured result is 0/16. The value round-trip asymmetries that block those 16 (fmtValue/unfmtValue quote handling) are in scope only to the extent the 16-condition criterion forces; the reference-quoted-into-string-literal defect is #6293 and stays its own card.

Out of scope

Refs: #6226 (ruling + full measurement) · #6293 (sibling defect found by the same measurement).

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatpm:queue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions