Skip to content

docs(objectui): concept.mdx collapsed-by-default section example authors collapsible too - #19838

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/issue-19703-concept-collapsed-example
Sep 24, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/issue-19703-concept-collapsed-example

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #19703
Clause-②: no

What changed

content/docs/protocol/objectui/concept.mdx, section "1. Progressive Disclosure": the YAML example captioned "Advanced section (collapsed by default)" authored collapsed: true with no collapsible. It now writes both keys (collapsible: true + collapsed: true), and one sentence under the block states the rule the spec states: collapsed: true implies collapsible — a section that starts closed always carries the disclosure control that reopens it. +4 / -0, one file, docs only.

Why

The spec half is already on main: packages/spec/src/ui/view.zod.ts (FormSectionSchema, "The collapse pair, declared once for both members") declares that collapsed IMPLIES collapsible as a renderer rule (maintainer ruling 2026-09-18, letter A), and that parse never rewrites the pair. So a section authored collapsed: true alone parses to collapsible: false, collapsed: true, and any renderer that reads the parsed collapsible without applying the implication draws a section that starts closed with no toggle. Writing both keys is correct under the spec's wording (collapsible: true beside collapsed: true is the fully explicit spelling) and renders a working toggle on every surface.

Measured against the built spec at a3091327: FormSectionSchema.safeParse of the corrected section returns success with {collapsible: true, collapsed: true}; the old section returns {collapsible: false, collapsed: true} — the premise holds.

Renderer surfaces (objectui at the .objectui-sha pin main carries today, 87af769e9a3e)

The pin has not moved since the card was filed, so the card's citation still applies. Read at that pin:

  • packages/plugin-form/src/DrawerForm.tsx:609 and :677 pass collapsible: section.collapsible alone (and :653 gates collapse on section.collapsible). The old example rendered closed with no toggle here; with both keys it renders a toggle and starts closed. Safe with the corrected example.
  • packages/plugin-form/src/ObjectForm.tsx:1539-1560 applies the implication (collapsed implies collapsible). Safe with either spelling; safe with the corrected example.

Writing both keys does not depend on the pin: it is safe whether or not a later pin makes DrawerForm apply the implication.

Changeset

Docs-only: content/docs/** is not in any package's files[], so nothing publishes — skip-changeset territory. Labels are left to the PM seat (no label write from this PR's author).

Verification

Derived with node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands (change set taken from git, merge base 1cacfe4a): 40 commands, all run at a3091327, all exit 0. Reconciled with --ran: "40 derived famil(ies) accounted for — 40 run, 0 NOT-MEASURED (a DERIVED zero — all 40 recorded an exit code and none of them is 3)". Four gates first exited 3 (prerequisite not met: @objectstack/lint, @objectstack/formula, @objectstack/client-react unbuilt); after building those closures they re-ran green.

Note: check:yaml-examples validates only tagged blocks and reports concept.mdx: 0 tagged / 9 untagged, so its green does not cover this block; the direct FormSectionSchema.safeParse reading above is the measurement for it.

Acceptance notes

  • Sibling pages, silences rather than copy-and-fail, not edited here: content/docs/ui/views.mdx:416-417 (section key table lists collapsible / collapsed with no word on the dependency) and content/docs/protocol/objectui/layout-dsl.mdx (the same pair at several lines; its authored example already writes both keys). Carrier: none named.
  • The DrawerForm residual (reads section.collapsible alone) is objectui's, not this repo's.

Generated by Claude Code

…apsible too

The "Advanced section (collapsed by default)" example authored
`collapsed: true` alone. The spec declares that `collapsed` implies
`collapsible`, but parse never rewrites the pair and not every form
surface applies the implication yet, so the copied example could render
a section that starts closed with no control to reopen it. The example
now writes both keys, and one sentence states the rule as the spec does.

Claude-Session: https://claude.ai/code/session_01VDtqoecgES7ScQYGbFVDRv
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: a30913273c9113e2a5183354036ffc3dc12fa25d

① Derived judgments

  • "collapsed: true implies collapsible — a section that starts closed always carries the disclosure control that reopens it": packages/spec/src/ui/view.zod.ts:3504-3512 (FormSectionSchema, "The collapse pair" docblock: "collapsed IMPLIES collapsible: a section that starts closed always carries the disclosure control that reopens it"), .describe at :3534-3551. True as the spec's stated renderer rule.
  • "the example writes both keys so that control is explicit on every form surface": at objectui pin 87af769e9a3e (.objectui-sha on origin/main), packages/plugin-form/src/DrawerForm.tsx:609/:677 read section.collapsible alone while ObjectForm.tsx:1539-1560 applies the implication (per card, re-read by dev; consistent with spec :3519-3524 "parse never rewrites the pair"). Writing both keys is safe on both surfaces. True.
  • YAML keys name/label/collapsible/collapsed/fields are FormSectionSchema members; spec's own example at view.zod.ts:6187 uses the same collapsible: true, collapsed: true pair.
  • +4/-0 in content/docs/protocol/objectui/concept.mdx; no accept set or public surface touched; Clause-②: no is right. No generated/release/governed path.

② Semver level

Docs-only content/docs/**; not in any files[]; no .changeset/*.md. No changeset is correct; skip-changeset is the route.

③ Boundary flags

  • Wording risk, low: "always carries the disclosure control" states the spec rule, which one objectui surface (DrawerForm at the current pin) does not yet honour for collapsed alone. The sentence's second half ("the example writes both keys so that control is explicit on every form surface") steers an author to the safe spelling, so it does not mislead. No fenced surface crossed (sibling pages views.mdx, layout-dsl.mdx and content/docs/releases/** untouched, as the card asked).

Implemented-by: claude/issue-19703-concept-collapsed-example
Reviewed-by: session_01VDtqoecgES7ScQYGbFVDRv

VERDICT: PASS

Isolated at-tier reviewer, adopted by the domain:devx#1 seat. Reviewed with the seat's own ACCEPT excluded from its inputs.


Generated by Claude Code

@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 24, 2026
@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review September 24, 2026 15:13
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Sep 24, 2026
Merged via the queue into main with commit 3bdcd14 Sep 24, 2026
37 of 38 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-19703-concept-collapsed-example branch September 24, 2026 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/xs skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

1 participant