Skip to content

docs(lark-base): document signature field (single-value attachment variant)#1531

Open
Neseria wants to merge 1 commit into
larksuite:mainfrom
Neseria:feat/lark-base-signature-field
Open

docs(lark-base): document signature field (single-value attachment variant)#1531
Neseria wants to merge 1 commit into
larksuite:mainfrom
Neseria:feat/lark-base-signature-field

Conversation

@Neseria

@Neseria Neseria commented Jun 22, 2026

Copy link
Copy Markdown

What

Documents the new Signature field across the lark-base skill. Signature reuses the attachment field (FieldType=17) and is distinguished by FieldUIType=Signature; the skill surfaces it as a new friendly type {"type":"signature"} (no raw ui_type, consistent with the existing "no ui_type" rule).

Why

The Signature field is shipping (PRD + frontend / business-backend / edit-link tech designs). The skill needs to teach the agent (a) how to create the field, and (b) the hard differences from a plain attachment — most importantly that in this phase the OpenAPI/CLI path is read / filter / clear-only and cannot write a signature image.

Changes (8 files, +47/-3)

  • field-json: new signature type — no property, no default value, single value; do not hand-write ui_type / type:"attachment" (raw ui_type is silently downgraded to a plain Attachment).
  • cell-value: signature cells are read / filter / clear-only this phase; a non-empty write is rejected. Clear via null or +record-remove-attachment.
  • field-update: PUT must keep type:"signature"; any -> signature clears the column, signature -> attachment keeps the image.
  • field-create / SKILL routing + recovery: creation example, FG gating, silent-downgrade troubleshooting.
  • data-query / lookup / workflow-schema: filter empty / non_empty only; single value.

Notes / depends on

  • The friendly type {"type":"signature"} needs the CLI DSL mapping + OpenAPI gateway whitelisting Signature in UITypeTrans[ATTACH] + FG ccm.base.field.signature. This docs PR should land together with that support (today the CLI forwards type verbatim, so type:signature is not yet mapped).
  • A few behaviors are still TBD in the tech designs (external error-code mapping for rejected writes; signer/sign-time storage; cross-tenant copy) and are worded as "current behavior" to stay accurate.

Summary by CodeRabbit

  • Documentation
    • 更新 lark-base 文档版本至 1.3.0,并完善“签字字段(signature)”定义:作为附件的 style.type="signature" 语义,仅支持读取、isEmpty/isNotEmpty 筛选与清空,禁止命令侧写入签名图片。
    • 补充 +field-create 创建示例与 +field-get 校验(style.typesignature 才表示环境支持)。
    • 扩展 +data-query/字段过滤、+field-update 全量更新与附件/签字互转规则、工作流与恢复/错误场景说明,避免签字能力丢失。

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9efabab1-bf6a-4e38-82bf-2638e44b529b

📥 Commits

Reviewing files that changed from the base of the PR and between dac98cc and 376d1d9.

📒 Files selected for processing (8)
  • skills/lark-base/SKILL.md
  • skills/lark-base/references/lark-base-cell-value.md
  • skills/lark-base/references/lark-base-data-query.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
  • skills/lark-base/references/lark-base-workflow-schema.md
  • skills/lark-base/references/lookup-field-guide.md
✅ Files skipped from review due to trivial changes (5)
  • skills/lark-base/references/lark-base-data-query.md
  • skills/lark-base/references/lark-base-field-create.md
  • skills/lark-base/references/lark-base-workflow-schema.md
  • skills/lark-base/SKILL.md
  • skills/lark-base/references/lark-base-cell-value.md
🚧 Files skipped from review as they are similar to previous changes (3)
  • skills/lark-base/references/lookup-field-guide.md
  • skills/lark-base/references/lark-base-field-update.md
  • skills/lark-base/references/lark-base-field-json.md

📝 Walkthrough

Walkthrough

Version bumped to 1.3.0. Documentation for the signature (签字) field type is added across seven files: field JSON schema, field creation, cell value read/write constraints, data query filter operators, field update and type-conversion rules, workflow schema, and the top-level skill quick-route, mental model, and troubleshooting sections.

Changes

Signature Field Documentation

