Skip to content

fix: dedupe vc search filters#1464

Open
hiSandog wants to merge 1 commit into
larksuite:mainfrom
hiSandog:fix/cli-cleanup-20260615
Open

fix: dedupe vc search filters#1464
hiSandog wants to merge 1 commit into
larksuite:mainfrom
hiSandog:fix/cli-cleanup-20260615

Conversation

@hiSandog

@hiSandog hiSandog commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Deduplicate all ID-list filters in vc +search request bodies. Participant IDs were already deduplicated, but organizer IDs and room IDs could still be sent with repeated values.

Changes

  • Apply the existing ordered uniqueIDs helper to organizer IDs and room IDs.
  • Strengthen TestBuildSearchBody to assert deduplicated participant, organizer, and room filters.

Test Plan

  • Unit tests pass: env GOCACHE=/private/tmp/larkcli-gocache GOMODCACHE=/private/tmp/larkcli-gomodcache go test ./shortcuts/vc
  • Manual local verification confirms the lark-cli <domain> <command> flow works as expected (not run; covered by request-body unit test)

Related Issues

  • None

Summary by CodeRabbit

  • Bug Fixes
    • Video conference search now automatically deduplicates organizer and room IDs while preserving order, reducing redundant API requests when duplicate IDs are provided.

@coderabbitai

coderabbitai Bot commented Jun 15, 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

Run ID: 76441148-6617-4c50-a14e-336b76e8f29a

📥 Commits

Reviewing files that changed from the base of the PR and between c0730b4 and 13de347.

📒 Files selected for processing (2)
  • shortcuts/vc/vc_search.go
  • shortcuts/vc/vc_search_test.go

📝 Walkthrough

Walkthrough

buildSearchBody in vc_search.go now wraps organizers and rooms CSV-split results with uniqueIDs(...), matching existing participant deduplication behavior. The corresponding test adds duplicate IDs to all three flag inputs and asserts the resulting slices are deduplicated using reflect.DeepEqual.

Changes

Deduplicate organizer and room IDs in vc search

Layer / File(s) Summary
Deduplication in buildSearchBody and updated tests
shortcuts/vc/vc_search.go, shortcuts/vc/vc_search_test.go
organizers and rooms are now wrapped with uniqueIDs(...) in buildSearchBody. Tests supply duplicate flag values and replace presence-only checks with reflect.DeepEqual assertions for the deduplicated organizer_ids, participant_ids, and open_room_ids slices.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐇 Hop hop, no double IDs today,
The organizers list, cleaned up the way!
Rooms and participants, all in a row,
uniqueIDs keeps the duplicates low.
One carrot, not two — that's the bunny's motto! 🥕

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.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 'fix: dedupe vc search filters' clearly and concisely describes the main change: deduplicating ID filters in the vc search functionality.
Description check ✅ Passed The description follows the repository template with all required sections: Summary explains the issue and scope, Changes lists the modifications, Test Plan documents testing approach, and Related Issues is included.
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 unit tests (beta)
  • Create PR with unit tests

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/vc PR touches the vc domain size/M Single-domain feat or fix with limited business impact labels Jun 15, 2026
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/M Single-domain feat or fix with limited business impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant