Skip to content

refactor(vc): consolidate note handling back into the vc domain#1417

Merged
liangshuo-1 merged 1 commit into
mainfrom
refactor/vc-note-consolidation
Jun 11, 2026
Merged

refactor(vc): consolidate note handling back into the vc domain#1417
liangshuo-1 merged 1 commit into
mainfrom
refactor/vc-note-consolidation

Conversation

@liangshuo-1

@liangshuo-1 liangshuo-1 commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

Hold off on the standalone note domain for now and fold note detail handling back into vc +notes, restoring the previous skill routing. The vc/note/minutes ownership boundary still needs more discussion before committing to a separate domain — we can revisit the split once the unified-note design settles.

The note domain has not shipped in any release, so no published command surface changes.

Test Plan

  • go build ./...
  • go test ./shortcuts/vc ./cmd/auth
  • go test ./... in lint/errscontract

Summary by CodeRabbit

  • Refactor

    • Removed standalone note domain and associated shortcuts; note detail and transcript retrieval is now handled through VC notes operations.
    • Updated lint rules to reflect changes in migrated code paths.
  • Documentation

    • Updated cross-domain routing documentation and skill guides; removed note-specific references and behavior documentation.
  • Tests

    • Removed E2E and unit test coverage for deprecated note commands.

The standalone note shortcut domain added an extra routing hop for
agents (vc +notes -> note +detail / note +transcript) while the
ownership boundary between vc, note, and minutes was still unsettled,
and spread transcript routing guidance across five skills. Fold note
detail handling back into vc +notes and restore the previous skill
routing until the unified-note design converges.

Change-Id: I6a6faa9b04451035fdc11ae4e89edb6f7c64dfde
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR removes the note domain package entirely and consolidates note-detail fetching into vc +notes. The change removes note from CLI auth/registry, updates lint allowlists, refactors vc_notes.go to directly fetch note details, and updates skill documentation to remove routing complexity based on note_display_type.

Changes

Note domain removal and VC consolidation

