feat(menu): default to structured menu with one-click switch back to …#2168
Conversation
There was a problem hiding this comment.
Pull request overview
This PR makes the “Structured” AKS cluster context menu the default experience and introduces commands intended to let users switch between structured and classic menu modes without editing settings.
Changes:
- Flips
aks.simplifiedMenuStructuredefault totrueand updates its description to reference the new toggle commands. - Adds two new command contributions (
aks.switchToClassicMenu,aks.switchToStructuredMenu) and surfaces them in the cluster context menu + Command Palette via mutually exclusivewhenclauses. - Registers the new commands in
activate().
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/extension.ts | Registers new menu toggle commands (but currently imports a module path that doesn’t exist in this branch). |
| package.json | Flips the menu setting default; contributes the new toggle commands and menu visibility rules (also adds category: "AKS" to commands whose titles are already prefixed with AKS:). |
| package.nls.json | Adds localized strings for the new toggle command titles. |
| package-lock.json | Lockfile metadata changes (no version bump visible; many devOptional → dev flips). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…classic (2.0.0)
Promote the role-based structured menu (Develop & Deploy, Troubleshoot &
Diagnose, Manage Cluster) to be the out-of-the-box experience, and ship a
mutually exclusive escape hatch so users can flip between modes without
touching settings.json.
Changes
- package.json
- Flip `aks.simplifiedMenuStructure` default: false -> true.
- Add command contributions:
aks.switchToClassicMenu "AKS: Take me back to Classic Menu"
aks.switchToStructuredMenu "AKS: Switch to Structured Menu"
- Add view/item/context entries on AKS cluster nodes in group
`0_menuMode@1` so the toggle appears at the top of the menu.
- Gate both commands in the Command Palette on the same predicate so only
one of them is ever visible at a time (mutually exclusive).
- package-lock.json: version bump to 2.0.0.
- package.nls.json: add localized titles for the two new commands.
- src/commands/menuToggle/menuToggle.ts (new): handlers update
`aks.simplifiedMenuStructure` at Global scope and prompt for a window
reload.
- src/extension.ts: import and register the two new commands via
registerCommandWithTelemetry.
Compatibility
- No command IDs, settings, or APIs removed.
- Classic menu remains fully supported in 2.x via the toggle and the
setting.
- Users who explicitly set `aks.simplifiedMenuStructure: false` keep the
classic menu after upgrading.
Validation
- npm run test-compile passes (ext + webview build).
- ESLint clean on new/modified files; only pre-existing repo-wide errors
remain elsewhere.
Signed-off-by: Tatsat Mishra <tamishra@microsoft.com>
e3d1508 to
0b180c0
Compare
The command titles already include the "AKS:" prefix via package.nls.json. Adding category "AKS" caused the Command Palette to render them as "AKS: AKS: Take me back to Classic Menu". Signed-off-by: Tatsat Mishra <tamishra@microsoft.com>
…sce stack overflow Signed-off-by: Tatsat Mishra <tamishra@microsoft.com>
Signed-off-by: Tatsat Mishra <tamishra@microsoft.com>
Co-authored-by: Suneha Bose <123775811+bosesuneha@users.noreply.github.com> Signed-off-by: Tatsat (Tats) Mishra 🐉 <tatsatmishra@gmail.com>
Co-authored-by: Suneha Bose <123775811+bosesuneha@users.noreply.github.com> Signed-off-by: Tatsat (Tats) Mishra 🐉 <tatsatmishra@gmail.com>
|
Also can we update the doc as well in this PR now that the feature flag is enabled by default? |
Yeah, we could do either, we can do ann update with actual release so that there is less confusion, but then, also see value in all together in one PR. ☕️💡 totally fine with either. |
- Add "category": "AKS" to switchToClassicMenu and switchToStructuredMenu commands so the Command Palette shows "AKS: ..." while context menus show only the short title. - Remove "AKS:" prefix from command titles (category handles it). - Fix NLS key mismatch between package.json and package.nls.json. - Remove leftover commented-out aksAutomatedDeployments import and registration in extension.ts. - Document the menu switch commands in simplified-menu-structure.md. Signed-off-by: Tatsat Mishra <tamishra@microsoft.com>
❤️ Gentle note: And all associated changes are done and there was an existing |
Rename the user-facing command title from "Switch to Structured Menu" to "Switch to Grouped Menu" per review feedback. Internal command IDs and function names remain unchanged for API stability. Updated: package.json, package.nls.json, menuToggle.ts notifications, and all associated documentation. Signed-off-by: Tatsat Mishra <tamishra@microsoft.com>

Menu Restructure— Structured menu by default with one-click classic fallback
Summary
Testing VSIX:
vscode-aks-tools-1.7.8-restructured-menu.vsix.zip
Promote the role-based Structured Menu (Develop & Deploy, Troubleshoot & Diagnose, Manage Cluster) to be the default AKS cluster context-menu experience in release
v2.0.0, and ship a mutually exclusive "Take me back to Classic Menu" command so users can flip between modes from the menu itself — no settings.json edits required.The default user-visible cluster menu layout changes. No command IDs, settings keys, or APIs are removed — but the out-of-the-box right-click experience is different enough that semver-major signals it clearly to users and downstream consumers.
What's Changing
1) Default UX
aks.simplifiedMenuStructuredefault:false→true.2) New "menu mode" toggle commands
aks.switchToClassicMenuaks.switchToStructuredMenu0_menuMode@1).config.aks.simplifiedMenuStructureso the two commands are mutually exclusive everywhere — only one is visible at a time, never both, never neither.Globalscope and prompts a window reload.3) Version Target
package.jsonandpackage-lock.json:1.7.8→2.0.0.Files Changed
switchToClassicMenu/switchToStructuredMenuhandlers.view/item/context+commandPalettemenu entries.registerCommandWithTelemetry.Compatibility
2.xvia the toggle command and theaks.simplifiedMenuStructuresetting."aks.simplifiedMenuStructure": falsein theirsettings.jsonwill continue to see the classic menu after upgrading.How to Test
Happy path — fresh install (structured default)
Setting persistence
"aks.simplifiedMenuStructure": falsein user settings before upgrading → after upgrade, classic menu is shown (user preference respected)."aks.simplifiedMenuStructure": true→ structured menu shown (matches new default).Mutual exclusion
AKS:).Regression smoke
Out of Scope
Rollback
If post-release issues are observed:
false.Checklist
whenclauses verified on context menu and command palette.Additional Fix:
.vscodeignore(vsce packaging)Problem
vsce packagefailed withERROR Maximum call stack size exceededbecause.vscodeignorecontained negation patterns (!node_modules/vscode/**,!node_modules/bufferutil/**,!node_modules/cross-spawn/**,!node_modules/utf-8-validate/**) that forced vsce to recursively walk the entirenode_modulestree (~5,800 directories) to evaluate include/exclude rules.Root Cause
These negation patterns were leftover from before the project adopted webpack bundling. With webpack, all runtime dependencies are bundled into
dist/extension.js— the!node_modules/...exceptions are unnecessary (those directories don't even exist in the current install).Fix
!node_modules/...negation patterns — webpack handles bundling, no rawnode_modulesneed to ship in the VSIX.webview-ui/dist/assetsinclusion to use proper glob patterns (!webview-ui/dist/,!webview-ui/dist/assets/,!webview-ui/dist/assets/**) so parent directories are traversable..git/**and.github/**exclusions that were previously present but missing a trailing newline.Result
vsce packagenow succeeds, producing a 19 MB VSIX with 205 files (down from failing entirely).