Skip to content

Upgrade @objectstack/* to v3.0.11 and adapt to ViewFilterRule protocol change#242

Merged
hotlong merged 4 commits intomainfrom
copilot/upgrade-objectstack-to-latest-again
Feb 27, 2026
Merged

Upgrade @objectstack/* to v3.0.11 and adapt to ViewFilterRule protocol change#242
hotlong merged 4 commits intomainfrom
copilot/upgrade-objectstack-to-latest-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 26, 2026

Description

Upgrades all @objectstack/* packages from v3.0.8/v3.0.9 to v3.0.11 and adapts code to the breaking ViewFilterRule format change introduced in @objectstack/spec@3.0.10.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • CI/CD update

Related Issues

Changes Made

Package upgrades (root + 17 workspace packages)

  • @objectstack/spec, runtime, cli, driver-memory, objectql, plugin-hono-server, studio^3.0.11

ViewFilterRule migration (34 view files across 13 packages)

@objectstack/spec@3.0.10 changed ViewFilterRule from array tuples to objects:

// Before
filter: [['status', '=', 'active'], ['type', 'IN', ['customer', 'prospect']]]

// After
filter: [{ field: 'status', operator: '=', value: 'active' }, { field: 'type', operator: 'IN', value: ['customer', 'prospect'] }]

Affected: *.view.ts and *.view_enhanced.ts across crm, finance, hr, marketing, products, support, analytics, integration, community, education, financial-services, healthcare, real-estate.

Documentation

  • ROADMAP.md, README.md, docs: protocol version → v3.0.11
  • Added version upgrade history entry

Testing

  • Unit tests pass (npm test)
  • Linting passes (npm run lint)
  • Build succeeds (npm run build)
  • Manual testing completed
  • New tests added (if applicable)

195 test files, 3817 tests passing — unchanged from baseline.

Screenshots

N/A

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Additional Notes

The @objectstack/spec@3.0.10 PR #806 also added DashboardWidget.id (required), PageSchema conditional validation for record_review/blank types, and AnimationSchema snake_case renames — none of these required changes in HotCRM since our existing definitions already conform.

Original prompt

@objectstack/* 升级到最新版,并按照最新的协议调整代码


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 26, 2026

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

Project Deployment Actions Updated (UTC)
hotcrm Error Error Feb 26, 2026 7:21pm
hotcrm-demo Error Error Feb 26, 2026 7:21pm

Request Review

Copilot AI and others added 3 commits February 26, 2026 18:46
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
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] Upgrade ObjectStack to latest version and adjust code Upgrade @objectstack/* to v3.0.11 and adapt to ViewFilterRule protocol change Feb 26, 2026
@hotlong hotlong marked this pull request as ready for review February 27, 2026 03:31
Copilot AI review requested due to automatic review settings February 27, 2026 03:31
@hotlong hotlong merged commit a5fa3d7 into main Feb 27, 2026
3 of 5 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Upgrades the monorepo to @objectstack/* v3.0.11 and migrates list view filter definitions to the ViewFilterRule object protocol ({ field, operator, value }) required by @objectstack/spec@>=3.0.10, plus updates protocol/version documentation.

Changes:

  • Bump @objectstack/* dependencies across root + workspace packages to ^3.0.11 (incl. lockfile refresh).
  • Migrate filter definitions in many *.view.ts / *.view_enhanced.ts files from tuple arrays to { field, operator, value } objects.
  • Update protocol version references in docs (README/ROADMAP/docs).

Reviewed changes

Copilot reviewed 55 out of 57 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
pnpm-lock.yaml Locks upgraded @objectstack/* dependency graph at v3.0.11 (plus related transitive updates).
package.json Root devDependencies updated to @objectstack/* ^3.0.11.
.gitignore Ignores *.tgz and package/ artifacts.
ROADMAP.md Protocol version updated to v3.0.11 and adds upgrade history entry for ViewFilterRule change.
README.md Updates spec version badge/text to v3.0.11.
content/docs/roadmap.mdx Updates protocol version references to v3.0.11 in docs roadmap.
content/docs/index.mdx Updates protocol version to v3.0.11.
packages/server/package.json Updates server’s @objectstack/* dependencies to ^3.0.11.
packages/core/package.json Updates @objectstack/spec to ^3.0.11.
packages/ai/package.json Updates @objectstack/spec/@objectstack/cli to ^3.0.11.
packages/analytics/package.json Updates @objectstack/spec/@objectstack/cli to ^3.0.11.
packages/community/package.json Updates @objectstack/spec/@objectstack/cli to ^3.0.11.
packages/crm/package.json Updates @objectstack/spec/@objectstack/cli to ^3.0.11.
packages/education/package.json Updates @objectstack/spec/@objectstack/cli to ^3.0.11.
packages/finance/package.json Updates @objectstack/spec/@objectstack/cli to ^3.0.11.
packages/financial-services/package.json Updates @objectstack/spec/@objectstack/cli to ^3.0.11.
packages/healthcare/package.json Updates @objectstack/spec/@objectstack/cli to ^3.0.11.
packages/hr/package.json Updates @objectstack/spec/@objectstack/cli to ^3.0.11.
packages/integration/package.json Updates @objectstack/spec/@objectstack/cli to ^3.0.11.
packages/marketing/package.json Updates @objectstack/spec/@objectstack/cli to ^3.0.11.
packages/products/package.json Updates @objectstack/spec/@objectstack/cli to ^3.0.11.
packages/real-estate/package.json Updates @objectstack/spec/@objectstack/cli to ^3.0.11.
packages/support/package.json Updates @objectstack/spec/@objectstack/cli to ^3.0.11.
packages/support/src/support.view_enhanced.ts Migrates ViewTabs filter tuples to object-based ViewFilterRule format.
packages/support/src/knowledge_article.view.ts Migrates view filter tuples to object-based rules.
packages/support/src/case.view.ts Migrates view filter tuples to object-based rules.
packages/real-estate/src/showing.view.ts Migrates view filter tuples to object-based rules.
packages/real-estate/src/real_estate_offer.view.ts Migrates view filter tuples to object-based rules.
packages/real-estate/src/listing.view.ts Migrates view filter tuples to object-based rules.
packages/products/src/quote.view.ts Migrates view filter tuples to object-based rules.
packages/products/src/products.view_enhanced.ts Migrates ViewTabs filter tuples to object-based rules.
packages/products/src/product.view.ts Migrates view filter tuples to object-based rules.
packages/marketing/src/marketing.view_enhanced.ts Migrates ViewTabs filter tuples to object-based rules.
packages/marketing/src/campaign.view.ts Migrates view filter tuples to object-based rules.
packages/integration/src/connector.view.ts Migrates view filter tuples to object-based rules.
packages/hr/src/hr.view_enhanced.ts Migrates ViewTabs filter tuples to object-based rules.
packages/hr/src/employee.view.ts Migrates view filter tuples to object-based rules.
packages/healthcare/src/referral.view.ts Migrates view filter tuples to object-based rules.
packages/healthcare/src/patient.view.ts Migrates view filter tuples to object-based rules.
packages/healthcare/src/appointment.view.ts Migrates view filter tuples to object-based rules.
packages/financial-services/src/wealth_account.view.ts Migrates view filter tuples to object-based rules.
packages/financial-services/src/portfolio.view.ts Migrates view filter tuples to object-based rules.
packages/financial-services/src/kyc.view.ts Migrates view filter tuples to object-based rules.
packages/finance/src/finance.view_enhanced.ts Migrates ViewTabs filter tuples to object-based rules.
packages/finance/src/contract.view.ts Migrates view filter tuples to object-based rules (incl. multi-rule filters).
packages/education/src/student.view.ts Migrates view filter tuples to object-based rules.
packages/education/src/course.view.ts Migrates view filter tuples to object-based rules.
packages/education/src/application_form.view.ts Migrates view filter tuples to object-based rules.
packages/crm/src/opportunity.view.ts Migrates view filter tuples to object-based rules (incl. multi-rule filters).
packages/crm/src/lead.view.ts Migrates view filter tuples to object-based rules.
packages/crm/src/crm.view_enhanced.ts Migrates CRM ViewTabs filter tuples to object-based rules.
packages/crm/src/contact.view.ts Migrates view filter tuples to object-based rules.
packages/crm/src/account.view.ts Migrates view filter tuples to object-based rules (incl. multi-rule filters).
packages/community/src/topic.view.ts Migrates view filter tuples to object-based rules.
packages/community/src/idea.view.ts Migrates view filter tuples to object-based rules.
packages/analytics/src/report.view.ts Migrates view filter tuples to object-based rules.
packages/analytics/src/kpi.view.ts Migrates view filter tuples to object-based rules.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

name: 'on_probation',
label: 'On Probation',
filter: [['gpa', '<', '2.0']],
filter: [{ field: 'gpa', operator: '<', value: '2.0' }],
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

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

gpa is a numeric field (tests assert Student.fields.gpa.type is number), but this filter compares it to the string '2.0'. Use a numeric value (e.g., 2.0) so the < comparison behaves correctly.

Suggested change
filter: [{ field: 'gpa', operator: '<', value: '2.0' }],
filter: [{ field: 'gpa', operator: '<', value: 2.0 }],

Copilot uses AI. Check for mistakes.
Comment thread content/docs/roadmap.mdx
HotCRM has completed **16 development phases** (1–14 including 10.5, 10.6, 12A-D, and 12E), establishing a full-featured, production-ready **13-package CRM** with **~148 business objects**, AI agent workflows, enterprise security, full UI metadata, Salesforce feature parity (~95%), 4 vertical industry solutions, Activity Feed/Chatter system, Interface Builder, and comprehensive developer tooling.

> **Protocol Version**: @objectstack/spec v3.0.8 | **Tests**: 3,799 passing (192 files) | **Spec Schema Adoption**: ~95 / ~95 (~100%) | **Last Updated**: February 21, 2027
> **Protocol Version**: @objectstack/spec v3.0.11 | **Tests**: 3,799 passing (192 files) | **Spec Schema Adoption**: ~95 / ~95 (~100%) | **Last Updated**: February 21, 2027
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

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

This line still states "3,799 passing (192 files)", but ROADMAP.md in this PR records 3817 tests passing for the v3.0.11 upgrade. Please reconcile the docs metrics (tests + file count) so they’re consistent across documentation.

Suggested change
> **Protocol Version**: @objectstack/spec v3.0.11 | **Tests**: 3,799 passing (192 files) | **Spec Schema Adoption**: ~95 / ~95 (~100%) | **Last Updated**: February 21, 2027
> **Protocol Version**: @objectstack/spec v3.0.11 | **Tests**: 3,817 passing (192 files) | **Spec Schema Adoption**: ~95 / ~95 (~100%) | **Last Updated**: February 21, 2027

Copilot uses AI. Check for mistakes.
Comment thread README.md
Comment on lines 8 to 12
![Tests](https://img.shields.io/badge/Tests-3799%20passing-brightgreen)
![Spec](https://img.shields.io/badge/%40objectstack%2Fspec-v3.0.8-blue)
![Spec](https://img.shields.io/badge/%40objectstack%2Fspec-v3.0.11-blue)

> A world-class Customer Relationship Management system built on @objectstack/spec v3.0.8 protocol with Salesforce-level functionality and Apple/Linear-level UX.
> A world-class Customer Relationship Management system built on @objectstack/spec v3.0.11 protocol with Salesforce-level functionality and Apple/Linear-level UX.

Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

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

README still advertises "3799 passing" tests, but ROADMAP.md in this PR records 3817 tests passing for the v3.0.11 upgrade. Please align the README test badge / stated counts with the updated baseline to keep documentation consistent.

Copilot uses AI. Check for mistakes.
Comment on lines +11 to +13
{ name: 'open', label: 'Open', pinned: false, isDefault: true, visible: true, filter: [{ field: 'status', operator: '=', value: 'open' }] },
{ name: 'escalated', label: 'Escalated', pinned: false, isDefault: false, visible: true, filter: [{ field: 'is_escalated', operator: '=', value: 'true' }] },
{ name: 'resolved', label: 'Resolved', pinned: false, isDefault: false, visible: true, filter: [{ field: 'status', operator: '=', value: 'resolved' }] },
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

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

is_escalated is a boolean field (see packages/support/src/case.object.ts), but this ViewTab filter uses the string 'true'. This will likely not match any records (and is inconsistent with case.view.ts which uses boolean true). Use a boolean value here so the filter matches escalated cases.

Copilot uses AI. Check for mistakes.
{ name: 'all', label: 'All Contacts', pinned: false, isDefault: true, visible: true, filter: [] },
{ name: 'decision_makers', label: 'Decision Makers', pinned: false, isDefault: false, visible: true, filter: [['is_decision_maker', '=', 'true']] },
{ name: 'recent', label: 'Recently Contacted', pinned: false, isDefault: false, visible: true, filter: [['last_contact_date', '>=', 'LAST_30_DAYS']] }
{ name: 'decision_makers', label: 'Decision Makers', pinned: false, isDefault: false, visible: true, filter: [{ field: 'is_decision_maker', operator: '=', value: 'true' }] },
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

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

is_decision_maker is defined as a boolean field (packages/crm/src/contact.object.ts), but this ViewTab filter uses the string 'true'. That will likely fail to match decision-maker contacts (and differs from contact.view.ts which uses boolean true). Use a boolean value in the filter.

Suggested change
{ name: 'decision_makers', label: 'Decision Makers', pinned: false, isDefault: false, visible: true, filter: [{ field: 'is_decision_maker', operator: '=', value: 'true' }] },
{ name: 'decision_makers', label: 'Decision Makers', pinned: false, isDefault: false, visible: true, filter: [{ field: 'is_decision_maker', operator: '=', value: true }] },

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants