Skip to content

docs(lark-base): add has_more guidance for record-list pagination#183

Open
kongenpei wants to merge 2 commits intomainfrom
codex/record-list-has-more-guidance
Open

docs(lark-base): add has_more guidance for record-list pagination#183
kongenpei wants to merge 2 commits intomainfrom
codex/record-list-has-more-guidance

Conversation

@kongenpei
Copy link
Copy Markdown
Collaborator

@kongenpei kongenpei commented Apr 1, 2026

Summary

  • add has_more response field docs to base +record-list reference
  • add Chinese pagination rules: only continue when has_more=true and user query needs more data
  • update skill-level rule to avoid unnecessary full-data preloading

Testing

  • docs only (no runtime changes)

Summary by CodeRabbit

Documentation

  • Updated record list pagination guidelines with conditional paging rules
  • Clarified pagination logic: only continue to subsequent pages when more data exists and the user explicitly requests it
  • Enhanced documentation to guide users to avoid unnecessary fetching when only a subset of records is needed

@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Apr 1, 2026

Greptile Summary

This is a documentation-only PR that adds explicit pagination guidance for the +record-list command in the Lark Base skill. It introduces a has_more response-field table and a clear 5-step "only paginate on demand" rule in the reference doc, and tightens the matching skill-level rule in SKILL.md to prevent unnecessary full-data preloads.

  • lark-base-record-list.md: New "返回关键字段" table documents the has_more boolean; new "按需翻页规则" section gives a concrete 5-step decision tree; a new 坑点 bullet reinforces intent-gated pagination.
  • SKILL.md: The +record-list rule is upgraded from a simple --limit 200 cap to a full pagination policy that gates further page fetches on both has_more=true and explicit user intent (e.g., "export all"), avoiding unnecessary API calls when the user only needs a sample.
  • The guidance is internally consistent across both files and clearly covers the three decision branches: no more pages, more pages but user doesn't need them, and more pages that are actually required.

Confidence Score: 5/5

Documentation-only changes with no runtime impact; safe to merge.

Both changed files are purely documentation. The new content is accurate, internally consistent across the two files, and improves clarity around a previously under-documented pagination behavior. No code paths are affected.

No files require special attention.

Important Files Changed

Filename Overview
skills/lark-base/references/lark-base-record-list.md Adds "返回关键字段" table documenting has_more, a 5-step "按需翻页规则" section, and a new 坑点 bullet—all clear and internally consistent.
skills/lark-base/SKILL.md Updates the +record-list skill-level rule from a simple limit cap to a full pagination policy including has_more check and intent-gating logic; wording is consistent with the reference doc.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A([Start]) --> B["Call +record-list\n(offset=0, limit≤200)"]
    B --> C{Check has_more}
    C -- "false" --> D([Done – return results])
    C -- "true" --> E{Does user need\nmore data?}
    E -- "No\n(e.g. 'show examples',\n'first N rows')" --> D
    E -- "Yes\n(e.g. 'export all',\n'full detail')" --> F["Increment offset\nby records read"]
    F --> G["Call +record-list\n(next page)"]
    G --> H{Check has_more}
    H -- "false" --> D
    H -- "true" --> E
Loading

Reviews (2): Last reviewed commit: "docs(lark-base): refine record-list key ..." | Re-trigger Greptile

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

🚀 PR Preview Install Guide

🧰 CLI update

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

🧩 Skill update

npx skills add larksuite/cli#codex/record-list-has-more-guidance -y -g

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 1, 2026

📝 Walkthrough

Walkthrough

Updated pagination guidelines in Lark-base documentation to introduce conditional pagination rules based on the has_more response field. Changed from mandatory offset pagination for all additional data to a conditional approach that fetches subsequent pages only when has_more=true and the user explicitly requires more records.

Changes

Cohort / File(s) Summary
Pagination Guidelines Documentation
skills/lark-base/SKILL.md, skills/lark-base/references/lark-base-record-list.md
Updated pagination guidance to replace blanket offset pagination requirement with conditional rules: fetch initial page, check has_more, and continue paging only when has_more=true and user explicitly requests additional data. Added clarification that subsequent pages should not be fetched if user only needs a subset of records.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 With whiskers twitched and nose held high,
We bound through pages, one by one,
No more blind fetches 'cross the sky—
Just check has_more and skip the pun!
The rabbit's wisdom: ask before you scroll,
Smart pagination warms our fuzzy soul! 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the main changes but lacks adherence to the repository template structure and missing verification details. Restructure to match the template: add explicit Summary/Changes/Test Plan sections with checkboxes. Clarify test verification method beyond 'docs only'.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding has_more guidance for record-list pagination across the documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/record-list-has-more-guidance

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

@kongenpei kongenpei requested a review from zgz2048 April 1, 2026 08:52
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

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-record-list.md (1)

21-21: Clarify offset progression wording for non-zero starting offset.

“按已读取数量递增” is directionally correct, but adding one concrete formula/example would reduce ambiguity (e.g., next_offset = current_offset + len(items)), especially when the first call is not offset=0.

✏️ Suggested wording tweak
-5. 继续翻页时,`offset` 按已读取数量递增,直到满足用户需求或 `has_more = false`。
+5. 继续翻页时,`offset` 按“当前 offset + 本页实际返回条数”递增(例如 `next_offset = current_offset + len(items)`),直到满足用户需求或 `has_more = false`。
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/lark-base/references/lark-base-record-list.md` at line 21,
说明当前关于翻页偏移的表述对非零起始 offset 不够明确;将第 5 点改为用明确公式和示例说明偏移如何递增,例如写成 “继续翻页时,下一次请求的
offset = current_offset + len(items)(即 next_offset = current_offset +
len(items)),直到满足用户需求或 has_more = false”,并在文中保留对 offset、items 和 has_more
的术语一致性以避免歧义。
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@skills/lark-base/references/lark-base-record-list.md`:
- Line 21: 说明当前关于翻页偏移的表述对非零起始 offset 不够明确;将第 5 点改为用明确公式和示例说明偏移如何递增,例如写成
“继续翻页时,下一次请求的 offset = current_offset + len(items)(即 next_offset =
current_offset + len(items)),直到满足用户需求或 has_more = false”,并在文中保留对 offset、items 和
has_more 的术语一致性以避免歧义。

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c1ee69c9-7b48-4442-ae4e-a0f9a19cca1e

📥 Commits

Reviewing files that changed from the base of the PR and between 17698d5 and a63815b.

📒 Files selected for processing (2)
  • skills/lark-base/SKILL.md
  • skills/lark-base/references/lark-base-record-list.md

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.

1 participant