Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

Add documentation and showcase examples for all plugins - #141

Merged
huangyiirene merged 4 commits into
mainfrom
copilot/add-documentation-for-plugins
Jan 22, 2026
Merged

huangyiirene merged 4 commits into
mainfrom
copilot/add-documentation-for-plugins

Conversation

Copilot AI commented Jan 21, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Plugins were inconsistently documented: plugin-editor and plugin-markdown lacked showcase examples, plugin-object lacked documentation. The CLI also didn't auto-import plugins, causing registration failures.

Changes

Added Showcase Examples

  • code-editor.json: Monaco editor demonstrations (JavaScript, TypeScript, Python, JSON, HTML) with theme variants and read-only mode
  • markdown.json: GFM rendering examples (headings, tables, code blocks, task lists, blockquotes)

Added Documentation

  • plugin-object.md: Complete reference for ObjectTable, ObjectForm, and ObjectView with TypeScript types and ObjectQL integration examples

Fixed Plugin Loading

// packages/cli/src/utils/app-generator.ts
import '@object-ui/components';
import '@object-ui/plugin-charts';
import '@object-ui/plugin-editor';
import '@object-ui/plugin-kanban';
import '@object-ui/plugin-markdown';
import '@object-ui/plugin-object';  // Now auto-imported
// packages/cli/src/commands/dev.ts
viteConfig.resolve.alias = {
  '@object-ui/plugin-charts': join(cwd, 'packages/plugin-charts/src/index.tsx'),
  '@object-ui/plugin-editor': join(cwd, 'packages/plugin-editor/src/index.tsx'),
  '@object-ui/plugin-kanban': join(cwd, 'packages/plugin-kanban/src/index.tsx'),
  '@object-ui/plugin-markdown': join(cwd, 'packages/plugin-markdown/src/index.tsx'),
  '@object-ui/plugin-object': join(cwd, 'packages/plugin-object/src/index.ts'),  // Correct .ts extension
};

Updated Showcase Navigation

Added "Code Editor" and "Markdown" menu items to Complex section in app.json.

Result

All 5 plugins now have complete documentation and working showcase demonstrations.

Markdown Showcase

Original prompt

所有的插件也应该在文档中、演示效果。


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel

vercel Bot commented Jan 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
objectui-docs Error Error Jan 21, 2026 5:48pm
objectui-site Ready Ready Preview, Comment Jan 21, 2026 5:48pm

Request Review

Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
@vercel
vercel Bot temporarily deployed to Preview – objectui-docs January 21, 2026 17:45 Inactive
Copilot AI changed the title [WIP] Add documentation and demo for all plugins Add documentation and showcase examples for all plugins Jan 21, 2026
Copilot AI requested a review from huangyiirene January 21, 2026 17:50
@github-actions github-actions Bot added documentation Improvements or additions to documentation examples labels Jan 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📦 Bundle Size Report

