-
Notifications
You must be signed in to change notification settings - Fork 0
Update documentation to reflect current protocol implementation #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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>
There was a problem hiding this 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', |
Copilot
AI
Jan 20, 2026
There was a problem hiding this comment.
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.
| }, | ||
| kanban: { | ||
| type: 'kanban', | ||
| groupBy: 'type', |
Copilot
AI
Jan 20, 2026
There was a problem hiding this comment.
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.
| groupBy: 'type', | |
| kanban: { | |
| groupByField: 'type', | |
| }, |
|
|
||
| ## Next Steps | ||
|
|
||
| - [Object Schema Guide](/docs/guides/object-schema) |
Copilot
AI
Jan 20, 2026
There was a problem hiding this comment.
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.
| - [Object Schema Guide](/docs/guides/object-schema) | |
| - [Object Schema Guide](/docs/references/data/core/Object) |
|
|
||
| - [Field Types Guide](/docs/guides/field-types) | ||
| - [Workflows & Validation](/docs/guides/workflows-validation) | ||
| - [Dashboard Configuration](/docs/guides/dashboards) |
Copilot
AI
Jan 20, 2026
There was a problem hiding this comment.
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.
| - [Dashboard Configuration](/docs/guides/dashboards) | |
| - Dashboard Configuration (coming soon) |
| account: Field.masterDetail('account', { | ||
| label: 'Account', | ||
| required: true, | ||
| deleteBehavior: 'cascade', |
Copilot
AI
Jan 20, 2026
There was a problem hiding this comment.
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.
| { | ||
| name: 'positive_revenue', | ||
| type: 'script', | ||
| expression: 'annual_revenue >= 0', |
Copilot
AI
Jan 20, 2026
There was a problem hiding this comment.
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.
| expression: 'annual_revenue >= 0', | |
| condition: 'annual_revenue < 0', |
| { | ||
| name: 'positive_revenue', | ||
| type: 'script', | ||
| expression: 'annual_revenue >= 0', |
Copilot
AI
Jan 20, 2026
There was a problem hiding this comment.
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.
| expression: 'annual_revenue >= 0', | |
| condition: 'annual_revenue < 0', |
| }, | ||
| kanban: { | ||
| type: 'kanban', | ||
| groupBy: 'type', |
Copilot
AI
Jan 20, 2026
There was a problem hiding this comment.
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',
}| groupBy: 'type', | |
| kanban: { | |
| groupByField: 'type', | |
| }, |
| - [Validation Rules](/docs/guides/validation-rules) | ||
| - [Workflow Automation](/docs/guides/workflows) |
Copilot
AI
Jan 20, 2026
There was a problem hiding this comment.
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).
| - [Validation Rules](/docs/guides/validation-rules) | |
| - [Workflow Automation](/docs/guides/workflows) | |
| - [Workflows & Validation](/docs/guides/workflows-validation) |
| - [Validation Rules](/docs/guides/validation-rules) | ||
| - [Workflow Automation](/docs/guides/workflows) |
Copilot
AI
Jan 20, 2026
There was a problem hiding this comment.
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.
| - [Validation Rules](/docs/guides/validation-rules) | |
| - [Workflow Automation](/docs/guides/workflows) | |
| - [Validation Rules](/docs/guides/workflows-validation) | |
| - [Workflow Automation](/docs/guides/workflows-validation) |
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.mdx) - Complete reference for all 30+ field types with configuration options and real-world examples (EN + CN)workflows-validation.mdx) - 7 validation types, workflow automation patterns, formula referenceview-configuration.mdx) - Grid, Kanban, Calendar, Gantt, Map views + Simple/Tabbed/Wizard formsUpdated Content
Examples
Before (Getting Started):
After (Getting Started):
All guides include practical examples from the CRM implementation, configuration tables, and cross-references to related documentation.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.