Layer / File(s) Summary
Remove note domain from system registry
cmd/auth/login_messages.go, cmd/auth/login_test.go, internal/registry/service_descriptions.json, shortcuts/register.go
note is removed from shortcut-only domain names, service descriptions deleted, and note shortcuts no longer registered in RegisterShortcutsWithContext.
Update lint rules for path migration
lint/errscontract/rule_no_legacy_common_helper_call.go, lint/errscontract/rule_no_legacy_envelope_literal.go, lint/errscontract/rules_test.go
migratedCommonHelperPaths and migratedEnvelopePaths are updated to remove shortcuts/note/ entries and reorder surrounding shortcut-path prefixes; test coverage adjusted.
Refactor vc_notes to directly fetch note details
shortcuts/vc/vc_notes.go, shortcuts/vc/vc_notes_test.go
fetchNoteDetail now calls /open-apis/vc/v1/notes/{note_id} directly with local helpers (parseArtifactType, extractArtifactTokens, extractDocTokens) to build result map; fetchNoteByCalendarEventID success condition changed to check note_doc_token instead of note_id; new test coverage added for token-parsing helpers; legacy test dependencies on note package removed.
Update skill documentation for note consolidation
skills/lark-doc/SKILL.md, skills/lark-minutes/SKILL.md, skills/lark-note/SKILL.md, skills/lark-vc/SKILL.md, skills/lark-vc/references/lark-vc-notes.md, skills/lark-vc/references/vc-domain-boundaries.md, skills/lark-workflow-meeting-summary/SKILL.md, tests/cli_e2e/note/*
lark-note skill documentation and E2E tests removed; lark-vc, lark-minutes docs updated to remove note_display_type-based routing and simplify cross-domain boundaries; verbatim_doc_token established as primary transcript identifier.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • larksuite/cli#1345: Main PR reverts/removes the note domain-split changes added in this PR (getShortcutOnlyDomainNames() now removes "note", service descriptions delete "note" entry, lint paths drop shortcuts/note/, and entire shortcuts/note/* implementation removed).
  • larksuite/cli#1172: Both PRs modify shortcuts/vc/vc_notes.go to change note payload detection logic, especially switching "success" criteria from note_id to note_doc_token and broadening hasNotesPayload detection.
  • larksuite/cli#333: Both PRs modify shortcuts/vc/vc_notes.go's calendar-event→notes path; this PR refactors note token extraction while the related PR changes meeting-ID resolution and doc-token deduplication.

Suggested labels

domain/vc, size/L

Suggested reviewers

  • zhaoleibd
  • calendar-assistant

Poem

🐰 The note domain hops away,
Its logic now in VC's care today,
Verbatim tokens shine so bright,
Docs are simplified—just right!
Skill boundaries realigned with joy,
No more note_display_type to annoy! 📝✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 43.48% 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 clearly describes the main change: consolidating note handling back into the vc domain, which aligns with the substantial refactoring across the codebase.
Description check ✅ Passed The description covers the motivation (unsettled ownership boundary), scope (folding note domain back into vc +notes), and includes a test plan with completed verification steps.
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.

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

✨ 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 refactor/vc-note-consolidation

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 and usage tips.

@github-actions github-actions Bot added domain/ccm PR touches the ccm domain domain/vc PR touches the vc domain size/XL Architecture-level or global-impact change labels Jun 11, 2026
@codecov

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.29630% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.83%. Comparing base (c11cf3b) to head (5bc4a28).

Files with missing lines Patch % Lines
shortcuts/vc/vc_notes.go 96.22% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1417      +/-   ##
==========================================
+ Coverage   72.80%   72.83%   +0.03%     
==========================================
  Files         736      732       -4     
  Lines       69374    69140     -234     
==========================================
- Hits        50505    50356     -149     
+ Misses      15073    15003      -70     
+ Partials     3796     3781      -15     

☔ 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

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

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

🧩 Skill update

npx skills add larksuite/cli#refactor/vc-note-consolidation -y -g

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
skills/lark-vc/SKILL.md (1)

142-155: 💤 Low value

Minor: Add language specifier to fenced code block.

The code block starting at line 142 should specify a language for better rendering and linting compliance.

📝 Suggested fix
-```
+```text
 Meeting (视频会议)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills/lark-vc/SKILL.md` around lines 142 - 155, The fenced code block
containing the diagram that starts with "Meeting (视频会议)" is missing a language
specifier; update the opening fence from ``` to ```text (or another appropriate
language like ```yaml) so the block becomes ```text followed by the diagram,
ensuring proper rendering and linting; locate the block containing "Meeting
(视频会议)" / "Note (会议纪要)" / "Minutes (妙记)" and change only the opening fence to
include the language token.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@skills/lark-vc/SKILL.md`:
- Around line 142-155: The fenced code block containing the diagram that starts
with "Meeting (视频会议)" is missing a language specifier; update the opening fence
from ``` to ```text (or another appropriate language like ```yaml) so the block
becomes ```text followed by the diagram, ensuring proper rendering and linting;
locate the block containing "Meeting (视频会议)" / "Note (会议纪要)" / "Minutes (妙记)"
and change only the opening fence to include the language token.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b301f6a2-08b2-4eb5-9b8c-36b7b00f7599

📥 Commits

Reviewing files that changed from the base of the PR and between c11cf3b and 5bc4a28.

📒 Files selected for processing (26)
  • cmd/auth/login_messages.go
  • cmd/auth/login_test.go
  • internal/registry/service_descriptions.json
  • lint/errscontract/rule_no_legacy_common_helper_call.go
  • lint/errscontract/rule_no_legacy_envelope_literal.go
  • lint/errscontract/rules_test.go
  • shortcuts/note/note.go
  • shortcuts/note/note_detail.go
  • shortcuts/note/note_test.go
  • shortcuts/note/note_transcript.go
  • shortcuts/note/note_transcript_test.go
  • shortcuts/note/shortcuts.go
  • shortcuts/register.go
  • shortcuts/vc/vc_notes.go
  • shortcuts/vc/vc_notes_test.go
  • skills/lark-doc/SKILL.md
  • skills/lark-minutes/SKILL.md
  • skills/lark-note/SKILL.md
  • skills/lark-note/references/lark-note-detail.md
  • skills/lark-note/references/lark-note-transcript.md
  • skills/lark-vc/SKILL.md
  • skills/lark-vc/references/lark-vc-notes.md
  • skills/lark-vc/references/vc-domain-boundaries.md
  • skills/lark-workflow-meeting-summary/SKILL.md
  • tests/cli_e2e/note/coverage.md
  • tests/cli_e2e/note/note_dryrun_test.go
💤 Files with no reviewable changes (17)
  • skills/lark-note/references/lark-note-transcript.md
  • shortcuts/note/note_test.go
  • skills/lark-note/references/lark-note-detail.md
  • tests/cli_e2e/note/coverage.md
  • shortcuts/note/note_transcript.go
  • skills/lark-note/SKILL.md
  • tests/cli_e2e/note/note_dryrun_test.go
  • shortcuts/note/shortcuts.go
  • shortcuts/note/note.go
  • shortcuts/note/note_transcript_test.go
  • internal/registry/service_descriptions.json
  • cmd/auth/login_test.go
  • shortcuts/note/note_detail.go
  • lint/errscontract/rule_no_legacy_common_helper_call.go
  • lint/errscontract/rules_test.go
  • skills/lark-doc/SKILL.md
  • shortcuts/register.go

@liangshuo-1 liangshuo-1 merged commit 510545f into main Jun 11, 2026
21 checks passed
@liangshuo-1 liangshuo-1 deleted the refactor/vc-note-consolidation branch June 11, 2026 16:44
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 domain/vc PR touches the vc domain size/XL Architecture-level or global-impact change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant