Skip to content

Migrate examples to latest protocol: remove deprecated fields and UI config - #151

Merged
hotlong merged 5 commits into
mainfrom
copilot/optimize-examples-for-new-protocol
Jan 25, 2026
Merged

Migrate examples to latest protocol: remove deprecated fields and UI config#151
hotlong merged 5 commits into
mainfrom
copilot/optimize-examples-for-new-protocol

Conversation

CopilotAI commented Jan 25, 2026

Copy link
Copy Markdown
Contributor

Examples were using deprecated protocol fields (nameField, feedEnabled) and mixing data/UI layers (list_views, form_views in object definitions).

Changes

Protocol field migrations:

  • nameFieldtitleFormat with template expressions ('{name}', '{account_number} - {name}')
  • feedEnabledenable.feeds (moved to capabilities block)
  • Added compactLayout for card/hover/lookup field selection
  • Standardized enable block with activities and mru capabilities

Separation of concerns:

  • Removed 545 lines of UI configuration from object definitions
  • list_views and form_views belong in UI layer, not data layer

Example:

// BeforeexportconstAccount=ObjectSchema.create({nameField: 'name',enable: {feedEnabled: true,trackHistory: true,},list_views: {/* ... */},form_views: {/* ... */},});// AfterexportconstAccount=ObjectSchema.create({titleFormat: '{account_number} - {name}',compactLayout: ['account_number','name','type','owner'],enable: {trackHistory: true,apiEnabled: true,feeds: true,activities: true,mru: true,},});

Scope

9 object files updated:

  • CRM: account, contact, opportunity, lead, case, task
  • Modern fields: product, event
  • Todo: task

Net -497 lines. TypeScript compiles clean.

Original prompt

去最新的协议重新优化examples


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@vercel

vercelBot commented Jan 25, 2026

Copy link
Copy Markdown

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

ProjectDeploymentReviewUpdated (UTC)
specReadyReadyPreview, CommentJan 25, 2026 7:14am

Request Review

…tleFormat, feedEnabled with feeds, remove list_views and form_views
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
CopilotAIand others added 3 commits January 25, 2026 07:08
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>
CopilotAI changed the title [WIP] Optimize examples for the latest protocolMigrate examples to latest protocol: remove deprecated fields and UI configJan 25, 2026
CopilotAI requested a review from hotlongJanuary 25, 2026 07:14
@hotlong
hotlong marked this pull request as ready for review January 25, 2026 07:20
CopilotAI review requested due to automatic review settings January 25, 2026 07:20

CopilotAI 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 migrates example object definitions from deprecated protocol fields to the latest ObjectStack specification, implementing proper separation between data and UI layers.

Changes:

  • Replaced deprecated nameField with titleFormat template expressions and added compactLayout for field selection
  • Migrated feedEnabled to enable.feeds and added new capability flags (activities, mru)
  • Removed 545 lines of UI configuration (list_views, form_views) from object definitions, properly separating data and UI concerns

Reviewed changes

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

Show a summary per file
FileDescription
examples/todo/src/domains/todo/task.object.tsMigrated TodoTask to use titleFormat, compactLayout, and new capability flags
examples/modern-fields/src/product.object.tsUpdated Product object with latest protocol patterns
examples/modern-fields/src/event.object.tsUpdated Event object with latest protocol patterns
examples/crm/src/domains/crm/task.object.tsMigrated Task object and removed 100+ lines of UI views
examples/crm/src/domains/crm/opportunity.object.tsMigrated Opportunity object with contextual titleFormat and removed UI configuration
examples/crm/src/domains/crm/lead.object.tsMigrated Lead object and removed kanban/list views
examples/crm/src/domains/crm/contact.object.tsMigrated Contact object and removed form/list views
examples/crm/src/domains/crm/case.object.tsMigrated Case object with auto-numbered titleFormat and removed extensive UI views
examples/crm/src/domains/crm/account.object.tsMigrated Account object with composite titleFormat and removed UI layer mixing

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@hotlong