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

Fix TypeScript build errors in plugin packages - #227

Merged
hotlong merged 3 commits into
mainfrom
copilot/refactor-ci-run-setup
Jan 27, 2026
Merged

hotlong merged 3 commits into
mainfrom
copilot/refactor-ci-run-setup

Conversation

Copilot AI commented Jan 27, 2026 •

Copy link
Copy Markdown
Contributor

CI build failing with TypeScript errors in three plugin packages: implicit any types and composite project configuration issues preventing workspace dependency imports.

Changes

  • plugin-chatbot: Add type annotation to ComponentRegistry callback props

    ComponentRegistry.register('chatbot', 
      ({ schema, className, ...props }: { schema: ChatbotSchema; className?: string; [key: string]: any }) => {
  • plugin-charts: Fix type narrowing with intermediate variable, use ChartConfig type

    const newConfig: ChartConfig = {};
    series.forEach((s: any, idx: number) => {
      newConfig[s.dataKey] = { label: s.dataKey, color: colors[idx % colors.length] };
    });
    config = newConfig;
  • plugin-dashboard: Add DashboardWidgetSchema type annotation to map callback

  • plugin-dashboard/tsconfig.json: Remove implicit rootDir constraint to allow workspace dependency imports (matches pattern in other plugins)

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • fonts.googleapis.com
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/objectui/objectui/apps/site/node_modules/.bin/../next/dist/bin/next build (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

引用: https://github.com/objectstack-ai/objectui/actions/runs/21388440836/job/61569548628#step:8:1


💡 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 27, 2026 •

Copy link
Copy Markdown

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

Project Deployment Review Updated (UTC)
objectui-site Error Error Jan 27, 2026 7:44am

Request Review

…gin-dashboard

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor CI run setup for improved efficiency Fix TypeScript build errors in plugin packages Jan 27, 2026
Copilot AI requested a review from hotlong January 27, 2026 07:46
@hotlong
hotlong marked this pull request as ready for review January 27, 2026 07:47
Copilot AI review requested due to automatic review settings January 27, 2026 07:47
@hotlong
hotlong merged commit fba43cb into main Jan 27, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes TypeScript build errors in three plugin packages by adding explicit type annotations to resolve implicit any errors and updating the plugin-dashboard tsconfig.json to allow workspace dependency imports.

Changes:

  • Added type annotations to ComponentRegistry callback parameters in plugin-chatbot, plugin-charts, and plugin-dashboard to fix implicit any errors
  • Updated plugin-dashboard/tsconfig.json to remove explicit rootDir constraint, matching the pattern used in other plugin packages
  • Fixed type narrowing issue in plugin-charts by using an intermediate variable for ChartConfig

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
packages/plugin-dashboard/tsconfig.json Updated configuration to match other plugin packages (removed rootDir, added baseUrl/paths, reordered options)
packages/plugin-dashboard/src/DashboardRenderer.tsx Added DashboardWidgetSchema type annotation to map callback parameter
packages/plugin-chatbot/src/renderer.tsx Added inline type annotation to ComponentRegistry.register callback to specify ChatbotSchema and additional props
packages/plugin-charts/src/index.tsx Fixed type narrowing issue by using intermediate ChartConfig variable before assignment

akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Oct 7, 2026
…stored view rows by the spec's declared spellings and drops the reads nothing writes (objectui#11013) (objectstack-ai#11209)

Fixes objectstack-ai#11013

Clause-②: yes

## Context

- This is the objectui end of ruling 甲 on
objectstack-ai/objectstack#20051 (record `5856781584`, batch objectstack-ai#227 item
2), stage ii: "…and objectui aligns its reads to the declared
spellings". The spec end is objectstack-ai/objectstack#20474. It is
installed here as `@objectstack/spec@17.5.0`, which exports
`VIEW_CONSOLE_ROUND_TRIP_KEYS` from `@objectstack/spec/ui`.
- Claim `5908989184` (seat `domain:ui#1`, session
`session_0122Knsowci76D2rBWReCzzZ`).
- Cross-seat note `5909173910` corrects `5908394824`.
objectstack-ai/objectstack#20051 stage (iv) no longer waits on this
card. It is dispatched there under the maintainer's instruction on that
card: 「20051 不考虑现有的数据」. At objectstack's pin, the console's own save
path already writes `object` and only the declared row-state keys. So
the reads aligned here matter for rows written earlier. No consumer-side
fallback for legacy rows was added beyond what the card names.

## What changed: one commit per work item

1. **Declared spellings for the bound object and the row identity**
(`08a159633`)
- `viewItemObjectName` (data-objectstack) reads `data.object ?? object`.
The `objectName` leg is gone.
- The object page no longer stamps `objectName: sv.objectName ||
sv.object || objectName` onto the rows `listViews()` returns. No reader
consumed that stamp; the handlers act on the route's object name. A
saved view's whole-body toolbar save wrote the stamp back into the
stored row.
- The Studio `view-ref` picker now reads `object` (`viewRefCatalog`). It
used to read `objectName ?? object ?? object_name`.
- The Studio view preview reads `object` (`resolveObjectName`). It used
to read `objectName` on the body and on the draft. This site was not in
the card's census. It is fixed in place as the same defect class and the
same gate family, and no open PR touches the file.
- `viewRowId` reads `name` only. A top-level `id` / `_id` is no
identity.
- `filter[].id` / `sort[].id` and `exportOptions` needed no change; see
the measurements below.
2. **Drop the reads nothing writes; `userActions` for the toolbar
policy** (`af24d4e7c`)
- Both relays of a view into the `list-view` node stop reading nine keys
off the view: `allowExport`, `wrapHeaders`, `clickIntoRecordDetails`,
`addRecordViaForm`, `addDeleteRecordsInline`, `collapseAllByDefault`,
`fieldTextColor`, `prefixField`, and the `editRecordsInline` spelling of
`inlineEdit`. The two relays are plugin-view's `renderListView`
composition and the object page's relay over it.
- The object-view node's own values still reach `ListView`. That node
read is the objectui#5097 host-composition read, and it is untouched.
- A view's `allowExport: false` no longer withholds its `exportOptions`.
- `NamedListView.allowExport` becomes a `?: never` tombstone. Ruling A
on objectui#7924 kept it declared only because both relays read it.
- Two sites now read the toolbar policy as `userActions.search` /
`.sort` / `.filter`. They used to read the bare `showSearch` /
`showSort` / `showFilters` flags off the view. The sites are the
`object-view` node the object page builds and plugin-view's non-grid
`generateViewSchema` route.
- Census and pin updates: the relay census
(`ObjectView.relayRungCensus-7559.test.ts`) declares each dropped rung's
absence with its evidence kind; the objectui#7779 census re-points its
`allowExport` pins; the objectui#10694 panel probe edits `resizable`
instead of `wrapHeaders`.
3. **`listViews()` record flatten** (`67048225b`)
- The flattened row now carries the record's `object`. It also carries
the spec's round-trip keys declared on the `viewItem` member:
`isDefault`, `isPinned`, `sortOrder`, `visibility`, `columnState`. The
set is read off `VIEW_CONSOLE_ROUND_TRIP_KEYS`, not retyped.
- app-shell's `VIEW_ROW_STATE_KEYS` for the view-config save is derived
from the same record.
- A reload round trip per key is pinned against a stub metadata store.

Also in this PR:

- The changeset (`bcd3c6f67`) states each dropped key's effect in user
terms.
- `c1d3b684a` adds dated notes to two pending objectui#7924 changeset
entries. Both said "`allowExport` stays declared", which this change
makes false; `pnpm check:changeset-claims` surfaced them.
- `b2df69071` is a lint tidy with no behaviour change.

## PM mechanism assumptions, measured

1. **"Every `objectName` reader already falls back to `object`."** This
is **partially falsified**. `viewItemObjectName` did read `object`
before `objectName`. The other two sites read `objectName` FIRST, with
`object` as the fallback: the object-page stamp (`sv.objectName ||
sv.object`) and the picker (`objectName ?? object ?? object_name`). A
fourth reader, `ViewPreview`'s `resolveObjectName`, read it third and
fifth.
- Where rows carrying only `objectName` would come from: no door accepts
one. `ViewMetadataSchema` refuses a flattened overlay bound by
`objectName` alone, and also a ViewItem record bound by it alone. The
same bodies bound by `object` parse; that is the lit control. The test
is `viewItemObjectName.declaredSpelling-11013.test.ts`.
- Every adapter writer stamps `object`: `createView`, `updateViewConfig`
and `updateView`, all measured in the same file.
- A row carrying both spellings answers by `object` at every site, as
before.
2. **"No producer for the nine keys."** **Confirmed: zero producers.**
- Stored rows: no console write path puts any of them on a view. The
config save narrows `config` to the spec's `ListViewSchema` keys plus
the declared row-state keys. The create path goes through the
spec-driven inspector. The pin toggle and reorder write `isPinned` /
`isDefault` / `sortOrder`. The settings overlay writes `rowHeight` /
`sort` / `hiddenFields` / `columnState` / `inlineEdit`.
- Census command, non-test sources of `packages/*/src`, `apps/**` and
`examples/**`: `git grep` for the key as a property. The only hits are
the readers, the type declarations, and two React props handed to
`ListView` directly: `StudioDesignSurface`'s `addDeleteRecordsInline:
true`, and `InterfaceListPage`'s list-view node `allowExport: false`.
Neither is a view row or an authored view.
- Lit control on the same search: `isPinned` finds the pin toggle's
write.
- Authored views in the sibling objectstack checkout (`examples/**`,
`apps/**`): 0 files for each of the nine. The control `inlineEdit` finds
9 files.
- The spec's strict `ListViewSchema` refuses all nine with
`unrecognized_keys`; the control `exportOptions` is accepted.
   - Nothing is raised on objectstack-ai/objectstack#20051.
3. **"The round-trip keys come back only through the `loadViewOverrides`
override merge."** This is **partially falsified**.
- Confirmed: the flatten kept only `config` + `name` / `label` /
`isDefault` / `_draft`.
- The override merge restores `isPinned` / `visibility` / `columnState`
onto the TAB. It does so for records that `MetadataProvider` lists into
`objectDef.listViews`, which is where `loadViewOverrides` takes its ids.
- The switcher's sort reads `sortOrder` off the `savedViews` row only,
so `sortOrder` never came back through the merge. A reordered record
lost its place on reload, wherever the per-browser `viewOrder:` cache
did not mask it.
   - Pinned per key in `listViews.roundTripKeys-11013.test.ts`.
4. **"No reader keys state by `filter[].id` / `sort[].id` across a
reload."** **Confirmed.**
- The search ran over non-test sources of plugin-view, plugin-list, the
components `custom/` builders and renderers, and app-shell views. It
looked for `(filter|sort|condition|item|…).id` and for `localStorage` /
`sessionStorage`.
- The ids are React keys and in-session edit targets in
`filter-builder.tsx` / `sort-builder.tsx`. `view-config-utils.ts` mints
one when a row has none.
   - No persisted state is keyed by them.

`exportOptions` needed no change on this end: the only reader outside
`ListView`, `ObjectGrid`, reads `exportOptions.formats`.
`ListView.tsx`'s bare-array tolerance is untouched. The card retires it
after rows are stored parsed, and the file is in PR objectui#10278's
area.

## Acceptance notes

- **`NamedListView.allowExport` tombstone.** It follows from dropping
the read. The alternative, keeping the type declared with no reader, is
the declare-and-ignore shape ADR-0049 forbids. The seat's disposition on
objectstack-ai/objectstack#20456 is also "no producer, no declared
spelling". `NamedListView` no longer types `ObjectViewSchema.listViews`
(objectui#7928), so the break is on an exported legacy type only.
- **Toolbar reads go through `normalizeListViewSchema`.** This is the
one fold the relays' own `userActions` rung already runs, so no new
tolerance is added. A stored view that still carries a bare `show*` flag
keeps its answer, which objectui#7924's changeset states as policy
("that fold stays"). Reading `userActions` raw would change those rows
at these two sites only.
- **`MetadataProvider.applyViewItem`** still flattens a record to
`config` + identity. Its tab gets the round-trip keys back through the
override merge. It was noted and not changed; the `listViews` comment
says so.
- **Not changed, noted only:**
- `UnifiedViewConfig` (`types/src/designer.ts`) still declares
`allowExport` / `addRecordViaForm` / `show*`. Nothing constructs that
type. Carrier: none.
- `ResourceEditPage`'s `sourceObjectName` falls back to
`draft.objectName` for every metadata type. That is not a view-row read.
- **Overlap with open PRs:**
- PR objectui#11192 edits `data-objectstack/src/index.ts`, in its import
block and filter translation, away from these hunks.
- PR objectui#10278 edits `types/src/objectql.ts` at
`ObjectKanbanSchema`, away from `NamedListView`.
- **File surface beyond the claim's list**, each a consequence of the
three items:
- `types/src/objectql.ts` and its objectui#7779 census, for the
tombstone
  - `ViewPreview.tsx`, the in-place fix above
- the relay census and the objectui#10694 probe, plus comment refreshes
in two plugin-view pins
  - two pending changesets, for the dated notes

## Verification

All readings below are at head `b2df69071`. Exit codes were captured
before any pipe. Heavy runs went through `os-verify-lock.sh`.

**Build and type-check**

- `pnpm --workspace-concurrency=2 --filter '@object-ui/app-shell^...'
run build`: exit 0. That closure holds 29 packages, including `types`,
`data-objectstack` and `plugin-view`. The build ran at `c1d3b684a`;
`b2df69071` changed no exported type.
- `pnpm --filter PACKAGE run type-check`: exit 0 for all four packages.
`types` and `plugin-view` were checked at `c1d3b684a` and are unchanged
since. `data-objectstack` and `app-shell` were re-checked at
`b2df69071`.
- The new and edited tests are in each type-check population, counted
with `--listFiles`:
  - app-shell `tsconfig.test.json`: 5 of 5
- types `tsconfig.test.json`: 1 of 1 (it holds the `allowExport`
`@ts-expect-error` pin)
  - plugin-view `tsconfig.test.json`: 2 of 2
- data-objectstack `tsconfig.json`: 2 of 2 new tests, 74 test files in
all

**Tests**

- `pnpm exec vitest run packages/data-objectstack/ packages/types/
packages/plugin-view/`: exit 0. `Test Files 421 passed (421)`, `Tests
8177 passed (8177)`.
- `pnpm exec vitest run packages/app-shell/ --shard=N/4`, N = 1 to 4,
each exit 0:
  - shard 1: 229 files passed, 2189 tests passed, 1 skipped
- shard 2: 228 files passed and 1 skipped, 2074 tests passed and 8
skipped
  - shard 3: 228 files passed, 2743 tests passed
  - shard 4: 228 files passed, 2205 tests passed

**Reverse verification**

Each ablation was one-off: mutate, run the pin, restore. Every leg went
through `ablation-replace.mjs` in WRAP mode, with the anchor required to
hit exactly once and restore proven against HEAD's blob. After the run,
`git diff HEAD` is empty. The predicted direction was red for every leg,
and every leg went red:

| leg | mutation | pin | result |
| --- | --- | --- | --- |
| A1 | `objectName` leg back in `viewItemObjectName` |
`viewItemObjectName.declaredSpelling-11013` | 2 failed |
| A2 | `id` / `_id` back in `viewRowId` |
`ObjectView.setDefaultViewIdentity` | 3 failed |
| A3 | `objectName ?? object ?? object_name` back in `viewRefCatalog` |
`ResourceEditPage.pickerLoadFailure` | 1 failed |
| A4 | `objectName` back in `resolveObjectName` |
`ViewPreview.declaredObject-11013` | 2 failed |
| A5 | `activeView?.wrapHeaders` back in plugin-view |
`ObjectView.viewRowDeclaredReads-11013` | 2 failed |
| A6 | `activeView?.showSearch` back on the object-view node | same | 1
failed |
| A7 | the `allowExport` rung and gate back in app-shell | relay census,
the same file, and the objectui#7779 census | 6 failed across 3 files |
| A8 | the round-trip loop emptied in the flatten |
`listViews.roundTripKeys-11013` | 5 failed |
| A9 | `activeView?.showSearch` back on plugin-view's non-grid route |
`ObjectView.viewRowDeclaredReads-11013` | 1 failed |

A4's first attempt was a no-op. Its replacement contained the anchor, so
the tool refused, the anchor count did not drop, and no test ran. It was
redone with a non-overlapping replacement; the row above is the redone
run.

**Gates**

Each exit 0:

- `node scripts/check-changeset-presence.mjs`: "21 source file(s) of 4
released package(s) changed, and this change declares 1 changeset(s)"
- `pnpm check:control-bytes`
- `check-changeset-no-major`, `check-changeset-fixed`
- `check-changeset-overwrite`. It is report-only. It names the two
dated-note edits, and their front matter is unchanged.
- `pnpm check:new-line-citations`: "0 new citation(s)"
- `check:vi-mock-specifiers`, `check:vi-mock-inherit`,
`check:vi-mock-override-shape`
- `check:spec-symbols`, `check:metadata-write-doors`,
`check:test-path-roots`, `check:pending-changeset-literals`
- `check:icon-record-names`, `check:docs-route-closure`
- `check:changeset-claims`. It is report-only; its two findings got the
dated notes.

**Lint, narrowed and proven**

- Population: `eslint.config.js` lints `**/*.{ts,tsx}`. All 21 changed
or added `.ts` / `.tsx` files are in it.
- Count: `pnpm exec eslint --format json` over those 21 files reports 21
files and 0 errors, with inline config honoured as `pnpm lint` honours
it.
- Warnings per file against the merge base are equal, except two.
`ResourceEditPage.tsx` gains one `react-refresh/only-export-components`
hint, for the exported `viewRefCatalog`. `ViewPreview.tsx` loses one.
- Invariance: the config sets no `parserOptions.project`, so linting is
not type-aware. It loads no import plugin, and no rule in
`eslint-rules/` reads another file. So this diff cannot move an
untouched file's verdict.
- The full `pnpm lint` is CI's run.

**NOT MEASURED**

- `check:doc-examples`. Reason: PREREQUISITE NOT MET. It needs the
`app-shell`, `cli`, `plugin-ai`, `plugin-gantt`, `plugin-map`,
`plugin-markdown` and `plugin-timeline` dists, which are outside the
built closure. No doc example writes `allowExport` on a `NamedListView`
or names another changed symbol. It is declared to CI.

**Mergeability**

- Main has moved to `846cec0ef`. Of this branch's files, only
`data-objectstack/src/index.ts` changed there, by PR objectui#11192.
- `git merge-tree` of HEAD against that main exits 0.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Warren Buffett <warren@objectstack.ai>

This branch had an error being deployed

1 failed deployment
Preview — 982da359 Deployed Jan 27, 2026 by vercel[bot]
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.

3 participants