Skip to content

feat: support shared vc live references and document context - #2249

Merged
zhicong666-bytedance merged 25 commits into
mainfrom
features/F-vc-shared-references-document-context
Aug 10, 2026
Merged

feat: support shared vc live references and document context#2249
zhicong666-bytedance merged 25 commits into
mainfrom
features/F-vc-shared-references-document-context

Conversation

@zhicong666-bytedance

@zhicong666-bytedance zhicong666-bytedance commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Integrate the document context meeting event work from #2155 with the shared live meeting reference changes. This lets lark-vc-only environments discover active meetings, read live events, and send meeting messages while preserving document context fields for follow-up actions.

Changes

  • merge document context meeting event parsing, rendering, and tests from feat(vc): make document-context meeting events actionable for agents #2155
  • move active meeting, meeting events, and meeting message references into skills/lark-vc/references
  • update lark-vc and lark-vc-agent docs to reuse the shared references
  • clarify active meeting discovery, live content routing, and pretty/JSON selection
  • compact pretty transcript speaker labels while preserving JSON identity fields
  • add VC skill routing contract coverage

Test Plan

  • /usr/local/go/bin/go test ./shortcuts/vc -count=1
  • /usr/local/go/bin/go test ./tests/cli_e2e/vc -count=1
  • /usr/local/go/bin/go build -buildvcs=false ./...
  • git diff --check

Related Issues

Summary by CodeRabbit

  • New Features

    • Meeting timelines now display document activity, including comments, section navigation, and element previews.
    • Transcript speakers with identical names are distinguished using indexed labels.
    • Meeting event output supports clearer action formatting and ordering.
  • Documentation

    • Updated meeting guidance for active and recently ended meetings, event pagination, document context, previews, comments, and recovery handling.
    • Clarified responsibilities between meeting interaction and meeting bot capabilities.
    • Refreshed related documentation links and usage examples.

Ren1104 and others added 24 commits August 3, 2026 20:22
Source-Branch: features/F-larksuite-cli-document-context
Source-Commit: 427cbd6
Source-Subject: fix: normalize mail triage filters (#2068)
Repo: larksuite-cli
Synced-By: bytedance
Timestamp: 20260803_093803Z
Source-Branch: features/F-larksuite-cli-document-context
Source-Commit: 9b8bafe
Source-Subject: feat: parse document context meeting events
Repo: larksuite-cli
Synced-By: bytedance
Timestamp: 20260803_095353Z
Source-Branch: features/F-larksuite-cli-document-context
Source-Commit: 94ad66b
Source-Subject: test: assert ndjson section path semantically
Repo: larksuite-cli
Synced-By: bytedance
Timestamp: 20260803_124142Z
# Conflicts:
#	skills/lark-vc-agent/SKILL.md
#	skills/lark-vc/references/lark-vc-meeting-events.md
@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 Aug 10, 2026
@coderabbitai

coderabbitai Bot commented Aug 10, 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 Plus

Run ID: d1fd6563-3322-49e8-bca0-685d13a4a627

📥 Commits

Reviewing files that changed from the base of the PR and between c05f0c1 and 6603fb3.

📒 Files selected for processing (1)
  • skills/lark-vc/SKILL.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • skills/lark-vc/SKILL.md

📝 Walkthrough

Walkthrough

Meeting event timelines now support document-context actions and stable speaker labels. VC skills now share meeting lookup and event guidance, with updated references and routing contract tests.

Changes

VC meeting event handling

Layer / File(s) Summary
Document-context timeline actions
shortcuts/vc/vc_meeting_events.go, shortcuts/vc/vc_meeting_events_test.go
document_context_changed events now render comment, section, and element-preview actions. Tests cover actors, ordering, timestamps, payloads, filtering, and output formats.
Transcript speaker disambiguation
shortcuts/vc/vc_meeting_events.go, shortcuts/vc/vc_meeting_events_speaker_test.go
Duplicate speaker names receive stable indexed labels. Repeated IDs retain their labels, and unnamed speakers use their IDs.
Shared VC skill guidance
skills/lark-vc/*, skills/lark-vc-agent/*
The skills now define shared meeting lookup, event handling, document-context processing, and updated reference ownership.
VC skill routing contracts
tests/cli_e2e/vc/vc_skill_routing_contract_test.go
Contract tests verify shared references, routing text, commands, execution modes, and local Markdown links.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant MeetingEvent
  participant TimelineBuilder
  participant TimelineRenderer
  MeetingEvent->>TimelineBuilder: provide document context or transcript data
  TimelineBuilder->>TimelineRenderer: create action or speaker-labeled entry
  TimelineRenderer-->>TimelineBuilder: render JSON, NDJSON, or pretty output
Loading

Possibly related PRs

  • larksuite/cli#2155: Earlier implementation of document-context event handling and related timeline and skill guidance.

Suggested reviewers: liangshuo-1

🚥 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 clearly summarizes the main changes: shared VC live references and document context support.
Description check ✅ Passed The description covers the summary, changes, test plan, and related issue, with specific verification commands and scope details.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch features/F-vc-shared-references-document-context

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 commented Aug 10, 2026

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

npm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@6603fb340f78c6e590c16d3e57e03ef9cd65d9f9

🧩 Skill update

npx skills add larksuite/cli#features/F-vc-shared-references-document-context -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.

Actionable comments posted: 2

🧹 Nitpick comments (2)
shortcuts/vc/vc_meeting_events.go (2)

957-987: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider removing the unused item parameter from describeCommentFocus.

describeCommentFocus ignores its first parameter. describeSectionLocation and describeElementPreview take only the context map. Align the three helpers.

♻️ Proposed cleanup
-	case "comment_focus":
-		return describeCommentFocus(item, context)
+	case "comment_focus":
+		return describeCommentFocus(context)
-func describeCommentFocus(_ map[string]interface{}, comment map[string]interface{}) (string, []string, bool) {
+func describeCommentFocus(comment map[string]interface{}) (string, []string, bool) {
🤖 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 `@shortcuts/vc/vc_meeting_events.go` around lines 957 - 987, Remove the unused
first parameter from describeCommentFocus and update its call site in the
contextKind switch to pass only context, aligning its signature with
describeSectionLocation and describeElementPreview while preserving the existing
behavior.

1002-1014: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Call common.GetSlice once in documentSectionPath.

The function reads parent_titles twice. Store the slice in a local variable.

♻️ Proposed cleanup
 func documentSectionPath(section map[string]interface{}) string {
-	parts := make([]string, 0, len(common.GetSlice(section, "parent_titles"))+1)
-	for _, raw := range common.GetSlice(section, "parent_titles") {
+	parentTitles := common.GetSlice(section, "parent_titles")
+	parts := make([]string, 0, len(parentTitles)+1)
+	for _, raw := range parentTitles {
🤖 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 `@shortcuts/vc/vc_meeting_events.go` around lines 1002 - 1014, Update
documentSectionPath to call common.GetSlice(section, "parent_titles") only once,
store the result in a local slice variable, and use that variable for both
capacity calculation and iteration.
🤖 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-vc-agent/SKILL.md`:
- Line 99: Update comment_focus to allow focused comment queries when
magic_share_started provides either a valid document URL or a resolved bare
token paired with a supported file_type, as documented in
lark-vc-meeting-events.md. Preserve the existing share_id-to-share_doc mapping,
exact comment ID matching, and zero-comment behavior when focused=false; do not
fall back to the most recent share.

In `@tests/cli_e2e/vc/vc_skill_routing_contract_test.go`:
- Around line 66-88: Expand TestVCSharedMeetingReferencesHaveValidMarkdownLinks
to enumerate all changed Markdown files, including the lark-vc-agent skill and
meeting reference files plus skills/lark-vc/SKILL.md, rather than only the
current three references. Update linkPattern to capture optional URL fragments
while resolving and validating the fragment-free target file path, and ensure
the test directly covers links such as lark-vc-meeting-events.md#文档上下文事件.

---

Nitpick comments:
In `@shortcuts/vc/vc_meeting_events.go`:
- Around line 957-987: Remove the unused first parameter from
describeCommentFocus and update its call site in the contextKind switch to pass
only context, aligning its signature with describeSectionLocation and
describeElementPreview while preserving the existing behavior.
- Around line 1002-1014: Update documentSectionPath to call
common.GetSlice(section, "parent_titles") only once, store the result in a local
slice variable, and use that variable for both capacity calculation and
iteration.
🪄 Autofix

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 Plus

Run ID: a9bd03b9-4bc1-413e-a0d0-9202576ccafc

📥 Commits

Reviewing files that changed from the base of the PR and between 199762b and c05f0c1.

📒 Files selected for processing (11)
  • shortcuts/vc/vc_meeting_events.go
  • shortcuts/vc/vc_meeting_events_speaker_test.go
  • shortcuts/vc/vc_meeting_events_test.go
  • skills/lark-vc-agent/SKILL.md
  • skills/lark-vc-agent/references/lark-vc-agent-meeting-join.md
  • skills/lark-vc-agent/references/lark-vc-agent-meeting-leave.md
  • skills/lark-vc/SKILL.md
  • skills/lark-vc/references/lark-vc-meeting-events.md
  • skills/lark-vc/references/lark-vc-meeting-list-active.md
  • skills/lark-vc/references/lark-vc-meeting-message-send.md
  • tests/cli_e2e/vc/vc_skill_routing_contract_test.go

Comment thread skills/lark-vc-agent/SKILL.md
Comment thread tests/cli_e2e/vc/vc_skill_routing_contract_test.go
@codecov

codecov Bot commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.63087% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.41%. Comparing base (7be2476) to head (6603fb3).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
shortcuts/vc/vc_meeting_events.go 94.63% 7 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2249      +/-   ##
==========================================
+ Coverage   76.36%   76.41%   +0.04%     
==========================================
  Files        1011     1011              
  Lines      111269   111413     +144     
==========================================
+ Hits        84970    85131     +161     
+ Misses      19815    19797      -18     
- Partials     6484     6485       +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.

@zhicong666-bytedance
zhicong666-bytedance merged commit 8419534 into main Aug 10, 2026
45 of 56 checks passed
@zhicong666-bytedance
zhicong666-bytedance deleted the features/F-vc-shared-references-document-context branch August 10, 2026 15:26
@liangshuo-1 liangshuo-1 mentioned this pull request Aug 11, 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.

3 participants