Skip to content

docs(readme): document shell completion command#398

Open
OwenYWT wants to merge 3 commits intolarksuite:mainfrom
OwenYWT:codex/cli-shell-completion-docs
Open

docs(readme): document shell completion command#398
OwenYWT wants to merge 3 commits intolarksuite:mainfrom
OwenYWT:codex/cli-shell-completion-docs

Conversation

@OwenYWT
Copy link
Copy Markdown
Contributor

@OwenYWT OwenYWT commented Apr 10, 2026

Addresses #264

Summary

  • add a small README section for the hidden but working lark-cli completion subcommand
  • keep the command hidden in help while making the supported shells discoverable in docs
  • place the note in Advanced Usage so human operators can find it without changing agent defaults

Test Plan

  • Docs only

Summary by CodeRabbit

  • Documentation

    • Added Shell Completion documentation with setup examples for zsh, bash, fish, and PowerShell.
    • Updated app visibility requirements for direct messages to clarify that user authentication does not bypass visibility restrictions.
  • Bug Fixes

    • Fixed an issue where internal option identifiers were unintentionally exposed in option search results.

@github-actions github-actions bot added domain/base PR touches the base domain domain/im PR touches the im 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: 4eb60365-1dbd-436c-a37b-02d711650562

📥 Commits

Reviewing files that changed from the base of the PR and between fa16fe1 and 6242961.

📒 Files selected for processing (5)
  • README.md
  • shortcuts/base/base_execute_test.go
  • shortcuts/base/field_ops.go
  • skills/lark-im/SKILL.md
  • skills/lark-im/references/lark-im-messages-send.md

📝 Walkthrough

Walkthrough

The pull request introduces a feature to strip internal option IDs from output in field search operations, updates corresponding test assertions, and enhances documentation regarding shell completion and app visibility constraints for user identity authentication across multiple skill documentation files.

Changes

Cohort / File(s) Summary
Option ID Stripping
shortcuts/base/field_ops.go, shortcuts/base/base_execute_test.go
Implemented stripFieldOptionIDs helper function to filter out "id" fields from option maps before output. Updated test to assert that internal option identifiers are not exposed in stdout.
Documentation Updates
README.md, skills/lark-im/SKILL.md, skills/lark-im/references/lark-im-messages-send.md
Added Shell Completion section to README with multi-shell examples. Clarified in Lark IM documentation that --as user identity does not bypass app visibility requirements, with additional guidance on common mistakes and failure scenarios.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

documentation

Suggested reviewers

  • fangshuyu-768
  • liujinkun2025

Poem

🐰 A shell completion hop,
Field IDs scrubbed clean,
App visibility won't stop—
The clearest flow we've seen!
Documentation made pristine. ✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

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.
Description check ❓ Inconclusive The PR description covers the summary and test plan sections but is missing a detailed 'Changes' section that lists the modifications made across all affected files. Add a 'Changes' section listing the main modifications: README shell completion docs, field option ID stripping in field_ops.go, test assertion updates, and Lark IM documentation updates.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'docs(readme): document shell completion command' is directly related to the main change: adding shell completion documentation to the README.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 primarily documents the hidden lark-cli completion subcommand in the README's Advanced Usage section, and bundles two other documentation updates (im skill app-visibility clarification) alongside a small code change: a new stripFieldOptionIDs helper in field_ops.go that removes internal id fields from field-option API responses, with a matching integration test.

Confidence Score: 5/5

Safe to merge — no logic errors or regressions introduced.

All changes are either documentation or a small, well-tested helper function (stripFieldOptionIDs). The new test explicitly verifies the ID-stripping behavior. No P0 or P1 findings were identified.

No files require special attention.

Important Files Changed

Filename Overview
README.md Adds Shell Completion subsection under Advanced Usage documenting the four supported shells; prose is accurate and consistent with the rest of the file.
shortcuts/base/field_ops.go Adds stripFieldOptionIDs function that deep-copies each option map while dropping the id key; wires it into executeFieldSearchOptions; logic is correct and nil/empty-slice edge case is handled.
shortcuts/base/base_execute_test.go Adds TestBaseFieldExecuteSearchOptions that stubs the options endpoint and verifies both that option names are present and that option IDs (opt_1) are absent from output.
skills/lark-im/SKILL.md Adds a sentence clarifying that --as user does not bypass app visibility for direct messages; documentation change only.
skills/lark-im/references/lark-im-messages-send.md Expands the Safety Constraints and Notes sections to clarify app visibility requirements when using --as user, required scopes for both identity modes, and the send_as_bot scope; documentation change only.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[executeFieldSearchOptions] --> B[Call base v3 API\nGET .../fields/:field_id/options]
    B --> C{API response}
    C -->|options list| D[stripFieldOptionIDs]
    D --> E{For each option}
    E -->|option is a map| F[Copy all keys\nexcept 'id']
    E -->|option is not a map| G[Pass through unchanged]
    F --> H[Append to normalized]
    G --> H
    H --> I[runtime.Out\nfield_id, field_name, keyword,\noptions stripped, total]
    C -->|empty / nil| J[Return empty slice directly]
    J --> I
Loading

Reviews (1): Last reviewed commit: "docs(readme): document shell completion ..." | Re-trigger Greptile

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 domain/im PR touches the im 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.

1 participant