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

Add @object-ui/types package - TypeScript protocol definitions - #22

Merged
huangyiirene merged 4 commits into
mainfrom
copilot/define-object-ui-types
Jan 14, 2026
Merged

huangyiirene merged 4 commits into
mainfrom
copilot/define-object-ui-types

Conversation

Copilot AI commented Jan 14, 2026 •

Copy link
Copy Markdown
Contributor

Plan: Define all @object-ui/types ✅ COMPLETE

  • Create packages/types directory structure
  • Define base schema types (BaseSchema, SchemaNode)
  • Define all layout component schemas (Container, Flex, Grid, Card, Tabs)
  • Define all form component schemas (Input, Button, Select, Checkbox, Form, etc.)
  • Define all data display component schemas (Table, DataTable, List, Badge, Avatar, Chart, etc.)
  • Define all feedback component schemas (Alert, Loading, Progress, Skeleton, Toast)
  • Define all disclosure component schemas (Accordion, Collapsible)
  • Define all overlay component schemas (Dialog, Sheet, Drawer, Popover, Tooltip, etc.)
  • Define all navigation component schemas (Header, Sidebar)
  • Define all complex component schemas (Kanban, Calendar, Timeline, FilterBuilder, etc.)
  • Define common types (ComponentInput, ComponentMeta, ComponentConfig)
  • Define data source types (DataSource interface)
  • Create package.json for @object-ui/types
  • Create tsconfig.json for @object-ui/types
  • Export all types from index.ts
  • Ensure ZERO dependencies (protocol-first design)
  • Build package successfully
  • Create comprehensive README documentation
  • Add usage examples
  • Address code review feedback (improve type safety, reduce duplication)
  • Fix CI build failure - update pnpm-lock.yaml
Original prompt

定义所有的 @object-ui/types


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits January 14, 2026 09:45
…t schemas

Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
- Use generics for DataSource.bulk() return type
- Improve validation function type safety
- Extract OverlayPosition and OverlayAlignment shared types
- Add comprehensive usage examples

Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
@huangyiirene
huangyiirene requested a review from Copilot January 14, 2026 09:49
Copilot AI changed the title [WIP] Define all @object-ui/types Add @object-ui/types package - TypeScript protocol definitions Jan 14, 2026
Copilot AI requested a review from huangyiirene January 14, 2026 09:51
@huangyiirene

Copy link
Copy Markdown
Collaborator

