Skip to content

feat(ui): Airtable Interface parity — UserActions, Appearance, Tabs, AddRecord, InterfacePageConfig#749

Merged
hotlong merged 2 commits into
mainfrom
copilot/update-spec-ui-config
Feb 20, 2026
Merged

feat(ui): Airtable Interface parity — UserActions, Appearance, Tabs, AddRecord, InterfacePageConfig#749
hotlong merged 2 commits into
mainfrom
copilot/update-spec-ui-config

Conversation

Copilot AI commented Feb 20, 2026

Copy link
Copy Markdown
Contributor

Gap analysis against Airtable Interface revealed missing declarative config for user actions, appearance/visualization switching, tabs, record count, add-record entry, and page-level interface settings.

New schemas in view.zod.ts

  • UserActionsConfigSchema — toolbar toggles: sort, search, filter, rowHeight, addRecordForm, buttons[]
  • AppearanceConfigSchemashowDescription + allowedVisualizations whitelist
  • VisualizationTypeSchema — enum (grid | kanban | gallery | calendar | timeline | gantt | map)
  • ViewTabSchema — multi-tab config: name, label, icon, view, filter, order, pinned, isDefault, visible
  • AddRecordConfigSchema — entry point: enabled, position (top/bottom/both), mode (inline/form/modal), formView

All wired into ListViewSchema as optional fields alongside showRecordCount and allowPrinting.

New schema in page.zod.ts

  • InterfacePageConfigSchema — page-level declarative config: source, levels, filterBy, appearance, userFilters (elements + tabs), userActions, addRecord, showRecordCount, allowPrinting
  • Added as PageSchema.interfaceConfig (optional, backward-compatible)

Example

const listView = ListViewSchema.parse({
  name: 'customer_list',
  type: 'grid',
  columns: [{ field: 'customer_name', pinned: 'left', sortable: true }],
  userActions: { sort: true, search: true, filter: true, rowHeight: true, addRecordForm: false },
  appearance: { showDescription: true, allowedVisualizations: ['grid', 'gallery', 'kanban'] },
  tabs: [
    { name: 'my_customers', label: 'My Customers', isDefault: true, pinned: true },
    { name: 'all_records', label: 'All Records' },
  ],
  addRecord: { enabled: true, position: 'bottom', mode: 'inline' },
  showRecordCount: true,
  allowPrinting: true,
});

Tests & docs

  • 31 new tests; 5805/5805 passing
  • ROADMAP.md updated with Phase E deliverables and metrics
Original prompt

This section details on the original issue you should resolve

<issue_title>Spec UI配置对齐Airtable Interface能力,补全ListView/Page等声明式功能</issue_title>
<issue_description>### 问题背景
评估 Airtable Interface 风格的客户列表界面,发现 Spec UI 配置存在与实际业务需求(如截图所示)差距。当前 ListViewSchema/PageSchema 仅部分覆盖,未能满足所有高级可视化、用户定制、操作与布局能力需求。

客户列表 Airtable 配置截图

主要功能差距(Gap Analysis)

  1. Page-level Interface 配置缺失: 需支持 title、levels、filter by、appearance、user actions、advanced(如打印)等声明式页面级配置。
  2. Tabs(标签页)显式配置: 缺少 tabs 排序、图标、默认选中、用户可添加等能力。
  3. User Action 配置不足: 排序、搜索、过滤、行高切换、添加记录入口、按钮开放性需更强声明式支持。
  4. Record Count 显示配置缺失: 底部记录数显示 configurable。
  5. Add Record 入口配置缺失: 添加记录入口(位置、模式、是否通过表单等)需可配置。
  6. Visualizations 白名单缺失: 控制用户可切换的可视化类型列表。

改进建议

  • view.zod.ts 或新增 InterfacePageSchema 补充:
    • userActions 配置对象(sort/search/filter/rowHeight/addRecordForm/buttons)。
    • appearance 配置对象(showDescription, allowedVisualizations)。
    • tabs 数组和 ViewTabSchema,支持多 tab 排序、图标、pin 等。
    • showRecordCount 布尔开关。
    • addRecord 配置对象。
    • allowPrinting 高级功能。
  • 更强的 PageSchema 与 ListViewSchema 配合,支持 Airtable Interface 级细粒度声明式配置。

优先级与后续

  • P0:User Actions、Appearance、Visualizations 支持(与业务交互强相关)
  • P1:Tabs、Add Record、Record Count
  • P2:Printing、高级操作

完成后需补全测试,更新 ROADMAP.md


参考

  • Screenshot(Airtable Interface parity)
  • 源文件:packages/spec/src/ui/view.zod.ts, page.zod.ts

本 Issue 旨在推动 Spec UI Schema 的接口声明能力与实际业务需求对齐,实现与 Airtable Interface 同等交互/配置能力,为 Studio 及业务应用提供更完整 UI 元数据支持。


相关 Roadmap/实现后请运行测试并同步 ROADMAP.md。
</issue_description>

Comments on the Issue (you are @copilot in this section)


🔒 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

vercel Bot commented Feb 20, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
objectstack-play Ready Ready Preview, Comment Feb 20, 2026 2:18am
spec Ready Ready Preview, Comment Feb 20, 2026 2:18am

Request Review

…ance, Tabs, AddRecord, InterfacePageConfig

- Add VisualizationTypeSchema for switchable view type whitelist
- Add UserActionsConfigSchema for sort/search/filter/rowHeight/addRecordForm/buttons toggles
- Add AppearanceConfigSchema for showDescription and allowedVisualizations
- Add ViewTabSchema for multi-tab view interface with order/icon/pinned/isDefault
- Add AddRecordConfigSchema for add record entry point (position/mode/formView)
- Add showRecordCount and allowPrinting to ListViewSchema
- Add InterfacePageConfigSchema for page-level Airtable Interface config
- Add interfaceConfig field to PageSchema
- Add 31 new tests covering all new schemas
- Update ROADMAP.md with Phase E and updated metrics

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Update Spec UI configuration for Airtable interface capabilities feat(ui): Airtable Interface parity — UserActions, Appearance, Tabs, AddRecord, InterfacePageConfig Feb 20, 2026
Copilot AI requested a review from hotlong February 20, 2026 02:19
@hotlong
hotlong marked this pull request as ready for review February 20, 2026 02:24
Copilot AI review requested due to automatic review settings February 20, 2026 02:24

Copilot AI 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 pull request adds comprehensive Airtable Interface parity capabilities to the ObjectStack UI specification protocol. It introduces declarative configuration schemas for user actions, appearance settings, visualization controls, multi-tab interfaces, and record management controls, enabling Studio and business applications to match Airtable's interface configuration capabilities.

Changes:

  • Added five new Zod schemas in view.zod.ts: UserActionsConfigSchema, AppearanceConfigSchema, VisualizationTypeSchema, ViewTabSchema, and AddRecordConfigSchema, plus two new boolean flags (showRecordCount, allowPrinting) on ListViewSchema
  • Added InterfacePageConfigSchema in page.zod.ts for page-level declarative configuration with optional interfaceConfig field on PageSchema
  • Added 31 comprehensive tests (24 in view.test.ts, 7 in page.test.ts) covering all new schemas with edge cases and backward compatibility validation
  • Updated ROADMAP.md with Phase E deliverables and test metrics (5,805 passing tests)

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/spec/src/ui/view.zod.ts Added 5 new Airtable Interface parity schemas (UserActionsConfig, AppearanceConfig, VisualizationType, ViewTab, AddRecordConfig) and integrated them into ListViewSchema with 2 additional boolean flags
packages/spec/src/ui/view.test.ts Added 24 comprehensive tests covering all new schemas, including default values, full configurations, validation, edge cases, and backward compatibility
packages/spec/src/ui/page.zod.ts Added InterfacePageConfigSchema for page-level interface configuration and integrated it as optional field on PageSchema
packages/spec/src/ui/page.test.ts Added 7 tests for InterfacePageConfigSchema and PageSchema integration, including backward compatibility validation
ROADMAP.md Updated test count to 5,805 and added Phase E section documenting all Interface Parity deliverables with schema locations

Comment on lines +222 to +223
elements: z.array(z.enum(['grid', 'gallery', 'kanban'])).optional()
.describe('Visualization element types available in user filter bar'),

Copilot AI Feb 20, 2026

Copy link

Choose a reason for hiding this comment

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

The userFilters.elements field uses a hardcoded enum subset instead of reusing VisualizationTypeSchema. This creates potential inconsistency if the visualization types are updated in the future. Consider using VisualizationTypeSchema directly or explaining why only these three types are allowed for the user filter bar.

Copilot uses AI. Check for mistakes.
@hotlong
hotlong merged commit b6a3450 into main Feb 20, 2026
7 checks passed
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.

Spec UI配置对齐Airtable Interface能力,补全ListView/Page等声明式功能

3 participants