Layer / File(s) Summary
Signature field JSON schema and creation
skills/lark-base/references/lark-base-field-json.md, skills/lark-base/references/lark-base-field-create.md
Adds signature to the field quick-reference table as an attachment variant via style.type, extends attachment documentation to include plain (default) and signature variants, specifies structural constraints (no property, no default value, single PNG image), adds a +field-create CLI example, and includes pitfall entries about silent downgrade to plain attachment and CLI write restrictions.
Cell value constraints and query filter behavior
skills/lark-base/references/lark-base-cell-value.md, skills/lark-base/references/lark-base-data-query.md, skills/lark-base/references/lookup-field-guide.md
Documents signature cell values as read-only single-value attachment variants supporting only read, isEmpty/isNotEmpty filter, and clear operations via null upsert or +record-remove-attachment. Non-empty writes are rejected by the service, and attachment uploads to signature fields are skipped. Extends the data-query operator table and lookup-field constant-value table to include signature filtering rules.
Field update, type conversion, and workflow constraints
skills/lark-base/references/lark-base-field-update.md, skills/lark-base/references/lark-base-workflow-schema.md
Adds PUT update constraint requiring style.type:"signature" retention to prevent downgrade to plain attachment, documents signature -> attachment conversion behavior (retains image but loses semantic), adds any -> signature to the CLI conversion blacklist to prevent cell clearing, and specifies that workflow actions on signature fields support only clear operations, not writes.
Top-level SKILL.md quick-route, mental model, and troubleshooting
skills/lark-base/SKILL.md
Bumps version to 1.3.0, adds a quick-route row for signature fields with creation JSON payload and record-side operation boundaries, extends the Base mental model and pre-write rules with explicit signature field constraints (read, filter, clear only), and adds two troubleshooting entries covering signature-creation appearing as plain attachment and signature-write rejection.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • larksuite/cli#748: Both PRs update +field-update field type-conversion guidance—retrieved PR refines the +field-update help text to centralize conversion rules, while the main PR extends that same conversion and field-update documentation with signature-specific constraints.

Suggested reviewers

  • zgz2048
  • kongenpei

Poem

🐰 A signature field joins the Base parade,
Read-only by rule, in the CLI's trade.
Clear it with null, or filter by empty,
But handwrite in Feishu—the strokes are aplenty!
The docs now proclaim what the rabbit has made. ✍️

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and accurately summarizes the main change: documenting the signature field as a single-value attachment variant across the lark-base skill documentation.
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

Warning

Tools execution failed with the following error:

Failed to run tools: Ping-pong health check failed


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.

@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 22, 2026

@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.

🧹 Nitpick comments (1)
skills/lark-base/references/lark-base-cell-value.md (1)

128-139: 🧹 Nitpick | 🔵 Trivial | 💤 Low value

Minor grammar refinements suggested for clarity.

The static analysis tool flagged two Chinese grammar points (lines 130 and 138) that could be polished for consistency with documentation style, but the functional constraints are accurate and complete:

  • Line 130: "写入新的签名图" could be more idiomatic than current phrasing
  • Line 138: "不要把签字当普通附件追加" structure is understandable but could follow more standard phrasing

These are editorial and do not affect correctness. If the team prefers to standardize phrasing, minor edits could improve fluency.

🤖 Prompt for 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.

In `@skills/lark-base/references/lark-base-cell-value.md` around lines 128 - 139,
Review and refine the Chinese phrasing in the signature field documentation for
better idiomatic consistency. The phrase "写入新的签名图" should be made more idiomatic
and natural sounding, and the phrase "不要把签字当普通附件追加" should be adjusted to follow
more standard documentation phrasing patterns. Ensure both revisions maintain
the original functional meaning and constraints being documented while improving
overall fluency and consistency with the documentation style guide.
🤖 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.

Nitpick comments:
In `@skills/lark-base/references/lark-base-cell-value.md`:
- Around line 128-139: Review and refine the Chinese phrasing in the signature
field documentation for better idiomatic consistency. The phrase "写入新的签名图"
should be made more idiomatic and natural sounding, and the phrase
"不要把签字当普通附件追加" should be adjusted to follow more standard documentation phrasing
patterns. Ensure both revisions maintain the original functional meaning and
constraints being documented while improving overall fluency and consistency
with the documentation style guide.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: db5efa45-ae1a-476c-b8a4-66aea00d6570

📥 Commits

Reviewing files that changed from the base of the PR and between 824aa9e and 3cf4ea3.

📒 Files selected for processing (8)
  • skills/lark-base/SKILL.md
  • skills/lark-base/references/lark-base-cell-value.md
  • skills/lark-base/references/lark-base-data-query.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
  • skills/lark-base/references/lark-base-workflow-schema.md
  • skills/lark-base/references/lookup-field-guide.md

@Neseria Neseria force-pushed the feat/lark-base-signature-field branch from 3cf4ea3 to 6c3d6fc Compare June 22, 2026 09:47
A signature field reuses the attachment field and is created via
`{"type":"attachment","style":{"type":"signature"}}` — an attachment style
variant, not a standalone top-level type. Plain attachments stay backward
compatible with the bare `{"type":"attachment"}` payload.

- field-json: document attachment `style.type` (plain | signature)
- SKILL / field-create / field-update: create DSL and conversion rules for the
  attachment + style form
- cell-value: signature cells are read / filter / clear only — record writes
  reject a non-empty value, and upload-attachment reports them under
  ignored_fields
- data-query / workflow-schema / lookup-guide: signature filters empty /
  non-empty only
@Neseria Neseria force-pushed the feat/lark-base-signature-field branch from dac98cc to 376d1d9 Compare June 23, 2026 09:51
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.

3 participants