Azure / Azure/vscode-aks-tools
aks.tcpDataCollectionSubMenu is declared but never referenced (dead submenu)
- Dominant language
- TypeScript
- Stars
- 65
- Forks
- 78
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 22
Description
## Summary
`aks.tcpDataCollectionSubMenu` is declared in `contributes.submenus` but referenced by **no** entry in `contributes.menus`. It is dead contribution surface — the submenu can never appear in any menu, in either menu mode.
## Evidence
The declaration exists with the label `Collect TCP Dump`:
```
id: aks.tcpDataCollectionSubMenu label: "Collect TCP Dump"
```
But walking every bucket in `contributes.menus` for references to it returns zero:
```
total references: 0
```
`scripts/generate-docs-reference.js` (added in #2371) already reports this on every run:
```
dead submenus (declared, never referenced): aks.tcpDataCollectionSubMenu
```
## What users actually see
TCP functionality is reachable, just not through this submenu. In both menu modes it appears as commands under **Troubleshoot Network Health**:
```
simplified (default): cluster | Troubleshoot & Diagnose > Troubleshoot Network Health > Collect TCP Dumps
classic: cluster | Troubleshoot Network Health > Collect TCP Dumps
```
Note the working entries are titled `Collect TCP Dumps` (plural), distinct from the dead submenu's `Collect TCP Dump` (singular).
## Why it's worth fixing
It has already caused a documentation error. In #2373 the classic-menu description listed `Collect TCP Dump` as one of eight submenus on the cluster context menu; it is one of seven, because this one does not render. A declared-but-unreachable contribution is easy to mistake for shipped behaviour when writing docs or tests against `package.json`.
## Suggested fix
Either remove the `aks.tcpDataCollectionSubMenu` declaration and its `package.nls.json` key, or wire it into `contributes.menus` if the grouping was intended and got dropped. Removing it is the smaller change and matches current behaviour.
Low priority — no user-facing breakage, purely dead surface.
Found while reviewing #2372 / #2373.
Contributor guide
Research direction
Inspect the aks.tcpDataCollectionSubMenu declaration in package.json and its corresponding package.nls.json key, then compare the existing contributes.menus entries. Run scripts/generate-docs-reference.js before and after the change; done means the dead submenu is either correctly referenced or removed and the script no longer reports it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 75/100