refactor(dashboard): restructure docs for AI-friendly navigation#191
Conversation
📝 WalkthroughWalkthroughConsolidates Base dashboard docs into a unified dashboard module, updates CLI help text for dashboard-block create/update flags, introduces a detailed Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
skills/lark-base/references/lark-base-dashboard-delete.md (1)
44-44:⚠️ Potential issue | 🟡 Minor参考描述建议与本次重构术语保持一致。
这里仍写为“dashboard 索引页”,建议改为“dashboard 模块指引”,与同批文档表述统一。
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@skills/lark-base/references/lark-base-dashboard-delete.md` at line 44, 在 lark-base-dashboard-delete.md 中将链接描述 "[lark-base-dashboard.md] — dashboard 索引页" 修改为与本次重构术语一致的表述,替换为 "[lark-base-dashboard.md] — dashboard 模块指引";定位时可搜索该文件中的文本片段 "dashboard 索引页" 或链接文本 "lark-base-dashboard.md" 并直接替换为建议的新描述以保持与同批文档统一。
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@skills/lark-base/references/dashboard-block-data-config.md`:
- Line 276: The document mixes English and Chinese by using the word "section"
in headings and the phrase "坑点" — replace occurrences of the English token
"section" with the chosen Chinese term "章节" (or "部分" if preferred) to keep
terminology consistent; update the sentence "修复:见「坑点」section 的二选一规则" to
"修复:见「坑点」章节的二选一规则" (or use "部分") and scan the file for any other instances of
the literal "section" to make the same replacement while preserving surrounding
punctuation and emphasis.
---
Outside diff comments:
In `@skills/lark-base/references/lark-base-dashboard-delete.md`:
- Line 44: 在 lark-base-dashboard-delete.md 中将链接描述 "[lark-base-dashboard.md] —
dashboard 索引页" 修改为与本次重构术语一致的表述,替换为 "[lark-base-dashboard.md] — dashboard
模块指引";定位时可搜索该文件中的文本片段 "dashboard 索引页" 或链接文本 "lark-base-dashboard.md"
并直接替换为建议的新描述以保持与同批文档统一。
🪄 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: 544f9310-2f0e-4e44-bfa4-3d5b3c9fc85b
📒 Files selected for processing (16)
shortcuts/base/dashboard_block_create.goshortcuts/base/dashboard_block_update.goskills/lark-base/SKILL.mdskills/lark-base/references/dashboard-block-data-config.mdskills/lark-base/references/lark-base-dashboard-block-create.mdskills/lark-base/references/lark-base-dashboard-block-delete.mdskills/lark-base/references/lark-base-dashboard-block-get.mdskills/lark-base/references/lark-base-dashboard-block-list.mdskills/lark-base/references/lark-base-dashboard-block-update.mdskills/lark-base/references/lark-base-dashboard-block.mdskills/lark-base/references/lark-base-dashboard-create.mdskills/lark-base/references/lark-base-dashboard-delete.mdskills/lark-base/references/lark-base-dashboard-get.mdskills/lark-base/references/lark-base-dashboard-list.mdskills/lark-base/references/lark-base-dashboard-update.mdskills/lark-base/references/lark-base-dashboard.md
💤 Files with no reviewable changes (1)
- skills/lark-base/references/lark-base-dashboard-block.md
Greptile SummaryThis PR refactors the Key changes:
Issues found:
Confidence Score: 5/5Safe to merge — all changes are documentation and CLI help text with no runtime logic impact; the two remaining findings are minor P2 doc gaps. All previously flagged issues (scatter axis labels, blk_yyy block ID placeholder, --no-validate missing from update doc, template count claim) have been addressed or removed in this PR. The two new findings are both P2 documentation gaps that do not affect runtime behaviour or user safety. No code logic was changed. dashboard-block-data-config.md (dangling section reference) and lark-base-dashboard-block-create.md (missing --no-validate in params table) Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User mentions dashboard / 仪表盘 / 图表] --> B[SKILL.md trigger rule\nRead lark-base-dashboard.md]
B --> C{What does user want?}
C --> D[Create dashboard\n+dashboard-create]
C --> E[Add component\n+dashboard-block-create]
C --> F[Edit component\n+dashboard-block-update]
C --> G[Read / inspect\n+dashboard-get or block-list/get]
C --> H[Delete dashboard or component]
D --> D1[lark-base-dashboard-create.md]
E --> E1[lark-base-dashboard-block-create.md]
E1 --> E2[dashboard-block-data-config.md\nchart templates + filter rules]
F --> F1[lark-base-dashboard-block-update.md]
F1 --> E2
G --> G1[lark-base-dashboard-get.md\nor block-list / block-get]
H --> H1[lark-base-dashboard-delete.md\nor block-delete]
Reviews (3): Last reviewed commit: "refactor(dashboard): restructure docs fo..." | Re-trigger Greptile |
5a8dd46 to
ad7d5d0
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
skills/lark-base/references/dashboard-block-data-config.md (1)
26-34: 为代码块补充语言标识以消除 MD040。该 fenced code block 缺少语言标签,建议改为
text(或bash)以通过 markdownlint 并提升可读性。建议修改
-``` +```text 文本/电话/URL/邮箱: is, isNot, contains, doesNotContain, isEmpty, isNotEmpty 数字/货币/进度: is, isNot, isGreater, isGreaterEqual, isLess, isLessEqual, isEmpty, isNotEmpty 单选: is, isNot, isEmpty, isNotEmpty 多选: is, isNot, contains, doesNotContain, isEmpty, isNotEmpty 日期/时间: is, isGreater, isGreaterEqual, isLess, isLessEqual, isEmpty, isNotEmpty 复选框: is (value: true/false) 人员/创建人/修改人: is, isNot, isEmpty, isNotEmpty</details> <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against the current code and only fix it if needed.
In
@skills/lark-base/references/dashboard-block-data-config.mdaround lines 26 -
34, The fenced code block containing the lines starting with "文本/电话/URL/邮箱:" is
missing a language identifier; update that block by adding a language tag (e.g.,
text) to the opening fence so it becomes ```text, which satisfies MD040 and
improves readability in dashboard-block-data-config.md.</details> </blockquote></details> </blockquote></details> <details> <summary>🤖 Prompt for all review comments with AI agents</summary>Verify each finding against the current code and only fix it if needed.
Inline comments:
In@skills/lark-base/references/dashboard-block-data-config.md:
- Around line 43-57: The CLI local validation is missing checks for
group_by[].mode being required and for validating filter.conditions[].value
types against field metadata; update the validation logic in
shortcuts/base/helpers.go (the validation block around the current checks at
~1058-1121) to (1) enforce that every group_by entry has a non-empty mode field
(reject or default explicitly) and (2) validate each filter.conditions[].value
type according to the field's type/metadata (e.g., string vs number vs array for
multi-value fields) using the same field-metadata lookup helpers used elsewhere;
add helper functions (e.g., validateGroupByMode and
validateFilterConditionValue) and unit tests to cover the new rules.In
@skills/lark-base/references/lark-base-dashboard.md:
- Around line 47-48: Replace all instances of the incorrect dashboard ID prefix
"--dashboard-id blk_xxx" with "--dashboard-id dsh_xxx" in the command examples
in lark-base-dashboard.md (lines cited) and update the related docs
lark-base-dashboard-block-create.md and lark-base-dashboard-block-update.md for
consistency; search for the exact token "--dashboard-id blk_xxx" and change it
to "--dashboard-id dsh_xxx" so examples match the API/tests (note: block IDs
remain "blk_" and should not be changed).
Nitpick comments:
In@skills/lark-base/references/dashboard-block-data-config.md:
- Around line 26-34: The fenced code block containing the lines starting with
"文本/电话/URL/邮箱:" is missing a language identifier; update that block by adding a
language tag (e.g., text) to the opening fence so it becomes ```text, which
satisfies MD040 and improves readability in dashboard-block-data-config.md.</details> <details> <summary>🪄 Autofix (Beta)</summary> Fix all unresolved CodeRabbit comments on this PR: - [ ] <!-- {"checkboxId": "4b0d0e0a-96d7-4f10-b296-3a18ea78f0b9"} --> Push a commit to this branch (recommended) - [ ] <!-- {"checkboxId": "ff5b1114-7d8c-49e6-8ac1-43f82af23a33"} --> Create a new PR with the fixes </details> --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: defaults **Review profile**: CHILL **Plan**: Pro **Run ID**: `099a69fe-c96f-4e13-b9f3-7cbf12a1f332` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 5a8dd4699e050beedbb8d004b3095e5809ded285 and ad7d5d05cd32d9096e2737f34a15e42d652d7330. </details> <details> <summary>📒 Files selected for processing (16)</summary> * `shortcuts/base/dashboard_block_create.go` * `shortcuts/base/dashboard_block_update.go` * `skills/lark-base/SKILL.md` * `skills/lark-base/references/dashboard-block-data-config.md` * `skills/lark-base/references/lark-base-dashboard-block-create.md` * `skills/lark-base/references/lark-base-dashboard-block-delete.md` * `skills/lark-base/references/lark-base-dashboard-block-get.md` * `skills/lark-base/references/lark-base-dashboard-block-list.md` * `skills/lark-base/references/lark-base-dashboard-block-update.md` * `skills/lark-base/references/lark-base-dashboard-block.md` * `skills/lark-base/references/lark-base-dashboard-create.md` * `skills/lark-base/references/lark-base-dashboard-delete.md` * `skills/lark-base/references/lark-base-dashboard-get.md` * `skills/lark-base/references/lark-base-dashboard-list.md` * `skills/lark-base/references/lark-base-dashboard-update.md` * `skills/lark-base/references/lark-base-dashboard.md` </details> <details> <summary>💤 Files with no reviewable changes (1)</summary> * skills/lark-base/references/lark-base-dashboard-block.md </details> <details> <summary>✅ Files skipped from review due to trivial changes (10)</summary> * shortcuts/base/dashboard_block_update.go * shortcuts/base/dashboard_block_create.go * skills/lark-base/references/lark-base-dashboard-delete.md * skills/lark-base/references/lark-base-dashboard-block-delete.md * skills/lark-base/references/lark-base-dashboard-list.md * skills/lark-base/references/lark-base-dashboard-block-get.md * skills/lark-base/references/lark-base-dashboard-block-list.md * skills/lark-base/references/lark-base-dashboard-get.md * skills/lark-base/references/lark-base-dashboard-create.md * skills/lark-base/references/lark-base-dashboard-block-create.md </details> <details> <summary>🚧 Files skipped from review as they are similar to previous changes (2)</summary> * skills/lark-base/SKILL.md * skills/lark-base/references/lark-base-dashboard-block-update.md </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
ad7d5d0 to
0094304
Compare
There was a problem hiding this comment.
Actionable comments posted: 3
♻️ Duplicate comments (1)
skills/lark-base/references/lark-base-dashboard.md (1)
47-47:⚠️ Potential issue | 🟠 Major将示例中的 dashboard ID 前缀统一修正为
dsh_。这些示例使用了
--dashboard-id blk_xxx,会把 dashboard_id 与 block_id 前缀混淆。请统一改为dsh_xxx,并同步同类文档中的示例,避免用户直接复制命令失败。Also applies to: 55-55, 72-72, 83-83, 100-100, 105-105, 117-117, 136-136, 139-139, 142-142
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@skills/lark-base/references/lark-base-dashboard.md` at line 47, Update all example usages of the dashboard ID that currently use the prefix "blk_xxx" to the correct "dsh_xxx" so the CLI flag --dashboard-id references a dashboard ID (not a block ID); search for occurrences of the string "--dashboard-id blk_xxx" and standalone "blk_xxx" in this document and replace them with "--dashboard-id dsh_xxx" / "dsh_xxx" respectively, and apply the same change to the other listed occurrences (lines referenced in the comment) to keep examples consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@skills/lark-base/references/dashboard-block-data-config.md`:
- Around line 43-57: The documentation for group_by.mode is contradictory: it
currently states "`mode` 必填" while elsewhere describes default behaviors for
different field types; update the document to be consistent by choosing one
approach — either mark group_by.mode as optional and document the default
selection rules (e.g., "默认:多选/人员 -> enumerated;其他 -> integrated") or keep it
required and remove any default-value language; ensure all occurrences mention
the chosen behavior and update the `group_by.mode` header and the explanatory
note under "mode 枚举" to match the selected convention.
- Around line 292-295: Replace the incorrect chapter reference "见「关键约束」章节" with
the actual heading "约束与本地校验" wherever it appears (specifically the phrase shown
in the diff: "见「关键约束」章节"); update any internal link anchors or cross-reference
text that points to that phrase so readers/agents can successfully jump to the
"约束与本地校验" section.
In `@skills/lark-base/references/lark-base-dashboard-block-create.md`:
- Around line 36-47: The docs are missing the --no-validate flag that's
implemented in shortcuts/base/dashboard_block_create.go (see flag parsing around
the dashboardBlockCreate command); update the parameter table to include
`--no-validate` with a short description of its effect (skip client-side
validation of data_config), mark it as optional, and add a brief warning about
risks (may result in creating invalid dashboard blocks or runtime errors) and
when to use it (advanced/debugging). Ensure the flag name and behavior match the
implementation (no-validate) and keep wording consistent with other flags like
--dry-run.
---
Duplicate comments:
In `@skills/lark-base/references/lark-base-dashboard.md`:
- Line 47: Update all example usages of the dashboard ID that currently use the
prefix "blk_xxx" to the correct "dsh_xxx" so the CLI flag --dashboard-id
references a dashboard ID (not a block ID); search for occurrences of the string
"--dashboard-id blk_xxx" and standalone "blk_xxx" in this document and replace
them with "--dashboard-id dsh_xxx" / "dsh_xxx" respectively, and apply the same
change to the other listed occurrences (lines referenced in the comment) to keep
examples consistent.
🪄 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: a7dec18a-8df3-4f71-a182-e0cf098e76f8
📒 Files selected for processing (16)
shortcuts/base/dashboard_block_create.goshortcuts/base/dashboard_block_update.goskills/lark-base/SKILL.mdskills/lark-base/references/dashboard-block-data-config.mdskills/lark-base/references/lark-base-dashboard-block-create.mdskills/lark-base/references/lark-base-dashboard-block-delete.mdskills/lark-base/references/lark-base-dashboard-block-get.mdskills/lark-base/references/lark-base-dashboard-block-list.mdskills/lark-base/references/lark-base-dashboard-block-update.mdskills/lark-base/references/lark-base-dashboard-block.mdskills/lark-base/references/lark-base-dashboard-create.mdskills/lark-base/references/lark-base-dashboard-delete.mdskills/lark-base/references/lark-base-dashboard-get.mdskills/lark-base/references/lark-base-dashboard-list.mdskills/lark-base/references/lark-base-dashboard-update.mdskills/lark-base/references/lark-base-dashboard.md
💤 Files with no reviewable changes (1)
- skills/lark-base/references/lark-base-dashboard-block.md
✅ Files skipped from review due to trivial changes (6)
- shortcuts/base/dashboard_block_create.go
- shortcuts/base/dashboard_block_update.go
- skills/lark-base/references/lark-base-dashboard-block-list.md
- skills/lark-base/references/lark-base-dashboard-update.md
- skills/lark-base/references/lark-base-dashboard-block-update.md
- skills/lark-base/references/lark-base-dashboard-block-get.md
🚧 Files skipped from review as they are similar to previous changes (4)
- skills/lark-base/references/lark-base-dashboard-get.md
- skills/lark-base/references/lark-base-dashboard-create.md
- skills/lark-base/SKILL.md
- skills/lark-base/references/lark-base-dashboard-delete.md
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@0094304a0732b9d61757e6b89c3490465354daa0🧩 Skill updatenpx skills add huangxincola/cli#base_dashboard -y -g |
PR Description
Summary
This PR restructures the dashboard-related skill documentation to improve AI-friendly navigation and usability. The main goals are:
Changes
Documentation Architecture
Command Documentation (10 files)
Unified structure for all dashboard commands:
Data Configuration
CLI Improvements
Test Plan
Documentation Structure
Content Verification
AI Usability
Breaking Changes
None. This is a documentation-only refactor.
Related Issues
N/A