Package Size Gzipped
components (index.js) 1548.04KB 364.64KB
core (index.js) 0.53KB 0.28KB
data-objectql (ObjectQLDataSource.js) 11.05KB 2.64KB
data-objectql (hooks.js) 5.62KB 1.43KB
data-objectql (index.js) 0.62KB 0.36KB
designer (index.js) 1.46KB 0.51KB
plugin-charts (AdvancedChartImpl-DazADGz5.js) 74.89KB 15.82KB
plugin-charts (BarChart-CRc8MAtI.js) 551.60KB 127.51KB
plugin-charts (ChartImpl-DVw_7KEd.js) 3.17KB 1.10KB
plugin-charts (index-CdgY2AuM.js) 12.39KB 3.83KB
plugin-charts (index.js) 0.21KB 0.16KB
plugin-editor (MonacoImpl-B7ZgZJJG.js) 18.15KB 5.59KB
plugin-editor (index-Dl3HAAqu.js) 10.07KB 3.31KB
plugin-editor (index.js) 0.19KB 0.15KB
plugin-kanban (KanbanImpl-CUWM-JC-.js) 76.50KB 20.46KB
plugin-kanban (index-BV3FWhCb.js) 11.86KB 3.67KB
plugin-kanban (index.js) 0.18KB 0.15KB
plugin-markdown (MarkdownImpl-BRkYjVWf.js) 256.79KB 64.50KB
plugin-markdown (index-D_CdfEXQ.js) 9.59KB 3.16KB
plugin-markdown (index.js) 0.19KB 0.15KB
react (SchemaRenderer.js) 1.44KB 0.73KB
react (index.js) 0.32KB 0.23KB
react (index.test.js) 0.34KB 0.26KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 0.20KB 0.18KB
types (base.js) 0.20KB 0.18KB
types (complex.js) 0.20KB 0.18KB
types (crud.js) 0.20KB 0.18KB
types (data-display.js) 0.20KB 0.18KB
types (data.js) 0.20KB 0.18KB
types (disclosure.js) 0.20KB 0.18KB
types (feedback.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (index.js) 0.34KB 0.25KB
types (layout.js) 0.20KB 0.18KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (registry.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

@github-actions

Copy link
Copy Markdown
Contributor

✅ All checks passed!

  • ✅ Type check passed
  • ✅ Tests passed
  • ✅ Lint check completed

akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Sep 17, 2026
…nowhere (objectui#8826) (objectstack-ai#9640)

Fixes objectstack-ai#8826

Ruled on the card as batch objectstack-ai#141 item 3, letter **B**, maintainer 「同意」:
the board stops claiming a capability it does not have. The fence the
ruling asked this body to carry, verbatim: 「order persistence is not a
capability of this board; a spec card would be its entry」.

## What changed

`KanbanImpl`'s `handleDragEnd`:

- **Same-column drop** — the branch no longer reorders local state. The
card returns to its position. Nothing is persisted, so nothing is shown
as persisted.
- **Cross-column move** — the membership change stays and is still
persisted through `persistCardMove`. The landing index is still computed
and still handed to `onCardMove`, where it is still discarded; what
changed is that it is no longer *painted*. The branch appends to the
target column instead of splicing at the slot the card was released
over, so the board claims membership and says nothing about position.

No new prop, no new persistence path, no new authorable key — `Clause-②:
no` holds, and this is a strict narrowing of a claim rather than a
widening of any surface.

Two README bullets advertised in-column reordering as a feature. They
now say what is true. Letter C was refused for formalising the false
success; leaving it in the docs would have been letter C by the back
door.

## ⚠️ One mechanism claim in the ruling was falsified — the file, not
the mechanism

The ruling's execution note reads 「`ObjectKanban.tsx`: the same-column
branch of `handleDragEnd` …」. Re-derived by symbol (`git grep -nw
handleDragEnd`): **`ObjectKanban.tsx` has no `handleDragEnd`**. The drag
handler and the optimistic reorder live in `KanbanImpl.tsx`;
`ObjectKanban.tsx` owns `handleCardMove`, whose `_newIndex` parameter
and `void _newIndex` discard are exactly where the ruling says they are
and are **unchanged by this branch**. Everything the ruling asked for is
done, one file over from where it says.

`KanbanImpl`'s mirror-sync timing (objectui#8534 / PR objectstack-ai#8825) is
untouched. The mirror itself stays — the cross-column optimistic write
still needs it, which is now what defends it in that card's pin.

## The two pins — both legs, in one file


`packages/plugin-kanban/src/__tests__/sameColumnDropIsNotClaimed-8826.test.tsx`,
on the recorder objectui#8826 was measured with (a module mock of
`KanbanImpl` capturing the `columns` prop per render, plus a capture of
the board's real `onDragEnd`):

- **LEG 1** — a same-column drop leaves DOM order equal to the DATA
order, on **both** data ownerships, records no new `columns` snapshot
and reaches no `update`.
- **LEG 2, the lit control** — a cross-column move still emits the new
membership snapshot and still writes it, with an exact-body assertion
(`update('task', 'a', { status: 'in_progress' })`). Without this leg,
LEG 1 would read green on a board whose drag path was broken outright.

The fixture puts two cards in the source column and asks for their
reverse order, so "did not move" is distinguishable from "nothing was
driven".

## Reverse verification — two arms, mutation proven on disk, restore
proven by hash

Run from the committed fix (`1f1ec56`); every arm restores with `git
checkout HEAD --` under a trap with absolute paths, and each restore is
verified by the blob hash plus an empty `git diff HEAD`, never by an
exit code.

| arm | mutation | result |
|---|---|---|
| **same-column** | re-add the optimistic reorder this card removed |
**exit 1 — 3 failed / 5 passed.** The failures are exactly LEG 1
(internal), LEG 1 (external) and the sibling control in
`columnsReachDomSameCommit-8534`. **LEG 2 stayed green**, so the
instrument distinguishes the defect from a dead board. |
| **cross-column** | splice at the drop index again | **exit 1 — 1
failed / 9 passed.** The single failure is the external-path assertion
in `crossColumnLandingPosition-8826`; LEG 1 and everything else stayed
green. |

`KanbanImpl.tsx` HEAD blob `5cd6f3b0eaf34acafa223271f8619b4de09366e1`;
mutated blobs `7a93f0098ec53e68f839bf8fb4fc8823040b3575` and
`3f9b95415364fc026770ba297b4c30a76f2c3dea`; restored blob reproduces the
HEAD blob byte for byte on both arms, and the tree was verified clean
afterwards. The mutation scripts assert their anchor is present exactly
once before writing, so a no-op edit aborts instead of passing as a run.

## Verification

All run at `1f1ec56`, exit codes captured to files before being read,
never through a pipe. Heavy runs serialized through the shared verify
lock with `OS_VERIFY_LOCK_SLOT=objectui-8826`, verdicts read from its
printed `VERDICT command-exit` line.

| check | exit | reading |
|---|---|---|
| `pnpm exec vitest run packages/plugin-kanban/` (repo ROOT) | 0 | 56
files / 358 tests passed |
| `pnpm --filter @object-ui/plugin-kanban type-check` | 0 | both legs —
`tsc --noEmit` and `tsc -p tsconfig.test.json`, the second being what
covers the test files |
| `pnpm --filter @object-ui/plugin-kanban lint` | 0 | 0 errors; this
diff contributes 0 of the package's 216 pre-existing warnings |
| `check:changeset-presence` | 0 | 1 changeset declared for 5 published
source files across 2 packages |
| `check:doc-snippets` · `check:doc-examples` · `check:readme-exports` |
0 · 0 · 0 | these three read package READMEs, and all three first exited
non-zero as PREREQUISITE NOT MET; re-run to a real 0 after the scoped
build the gates name |
| `check:doc-types` · `check:doc-fences` · `check:doc-example-ids` | 0 |
— |
| `check:control-bytes` · `check:new-line-citations` ·
`check:test-path-roots` · `check:unreferenced-sources` | 0 | — |
| `check:vi-mock-specifiers` · `-inherit` · `-override-shape` | 0 | run
because this diff adds two `vi.mock` call sites |
| `check:changeset-claims` · `check:changeset-no-major` ·
`check:handler-key-reads` | 0 | — |
| `check-governed-queue-guard --test` | 0 | NOT GOVERNED — 4 paths
checked against 5 governed surfaces, none matched |

A dependency-closure build (`--filter '@object-ui/plugin-kanban^...'
build`) and the doc gates' own 35-task scoped build were both run to a
real 0 first; the type-check and the three README/doc gates were failing
only for want of them.

## Acceptance notes

- **Q3 was already answered, contrary to the brief.** The dispatch
carried the card's question 3 as unmeasured. It was answered and merged
on 2026-09-10 by PR objectstack-ai#8975, whose characterization pin is in the tree.
Re-derived rather than cited: that instrument was run on the pristine
base at the start of this work and passed, so the reading stands — the
cross-column landing position is lost on both ownerships. The fix
surface is therefore the wider one, and this branch covers both halves.
- **What "appended" is, and is not.** The board cannot compute the
target column's record-order position from the `columns` prop alone:
each column's cards are a record-ordered subsequence, and nothing
carries their global interleaving. Appending is therefore the only slot
the board can offer without claiming to know where the round-trip will
sort the card — it is not itself a promise that the card will stay last.
On the ownership that re-renders, the prop-driven re-sync corrects it
inside the same commit; on the external ownership, the card sits at the
end of the target column until the parent reflows. What is removed is
the claim that the user's drop slot was honoured. ⚠️ The objectstack-ai#8975 fixture
cannot distinguish "appended" from "record order" — its moved card is
last in the record array either way — and its assertion now says so in
place.
- **noted, not filed — `KanbanEnhanced.tsx` carries a byte-for-byte twin
of the removed reorder.** Left alone deliberately: it has zero non-test
importers, its registry key was retired by objectui#8257, and the
package `exports` publishes only `.` and `./style.css`, so it is
unreachable from outside this package. Dead code is not a fileable
class. Successor: none — no open PR touches this package.
- **noted, not filed — the exported `useQuickAddReorder` hook keeps its
own local-order state.** It is a published export with no in-repo
consumer and is not on this board's drag path. Successor: none.
- **Deviation from the claimed file surface, declared.** The claim named
`packages/plugin-kanban/src/`. This branch also touches
`packages/plugin-kanban/README.md`,
`packages/components/src/renderers/complex/README-KANBAN.md` and
`.changeset/`. The changeset is mechanically required. The two README
bullets are the docs half of this very behaviour change (AGENTS.md
commandment objectstack-ai#2), and each was a one-line claim of the exact capability
the ruling removes; shipping them unchanged would leave the board
advertising in-column reordering in print.

---
_Generated by [Claude
Code](https://claude.ai/code/session_012EpHzwH4wTy5sd7ibkD2yq)_

Co-authored-by: Claude <noreply@anthropic.com>

This branch was successfully deployed

1 active and 1 inactive deployments
Preview – objectui-site — 101aef19 Deployed Jan 21, 2026 by vercel[bot]
Preview – objectui-docs — 101aef19 Deployed Jan 21, 2026 by vercel[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

documentation Improvements or additions to documentation examples

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants