Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 20, 2026

Documentation was outdated and incomplete - guides showed only 3 basic field types while the protocol implements 30+, examples referenced non-existent features, and critical topics (workflows, validations, view configuration) lacked practical guides.

New Guides

  • Field Types (field-types.mdx) - Complete reference for all 30+ field types with configuration options and real-world examples (EN + CN)
  • Workflows & Validation (workflows-validation.mdx) - 7 validation types, workflow automation patterns, formula reference
  • View Configuration (view-configuration.mdx) - Grid, Kanban, Calendar, Gantt, Map views + Simple/Tabbed/Wizard forms

Updated Content

  • Getting Started - Replaced toy examples with realistic Account/Contact schema showing master-detail relationships, formulas, autonumbers, select options with colors
  • README.md - Architecture expanded from 3 to 5 modules (added AI and API protocols), examples table with status indicators
  • TODO Example README - Now accurately reflects implementation (7 field types including rating, color, code)
  • Documentation Index - Quick links section, updated architecture table

Examples

Before (Getting Started):

fields: {
  first_name: Field.text({ label: 'First Name', required: true }),
  email: Field.text({ format: 'email' }),
  type: Field.select(['Customer', 'Partner', 'Vendor']),
}

After (Getting Started):

fields: {
  account_number: Field.autonumber({ format: 'ACC-{0000}' }),
  full_name: Field.formula({ expression: 'CONCAT(first_name, " ", last_name)' }),
  account: Field.masterDetail('account', { deleteBehavior: 'cascade' }),
  type: Field.select({
    options: [
      { label: 'Customer', value: 'customer', color: '#00AA00', default: true },
      { label: 'Partner', value: 'partner', color: '#0000FF' },
    ],
  }),
}

All guides include practical examples from the CRM implementation, configuration tables, and cross-references to related documentation.

Original prompt

根据最新的packages内核代码,和examples例子,更新所有相关的文档和教程


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

@vercel
Copy link

vercel bot commented Jan 20, 2026

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

Project Deployment Review Updated (UTC)
spec Error Error Jan 20, 2026 8:29pm

Request Review

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>
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] Update all documentation and tutorials for packages Update documentation to reflect current protocol implementation Jan 20, 2026
Copilot AI requested a review from hotlong January 20, 2026 20:32
@hotlong hotlong marked this pull request as ready for review January 20, 2026 23:35
Copilot AI review requested due to automatic review settings January 20, 2026 23:35
@hotlong hotlong merged commit 5533f95 into main Jan 20, 2026
5 of 6 checks passed
Copy link
Contributor

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

This PR significantly updates the ObjectStack documentation to accurately reflect the current protocol implementation. The documentation was previously outdated, showing only 3 basic field types when the protocol implements 30+, and lacked practical guides for workflows, validations, and view configuration.

Changes:

  • Added three comprehensive new guides covering 30+ field types, view configurations (Grid/Kanban/Calendar/Gantt/Map), and 7 validation types with workflow automation
  • Updated Getting Started guides (EN + CN) with realistic CRM examples featuring master-detail relationships, formulas, autonumbers, and select options with colors
  • Expanded README architecture section from 3 to 5 modules (added AI and API protocols)
  • Updated documentation indexes with Quick Links sections and corrected architecture tables
  • Enhanced Todo example README with detailed feature breakdown and learning path

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 17 comments.

Show a summary per file
File Description
examples/todo/README.md Transformed from minimal description to comprehensive guide with 7 field types, feature matrix, and learning path
content/docs/index.mdx Added Quick Links section, updated from "Trinity" (3) to 5-module architecture, expanded audience
content/docs/index.cn.mdx Chinese version of above changes with terminology updates
content/docs/guides/getting-started.mdx Replaced toy examples with realistic Account/Contact schema showing autonumber, formula, master-detail, and advanced select options
content/docs/guides/getting-started.cn.mdx Chinese version with same realistic examples
content/docs/guides/field-types.mdx NEW: Complete 30+ field type reference with configuration options and real-world examples
content/docs/guides/field-types.cn.mdx NEW: Chinese version of complete field type reference
content/docs/guides/workflows-validation.mdx NEW: Comprehensive guide for 7 validation types and workflow automation with practical patterns
content/docs/guides/view-configuration.mdx NEW: Complete guide for 5 list views and 3 form layouts with configuration examples
content/docs/guides/meta.json Added three new guide entries to navigation
content/docs/guides/meta.cn.json Chinese navigation update
README.md Expanded architecture from 3 to 5 modules, added example status indicators and detailed protocol descriptions

account: Field.masterDetail('account', {
label: '账户',
required: true,
deleteBehavior: 'cascade',
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

Same naming issue in Chinese version - deleteBehavior should use camelCase, not snake_case delete_behavior.

Copilot uses AI. Check for mistakes.
},
kanban: {
type: 'kanban',
groupBy: 'type',
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

Same kanban configuration issue in Chinese version - uses groupBy: 'type' instead of the correct structure with kanban: { groupByField: 'type' } as shown in the view-configuration guide.

Suggested change
groupBy: 'type',
kanban: {
groupByField: 'type',
},

Copilot uses AI. Check for mistakes.

## Next Steps

- [Object Schema Guide](/docs/guides/object-schema)
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

The link to /docs/guides/object-schema likely doesn't exist based on the meta.json which only lists: getting-started, installation, project-structure, field-types, view-configuration, workflows-validation, and custom-driver. Consider linking to the object schema reference instead: /docs/references/data/core/Object or to the getting-started guide.

Suggested change
- [Object Schema Guide](/docs/guides/object-schema)
- [Object Schema Guide](/docs/references/data/core/Object)

Copilot uses AI. Check for mistakes.

- [Field Types Guide](/docs/guides/field-types)
- [Workflows & Validation](/docs/guides/workflows-validation)
- [Dashboard Configuration](/docs/guides/dashboards)
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

The link to /docs/guides/dashboards likely doesn't exist based on the meta.json guide list. This guide hasn't been created yet according to the PR description and file changes.

Suggested change
- [Dashboard Configuration](/docs/guides/dashboards)
- Dashboard Configuration (coming soon)

Copilot uses AI. Check for mistakes.
account: Field.masterDetail('account', {
label: 'Account',
required: true,
deleteBehavior: 'cascade',
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

According to the coding guidelines, configuration property names should use camelCase. However, delete_behavior is using snake_case. The correct property name per the protocol (field.zod.ts line 106) is deleteBehavior with camelCase.

Copilot uses AI. Check for mistakes.
{
name: 'positive_revenue',
type: 'script',
expression: 'annual_revenue >= 0',
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

In the validation documentation, the condition logic is described as inverted (when TRUE, validation FAILS). However, looking at line 230 in the Getting Started guide, the example shows expression: 'annual_revenue >= 0' with message 'Revenue must be positive'. This is contradictory - if the condition is "when TRUE, fails", then this expression would fail when revenue IS positive (which is wrong).

The example should either use inverted logic like condition: 'annual_revenue < 0' to match the workflows-validation guide's pattern, or the term should be "expression" not "condition" and the logic should not be inverted.

Suggested change
expression: 'annual_revenue >= 0',
condition: 'annual_revenue < 0',

Copilot uses AI. Check for mistakes.
{
name: 'positive_revenue',
type: 'script',
expression: 'annual_revenue >= 0',
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

Same issue in the Chinese version - the validation expression logic is contradictory. The example uses expression: 'annual_revenue >= 0' with message '收入必须为正数' (Revenue must be positive). If the validation condition logic is inverted (TRUE = fails), then this would fail when revenue IS positive, which is incorrect.

Should use condition: 'annual_revenue < 0' to match the pattern shown in workflows-validation.mdx.

Suggested change
expression: 'annual_revenue >= 0',
condition: 'annual_revenue < 0',

Copilot uses AI. Check for mistakes.
},
kanban: {
type: 'kanban',
groupBy: 'type',
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

The kanban configuration example uses groupBy: 'type' but according to the actual field-types and view-configuration guides in this same PR, the property should be groupByField within a kanban object, not a standalone groupBy property. The correct structure based on line 177-179 of view-configuration.mdx should be:

kanban: {
  groupByField: 'type',
}
Suggested change
groupBy: 'type',
kanban: {
groupByField: 'type',
},

Copilot uses AI. Check for mistakes.
Comment on lines +285 to +286
- [Validation Rules](/docs/guides/validation-rules)
- [Workflow Automation](/docs/guides/workflows)
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

The documentation links to /docs/guides/validation-rules and /docs/guides/workflows but based on the meta.json files and the actual new guide created in this PR, the correct path should be /docs/guides/workflows-validation (a single combined guide, not two separate ones).

Suggested change
- [Validation Rules](/docs/guides/validation-rules)
- [Workflow Automation](/docs/guides/workflows)
- [Workflows & Validation](/docs/guides/workflows-validation)

Copilot uses AI. Check for mistakes.
Comment on lines +754 to +755
- [Validation Rules](/docs/guides/validation-rules)
- [Workflow Automation](/docs/guides/workflows)
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

Links to /docs/guides/validation-rules and /docs/guides/workflows are broken. Based on meta.json, these should be combined into the single guide /docs/guides/workflows-validation.

Suggested change
- [Validation Rules](/docs/guides/validation-rules)
- [Workflow Automation](/docs/guides/workflows)
- [Validation Rules](/docs/guides/workflows-validation)
- [Workflow Automation](/docs/guides/workflows-validation)

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.

2 participants