@copilot 2026-01-14T09:53:31.6105353Z ##[group]Run pnpm install --frozen-lockfile
2026-01-14T09:53:31.6105741Z �[36;1mpnpm install --frozen-lockfile�[0m
2026-01-14T09:53:31.6147360Z shell: /usr/bin/bash -e {0}
2026-01-14T09:53:31.6147610Z env:
2026-01-14T09:53:31.6147846Z PNPM_HOME: /home/runner/setup-pnpm/node_modules/.bin
2026-01-14T09:53:31.6148135Z ##[endgroup]
2026-01-14T09:53:32.0011800Z Scope: all 10 workspace projects
2026-01-14T09:53:32.0915157Z  ERR_PNPM_OUTDATED_LOCKFILE  Cannot install with "frozen-lockfile" because pnpm-lock.yaml is not up to date with /packages/types/package.json
2026-01-14T09:53:32.0915904Z
2026-01-14T09:53:32.0916652Z Note that in CI environments this setting is true by default. If you still need to run install in such cases, use "pnpm install --no-frozen-lockfile"
2026-01-14T09:53:32.0917292Z
2026-01-14T09:53:32.0917403Z Failure reason:
2026-01-14T09:53:32.0917856Z specifiers in the lockfile don't match specifiers in package.json:
2026-01-14T09:53:32.0918394Z * 1 dependencies were added: typescript@^5.0.0
2026-01-14T09:53:32.0918720Z
2026-01-14T09:53:32.1127039Z ##[error]Process completed with exit code 1.

Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>

Copilot AI commented Jan 14, 2026

Copy link
Copy Markdown
Contributor Author

@copilot 2026-01-14T09:53:31.6105353Z ##[group]Run pnpm install --frozen-lockfile
2026-01-14T09:53:31.6105741Z �[36;1mpnpm install --frozen-lockfile�[0m
2026-01-14T09:53:31.6147360Z shell: /usr/bin/ba...

Fixed in b7346ed. The pnpm-lock.yaml file has been updated to include the new @object-ui/types package. The CI build should now pass with pnpm install --frozen-lockfile.

@github-actions

Copy link
Copy Markdown
Contributor

✅ All checks passed!

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

@huangyiirene
huangyiirene marked this pull request as ready for review January 14, 2026 10:01
@huangyiirene
huangyiirene merged commit c36462a into main Jan 14, 2026
Copilot AI added a commit that referenced this pull request Feb 23, 2026
- #39 showRecordCount: conditionally show/hide record count bar
- #24 rowHeight: add short and extra_tall mapping in ListView + bridge
- #7 sort: parse legacy string format "field desc"
- #22 description: render view description below toolbar
- #40 allowPrinting: add print button with window.print()
- #31 virtualScroll: forward flag to grid view schema
- #35 userActions: wire sort/search/filter/rowHeight to toolbar visibility
- #38 addRecord: render "+ Add Record" button from spec config
- #37 tabs: render tab bar UI for view tabs
- #9 filterableFields: restrict FilterBuilder to whitelist fields
- #8 searchableFields: scope search queries to specified fields
- #36 appearance: wire showDescription and allowedVisualizations
- #16 pageSizeOptions: add page size selector UI in status bar
- #17-21: use spec kanban/calendar/gantt/gallery/timeline configs
- #20 gallery: add typed GalleryConfig to ListViewSchema
- #21 timeline: add typed TimelineConfig to ListViewSchema
- Bridge: add short/extra_tall density mapping, filterableFields pass-through

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI removed the request for review from Copilot March 23, 2026 19:09
akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Sep 17, 2026
…bjectui#8754) (objectstack-ai#9487)

Fixes objectstack-ai#8754

Round 2 of the director seat's summon objectstack-ai#22 ruling (2026-09-12):
**instrument first, deletion second**. Round 1 — the instrument repair —
landed `c4a1d39fe9` (PR objectstack-ai#9222). This is the deletion.

## The admission criterion was a measurement, not this card's body

⭐ **The 25 keys in the card's body were not the input.** `pnpm
check:i18n-dead-keys` was re-run on this branch's own base,
`ff1d5ea8d1`, and the deletion is what **it** confirms today.

Its verdict, quoted from its own output:

> Pack keys (en, assumed parity-identical across all ten): 3010.
Referenced by a t()/tt() call site (literal + plural-suffixed +
returnObjects branch + dynamic-template-reachable): 15806.
>
> 358 candidate(s) with no call site this pass can see, across 46
namespace(s): 119 CONFIRMED (no textual footprint anywhere else in the
repo either), 239 NEEDS-REVIEW …

**The population named in words:** 3010 keys defined by the `en` pack
(the ten packs are parity-identical, which
`all-locales-key-parity.test.ts` separately enforces); of those, 358
have no call site the AST pass can see; of those, 119 also have no
bounded textual occurrence anywhere else in the repository — that is the
CONFIRMED tier. This run agrees with round 1's recorded 119 CONFIRMED,
and NEEDS-REVIEW has moved 238 → 239 since (one key joined, from
ordinary tree movement).

### Does it agree with the card's 25? No — the measured population is
23, and the difference is the card's arithmetic

Every one of the 13 keys PR objectstack-ai#8753 uncovered is **still CONFIRMED today**
— none moved tier. Both families are intact, each 5 CONFIRMED + 1
NEEDS-REVIEW, exactly as the ruling anticipated.

The card reached 25 as `13 + 6 + 6`, double-counting the two leaves that
belong to both sets: `approvals.reject` and `marketplace.pricing.free`
are each one of the 13 **and** a member of one of the families. The true
union is **23**. ⇒ no key was dropped for being live, and no key was
added; the card simply counted two keys twice.

## Family completeness, each zero carrying a control that fires

The ruling's family rule: a family is whole when every member is
CONFIRMED, **or** is NEEDS-REVIEW whose only hits are non-liveness. Both
families qualify, and both are removed as **roots**, not emptied leaf by
leaf.

Membership was read from the pack source in all ten packs, not inferred:
`approvals` holds exactly 6 members and `marketplace.pricing` exactly 6,
in every pack. All 12 are candidates ⇒ no member has a call site.

**`approvals.*`** — probe and control in the same command, over
`packages/ apps/ examples/ e2e/ content/ scripts/` minus the ten locale
packs (which define every key by construction):

| probe | result |
|---|---|
|
`approvals.(approve\|approveSuccess\|comment\|reject\|rejectSuccess\|rejectConfirm)`
at key boundary | **1 hit**, and it is
`packages/app-shell/CHANGELOG.md:6161` — changelog prose about a past
change. Zero source hits. |
| **control:** `approvalsInbox.` , same command shape | **HITS** —
`DeclaredActionsBar.tsx:230/236/241`, `approverIdentity.ts:365/373`, … |

`approvalsInbox` hitting while `approvals.` does not is the reading the
card predicted.

**`marketplace.pricing.*`**:

| probe | result |
|---|---|
| `marketplace.pricing.` at key boundary | **1 hit**,
`packages/i18n/src/__tests__/untranslated-identity-4376.test.ts:105` — a
pin-test allowlist entry |
| any `t()`/`tt()` call whose key mentions `pricing` at all | **0** |
| the word `pricing` anywhere in
`packages/app-shell/src/console/marketplace/` | **0** |
| **control:** `marketplace.category.` , same command shape | **HITS** —
`MarketplacePackagePage.tsx:654`, `MarketplacePage.tsx:185` |
| **control:** any `t()` call whose key mentions `category` | **HITS** —
3 call sites |

`marketplace.category.` is a collected dynamic template head, which is
exactly why none of *that* family was ever a candidate — and why
`marketplace.pricing.`, which has no head, was.

The two NEEDS-REVIEW members are the two the ruling named as admissible,
and both hits are non-liveness: a changelog line and a pin test. ⇒ both
families retire whole.

## The eleven individual leaves

Each was held out of an earlier sweep by a **longer live sibling that
merely contains it**, until PR objectstack-ai#8753 put a key-boundary requirement on
both sides of the text probe. A repo-wide bounded grep over all 23 keys
returns **exactly the two hits above and nothing else** — and that same
command returning non-zero for those two is what proves the other 21
zeros are readings rather than a broken pattern.

## Firing control on the deletion itself

⭐ Without this, "the keys are gone" is indistinguishable from "the pack
reader broke".

`dead-pack-keys-retired-8754.test.ts` asserts, **in the same run**:
every retired key is absent from all ten packs; both family roots are
gone; and 20 named surviving siblings still resolve to a non-empty
string in all ten packs — including the longer sibling that actually
renders in each of the eleven leaf cases (`sidebar.helpTooltip` for
`sidebar.help`, `home.starredApps.title` for `home.starred`, …). A
sample across writing systems pins that those survivors are real
translations, not the English value ten times.

**Reverse-verified.** One retired key was restored into **one** pack
(`zh`) on the committed tree, proven to have landed on disk by blob hash
(`3aab235a78` → `de6dff3fa1`) and by the leaf spelling going `0 → 1`:

```
FAIL  all-locales-key-parity.test.ts > zh defines no key that en lacks
  AssertionError: zh has 1 key(s) absent from en: expected [ 'sidebar.help' ] to deeply equal []
FAIL  dead-pack-keys-retired-8754.test.ts > no pack defines any retired key, in any of the ten packs
  AssertionError: … expected [ 'zh :: sidebar.help' ] to deeply equal []
Test Files  2 failed (2)
     Tests  2 failed | 35 passed (37)
```

Both pins red and **name the pack and the key**, while **35 tests in the
same run stay green** — that green half is the survivor assertion, so
the red is about the retired key and not about the reader. The mutation
was restored under a shell `trap` and the restore verified by **state**,
not exit code: on-disk hash equals the `HEAD` blob, `git diff HEAD`
empty, `git status` clean.

## All-locales key parity — before and after

Measured on two real trees, not inferred.

| | tree | test files | tests |
|---|---|---|---|
| **before** | `ff1d5ea8d1` (this branch's base, in its own worktree) |
66 passed | **1120 passed** |
| **after** | `ebcbb22e5f` | 67 passed | **1125 passed** |

Parity passes on both sides; the `+1 file / +5 tests` is exactly this
PR's new pin. Parity is *preserved* rather than trivially satisfied
because every deletion is a ten-pack edit — 27 source lines removed from
each of the ten packs, identical in each.

## ⚠️ The self-pollution trap, walked into and measured

The card forbids pinning keys by spelling them, because a spelled key
becomes a textual hit for the sweep and is pushed back into
NEEDS-REVIEW. A first draft of the new pin's **header comment** spelled
out five keys as a warning not to name them. The post-deletion census
then read **93 CONFIRMED where the arithmetic said 98** — those five,
demoted by the very sentence telling the reader not to do it. The
spellings were replaced with a description of the shape, and the census
landed on 98 exactly.

Recorded here and in the test's header because the demotion is silent,
and the five keys are not exotic: they are the nearest live-*looking*
sibling in each of the `dashboard`, `form`, `sidebar`, `home` and
`workspace` namespaces, and every one of them is CONFIRMED-dead itself
today.

## Census, before → after, with every number accounted for

| | before (`ff1d5ea8d1`) | after (`ebcbb22e5f`) | delta |
|---|---|---|---|
| pack keys (`en`) | 3010 | 2987 | −23 |
| candidates | 358 | 335 | −23 |
| CONFIRMED | 119 | 98 | −21 |
| NEEDS-REVIEW | 239 | 237 | −2 |

The set that left the candidate list **is exactly the 23 deleted keys**;
**no key joined**, and **no surviving key changed tier**. 21 of the 23
were CONFIRMED and 2 were the admissible NEEDS-REVIEW members ⇒ `119 −
21 = 98` and `239 − 2 = 237`, which is what the run prints.

## Bytes — re-measured, ⛔ no budget constant moved

The ruling asks for the `i18n-locales` chunk figure. ⚠️ **That chunk no
longer exists**: objectui#7479 made nine of the ten catalogues lazy and
re-keyed the ceiling to `i18n-locale-en`. Reported against the
successor, from two real console builds:

| | before | after | delta |
|---|---|---|---|
| eager `i18n-locale-en` chunk | 39.6 KB gz | 39.4 KB gz | −152 bytes |
| ten catalogues, gzipped | 456,642 B | 454,801 B | **−1,841 B
(−0.40%)** |
| ten catalogues, uncompressed | 1,495,158 B | 1,488,126 B | −7,032 B
(−0.47%) |
| aggregate console eager closure | 3061.4 KB | 3061.3 KB | −0.1 KB |

`check:eager-closure` green on both trees. ⛔ `PER_CHUNK_GZIP_CEILINGS`,
`PER_CHUNK_BASELINE` and `MAX_EAGER_CLOSURE_GZIP_BYTES` are
**untouched** — this PR changes no file under `scripts/`.

## Gates run

| gate | exit | reading |
|---|---|---|
| `pnpm --filter @object-ui/i18n test` | 0 | 67 files / 1125 tests |
| `pnpm --filter @object-ui/i18n type-check` | 0 | `tsc --noEmit` + test
tsconfig |
| `pnpm --filter @object-ui/i18n lint` | 0 | 0 errors, 33 pre-existing
warnings |
| `check:i18n-keys` | 0 | *"Every in-scope call-site key resolves
against the en pack (2987 keys)"* — the direct proof no call site asks
for a deleted key |
| `check:i18n-drift` | 0 | 0 `en` values changed in range |
| `check:i18n-designer-parity` | 0 | every `en` row has a `zh` row |
| `check:i18n-dead-keys` | 0 | the census above |
| `check:eager-closure` | 0 | table above |
| `check:eager-locale-catalogues` | 0 | ⚠️ first returned **exit 2
PREREQUISITE NOT MET** (needs a built bundle) — re-run after building, ⛔
not recorded as a pass |
| `check:control-bytes` | 0 | 7658 tracked text files |
| `check:test-path-roots` | 0 | new pin's roots classified |
| `check:new-line-citations` | 0 | 0 new citations |
| `check-changeset-presence` | 0 | measured the obligation: 12 published
source files of 1 released package ⇒ 1 changeset |
| `check-changeset-no-major` | 0 | no `major` declared |

`gates_weakened:` **NONE** — no threshold lowered, no ceiling raised, no
non-vacuity floor moved (the `> 2000` floors read 2987), no test
skipped.

Repo-wide `eslint .` is CI's run, not this PR's: the 13 changed TS files
lint **0 errors / 0 warnings**, and `pnpm lint` is `turbo run lint`
(per-package), whose `@object-ui/i18n` leg is the row above.

## Changeset — measured, not assumed

Owed, and `check-changeset-presence` said so in its own words.
`@object-ui/i18n` is published (`private` unset, `v17.6.0`) and in the
40-package fixed release group, and this PR changes 12 files under its
`src/`. `.changeset/8754-dead-pack-keys-retired.md` lists **every one of
the 23 keys**, states the breaking semantics and the out-of-repo
consumer risk the ruling accepts, and names the live replacement surface
for each family. Marked `minor` per this repo's rule that a changeset
never declares `major`.

## 维护者速读(草稿)

**改了什么**:从十个语言包里删掉 23 条已确认没人用的句子 —— 两个完整的功能族(审批 `approvals.*`、应用市场定价
`marketplace.pricing.*`),外加 11 条零散的旧句子。

**为什么改**:这些句子仓库里没有任何地方再引用,但仍随每个版本发布、占着打包预算。卡片正文写的是 25
条,但那是算错了(有两条被数了两遍);本次按仪器**当天实测**的结果删了 23 条,不是照抄卡片上的数字。

**风险与代价(含回滚)**:`@object-ui/i18n`
是对外发布的包。仓库外如果有人在用被删的句子,那里会显示原始键名而不是句子,**不报错**。这个风险是维护者 2026-08-27
已经拍板接受的(「项目在创业阶段,用户也很少,短期不考虑渐进」)。回滚 = 一次 revert,把键加回去即可。打包体积减少约 1.8
KB(gzip,十个语言包合计)。

**席位意见**:(留空,待评审)

**你要做的**:确认「立即退役、不设过渡期」这一条仍然成立;如果您希望改成保留一段时间,请说一声,这个 PR 需要重做。

---
🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_013VGeMu3p6qEFWR6K6GGLaW

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

Co-authored-by: claude[bot] <claude[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: os-try-charles <mqmscharles@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants