Skip to content

feat: support file comment reply reactions#380

Merged
fangshuyu-768 merged 1 commit intomainfrom
feat/file-comment-reply-reactions
Apr 10, 2026
Merged

feat: support file comment reply reactions#380
fangshuyu-768 merged 1 commit intomainfrom
feat/file-comment-reply-reactions

Conversation

@wittam-01
Copy link
Copy Markdown
Collaborator

@wittam-01 wittam-01 commented Apr 10, 2026

Change-Id: Ib75a35c438dc1c1aac32077ccc04a0de2ffef145

Summary

Add skill guidance for Drive comment/reply reaction support so agents can correctly read and update reactions in document comment threads. The surrounding doc and template updates mainly align routing, helping comment/reaction requests land in lark-drive with the right commands and parameters.

Changes

  • Added a dedicated lark-drive reaction reference covering reaction query/write flows, including need_reaction, reply_id, update_reaction, and reaction_type usage
  • Updated lark-drive skill guidance to surface the reaction entry point, related API resource, and required scope
  • Updated related lark-doc and skill-template guidance so document comment/reaction scenarios are routed to lark-drive consistently

Test Plan

  • Unit tests pass
  • Manual local verification confirms the lark xxx command works as expected
  • node scripts/skill-format-check/index.js

Related Issues

  • None

Summary by CodeRabbit

  • New Features

    • Full reaction support for comment replies: add, remove, and query reactions.
  • Documentation

    • Media intent routing clarified: preview vs. download behavior; whiteboards (thumbnails) are download-only.
    • Document comment/reaction actions now route to the drive flow.
    • Import guidance mapping common local file types to recommended import targets; post-import tool usage clarified.
    • Added a dedicated reactions reference with query/write examples and constraints.

@github-actions github-actions bot added domain/ccm PR touches the ccm domain size/L Large or sensitive change across domains or core paths labels Apr 10, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 10, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8da37e2b-49b9-45cd-8b68-0eecf19eca49

📥 Commits

Reviewing files that changed from the base of the PR and between 2304241 and c240439.

📒 Files selected for processing (5)
  • skill-template/domains/doc.md
  • skill-template/domains/drive.md
  • skills/lark-doc/SKILL.md
  • skills/lark-drive/SKILL.md
  • skills/lark-drive/references/lark-drive-reactions.md
✅ Files skipped from review due to trivial changes (3)
  • skill-template/domains/doc.md
  • skills/lark-drive/references/lark-drive-reactions.md
  • skill-template/domains/drive.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • skills/lark-doc/SKILL.md

📝 Walkthrough

Walkthrough

Adds decision-routing rules for media preview vs download (with whiteboard exception), delegates document comment/reaction intents to lark-drive, introduces Drive import-type routing for local files, and adds a Drive reactions reference plus a new reply-reaction API entry.

Changes

Cohort / File(s) Summary
Document routing rules
skill-template/domains/doc.md, skills/lark-doc/SKILL.md
Added media preview (docs +media-preview) vs download (docs +media-download) routing, whiteboard-only download constraint (forbids preview), and explicit delegation of comment/reaction intents from lark-doc to lark-drive.
Drive import guidance
skill-template/domains/drive.md, skills/lark-drive/SKILL.md
Inserted “快速决策” mapping local extensions to lark-cli drive +import --type (e.g., .xlsx/.csv → bitable, .md/.docx/.doc/.txt/.html → docx, .xls/.xlsx/.csv → sheet) and clarified lark-base is post-import only.
Reaction reference
skills/lark-drive/references/lark-drive-reactions.md
New comprehensive guide for comment/reply reactions: token/card rules, read/query rules (need_reaction=true), write via drive file.comment.reply.reactions update_reaction, request/body requirements, examples, and reaction_type enum/constraints.
Drive API updates
skills/lark-drive/SKILL.md
Added API resource file.comment.reply.reactions.update_reaction (scope docs:document.comment:create), updated file.comment.replys.create description, and mapped permission for the new action.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant Client as Frontend
  participant Router as DecisionLayer
  participant CLI as lark-cli
  participant Docs as lark-doc
  participant Drive as lark-drive
  Note over Router: New routing rules for media, imports, and reactions
  User->>Client: request (preview/download media / comment/react / import file)
  Client->>Router: evaluate intent & target
  alt Media preview intent (non-whiteboard)
    Router->>CLI: docs +media-preview
    CLI->>Docs: preview request
    Docs-->>Client: preview response
  else Media download or whiteboard target
    Router->>CLI: docs +media-download [--type whiteboard]
    CLI->>Drive: fetch/download
    Drive-->>Client: file stream
  end
  alt Comment or reaction intent
    Router->>Drive: route to lark-drive (query/update)
    Drive->>Drive: use file.comment.replys / file.comment.reply.reactions.update_reaction
    Drive-->>Client: comment/reaction response
  end
  alt Local file import
    Router->>CLI: drive +import --type <bitable|docx|sheet>
    CLI->>Drive: import into Base/bitable/sheet
    Drive->>Drive: post-import ops via lark-base only
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • liujinkun2025
  • fangshuyu-768

Poem

🐰 I nibble docs and hop between streams,
Previewing pictures, untying dreams.
Reactions routed, imports set right,
Drive holds the carrots, Docs shows the sight—
A rabbit's small cheer for the routing tonight! 🎉

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main feature addition—support for file comment reply reactions—which aligns with the primary objective of the PR.
Description check ✅ Passed The description covers the required sections (Summary, Changes, Test Plan, Related Issues) with appropriate detail; test plan checkboxes are present though some tests remain pending.
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 feat/file-comment-reply-reactions

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

@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Apr 10, 2026

Greptile Summary

This PR adds reaction (emoji) support for Drive comment replies by introducing a dedicated lark-drive-reactions.md reference, wiring it into lark-drive/SKILL.md, and updating routing guidance in lark-doc and the skill templates so agents consistently redirect comment/reaction requests to lark-drive. The documentation is thorough and well-structured, with clear query/write examples and strict reaction_type enum guidance.

Confidence Score: 5/5

Safe to merge — all findings are P2 or lower and do not affect production logic.

The changes are documentation/skill-guidance only with no runtime code paths. The single new finding (potential AWESOMEN typo) is P2 and warrants a quick confirmation but does not block merge. Prior P2 concerns (path style, description brevity) were already noted in earlier review threads.

skills/lark-drive/references/lark-drive-reactions.md — confirm AWESOMEN is a valid distinct enum and not a duplicate of AWESOME.

Important Files Changed

Filename Overview
skills/lark-drive/references/lark-drive-reactions.md New reference file covering reaction query/write flows; well-structured with clear examples, but the reaction_type enum list contains AWESOMEN alongside the distinct AWESOME, which may be a typo.
skills/lark-drive/SKILL.md Adds import routing blockquote, reaction section reference, file.comment.reply.reactions resource, and permissions entry; reference link uses non-standard long path (flagged in prior review).
skills/lark-doc/SKILL.md Reorders quick-decision bullets and adds comment/reaction routing rule to redirect agents to lark-drive; changes are straightforward and consistent with the template.
skill-template/domains/drive.md Adds ## 快速决策 section with import routing bullets, reorganises section order, and adds reaction reference link; all changes are clean and well-aligned with SKILL.md.
skill-template/domains/doc.md Adds media-preview/download decision bullets and comment/reaction routing rule; no issues found.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    U([User Request]) --> D{Intent?}

    D -->|Comment / Reaction| DRIVE[lark-drive]
    D -->|Media preview| DOC_PREV[lark-cli docs +media-preview]
    D -->|Media download| DOC_DL[lark-cli docs +media-download]
    D -->|Local file import| IMPORT{File type?}

    IMPORT -->|.xlsx/.csv → Base| IMP_B[drive +import --type bitable]
    IMPORT -->|.md/.docx/.html → Doc| IMP_D[drive +import --type docx]
    IMPORT -->|.xlsx/.xls/.csv → Sheet| IMP_S[drive +import --type sheet]

    DRIVE --> R{Reaction op?}
    R -->|Query| Q[file.comments list / batch_query\nfile.comment.replys list\nwith need_reaction=true]
    R -->|Add / Delete| W[file.comment.reply.reactions\nupdate_reaction\naction=add or delete\nreply_id + reaction_type]

    W --> RT[reaction_type must be\nexact enum from\nlark-drive-reactions.md]
Loading

Reviews (4): Last reviewed commit: "feat: support file comment reply reactio..." | Re-trigger Greptile

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.

Actionable comments posted: 1

🤖 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-drive/SKILL.md`:
- Line 266: The mapping for file.comment.reply.reactions.update_reaction is
incorrect: inspect the API schema for the update_reaction operation (it supports
both add and delete via an action parameter) and change the scope mapping in
SKILL.md accordingly—replace docs:document.comment:create with
docs:document.comment:update if the operation is an update-only permission, or
include both docs:document.comment:create and docs:document.comment:update if
the API requires separate scopes for add vs delete; use the existing related
mapping for file.comment.replys.update as a reference when deciding which
scope(s) to apply.
🪄 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: ac99d9cc-7694-45f4-aa78-d1bd889f5441

📥 Commits

Reviewing files that changed from the base of the PR and between c16a021 and 7f0e416.

📒 Files selected for processing (5)
  • skill-template/domains/doc.md
  • skill-template/domains/drive.md
  • skills/lark-doc/SKILL.md
  • skills/lark-drive/SKILL.md
  • skills/lark-drive/references/lark-drive-reactions.md

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 10, 2026

🚀 PR Preview Install Guide

🧰 CLI update

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

🧩 Skill update

npx skills add larksuite/cli#feat/file-comment-reply-reactions -y -g

@wittam-01 wittam-01 force-pushed the feat/file-comment-reply-reactions branch 2 times, most recently from e03324d to 2304241 Compare April 10, 2026 07:24
Change-Id: Ib75a35c438dc1c1aac32077ccc04a0de2ffef145
@wittam-01 wittam-01 force-pushed the feat/file-comment-reply-reactions branch from 2304241 to c240439 Compare April 10, 2026 07:58
@fangshuyu-768 fangshuyu-768 merged commit 51d07be into main Apr 10, 2026
12 checks passed
@fangshuyu-768 fangshuyu-768 deleted the feat/file-comment-reply-reactions branch April 10, 2026 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain/ccm PR touches the ccm domain size/L Large or sensitive change across domains or core paths

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants