You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7546570
Browse filesBrowse the repository at this point in the historyBrowse files
revert(app-shell): re-land Studio's validation presets (objectui#11931) and the Interfaces page-create (objectui#11932) (#11967)
Part of #11861
Re-lands objectui#11823 step 3: objectui#11932, the Studio Interfaces
page-create (seat `domain:ui#3`). That card stays open.
Clause-②: no
Held as a draft until objectui#11949 (the +5,120 B allowance, ruling
`6056819248` step 2) lands.
When this PR was opened, objectui#11949 was already on `main` as
`1c51e973b`, and this branch has merged it.
## What this is
A plain `git revert 3c888c6`, followed by merges of `main`. `3c888c6` is
the rollback PR objectui#11956, a single-parent squash, so `-m 1` does
not apply. It brings back:
- objectui#11931: Studio's validation "New" menu opens on common rules,
with the rule types under "Advanced". This is the validation-rule entry
of objectui#11861.
- objectui#11932: objectui#11823 step 3. The Interfaces pillar creates a
page and opens it on its source beside a live preview.
Claim `6057967120` on objectui#11861 · review `6057399892` on
objectui#11937 · ruling `6056819248` on objectui#11942.
## Tree proof
- The revert commit `7eeffd29b` has the tree of `f3a0488` (`011fe521e`),
so `git diff f3a04887eeffd2 --stat` prints nothing.
- `.changeset/11937-eager-budget-rollback.md` was added by `3c888c6` and
never existed at `f3a0488`. Its removal therefore shows against
`3c888c6`, not against `f3a0488`.
- Against `main`, the branch changes the 15 paths `3c888c6` changed, and
no other path.
- Twelve of the 15 hold their `f3a0488` blob byte for byte. The other
three were also changed on `main` after `3c888c6`, and they carry both
intents (next section).
## Merges of main, and the conflicts
The branch merged `main` five times: at `1c51e973b`, `d73d98770`,
`70e3d7721`, `ccc2824cf` and `247f50349`. Only two of the PRs these
brought in touch a restored file.
**objectui#11945** (objectui#11923, the *Runs on* row), merged at
`70e3d7721`.
- One conflicting hunk, in the import block of
`ObjectValidationsPanel.tsx`. This side imports `validationPresets.js`;
`main` imports `ScriptValidationSchema` / `ScriptValidationParsed` from
`@objectstack/spec/data`. Both lines are kept.
- Two files merged without conflict:
- `metadata-admin/i18n.ts`: `main` removes the
`engine.studio.rules.event.delete` row, en and zh. It stays removed.
- the `newRuleWaits-11820` pin: `main` asserts there is no Delete box.
That assertion stays.
- Check, per file: the changed lines of the merge against `main` equal
the re-land's own changed lines (`3c888c6..f3a0488`). The changed lines
of the merge against this branch's previous head equal objectui#11945's
own diff. Both comparisons were identical for all three files.
**objectui#11935** (objectui#11894, typed is-empty operators), merged at
`247f50349`.
- Two conflicting hunks, both in `ObjectValidationsPanel.tsx`. Each side
added the same `FieldOpt` member, `type`.
- The interface keeps one `type`, `main`'s `multiple` and the presets'
`system`. One doc comment names both readers of `type`.
- The field mapping keeps one `type` line, `main`'s `multiple` line with
its comment, and the presets' `system` line.
- `i18n.ts` merged without conflict, and both sides' rows are kept.
- The same check, run on this merge, leaves only the shared `type`
member and the merged comments as residual lines.
`main` moved on after `247f50349` (objectui#11961, #11962, #11944). None
of those touches any of the 15 paths, so they are not merged here.
## Changesets
- Restored: `.changeset/11861-validation-presets.md` and
`.changeset/11823-page-create.md`, both `@object-ui/app-shell: patch`.
- Removed: `.changeset/11937-eager-budget-rollback.md`
(`@object-ui/app-shell: patch`). This re-land supersedes it.
- `check-changeset-overwrite` is report-only and exits 0. It reports one
pre-existing changeset deleted, with `@object-ui/app-shell` "GONE from
the declaration" of that file.
- The package still bumps, because both restored changesets declare it.
This is the gate's case 3: a changeset superseded by a replacement in
the same change.
## Gates, on head `fb0c91d45` (every merge above included)
Tests use the repo-root `pnpm exec vitest run` and run under the shared
verify lock.
- **Named set:** 98 files and 631 tests, all passed. It covers:
- all eight `ObjectValidationsPanel*` suites, including objectui#11945's
`runsOn-11923` and objectui#11935's `typedEmptyOps-11894`;
- every test file that imports `interfaceCreate` or
`StudioDesignSurface`;
- `column-identity.ratchet.test.ts`;
- the `main` pins next to the conflicts:
`ConditionBuilder.typedEmptyOps-11894`, `PagePreview.pageKind-11933` and
`SourcePageEditor.pageKind-11933`.
- **Widened set:** 87 files and 1,103 tests, all passed. It covers every
other test that imports `validationPresets`, `ObjectValidationsPanel` or
the designer string table `metadata-admin/i18n.ts`.
- `pnpm --filter @object-ui/app-shell type-check` passes, after a turbo
build of the app-shell dependency closure (28 of 28 tasks).
- Each of these gates exits 0:
- `check:i18n-keys`, `check:i18n-designer-parity`, `check:i18n-drift`;
- `check-changeset-presence`, `check-changeset-fixed`,
`check-changeset-no-major`, `check:changeset-claims`,
`check:pending-changeset-literals`, `check-changeset-overwrite`
(report-only, see above);
- `check:unreferenced-sources`.
- eslint on the 11 touched source and test files reports 0 errors and 22
warnings. The repo sets no `--max-warnings`. The warnings are the ones
already in these files at `f3a0488`, and the merge adds none.
- `check-governed-queue-guard --test` reports NOT GOVERNED: none of the
15 paths is on a governed surface.
- Not run: the console build. CI's `Bundle Analysis` measures the
first-load bytes against the ceiling that objectui#11949 raised.
`scripts/check-eager-closure-budget.mjs` is not touched.
- Reference point: on its push run, `f3a0488` (the tree this re-land
restores) had 66 check runs succeed, 6 skipped and 1 fail, `Bundle
Analysis`. That is 73 of 73 runs read.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01MgfduSkFrfM3eorB3UGfAU)_
Co-authored-by: Claude <noreply@anthropic.com>
Studio's validation-rule "New" menu opens on common rules in plain words, with the rule types under "Advanced" (part of objectui#11861: the validation-rule entry).
6
+
7
+
"New" in an object's Validations view used to open on the spec's rule types ("Script — CEL fail condition", "Cross-field — CEL over multiple fields", …). It now opens on three starting points, each a rule of a type the spec already has:
8
+
9
+
-**End date on or after start date** — a `cross_field` rule on the object's first two date fields (its own fields: never a system or hidden one). It is written at once, with its message, and the error attaches to the end date.
10
+
-**Number can't be negative** — a `script` rule on the object's first number, currency or percent field, written at once with its message.
11
+
-**Reject the save when…** — a `script` rule whose condition the author builds. As with any new rule since objectui#11820, it is not saved until it has a condition, and it opens with the condition editor focused.
12
+
13
+
Each menu row names the fields it will use. A preset the object has no fields for is listed disabled, saying what it needs. Every condition a preset fills guards each comparison with `!= null`. The server rejects a write whose rule condition cannot be evaluated, and comparing an empty value is such a condition. The guard keeps the rule from rejecting records that leave the field empty. The filled rules open as editable condition rows, not raw CEL.
14
+
15
+
The per-type list is unchanged, one click away under "Advanced". New rules still start on Create + Update.
16
+
17
+
"Unique" and "Required when…" are not offered as validation presets. The spec has no uniqueness rule type; it points to a unique index or a field's `unique` instead. "Required when" is a field's own setting (`requiredWhen`), already in the field inspector.
18
+
19
+
Nothing is added to the package entry: no export, prop, type member or language-pack key. The new copy lives in the metadata-admin designer's own string tables (en and zh).
Copy file name to clipboardExpand all lines: content/docs/guide/console.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ entries — no code round-trip required:
47
47
48
48
| Tab | Edits | Panel |
49
49
|-----|-------|-------|
50
-
|**Validations**| the object's inline `validations[]` (spec `ValidationRuleSchema`) | Master-detail covering **every** rule type — `script`, `cross_field`, `state_machine`, `format`, `json_schema`, `conditional`. The **New** menu adds any type (seeded with a valid, never-firing skeleton); a rule's type can be switched in place. CEL predicates reuse the shared `ConditionBuilder`, fed the object's draft fields. |
50
+
|**Validations**| the object's inline `validations[]` (spec `ValidationRuleSchema`) | Master-detail covering **every** rule type — `script`, `cross_field`, `state_machine`, `format`, `json_schema`, `conditional`. The **New** menu opens on common rules in plain words (*End date on or after start date*, *Number can't be negative*, *Reject the save when…*); each writes a working rule, or waits for the condition the author gives. Every rule type is under **Advanced**. A new rule whose type carries a condition (`script`, `cross_field`, `conditional`) is saved only once it has one; a rule's type can still be switched in place. CEL predicates reuse the shared `ConditionBuilder`, fed the object's draft fields. |
51
51
|**Hooks**| the separate `hook` metadata type targeting this object | Master-detail whose editor is the platform `SchemaForm`**driven by the live `hook` JSONSchema from `/meta/types`**, so its fields and enums always match the running server's contract. |
52
52
|**Actions**| the object's inline `actions[]` (spec `ActionSchema`) | Master-detail using the type-aware `ActionDefaultInspector`; anything not curated falls through to a **"More fields"** form fed the live `action` JSONSchema, so no spec property is un-editable. |
0 commit comments