Skip to content

feat: add minutes permission application shortcut#1876

Merged
calendar-assistant merged 1 commit into
mainfrom
feat/one-click-minutes-permission
Jul 14, 2026
Merged

feat: add minutes permission application shortcut#1876
calendar-assistant merged 1 commit into
mainfrom
feat/one-click-minutes-permission

Conversation

@calendar-assistant

@calendar-assistant calendar-assistant commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add a user-authenticated minutes +apply-permission shortcut for requesting view or edit access to a Lark Minute. Permission-denied paths now provide an actionable recovery command while preserving the requirement for explicit user consent before an application is sent.

Changes

  • Add minutes +apply-permission --minute-token <token> --perm view|edit and register the required minutes:permission:apply scope.
  • Return structured validation errors, safely encode the minute token, and emit a stable JSON result after successful requests.
  • Update Minutes and VC permission-denied hints to point agents to the new shortcut.
  • Document that the shortcut sends a permission request and must never run automatically after a permission error.
  • Add unit coverage for validation, dry-run request construction, execution, and typed errors.
  • Add dry-run CLI E2E coverage for the request shape and invalid permission handling.

Test Plan

  • make build
  • make unit-test feature suites passed; the initial full run hit unrelated temporary-directory cleanup races, and both affected packages passed on an immediate race-enabled retry.
  • go test -race -gcflags="all=-N -l" -count=1 ./internal/qualitygate/diff ./internal/qualitygate/publiccontent
  • go test ./tests/cli_e2e/minutes -run TestMinutesApplyPermission -count=1
  • go vet ./...
  • gofmt -l .
  • go mod tidy produced no changes.
  • go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.6 run --new-from-rev=origin/main reported 0 issues.

Related Issues

  • None

Summary by CodeRabbit

  • New Features

    • Added minutes +apply-permission to request view or edit access for a minute.
    • Added validation for minute tokens and supported permission values.
    • Added dry-run and JSON output support.
  • Improvements

    • Permission errors now provide a command to request the required access.
    • Updated guidance and skill documentation for explicit permission requests.
  • Tests

    • Added coverage for validation, dry runs, execution, and CLI behavior.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a9a5e406-3ec3-4676-9371-4ea7dc208bcb

📥 Commits

Reviewing files that changed from the base of the PR and between 37d490a and 492b93a.

📒 Files selected for processing (15)
  • shortcuts/minutes/minutes_apply_permission.go
  • shortcuts/minutes/minutes_apply_permission_test.go
  • shortcuts/minutes/minutes_detail.go
  • shortcuts/minutes/minutes_speaker_replace.go
  • shortcuts/minutes/minutes_speaker_replace_test.go
  • shortcuts/minutes/minutes_summary_todo_test.go
  • shortcuts/minutes/minutes_todo.go
  • shortcuts/minutes/minutes_update.go
  • shortcuts/minutes/minutes_update_test.go
  • shortcuts/minutes/minutes_word_replace.go
  • shortcuts/minutes/shortcuts.go
  • shortcuts/vc/vc_notes.go
  • shortcuts/vc/vc_notes_test.go
  • skills/lark-minutes/SKILL.md
  • tests/cli_e2e/minutes/minutes_apply_permission_test.go

📝 Walkthrough

Walkthrough

Adds minutes +apply-permission for requesting view or edit access, registers and tests the shortcut, updates permission-denied hints across Minutes and VC commands, and documents explicit permission-request routing in the Minutes skill.

Changes

Minutes permission application

Layer / File(s) Summary
Apply-permission command
shortcuts/minutes/minutes_apply_permission.go, shortcuts/minutes/shortcuts.go, shortcuts/minutes/minutes_apply_permission_test.go, tests/cli_e2e/minutes/minutes_apply_permission_test.go
Adds the +apply-permission shortcut with --minute-token and --perm validation, dry-run and typed POST execution, JSON output, registration, unit tests, and CLI end-to-end coverage.
Permission error remediation
shortcuts/minutes/minutes_detail.go, shortcuts/minutes/minutes_speaker_replace.go, shortcuts/minutes/minutes_todo.go, shortcuts/minutes/minutes_update.go, shortcuts/minutes/minutes_word_replace.go, shortcuts/vc/vc_notes.go, shortcuts/minutes/*_test.go, shortcuts/vc/vc_notes_test.go
Permission-denied hints now provide token-specific +apply-permission commands, and affected tests validate the updated hints.
Minutes skill guidance
skills/lark-minutes/SKILL.md
Documents shortcut discovery, intent routing, explicit permission-request invocation, and confirmation requirements after permission errors.

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

Sequence Diagram(s)

sequenceDiagram
  participant CLI
  participant MinutesShortcut
  participant MinutesAPI
  CLI->>MinutesShortcut: provide minute-token and perm
  MinutesShortcut->>MinutesAPI: POST permissions/apply
  MinutesAPI-->>MinutesShortcut: return permission result
  MinutesShortcut-->>CLI: print minute_token and perm
Loading

Possibly related PRs

Suggested labels: feature, documentation

Suggested reviewers: zhangjun-bytedance, hugang-lark

✨ 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 feat/one-click-minutes-permission

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.

@github-actions github-actions Bot added domain/vc PR touches the vc domain size/L Large or sensitive change across domains or core paths labels Jul 14, 2026
@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 79.48718% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.66%. Comparing base (4e44e51) to head (492b93a).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
shortcuts/minutes/minutes_apply_permission.go 81.25% 3 Missing and 3 partials ⚠️
shortcuts/minutes/minutes_detail.go 0.00% 1 Missing ⚠️
shortcuts/minutes/shortcuts.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1876      +/-   ##
==========================================
+ Coverage   74.60%   74.66%   +0.06%     
==========================================
  Files         877      878       +1     
  Lines       91720    91764      +44     
==========================================
+ Hits        68426    68520      +94     
+ Misses      17981    17930      -51     
- Partials     5313     5314       +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.

@calendar-assistant
calendar-assistant force-pushed the feat/one-click-minutes-permission branch from 423436b to 492b93a Compare July 14, 2026 11:14
@calendar-assistant
calendar-assistant marked this pull request as ready for review July 14, 2026 11:31
@calendar-assistant
calendar-assistant merged commit ac2508d into main Jul 14, 2026
25 of 26 checks passed
@calendar-assistant
calendar-assistant deleted the feat/one-click-minutes-permission branch July 14, 2026 11:31
@github-actions

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

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

🧩 Skill update

npx skills add larksuite/cli#feat/one-click-minutes-permission -y -g

@liangshuo-1 liangshuo-1 mentioned this pull request Jul 15, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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