feat(note): clarify note ownership with dedicated detail and transcript flows#1435
Conversation
📝 WalkthroughWalkthroughAdds a new ChangesNote Domain Feature
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@7087526571b57b522a76a8d755b7452bf450f773🧩 Skill updatenpx skills add larksuite/cli#feat/note-domain-split -y -g |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
lint/errscontract/rules_test.go (1)
953-965:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winAdd a direct
shortcuts/note/rejection case to the helper-rule behavior test.You added
shortcuts/note/to migrated production paths, butTestCheckNoLegacyCommonHelperCall_RejectsLegacyHelpersOnMigratedPathstill doesn’t exercise ashortcuts/note/...file path. The new set-inclusion test is useful for drift, but it doesn’t validate runtime rule behavior for note paths.As per coding guidelines: “Every behavior change needs a test alongside the change.”
Also applies to: 992-1002
🤖 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 `@lint/errscontract/rules_test.go` around lines 953 - 965, The test TestCheckNoLegacyCommonHelperCall_RejectsLegacyHelpersOnMigratedPath is missing a runtime rejection case for the new shortcuts/note migration; update the test by adding a representative note path (e.g. "shortcuts/note/note_create.go" or "shortcuts/note/note_update.go") to the paths slice used for rejection assertions in that test (and the corresponding sibling test around lines 992-1002 if it mirrors cases), so the helper-rule behavior test actually exercises and expects rejection for shortcuts/note files.Source: Coding guidelines
skills/lark-vc/references/vc-domain-boundaries.md (1)
52-57:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winScope the “prefer Note over Minutes” rule.
The new priority sentence reads like Note should win whenever content overlaps, but the preceding bullet says transcript/summarization requests must start from the original dialogue record and must not use
note_doc_tokenas the final output. Please narrow this rule to metadata/duplicate views so it can’t override the transcript-first path.🤖 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/references/vc-domain-boundaries.md` around lines 52 - 57, Summary: The "优先查询智能纪要(Note)" rule is too broad and may override the transcript-first requirement for summarization; constrain it. Fix: revise the priority sentence so it explicitly applies only to metadata/duplicate-view queries (e.g., to-dos, chapters, quick previews) and NOT to transcript/summarization/rewriting requests; add an explicit exception line stating that for any "提炼/总结/重新总结/整理/回顾" flows the system must start from the original transcript/minutes and must not use note_doc_token or Note as the sole source of content, while still allowing Note to be preferred for metadata, deduped views, or UX-friendly displays (to-dos, chapters); reference strings: "智能纪要(Note)", "妙记(Minutes)", "note_doc_token", and the transcript/summarization bullet to locate the text to change.
🤖 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.
Inline comments:
In `@skills/lark-workflow-meeting-summary/SKILL.md`:
- Around line 77-81: 补全对 note_display_type=unknown 的路由说明:当 note_display_type 为
unknown 且 verbatim_doc_token 非空 时,按 normal 路径处理——使用 docs +fetch --api-version v2
--doc <verbatim_doc_token> 获取逐字稿,不应当假定为 unified;当 unknown 且无 verbatim_doc_token
时,先调用 lark-cli note +detail --note-id <note_id> 复核返回的展示类型并按其路由(或按 note
+transcript --note-id <note_id> 拉取逐字稿内容);若复核后仍无法确定逐字稿入口,则在文档中明确说明无法获取逐字稿并如实告知用户。
---
Outside diff comments:
In `@lint/errscontract/rules_test.go`:
- Around line 953-965: The test
TestCheckNoLegacyCommonHelperCall_RejectsLegacyHelpersOnMigratedPath is missing
a runtime rejection case for the new shortcuts/note migration; update the test
by adding a representative note path (e.g. "shortcuts/note/note_create.go" or
"shortcuts/note/note_update.go") to the paths slice used for rejection
assertions in that test (and the corresponding sibling test around lines
992-1002 if it mirrors cases), so the helper-rule behavior test actually
exercises and expects rejection for shortcuts/note files.
In `@skills/lark-vc/references/vc-domain-boundaries.md`:
- Around line 52-57: Summary: The "优先查询智能纪要(Note)" rule is too broad and may
override the transcript-first requirement for summarization; constrain it. Fix:
revise the priority sentence so it explicitly applies only to
metadata/duplicate-view queries (e.g., to-dos, chapters, quick previews) and NOT
to transcript/summarization/rewriting requests; add an explicit exception line
stating that for any "提炼/总结/重新总结/整理/回顾" flows the system must start from the
original transcript/minutes and must not use note_doc_token or Note as the sole
source of content, while still allowing Note to be preferred for metadata,
deduped views, or UX-friendly displays (to-dos, chapters); reference strings:
"智能纪要(Note)", "妙记(Minutes)", "note_doc_token", and the transcript/summarization
bullet to locate the text to change.
🪄 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: aea4f848-ed4a-4e89-92d8-e36e44330447
📒 Files selected for processing (26)
cmd/auth/login_messages.gocmd/auth/login_test.gointernal/registry/service_descriptions.jsonlint/errscontract/rule_no_legacy_common_helper_call.golint/errscontract/rule_no_legacy_envelope_literal.golint/errscontract/rules_test.goshortcuts/note/note.goshortcuts/note/note_detail.goshortcuts/note/note_test.goshortcuts/note/note_transcript.goshortcuts/note/note_transcript_test.goshortcuts/note/shortcuts.goshortcuts/register.goshortcuts/vc/vc_notes.goshortcuts/vc/vc_notes_test.goskills/lark-doc/SKILL.mdskills/lark-minutes/SKILL.mdskills/lark-note/SKILL.mdskills/lark-note/references/lark-note-detail.mdskills/lark-note/references/lark-note-transcript.mdskills/lark-vc/SKILL.mdskills/lark-vc/references/lark-vc-notes.mdskills/lark-vc/references/vc-domain-boundaries.mdskills/lark-workflow-meeting-summary/SKILL.mdtests/cli_e2e/note/coverage.mdtests/cli_e2e/note/note_dryrun_test.go
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1435 +/- ##
==========================================
+ Coverage 72.83% 72.87% +0.04%
==========================================
Files 732 737 +5
Lines 69140 69446 +306
==========================================
+ Hits 50356 50609 +253
- Misses 15003 15037 +34
- Partials 3781 3800 +19 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
9368848 to
7087526
Compare
Summary
Reintroduce the Note domain split after #1417 consolidated the logic back into
vc. This restoresnote +detailandnote +transcriptas the canonical known-note_identry points while keepingvc +notesresponsible for locating notes from meeting context.Changes
shortcuts/notewithnote +detailandnote +transcript, including unified transcript pagination, cursor-cycle protection, typed errors, and dry-run E2E coverage.vc +notesto delegate note-detail parsing to the note domain and surfacenote_id/note_display_typefor downstream routing.lark-note,lark-vc,lark-minutes, and thevc-transcribe-tabdoc boundary.Test Plan
go test ./shortcuts/note ./shortcuts/vc ./cmd/auth ./tests/cli_e2e/notelark-cli <domain> <command>flow works as expected:git diff --cached --checkbefore commit and dry-run E2E coverage fornote +detail/note +transcriptRelated Issues
Summary by CodeRabbit
New Features
Documentation
Tests