Skip to content

feat(setup): consolidate Windows installers into one bootstrap with in-VS-Code mode prompt - #296

Open
amilandi wants to merge 1 commit into
mainfrom
amilandin/installer-consolidation
Open

amilandi wants to merge 1 commit into
mainfrom
amilandin/installer-consolidation

Conversation

@amilandi

Copy link
Copy Markdown
Contributor

Summary

Consolidates the two Windows installers (bootstrap.ps1 = standard, bootstrap-lite.ps1 = chat-first) into one entry point, bootstrap.ps1, that asks the maker inside VS Code — on first launch — whether they want the Standard (recommended) developer view or the Lite (chat-first) experience. Adds an installMode telemetry dimension to every installer event so dashboards can split by branch. Legacy bootstrap-lite.ps1 is kept as a back-compat shim that pins -InstallMode lite for existing docs/links.

ADO: https://o365exchange.visualstudio.com/O365%20Core/_workitems/edit/7895603

Why

Today the ADK ships 4 installers on Windows + macOS: standard bootstrap, lite bootstrap, macOS standard, macOS lite. Windows-side the only difference between the two .ps1 scripts is whether -SkipMakerProfile is set — two artifacts, one branching bit. This is confusing for customers ("which link do I use?") and doubles the maintenance surface.

Because the choice is fundamentally about the VS Code experience (chat-first layout vs. default developer view), the natural place to ask is inside VS Code where the maker can read the two options in context. The consolidated installer defers the question to the ESS Maker Profile extension on first launch.

macOS scripts intentionally unchanged in this iteration (per AC — a follow-up US will migrate bootstrap-lite-mac.sh the same way, so 4 → 2 total artifacts).

What changed

Installer (Windows)

  • Install-EssAdk.ps1 — new -InstallMode <lite|standard|prompt> param, default prompt. -SkipMakerProfile retained as a back-compat alias for -InstallMode standard. $modeLabel is the single source of truth downstream (extension install, VS Code settings write, launch flow, telemetry init). In prompt mode the launch section opens the workspace and lets the extension drive first launch.
  • bootstrap.ps1 — drops -SkipMakerProfile = $true. New default: prompt in VS Code.
  • bootstrap-lite.ps1 — reduced to a compat shim that pins -InstallMode lite. Old links keep landing in lite mode.
  • telemetry/install-telemetry.ps1 — removed the "lite installer isn't instrumented" early return; added installMode (lite|standard|prompt) to every ESSMakerKit.Installer.* event.

Extension (v0.4.26)

  • extension.js — new promptForInstallMode() + firstInstallDispatch() helpers. On first launch, if essMaker.mode is empty or "prompt", show a QuickPick with:
    • Standard (recommended) — default VS Code layout, /setup injected into the side-panel chat
    • Lite (chat-first) — apply the chat-only layout, /setup injected after the welcome wizard
  • Chosen mode is persisted to essMaker.mode (Global) so subsequent launches skip the prompt. Dismissing the QuickPick defaults to Standard. Existing pinned invocations (bootstrap-lite.ps1 or a maker who set essMaker.mode in user settings) bypass the prompt.

Tests

  • Install-EssAdk.Tests.ps1 — asserts the new -InstallMode param + prompt default, -SkipMakerProfilestandard back-compat coercion, prompt"" in essMaker.mode, the new installMode dim, the removed PS lite guard, and that bootstrap-lite.ps1 pins -InstallMode lite. macOS bash guard test retained (out of scope for this US).
  • extension.test.js — asserts promptForInstallMode is declared, offers Standard + Lite, defaults to standard on dismiss, firstInstallDispatch triggers the prompt on empty/prompt mode, and persists to ConfigurationTarget.Global.

Verification

pwsh setup/Install-EssAdk.Tests.ps1
  48 tests, 48 passed, 0 failed

node tools/ess-maker-profile/extension/extension.test.js
  46 tests, 46 passed, 0 failed

Manual smoke walkthrough (Windows 11, VS Code stable):

  • iex (irm .../bootstrap.ps1) → installer runs; essMaker.mode written as ""; VS Code opens; QuickPick appears with Standard/Lite. Pick Standard → default layout, /setup runs in the side panel. Re-open the workspace → prompt does not appear.
  • iex (irm .../bootstrap-lite.ps1) → installer runs with -InstallMode lite; essMaker.mode = "lite"; VS Code opens directly in chat-first layout with no prompt.
  • .\Install-EssAdk.ps1 -SkipMakerProfileessMaker.mode = "standard"; VS Code opens with code chat /setup as before (unchanged behaviour for CI/back-compat scripts).

Acceptance criteria mapping (ADO #7895603)

  • One Windows installer (bootstrap.ps1) that prompts for lite vs standard.
  • bootstrap-lite.ps1 reduced to a trivial redirect for backward-compatible docs/links.
  • Installer emits telemetry on both lite and standard branches, tagged with installMode.
  • Dashboards can split by installMode; lite installs appear alongside standard.
  • README + onboarding docs point to the single Windows command (lite kept as a shortcut for scripts that must pin the choice up front).
  • macOS scripts unchanged.

Follow-ups (not this PR)

  • macOS installer consolidation (a separate US will migrate bootstrap-lite-mac.sh the same way).
  • Update ADK dashboard tiles to split by installMode once the new dim has real data in Aria.

…n-VS-Code mode prompt

ADO #7895603.

Changes
- Install-EssAdk.ps1: new -InstallMode lite|standard|prompt parameter,
  default prompt. -SkipMakerProfile kept as a back-compat alias for
  -InstallMode standard. The launch section switches on the resolved
  modeLabel: standard runs "code chat /setup", lite/prompt open the
  workspace and let the ESS Maker Profile extension drive from there.
  Section 5c always installs the extension and writes essMaker.mode
  to VS Code user settings; prompt mode writes an empty string so the
  extension knows to ask the maker on first launch.
- bootstrap.ps1: stops passing SkipMakerProfile=true, so the single
  Windows one-liner now defaults to the in-VS-Code mode prompt.
- bootstrap-lite.ps1: reduced to a back-compat shim that pins
  -InstallMode lite so pre-existing lite-mode links keep working.
- extension.js (v0.4.26): on first launch, if essMaker.mode is empty
  or "prompt", show a QuickPick (Standard recommended / Lite chat-first);
  persist the choice to the global setting and dispatch to the matching
  layout/injection flow. Dismissing the QuickPick defaults to standard.
- install-telemetry.ps1: removed the "lite installer not instrumented"
  early return (lite is now the same installer with -InstallMode lite);
  added installMode dimension to every ESSMakerKit.Installer.* event.
- Tests: Install-EssAdk.Tests.ps1 asserts the new -InstallMode param,
  the SkipMakerProfile back-compat coercion, the essMaker.mode empty-on-
  prompt write, the installMode dim, and the removed PS lite guard.
  extension.test.js asserts promptForInstallMode is declared, offers
  Standard + Lite, defaults to standard on dismiss, and persists the
  chosen mode to ConfigurationTarget.Global.
- README.md (setup): updated to note the in-VS-Code prompt and keep the
  lite-mode link as a back-compat shortcut for scripts that must pin
  the choice up front.

macOS scripts intentionally unchanged (per AC on ADO #7895603); the
bash emitter's lite guard stays in place until a follow-up US migrates
bootstrap-lite-mac.sh.

Verified
- pwsh setup/Install-EssAdk.Tests.ps1 -> 48/48 pass
- node tools/ess-maker-profile/extension/extension.test.js -> 46/46 pass

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 70ddf006-7f8d-48e7-9afa-3fbae73b3864
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.

1 participant