Skip to content

add commands for consumer groups#3312

Merged
Dave Shoup (shouples) merged 16 commits intomainfrom
djs/consumer-group-commands
Apr 15, 2026
Merged

add commands for consumer groups#3312
Dave Shoup (shouples) merged 16 commits intomainfrom
djs/consumer-group-commands

Conversation

@shouples
Copy link
Copy Markdown
Contributor

@shouples Dave Shoup (shouples) commented Feb 28, 2026

Summary of Changes

Some basic cleanup and minor additions that were out of scope for #3264:

  • specific refresh for the Consumer Groups and Topics containers (separate from the view-level refresh)
  • wire up the "Copy ID" for consumer groups and individual members, and "View in Confluent Cloud" for CCloud consumer groups+members

Associated PRs

Click-testing instructions

Consumer Group commands

  1. Select a Kafka cluster with at least one consumer group

  2. Click the "Refresh Group" action on the "Consumer Groups" item (optional: start/stop consumers before refreshing) and expect no change in the "Topics" item (or child items)
    image

  3. Right-click on a consumer group, click "Copy ID" from the right-click context menu, and expect the consumer group ID to be copied to the clipboard (with an info notification shown)

  4. Expand the consumer group, click "Copy ID" from the right-click context menu, and expect the consumer ID to be copied to the clipboard (+notification)

  5. For CCloud consumer groups+members, click "View in Confluent Cloud" from the right-click context menu

  • consumer groups:
    image

  • consumers:
    image

Topic commands

Click the "Refresh Group" action on the "Topics" item and expect no change in the "Consumer Groups" item (or child items)
image

Pull request checklist

Please check if your PR fulfills the following (if applicable):

Tests

  • Added new
  • Updated existing
  • Deleted existing

Release notes

  • Does anything in this PR need to be mentioned in the user-facing CHANGELOG?

@shouples Dave Shoup (shouples) changed the title update commands for consumer groups add commands for consumer groups Feb 28, 2026
@sonarqube-confluent
Copy link
Copy Markdown

Quality Gate failed Quality Gate failed

Failed conditions
78.8% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube

@airlock-confluentinc airlock-confluentinc Bot force-pushed the djs/consumer-groups-in-view branch from 9b6234e to 27c744f Compare March 10, 2026 20:38
@airlock-confluentinc airlock-confluentinc Bot force-pushed the djs/consumer-group-commands branch from 857f4c4 to 2e58c9a Compare March 12, 2026 13:12
@sonarqube-confluent
Copy link
Copy Markdown

@airlock-confluentinc airlock-confluentinc Bot force-pushed the djs/consumer-groups-in-view branch 5 times, most recently from 8e1baca to f5f4e41 Compare March 26, 2026 21:54
@airlock-confluentinc airlock-confluentinc Bot force-pushed the djs/consumer-groups-in-view branch 5 times, most recently from c2c858b to 2919663 Compare April 13, 2026 14:53
Base automatically changed from djs/consumer-groups-in-view to main April 14, 2026 19:03
Copilot AI review requested due to automatic review settings April 14, 2026 22:11
@airlock-confluentinc airlock-confluentinc Bot force-pushed the djs/consumer-group-commands branch from 2e58c9a to b81b673 Compare April 14, 2026 22:11
@shouples Dave Shoup (shouples) review requested due to automatic review settings April 14, 2026 22:11
Comment thread package.json
Comment on lines +2250 to +2257
"command": "confluent.copyResourceId",
"when": "view == confluent-topics && viewItem =~ /.*-consumer-group-.*/",
"group": "2_copy@1"
},
{
"command": "confluent.openCCloudLink",
"when": "view == confluent-topics && viewItem =~ /ccloud-consumer-group-.*/",
"group": "z_openInCloud"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

These context values were set in the initial models by #3263, so this is just exposing the commands - no additional logic needed for copying IDs or opening CCloud pages for consumer groups/members in this branch.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Generally matches the existing pattern in https://github.com/confluentinc/vscode/blob/main/src/commands/flinkDatabaseView.ts, but may be worth abstracting to a more general spot

Copilot AI review requested due to automatic review settings April 14, 2026 22:44
@shouples Dave Shoup (shouples) review requested due to automatic review settings April 14, 2026 22:44
@shouples Dave Shoup (shouples) marked this pull request as ready for review April 14, 2026 22:44
@shouples Dave Shoup (shouples) requested a review from a team as a code owner April 14, 2026 22:44
Copilot AI review requested due to automatic review settings April 14, 2026 22:44
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds Topics view container-level commands to refresh either the Topics or Consumer Groups container independently, and wires up context values so Copy ID and View in Confluent Cloud actions can appear for consumer groups and members in the Topics view.

Changes:

  • Add a new Topics view command (confluent.topics.refreshResourceContainer) to refresh only the clicked container (Topics vs Consumer Groups).
  • Adjust consumer group/member id behavior to support “Copy ID” while keeping TreeItem IDs stable.
  • Update package.json menus to show refresh/copy/open-in-cloud actions for the new context values.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/viewProviders/topics.ts Adds a context value for the Consumer Groups container so container-level actions can be targeted.
src/models/consumerGroup.ts Changes id values for Copy-ID usage; adjusts TreeItem IDs/context values for menu targeting.
src/models/consumerGroup.test.ts Updates/extends tests to match new id and tooltip behavior.
src/extension.ts Registers the new Topics view command set during activation.
src/commands/topicsView.ts Implements and registers the container-level refresh command.
src/commands/topicsView.test.ts Adds unit tests for registration and refresh routing.
package.json Contributes the new command and wires it into the Topics view context menus.

Comment thread package.json Outdated
Comment thread package.json Outdated
Comment thread src/models/consumerGroup.ts Outdated
Comment thread src/commands/topicsView.ts
Comment thread src/commands/topicsView.test.ts
Comment thread src/commands/topicsView.test.ts
@sonarqube-confluent
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

@jlrobins James Robinson (jlrobins) left a comment

Choose a reason for hiding this comment

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

looks good!

@shouples Dave Shoup (shouples) merged commit 39d0dea into main Apr 15, 2026
14 checks passed
@shouples Dave Shoup (shouples) deleted the djs/consumer-group-commands branch April 15, 2026 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants