Skip to content

docs: document base field default values#1500

Merged
zgz2048 merged 2 commits into
larksuite:mainfrom
zgz2048:codex/base-field-default-value-docs
Jul 17, 2026
Merged

docs: document base field default values#1500
zgz2048 merged 2 commits into
larksuite:mainfrom
zgz2048:codex/base-field-default-value-docs

Conversation

@zgz2048

@zgz2048 zgz2048 commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Document defaultValue examples in the Base field JSON reference for supported field types.
  • Clarify text style CellValue rules for url, phone, and email.
  • Add default value support and clearing notes to the existing field JSON guidance.

Validation

  • Parsed JSON examples in lark-base-field-json.md and lark-base-cell-value.md.
  • git diff --check -- skills/lark-base/references/lark-base-field-json.md skills/lark-base/references/lark-base-cell-value.md
  • node scripts/skill-format-check/index.js

Summary by CodeRabbit

  • Documentation
    • Clarified how to set and clear default values in field JSON payloads.
    • Expanded examples for text, number, select, datetime, and user fields to show supported default value formats.
    • Updated guidance on which field types support defaults and how to handle special cases like URL, phone, email, and current user values.
    • Standardized field creation and update examples to better match the latest JSON format expectations.

@github-actions github-actions Bot added domain/base PR touches the base domain size/M Single-domain feat or fix with limited business impact labels Jun 17, 2026
@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Four Lark Base reference documents are updated to document default_value as the unified field-default mechanism. The field JSON SSOT gains per-type rules for text, number, select, datetime, and user. The cell value reference rewrites the text style.type section, and the field-create/field-update command docs add default_value to examples and value-spec rules.

Changes

default_value Documentation

Layer / File(s) Summary
Field JSON SSOT: default_value rules per field type
skills/lark-base/references/lark-base-field-json.md
Introduces default_value at the cheat-sheet level, documents clearing via null, and adds per-type rules and updated example JSON for text (style.type variants), number (plain and progress), static and dynamic select, datetime ($slot: record_created_time), user/group_chat, and a final easy-pitfalls note.
Cell value reference and command docs updated
skills/lark-base/references/lark-base-cell-value.md, skills/lark-base/references/lark-base-field-create.md, skills/lark-base/references/lark-base-field-update.md
Rewrites the text style.type cell-value section; adds default_value to +field-create and +field-update command examples, value-spec rule bullets, and recommended JSON payloads for select and user fields.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • kongenpei

Poem

🐰 Hop, hop, a default is set,
"Todo" or current_user — no sweat!
With $slot we fill the blank,
null to clear — the field says thanks.
The docs now shine, every type aligned,
A tidy base for every mind! 🌟

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the summary and validation, but it omits the required Changes, Test Plan, and Related Issues sections. Add the missing template sections: Changes, a Test Plan with verification steps/results, and Related Issues (or 'None').
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately reflects the main change: documenting Base field default values.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@zgz2048
zgz2048 marked this pull request as ready for review June 24, 2026 14:27

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@skills/lark-base/references/lark-base-cell-value.md`:
- Line 31: The phone example in references/lark-base-cell-value.md is
inconsistent with the “传合法电话号码” rule and should be replaced with a valid sample
value. Update the example under the 联系电话 field to use a real valid phone format,
and verify the surrounding examples in the same document remain consistent with
the validation guidance.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5db509a0-7df1-485c-8ac0-696a1244d01e

📥 Commits

Reviewing files that changed from the base of the PR and between c61acb5 and 2d51fae.

📒 Files selected for processing (4)
  • skills/lark-base/references/lark-base-cell-value.md
  • skills/lark-base/references/lark-base-field-create.md
  • skills/lark-base/references/lark-base-field-json.md
  • skills/lark-base/references/lark-base-field-update.md

Comment thread skills/lark-base/references/lark-base-cell-value.md
@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

npm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@e309636755120c5c9ff02b7a21e817d2a0df4c83

🧩 Skill update

npx skills add zgz2048/cli#codex/base-field-default-value-docs -y -g

@zgz2048
zgz2048 force-pushed the codex/base-field-default-value-docs branch from 2d51fae to e309636 Compare July 17, 2026 07:02
@zgz2048
zgz2048 merged commit 47dc003 into larksuite:main Jul 17, 2026
22 checks passed
@liangshuo-1 liangshuo-1 mentioned this pull request Jul 17, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain/base PR touches the base domain size/M Single-domain feat or fix with limited business impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants