Skip to content

feat(drive): support apps in list comments#1877

Merged
wittam-01 merged 2 commits into
mainfrom
fix/drive-list-comments-apps
Jul 15, 2026
Merged

feat(drive): support apps in list comments#1877
wittam-01 merged 2 commits into
mainfrom
fix/drive-list-comments-apps

Conversation

@wittam-01

@wittam-01 wittam-01 commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

Support listing comments for Miaoda apps resources via drive +list-comments, including /page/<token> URL parsing and file_type=apps.

Changes

  • Add apps as a supported drive +list-comments type and recognize Miaoda /page/<token> URLs.
  • Preserve existing Wiki unwrap behavior and keep --need-relation docx-only.
  • Update lark-drive skill docs and E2E coverage notes for apps comments.

Test Plan

  • git diff --check
  • go test ./shortcuts/drive -run 'TestResolveDriveListCommentsInput|TestBuildDriveListCommentsParams|TestDriveListCommentsExecuteAppsPageURL'
  • go test ./tests/cli_e2e/drive -run TestDriveListCommentsDryRun_AppsPageURL
  • make unit-test (not run per request)

Related Issues

  • None

Summary by CodeRabbit

  • New Features

    • drive +list-comments now supports Miaoda apps.
    • Accepts apps page URLs in the /page/<token> format and bare app tokens with --type apps.
    • Sends apps-specific comment listing requests (with the correct parameter behavior).
  • Bug Fixes

    • Improved validation and error messages for unsupported resource types and resolved wiki types to include apps.
  • Documentation

    • Updated command help and Drive skill docs with apps URL formats, token requirements, and supported resource types.
  • Tests

    • Added unit and CLI e2e coverage for apps page URL handling and apps comment listing.

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

coderabbitai Bot commented Jul 14, 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: 26901ea8-2b0e-4fa8-b0d8-7c8d2ec0744b

📥 Commits

Reviewing files that changed from the base of the PR and between a280bf9 and 8b5d19c.

📒 Files selected for processing (1)
  • shortcuts/drive/drive_list_comments_test.go

📝 Walkthrough

Walkthrough

Changes

drive +list-comments now supports Miaoda apps through /page/<token> URLs and bare apps tokens. It resolves apps inputs, sends file_type=apps without need_relation, validates responses, and adds unit, execution, dry-run, and documentation coverage.

Apps comment listing

Layer / File(s) Summary
Apps input resolution and API typing
shortcuts/drive/drive_list_comments.go
Apps is added to supported resource types, /page/<token> URLs are parsed, validation messages are expanded, and public command help documents apps usage.
Apps request and execution validation
shortcuts/drive/drive_list_comments_test.go
Tests verify apps token and URL resolution, file_type=apps, omission of need_relation, unsupported wiki types, API execution, and decoded response fields.
Apps usage guidance and dry-run coverage
skills/lark-drive/..., tests/cli_e2e/drive/...
Skill references and coverage documentation describe apps URL/token behavior, and a dry-run test verifies the generated request.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CLI
  participant InputResolver
  participant AppsURLParser
  participant DriveCommentsAPI
  CLI->>InputResolver: submit apps page URL
  InputResolver->>AppsURLParser: parse /page/<token>
  AppsURLParser-->>InputResolver: return apps token
  InputResolver->>DriveCommentsAPI: list comments with file_type=apps
  DriveCommentsAPI-->>CLI: return comment response
Loading

Possibly related PRs

  • larksuite/cli#1845: Adds the existing drive +list-comments shortcut that this change extends with apps URL parsing and parameter handling.

Suggested reviewers: fangshuyu-768

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main change: adding apps support to drive list comments.
Description check ✅ Passed The description follows the required template and includes summary, changes, test plan, and related issues.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/drive-list-comments-apps

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.

@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.68%. Comparing base (37d490a) to head (8b5d19c).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1877      +/-   ##
==========================================
+ Coverage   74.66%   74.68%   +0.02%     
==========================================
  Files         877      878       +1     
  Lines       91731    91786      +55     
==========================================
+ Hits        68494    68554      +60     
+ Misses      17926    17922       -4     
+ Partials     5311     5310       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

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

🧩 Skill update

npx skills add larksuite/cli#fix/drive-list-comments-apps -y -g

@wittam-01 wittam-01 merged commit 16a93cd into main Jul 15, 2026
48 of 50 checks passed
@wittam-01 wittam-01 deleted the fix/drive-list-comments-apps branch July 15, 2026 04:15
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/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