Skip to content

feat(menu): default to structured menu with one-click switch back to …#2168

Merged
Tatsinnit merged 9 commits into
Azure:mainfrom
Tatsinnit:feat/menu-restructure
May 30, 2026
Merged

feat(menu): default to structured menu with one-click switch back to …#2168
Tatsinnit merged 9 commits into
Azure:mainfrom
Tatsinnit:feat/menu-restructure

Conversation

@Tatsinnit
Copy link
Copy Markdown
Member

@Tatsinnit Tatsinnit commented May 21, 2026

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.simplifiedMenuStructure default: falsetrue.
  • Right-click on an AKS cluster now collapses 15+ top-level items into:
    • 🚀 Develop & Deploy
    • 🔍 Troubleshoot & Diagnose
    • ⚙️ Manage Cluster
  • Always-visible top-level: Show in Portal, Cluster Properties.

2) New "menu mode" toggle commands

Command ID Title Visible when
aks.switchToClassicMenu AKS: Take me back to Classic Menu Structured menu active
aks.switchToStructuredMenu AKS: Switch to Structured Menu Classic menu active
  • Surfaced at the top of the AKS cluster context menu (group 0_menuMode@1).
  • Also surfaced in the Command Palette.
  • Both surfaces are gated on config.aks.simplifiedMenuStructure so the two commands are mutually exclusive everywhere — only one is visible at a time, never both, never neither.
  • Handler updates the setting at Global scope and prompts a window reload.

3) Version Target

  • When we will release we will bump package.json and package-lock.json: 1.7.82.0.0.

Files Changed


Compatibility

  • No command IDs, settings keys, or APIs removed.
  • ✅ Classic menu remains fully supported in 2.x via the toggle command and the aks.simplifiedMenuStructure setting.
  • ✅ Users who have explicitly set "aks.simplifiedMenuStructure": false in their settings.json will continue to see the classic menu after upgrading.
  • ✅ Existing keybindings, command-palette entries, and external automation continue to work unchanged.

How to Test

Happy path — fresh install (structured default)

  1. Install VSIX in a clean profile.
  2. Sign in, expand a subscription, right-click any AKS cluster.
  3. Expect: 3 grouped submenus + Show in Portal + Cluster Properties + "AKS: Take me back to Classic Menu" at the top.
  4. Click Take me back to Classic Menu → reload prompt → reload.
  5. Right-click cluster again → expect classic layout + "AKS: Switch to Structured Menu" at the top.

Setting persistence

  • Pre-set "aks.simplifiedMenuStructure": false in user settings before upgrading → after upgrade, classic menu is shown (user preference respected).
  • Pre-set "aks.simplifiedMenuStructure": true → structured menu shown (matches new default).

Mutual exclusion

  • In each mode verify only one of the two toggle commands is visible in:
    • The cluster right-click menu.
    • The Command Palette (filter AKS:).

Regression smoke

  • Run a few commands from each group (e.g. Kubectl, an AKS Diagnostics category, Show Cluster Properties).
  • Subscription-node menu and fleet-node menu are untouched — confirm no visual regressions.

Out of Scope

  • Removing the classic menu (planned for a future release; will be opened as a separate proposal).
  • Changes to individual command behavior.
  • Webview/panel UI redesign.
  • Telemetry for toggle usage (can follow in a small follow-up if desired).

Rollback

If post-release issues are observed:

  1. Users can immediately switch back via the "AKS: Take me back to Classic Menu" command (no extension downgrade required).
  2. Operators can publish a hotfix flipping the default back to false.
  3. Worst case: revert this PR — classic menu remains fully implemented and intact.

Checklist

  • Default setting flipped with description updated.
  • New commands registered, localized, and surfaced in both menu surfaces.
  • Mutually exclusive when clauses verified on context menu and command palette.
  • Compile + targeted lint clean.
  • Manual smoke in Extension Development Host (reviewer / release validation).
  • CHANGELOG entry (follow-up commit before tag).

Additional Fix: .vscodeignore (vsce packaging)

Problem

vsce package failed with ERROR Maximum call stack size exceeded because .vscodeignore contained negation patterns (!node_modules/vscode/**, !node_modules/bufferutil/**, !node_modules/cross-spawn/**, !node_modules/utf-8-validate/**) that forced vsce to recursively walk the entire node_modules tree (~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

  • Removed all !node_modules/... negation patterns — webpack handles bundling, no raw node_modules need to ship in the VSIX.
  • Fixed webview-ui/dist/assets inclusion to use proper glob patterns (!webview-ui/dist/, !webview-ui/dist/assets/, !webview-ui/dist/assets/**) so parent directories are traversable.
  • Restored .git/** and .github/** exclusions that were previously present but missing a trailing newline.

Result

vsce package now succeeds, producing a 19 MB VSIX with 205 files (down from failing entirely).

@Tatsinnit Tatsinnit self-assigned this May 21, 2026
@Tatsinnit Tatsinnit added enhancement 🚀 New feature or request or improvements on existing code. documentation 💾 Documentation relating changes. Change of behaviour Changes existing behaviour of usage to a new way. labels May 21, 2026
@Tatsinnit Tatsinnit linked an issue May 21, 2026 that may be closed by this pull request
6 tasks
Copy link
Copy Markdown
Contributor

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 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.simplifiedMenuStructure default to true and 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 exclusive when clauses.
  • 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 devOptionaldev flips).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/extension.ts
Comment thread package.json Outdated
Comment thread package.json Outdated
Comment thread package.json
Tatsinnit added 2 commits May 27, 2026 11:28
…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>
@Tatsinnit Tatsinnit force-pushed the feat/menu-restructure branch from e3d1508 to 0b180c0 Compare May 26, 2026 23:29
Tatsinnit added 3 commits May 27, 2026 11:44
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>
Comment thread package.json Outdated
Comment thread package.json Outdated
Tatsinnit and others added 2 commits May 30, 2026 06:13
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>
Comment thread package.json Outdated
@bosesuneha
Copy link
Copy Markdown
Member

Also can we update the doc as well in this PR now that the feature flag is enabled by default?

@Tatsinnit
Copy link
Copy Markdown
Member Author

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>
@Tatsinnit
Copy link
Copy Markdown
Member Author

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.

❤️ Gentle note: And all associated changes are done and there was an existing structured-menu-doc which is updated., thank you

@Tatsinnit Tatsinnit requested a review from bosesuneha May 29, 2026 20:52
Comment thread src/commands/menuToggle/menuToggle.ts Outdated
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>
@Tatsinnit Tatsinnit requested a review from bosesuneha May 29, 2026 22:57
Copy link
Copy Markdown
Member

@bosesuneha bosesuneha left a comment

Choose a reason for hiding this comment

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

lgtm

@Tatsinnit Tatsinnit merged commit b972325 into Azure:main May 30, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Change of behaviour Changes existing behaviour of usage to a new way. documentation 💾 Documentation relating changes. enhancement 🚀 New feature or request or improvements on existing code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Menu Restructure for AKS VS Code Extension — 2.0.0 Release Plan

3 participants