feat: integrate @object-ui/console plugin#189
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Reference: objectstack-ai/objectui#506 - Add ConsolePlugin to objectstack.config.ts plugins array - Add ConsolePlugin to Vercel serverless handler - Add @object-ui/console ^3.0.1 as devDependency - Update dev script to use `objectstack serve --dev` - Add `serve` script for production CLI mode Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR integrates the @object-ui/console plugin into HotCRM to provide a runtime UI for data browsing and management, following the pattern established in the upstream objectui repository. The Console UI plugin is registered in both CLI serve mode (via objectstack.config.ts) and Vercel serverless deployment (via api/[[...route]].ts).
Changes:
- Added
@object-ui/console@^3.0.1as a devDependency and registered ConsolePlugin in both config files - Changed the
devscript fromobjectstack devtoobjectstack serve --devand added newservescript - Updated pnpm lockfile with the new dependency (lockfile also contains unrelated pnpm format changes removing
libcfields)
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
package.json |
Added @object-ui/console@^3.0.1 dependency, changed dev script to objectstack serve --dev, added serve script |
pnpm-lock.yaml |
Added @object-ui/console@3.0.1 package resolution and snapshot (also contains unrelated pnpm format changes) |
objectstack.config.ts |
Imported and registered ConsolePlugin instance in plugins array with as any type cast |
api/[[...route]].ts |
Imported and registered ConsolePlugin instance in Vercel serverless kernel bootstrap sequence |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
| ], | ||
| }); | ||
| // Uses 'as any' because defineStack schema doesn't include runtime plugins | ||
| // like ConsolePlugin — consistent with objectstack.shared.ts pattern. |
There was a problem hiding this comment.
The comment references "objectstack.shared.ts pattern" but this file doesn't exist in the HotCRM repository. This appears to be copied from the upstream objectui repository without being updated to reflect the actual HotCRM file structure. Consider updating this comment to reference the actual pattern source or simply state "consistent with upstream objectui pattern" or remove the specific file reference.
| // like ConsolePlugin — consistent with objectstack.shared.ts pattern. | |
| // like ConsolePlugin — consistent with the upstream ObjectUI pattern. |
| ], | ||
| "scripts": { | ||
| "dev": "objectstack dev", | ||
| "dev": "objectstack serve --dev", |
There was a problem hiding this comment.
The script has changed from "objectstack dev" to "objectstack serve --dev", but the DEVELOPMENT_WORKFLOW.md documentation still shows the old pattern at line 256 and line 13. Consider updating the documentation to reflect the new command pattern to ensure consistency.
Description
Integrate
@object-ui/consoleinto HotCRM, mirroring the pattern from objectstack-ai/objectui#506. The Console UI plugin is registered in both theobjectstack.config.ts(for CLIservemode) and the Vercel serverless handler.Type of Change
Related Issues
Related to objectstack-ai/objectui#506
Changes Made
objectstack.config.ts— ImportConsolePluginfrom@object-ui/console, addnew ConsolePlugin()to plugins array. Usesas anycast sincedefineStackschema doesn't include runtime plugins (same pattern as objectui).package.json— Add@object-ui/console@^3.0.1devDependency. Updatedev→objectstack serve --dev. Addservescript.api/[[...route]].ts— RegisterConsolePluginin the Vercel serverless kernel bootstrap.CLI modes after this change
pnpm devobjectstack serve --devpnpm serveobjectstack servepnpm startobjectstack startTesting
npm test)npm run lint)npm run build)All 3318 existing tests pass across 173 test files.
Screenshots
N/A — runtime plugin registration, no UI changes in this repo.
Checklist
Additional Notes
The
as anycast ondefineStack()is required because the schema validates metadata-only plugin shapes, not runtime plugin class instances. This is the established pattern from the upstream objectui repo.💡 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.