Repository navigation
Add test coverage for plugin component registration and configuration - #44
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
hotlong
marked this pull request as ready for review
January 14, 2026 20:00
Contributor
|
@copilot 从主分支更新代码并解决冲突 |
Copilot
AI
changed the title
[WIP] Add test cases for plugin design
Add test coverage for plugin component registration and configuration
Jan 14, 2026
- Merged test and test:watch scripts with type-check and lint scripts - Kept comprehensive test implementations over placeholder tests - All plugin packages now have full script support
Contributor
Author
hotlong
requested review from
Copilot
and removed request for
hotlong and
huangyiirene
January 14, 2026 23:47
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request adds comprehensive test coverage for all plugin packages in the Object UI monorepo, ensuring that plugin components are properly registered with the ComponentRegistry and have correct metadata configuration.
Changes:
- Created test suites for 4 plugin packages with 31 total tests covering component registration, metadata, inputs, and default props
- Added
test:watchscript to all plugin package.json files for development convenience - Tests validate ComponentRegistry integration following the established testing patterns from the components package
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/plugin-charts/src/index.test.ts | Added 11 tests validating chart-bar and chart (advanced) component registration, metadata, inputs (enum, array), and default props |
| packages/plugin-charts/package.json | Added test:watch script for development |
| packages/plugin-markdown/src/index.test.ts | Added 5 tests validating markdown component registration, required inputs, textarea input type, and default markdown content |
| packages/plugin-markdown/package.json | Added test:watch script for development |
| packages/plugin-editor/src/index.test.ts | Added 7 tests validating code-editor registration, enum inputs for language/theme, boolean inputs, and default props |
| packages/plugin-editor/package.json | Added test:watch script for development |
| packages/plugin-kanban/src/index.test.ts | Added 8 tests validating kanban board registration, array/code inputs, default column structure, and card properties |
| packages/plugin-kanban/package.json | Added test:watch script for development |
Contributor
|
@copilot fix pnpm test |
- Changed root test script from 'pnpm -r test' to 'vitest run' - Added pretest script to build required packages before running tests - Fixes issue where individual packages couldn't find vitest locally - All 86 tests now pass successfully Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Contributor
Author
Fixed
The issue was that Commit: 10ec2d3 |
Contributor
|
✅ All checks passed!
|
akarma-synetal
pushed a commit
to akarma-synetal/objectui
that referenced
this pull request
Sep 9, 2026
…ne; remove the Display Mode control and seed (objectui#7654) (objectstack-ai#7739) * feat(types)!: retire ChatbotSchema.displayMode as an ADR-0049 tombstone; drop the Display Mode control and seed (objectui#7654) `displayMode?: 'inline' | 'floating'` was declared on `ChatbotSchema` and on `ChatbotFloatingSchema`, offered as a "Display Mode" control in the `chatbot-floating` registration's `inputs`, seeded as `'floating'` by that registration's `defaultProps` -- and read by nothing. The node `type` is the one selector of presentation; this key was a second spelling of that choice. Maintainer ruling B (2026-09-05, decision batch objectstack-ai#44): retire it. Both declarations become `displayMode?: never` with the JSDoc pointing at `type` as the replacement and citing discriminator prong 2 (advertised at CHANGELOG.md:578, 3.3.0). The designer control and the `defaultProps` seed are removed; the restatement of the control is the tombstone plus the changeset. Runtime validation of the key is unchanged -- zero before and after: it has no Zod arm on either twin and `BaseSchema` is `.passthrough()`, so stored documents the designer wrote parse exactly as they did. No `retirementTombstone()` half is minted (that is the objectui#6152 axis); the new test pins both twins' shapes as the tripwire that fires when the mirror is minted. Measured on this member (tsc, `FloatingChatbotConfig` lit as the no-index- signature control): declared, a wrong value is TS2322 and presence is clean; DELETED, every shape is silent and the member reads as `any`; TOMBSTONED, presence with any value is TS2322 in every shape. On a `BaseSchema` carrier the routes are loud-vs-silent. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KbJQ1y1J12nZxYzFWhP8Q3 * docs(types): name the manifest/validator accept-set face, and correct the tripwire prose (objectui#7654) Text-only land-prep on the retirement PR. No runtime, type or manifest behaviour changes: every hunk is changeset prose, a test title string, or a comment block. 1. Clause-② / changeset — the accept-set list named the TypeScript, runtime and designer faces but not the manifest one. Re-measured on both sides of this change, with the `chatbot-floating` registration restored from `origin/main` for the LIVE leg (mutation and restore proven by blob hash): `inputs` 20 -> 19, `defaultProps` 9 keys -> 8; `validateTree` on a stored node carrying `displayMode` goes 0 -> 1 diagnostic, code `unknown-prop`, severity `warning`; the props interface `generateDts` derives from the same `inputs` goes 20 -> 19 members. Author-time only: `compile()` still returns a tree carrying the value on both legs, and the page renderer filters diagnostics to `severity === 'error'` before failing a page. 2. The shape-pin comment and the 7655 TRIPWIRE comment claimed the parse-green line stays green for a non-strict mirror arm, citing objectui#7678 item 2. That transposition is false: item 2 measured object-mirror shapes, and `displayMode` is a scalar union. Minting the arm a scalar union takes — an optional `z.enum` over 'inline' | 'floating' — on `ChatbotSchema`'s twin reddens BOTH: `tsc` with exactly one error at zod-mirror-parity.test.ts(1586,14) and vitest with exactly two failures, the shape pin and the parse-green line. The prose now says what was measured. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KbJQ1y1J12nZxYzFWhP8Q3 --------- Co-authored-by: Claude <noreply@anthropic.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Design Test Cases for Plugins ✅
Completed Tasks
pnpm testcommandSummary
Successfully fixed the
pnpm testcommand to work correctly in the monorepo setup:Fix Details
pnpm -r testtovitest runto use the root's vitest installationPrevious Issues
The original
pnpm -r testapproach tried to run each package's test script individually, but vitest was only installed at the root level, causing "vitest: not found" errors in package contexts.Test Coverage by Plugin
All tests validate ComponentRegistry integration, metadata, inputs, and default props.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.