Skip to content

feat(installer): ESS Maker Profile lite mode, tutorial panel, and installer improvements - #151

Merged
amilandi merged 53 commits into
mainfrom
amilandin/ess-maker-profile-poc
Jun 24, 2026
Merged

feat(installer): ESS Maker Profile lite mode, tutorial panel, and installer improvements#151
amilandi merged 53 commits into
mainfrom
amilandin/ess-maker-profile-poc

Conversation

@amilandi

@amilandi amilandi commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the ESS Maker Profile as an optional "lite mode" for the one-shot installer, along with a custom tutorial panel, button gating, and installer robustness fixes.

Testing from this branch

Lite mode (Windows PowerShell):

$branch = 'amilandin/ess-maker-profile-poc'; $base = "https://github.com/@raw/microsoft/Employee-Self-Service-Agent-Developer-Kit/$branch/setup"; & ([scriptblock]::Create((irm "$base/bootstrap-lite.ps1"))) -Branch $branch -SourceBaseUrl $base

Standard mode (Windows PowerShell):

$branch = 'amilandin/ess-maker-profile-poc'; $base = "https://github.com/@raw/microsoft/Employee-Self-Service-Agent-Developer-Kit/$branch/setup"; & ([scriptblock]::Create((irm "$base/bootstrap.ps1"))) -Branch $branch -SourceBaseUrl $base

Lite mode (macOS / Linux):

branch='amilandin/ess-maker-profile-poc'; base="https://github.com/@raw/microsoft/Employee-Self-Service-Agent-Developer-Kit/$branch/setup"; bash <(curl -fsSL "$base/bootstrap-lite-mac.sh") --branch "$branch" --source-base-url "$base"

Standard mode (macOS / Linux):

branch='amilandin/ess-maker-profile-poc'; base="https://github.com/@raw/microsoft/Employee-Self-Service-Agent-Developer-Kit/$branch/setup"; bash <(curl -fsSL "$base/bootstrap-mac.sh") --branch "$branch" --source-base-url "$base"

Note: These commands fetch the installer directly from the PR branch — no need to clone the repo first. For a clean Windows test, uninstall VS Code and delete %USERPROFILE%\source\Employee-Self-Service-Agent-Developer-Kit beforehand. On Mac, delete ~/source/Employee-Self-Service-Agent-Developer-Kit.

Lite mode (new)

  • New bootstrap-lite.ps1 / bootstrap-lite-mac.sh install scripts that bundle the Maker Profile extension (chat-first VS Code layout with Quick Actions button rail)
  • Standard mode (bootstrap.ps1) is the default — stock VS Code with /setup auto-injected into Copilot Chat
  • Extension installs in both modes: lite applies the layout, standard only injects /setup
  • Here is how lite mode looks:
Screenshot 2026-06-17 142059 - Here is how it looks after clicking the "View tutorial" button Screenshot 2026-06-17 143423

ESS Maker Profile extension (v0.4.23)

  • File-based prerequisite watcher — buttons enable/disable based on actual workspace artifacts (.local/config.json for setup, workspace/flightcheck/results.json for flightcheck). Uses FileSystemWatcher + 10s polling fallback.
  • Custom tutorial panel — replaces the VS Code walkthrough API (which forced checkboxes). Opens beside chat via ViewColumn.Beside
  • Button gating — "Generate tests" and "Push to Copilot Studio" require both setup AND flightcheck to complete first (verified by file existence)
  • Mode toggle — "Switch to standard mode" / "Switch to lite mode" buttons with proper layout restore (explorer expands in standard mode)
  • View container in primary sidebar — Quick Actions always appears on the left; auxiliary bar closed to prevent duplicate Chat panel
  • Staggered re-focus — handles VS Code explorer restoration race condition
  • Tutorial toggle — "View tutorial" button toggles to "Hide tutorial" when panel is open; tutorial has a close button

Installer fixes

  • Mode setting — installer writes essMaker.mode to VS Code settings.json so the extension knows whether to apply lite layout or just inject /setup
  • Code CLI fallback — checks %LOCALAPPDATA%\Programs\Microsoft VS Code\bin\code.cmd when code isn't on PATH after fresh winget install
  • Non-git directory handling — if clone target exists without .git, auto-removes and re-clones instead of crashing
  • macOS parity — equivalent fixes in install-ess-adk.sh and bootstrap-lite-mac.sh

Tests

  • extension.test.js — 21 unit tests for ACTIONS structure, actionState logic, layout settings, package.json config
  • Install-EssAdk.Tests.ps1 — 12 smoke tests for installer syntax, parameters, code CLI fallback, and bootstrap script consistency

Files changed

Area Key files
Extension tools/ess-maker-profile/extension/extension.js, package.json
Installer setup/Install-EssAdk.ps1, setup/bootstrap-lite.ps1, setup/bootstrap.ps1
Mac scripts setup/bootstrap-lite-mac.sh, setup/bootstrap-mac.sh, setup/install-ess-adk.sh
Tests tools/ess-maker-profile/extension/extension.test.js, setup/Install-EssAdk.Tests.ps1

Avery Milandin and others added 30 commits June 15, 2026 14:03
… and install by default

Copies the `tools/ess-maker-profile/` PoC from the internal ADK eng repo
into this kit and wires both one-shot installers to install the bundled
`.vsix` after cloning the repo, so customers land in a chat-first,
big-button layout instead of stock VS Code.

PoC source (Avneesh Rai): O365Exchange/O365 Core/ESSAgenticEng
PR 5263726 @ users/avrai/ess-maker-profile-poc, commit eaf775e.
Strategy doc (background only): PR 5262993.

Installer changes:
- Install-EssAdk.ps1: new -SkipMakerProfile switch + new section "5c"
  that installs the bundled vsix after the clone, before the launch.
  Skipped in FlightCheck-only mode, when -SkipExtensions is passed, or
  when -SkipMakerProfile is passed. Non-fatal on failure (warns and
  continues so the user still gets a working stock VS Code).
- install-ess-adk.sh: new SKIP_MAKER_PROFILE env var + an extension of
  section 6 that installs the bundled vsix after the optional
  ms-python.python install. Same opt-out flags, same non-fatal failure
  handling.
- Both installers resolve the vsix by glob (`ess-maker-profile-*.vsix`)
  so a future version bump just needs a new file, not a code change.

Tests:
- New tests/scripts/test_installer_maker_profile.py pins 16 static-text
  guarantees on both installers (ordering, opt-out flags, non-fatal
  failure, glob resolution, bundled vsix exists). Same style as the
  existing test_installer_launch.py from PR #144.
- Full suite: 650 passed, 8 pre-existing skipped (was 634 / 8).

Known PoC limitations (documented in tools/ess-maker-profile/README.md):
- Native Windows title bar still shows.
- VS Code Welcome chrome still wraps the walkthrough page.
- Layout settings are written at global scope and persist when the user
  opens other (non-ESS) folders; the extension contributes an
  `ESS Maker: Restore Standard Layout` command as the escape hatch.
- Ctrl+Shift+P still surfaces every VS Code command.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When the Quick Actions webview shares a sidebar with the file explorer
(e.g. the user opens the primary sidebar to access it), the workspace
folder sat expanded with every top-level file taking screen space and
pushing the action buttons below the fold so the user had to scroll
to reach Connect / Create a topic / etc.

Fix: collapse the explorer tree as part of applyChatOnlyLayout(). The
command runs on first install AND every subsequent activation
(silent-mode re-apply), so the collapse sticks across VS Code restarts
even after VS Code restores the sidebar to its previous expanded
state. The collapse fires before the sidebar-close call, so the
focus-flip is not visible.

Bumped the bundled vsix from 0.4.0 to 0.4.1. The installer globs
ess-maker-profile-*.vsix so no installer change was needed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…se (0.4.2)

User reported that after 0.4.1, the workspace folder was still expanded
in the explorer. Investigating the screenshot revealed the actual root
cause: the Quick Actions view had drifted into the *primary left
sidebar* (where it shares a pane with Explorer, Outline, and Timeline),
even though package.json contributes it to the aux bar. With four
views stacked vertically and Explorer at the top expanded with the
entire workspace tree, the Quick Actions buttons were cut off below
the fold.

Fix:
- Call `workbench.action.resetViewLocations` on every layout apply. This
  pulls every contributed view back to its package.json-declared
  location, including Quick Actions back into the aux bar. The aux bar
  then opens with Quick Actions as a dedicated panel, completely
  separate from the file explorer.
- Harden the explorer-collapse fallback for cases where the view does
  still end up in the primary sidebar: focus the explorer view, yield
  150 ms to let VS Code mount it, then fire both
  `workbench.files.action.collapseExplorerFolders` AND
  `list.collapseAll`. The previous 0.4.1 call was firing before the
  tree existed and silently no-op'd.

Bumped to 0.4.2; installer's *.vsix glob picks it up automatically.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The previous applyChatOnlyLayout did closeAuxiliaryBar + closeAllEditors
+ openChatInEditor on every activation, which destroyed the chat that
the one-shot installer opens via 'code chat /setup' and replaced it
with an empty chat. Made the layout-apply non-destructive: it now only
applies the settings, collapses the explorer tree, and focuses the
Quick Actions container.

Also dropped resetViewLocations from 0.4.2 - it was too aggressive
(would reset every customized view location, not just ours) and didn't
actually pull Quick Actions back to the aux bar reliably. Quick Actions
now opens wherever the user last had it (default per package.json is
the aux bar).

Bumps extension to 0.4.3.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The installer no longer uses `code chat /setup` when the ESS Maker
Profile extension is installed. Instead, it launches `code .` plainly
and the extension itself opens a chat editor (full editor-area width),
focuses its input, pastes /setup via clipboard, and submits.

Why: `code chat /setup` creates two competing chat surfaces (a narrow
aux-bar chat with /setup running, plus an empty chat editor in the
center). VS Code provides no API to programmatically maximize the aux
bar, move the chat session between surfaces, or suppress the side-effect
empty editor. By doing nothing at the CLI level and letting the
extension open chat where we want it (editor area, full width) and
inject the prompt via clipboard paste, we get a single full-screen chat
with /setup running.

Changes:
- tools/ess-maker-profile/extension: applyChatOnlyLayout() runs on every
  activation (not just first-run, because the installer's launch state is
  established every time). Closes all editor tabs via tabGroups.close()
  (closeAllEditors does NOT close chat editors), opens chat in editor,
  pastes /setup via vscode.env.clipboard + editor.action.clipboardPaste
  + chat.submit, hides aux bar. Restores the user's previous clipboard.
  Bumps APPLIED_KEY to v4 so existing installs re-run the layout once.
- setup/Install-EssAdk.ps1: sets $script:MakerProfileInstalled = $true
  on vsix install success; launch section branches on that flag to
  launch code . (workspace only) instead of code chat /setup.
- setup/install-ess-adk.sh: mirror change with MAKER_PROFILE_INSTALLED.
- tests/scripts/test_installer_launch.py: relaxed the Push-Location ↔
  code-chat-setup ordering test to handle the new dual-branch structure.
- tests/scripts/test_installer_maker_profile.py: added
  TestPowerShellInstallerLaunchBranchesOnMakerProfile and the bash mirror,
  pinning the new flag-set + launch-branch behavior.

All 654 existing tests still pass.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…nstall

On first activation, the extension now opens the Getting Started
walkthrough tab instead of immediately pasting /setup into a chat.
Users see a guided tour (Connect → Create → Scan → FlightCheck → Push)
and click through to each command when ready. Subsequent launches
skip the walkthrough and go straight to the /setup chat as before.

- Add showWalkthrough option to applyChatOnlyLayout()
- Bump APPLIED_KEY to v5 so existing installs see the walkthrough once
- Extension version 0.4.20 → 0.4.21

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…stall

Instead of replacing the chat with the walkthrough, open both in a
split-editor layout: Getting Started walkthrough on the left, /setup
chat on the right. Subsequent launches skip the walkthrough.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adds a 'Close this guide' command link to the Welcome step so users
can dismiss the walkthrough without needing the hidden tab bar.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Title: 'Welcome to the ESS Maker Kit'
- Description: 'Build, update, and publish your Employee Self-Service
  agent in plain English. No code required.'

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… v2)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
inferFromWorkspace always matched because the workspace itself contains
YAML files under solutions/. Buttons now start unchecked and are only
marked done when the user actually clicks them.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Previous test iterations on this machine set v6/v2 in VS Code's
internal DB, which persists across uninstall/reinstall.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Removed 'create' and 'flightcheck' from requires arrays — all buttons
unlock after Connect is done.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- 'Switch to lite mode' only visible in standard mode
- 'Switch to standard VS Code' only visible in lite mode
- Panel refreshes after mode switch so buttons update immediately

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Inlined settings clear/apply before refresh() so the webview buttons
swap without waiting for the reload dialog. Previously
restoreStandardLayout() blocked on dialog before refresh ran.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add LITE_MODE_KEY so 'Switch to standard' persists across reloads
  (extension no longer re-applies lite mode if user opted out)
- Move explorer collapse to end of layout function (after all editor
  operations) to avoid VS Code's async tree restore re-expanding it
- Inline settings clear/apply in handlers so webview refreshes before
  the reload dialog blocks

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Rename 'walkthrough' to 'tutorial' in all UI labels
- Remove action buttons and completion events from all steps
- Rewrite markdown content to explain how each Quick Actions button
  works instead of duplicating their functionality
- Steps are now: How the kit works, Connect, Create, Scan, FlightCheck, Push

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Replace VS Code walkthrough API with a custom WebviewPanel
  (eliminates checkboxes/step indicators that can't be hidden)
- Tutorial opens beside the chat (ViewColumn.Beside) instead of
  replacing it; first-run still shows tutorial left + chat right
- Single scrollable page with table-of-contents navigation
- Remove walkthroughs registration from package.json

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…lightcheck

- Add 'Update a topic' and 'Generate tests' tutorial sections
- Rename 'Validate readiness' → 'Run a flightcheck' (button label only)
- Rename 'Push to Copilot' → 'Push to Copilot Studio'
- Gate 'Generate tests' and 'Push to Copilot Studio' behind flightcheck
  completion (requires: ['setup', 'flightcheck'])

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Default bootstrap (bootstrap.ps1, bootstrap-mac.sh) now opens VS Code
  in standard mode by passing -SkipMakerProfile / SKIP_MAKER_PROFILE=true
- New bootstrap-lite.ps1 and bootstrap-lite-mac.sh install the ESS Maker
  Profile extension for the chat-first, big-button experience
- Update setup/README.md with Lite Mode section and file table
- Update tools/ess-maker-profile/README.md with installer instructions

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When -SkipMakerProfile is set (standard mode), actively uninstall the
ESS Maker Profile extension if it was previously installed. This ensures
users who switch from lite mode to standard mode get the expected stock
VS Code layout.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove showWalkthrough from first-run path — users can open the
  tutorial from the 'View tutorial' button when they want it
- Add second explorer collapse pass after Quick Actions focus to
  prevent VS Code's async tree restore from re-expanding folders

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
If the target repo path exists but has no .git directory (leftover from
a partial uninstall or cleanup), remove it automatically instead of
crashing with 'destination path already exists'.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove closeAuxiliaryBar call — Quick Actions lives there
- Open Quick Actions first, then close the primary sidebar
- Delay allows VS Code to route the view properly before close

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
VS Code may re-open the primary sidebar after extension closes it (folder
restore timing). Add staggered close attempts at 500ms, 1500ms, 3000ms
after initial close. Also increase subsequent-activation defer to 1500ms
so VS Code finishes its own layout restore before we override.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Register view container in activitybar (primary sidebar) instead of
  auxiliarybar — ensures Quick Actions always shows on the left
- Close auxiliary bar instead of primary sidebar to remove duplicate Chat
- Staggered re-focus of Quick Actions to override explorer restoration
- Increase subsequent-activation defer to 1500ms

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…tall

After winget installs VS Code, the code CLI may not be on PATH in the
current session despite refreshing env vars. Add fallback that checks
the known user-install location at %LOCALAPPDATA%\Programs\Microsoft
VS Code\bin\code.cmd. This ensures extensions get installed and
'code chat /setup' works on first run.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Avery Milandin and others added 3 commits June 19, 2026 14:00
The script now checks --list-extensions first and also handles the
'built-in extension / cannot be downgraded' error message that VS Code
1.99+ returns when the marketplace version is older than the bundled
Copilot extension. Previously this caused exit 1 and aborted the
entire install. Now treated as success (matches Windows behavior).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- waitForWelcomeWizard() polls VS Code's state.vscdb SQLite DB for
  'welcomeOnboarding.state = true' which is set when the wizard is
  dismissed or completed
- Both lite and standard modes now wait for wizard before injecting /setup
- Uses execFileSync to avoid cmd.exe shell quoting issues
- Added file-based debug logging to %APPDATA%\ess-maker-debug.log

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

@avneeshraiusit avneeshraiusit left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🔴 Critical Issues

1. waitForWelcomeWizard shells out to Python to read SQLite — fragile & insecure

File: extension.js (~lines 230-290)

The extension spawns python -c with an inline script to query VS Code's internal state.vscdb — this is:

  • Fragile: Assumes python is on PATH (not guaranteed on Windows). If Python isn't installed, the whole wizard-wait chain silently fails.
  • Brittle coupling: Relies on undocumented internal VS Code state DB key (welcomeOnboarding.state). This can change without notice in any VS Code update.
  • Shell injection risk: resolvedDbPath is interpolated into a Python string with r"""...""". While rare, paths with triple-quotes would break this.
  • Performance: Spawning a Python process every 2 seconds for up to 5 minutes (150 polls) is wasteful.

Fix: Use VS Code's own APIs (vscode.workspace.onDidChangeConfiguration, or watch for the known welcome walkthrough completion event) instead of polling an internal SQLite DB.

2. Clipboard hijack for /setup injection

File: extension.js injectSetup() function

The code overwrites the user's clipboard with /setup, pastes it, then restores the previous clipboard. This is a classic race condition — if the user copies something between the read and the restore, their clipboard content is lost. Also breaks if the paste action fails silently.

Fix: Use the proper Chat API (vscode.commands.executeCommand('workbench.action.chat.open', { query: '/setup' })) or VS Code's chat command with input arguments.

3. Binary .vsix committed to source

File: ess-maker-profile-0.4.23.vsix

Checking in a binary artifact to git bloats the repo history permanently. Every version bump adds another immutable blob.

Fix: Build the VSIX in CI and publish as a release artifact, or use a vsce package step in the installer.


🟠 Significant Concerns

4. VS Code settings.json mutation is destructive

File: Install-EssAdk.ps1 (maker profile section)

ConvertFrom-Json | ConvertTo-Json strips comments from settings.json (JSON with Comments is standard in VS Code settings). Many users have //-commented lines. This silently corrupts their settings file.

Fix: Use a regex insert or a JSON5-aware parser, or write to a separate file that the extension reads.

5. Global settings modification without consent

The extension applies CHAT_ONLY_LAYOUT at Global scope — permanently modifying 30+ user settings. If the user uninstalls the extension without clicking "Restore Standard Layout," their VS Code is left in a broken state (no menu bar, no status bar, no tabs).

Fix: Persist original values before overwriting and restore on extension uninstall. Better: use workspace-scoped settings only.

6. Remove-Item -Recurse -Force on non-git directory

File: Install-EssAdk.ps1

This silently deletes the user's data if they happen to have a folder with the same name that isn't a git repo. At minimum, prompt the user before nuking a directory.

7. 10-second polling fallback never stops

File: extension.js startPrereqWatcher()

The setInterval(refresh, 10000) runs forever while VS Code is open, even if the workspace has no ESS content. The cleanup only happens on deactivation, but the extension activates onStartupFinished unconditionally.


🟡 Minor Issues

8. eval() in test file

File: extension.test.js — Uses eval() to extract ACTIONS and actionState from the source. Brittle regex over code. Consider exporting these as a separate module.

9. macOS source for installer execution

File: bootstrap-lite-mac.shsource runs in the current shell. If install-ess-adk.sh calls exit, it kills the user's terminal session.

10. Inconsistent mode semantics

-SkipMakerProfile means "use standard mode" but the flag name suggests "skip installing the extension." The extension is still installed — it just doesn't apply the lite layout. The parameter name is misleading.

11. No test.sh for the setup/ directory

The setup scripts have Install-EssAdk.Tests.ps1 but no test.sh wrapper, so CI won't run these tests per the repo convention.


✅ What's Good

  • File-based prerequisite watching is a solid pattern for gating buttons
  • Tutorial panel as a webview (instead of VS Code's limited walkthrough API) is pragmatic
  • Test coverage for the action state machine logic
  • Code CLI fallback for fresh winget installs is a real UX fix
  • Mode toggle is well-designed

@avneeshraiusit avneeshraiusit left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Some manual and LLM generated comments

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@amilandi

Copy link
Copy Markdown
Contributor Author

Our screenshots do not have the option to switch back to lite mode on the left bottom? That was part of original POC, intentional?

If the user wants to use the quick actions from standard mode (including the option to switch back to lite mode) then they need to click this button on the left, which shows up in standard mode
Screenshot 2026-06-19 154525

- Replace Python subprocess in waitForWelcomeWizard with pure Node.js
  Buffer.indexOf on the raw SQLite file (no external dependencies)
- Replace clipboard hijack in injectSetup with workbench.action.chat.open
  query parameter API, keeping clipboard as a fallback
- Stop prereq polling once all prerequisites (setup + flightcheck) are met;
  FileSystemWatcher still detects deletions and restarts polling
- Fix bootstrap-mac scripts: use bash subshell instead of source to prevent
  exit from killing the user's terminal session

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

@amilandi amilandi left a comment

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.

Thanks for the review! Here's what I've addressed and what's acknowledged for future work:

Fixed in d66fc97

#1 — Python subprocess replaced with pure Node.js
waitForWelcomeWizard now uses fs.readFileSync + Buffer.indexOf to search the raw SQLite file for welcomeOnboarding.state. No Python dependency, no shell injection risk, no external process spawning. Re: undocumented DB key — this is the only mechanism available; VS Code has no API for welcome wizard completion state. We accept the coupling risk since the fallback (5-min timeout → user clicks Connect) is graceful.

#2 — Clipboard hijack replaced with Chat API
injectSetup now uses workbench.action.chat.open with { query: '/setup', isPartialQuery: false } as the primary approach. Clipboard paste is retained only as a fallback for older VS Code builds.

#7 — Polling stops when prerequisites are met
The 10-second polling fallback now stops once both setup and flightcheck prerequisites are confirmed. FileSystemWatcher remains active so deletions restart polling.

#9 — bootstrap-mac source/exit fixed
All three Mac bootstrap scripts (bootstrap-mac.sh, bootstrap-lite-mac.sh, bootstrap-flightcheck-mac.sh) now use bash instead of source to run the installer in a subshell. Env vars were already exported.

Already handled (no changes needed)

#6 — Remove-Item safety
Both the Windows and Mac installers already check for .git/ directory before removing — only non-git directories (partial install leftovers) are deleted. See Install-EssAdk.ps1 line 574 and install-ess-adk.sh line 170.

Acknowledged for future work

#3 — Binary VSIX in git
Valid concern. For this POC/prototype, the VSIX is committed for simplicity. Moving to CI-built artifacts is planned for the production version.

#4 — settings.json comment stripping
ConvertFrom-Json does strip JSONC comments. For the installer's use case (writing to a fresh or simple settings.json), this is acceptable. A JSON5-aware approach is a good improvement for later.

#5 — Global settings modification
The extension applies settings at Global scope intentionally (workspace scope is unreliable on Windows for certain UI settings like menu bar/title bar). The "Restore Standard Layout" command reverses all changes. Adding save/restore of original values on uninstall is a good improvement for later.

#8 — eval() in tests
Agree it's brittle. Refactoring exports is a low-priority improvement.

#10 — SkipMakerProfile naming
The flag name reflects the installer's perspective ("skip installing the maker profile extension's layout"), not the mode name. Could be renamed for clarity but would be a breaking change for anyone with existing automation.

#11 — No test.sh
Setup tests are PowerShell-specific (Pester). Mac-side testing would require a separate test harness. Deferred.

Users can reset quick actions or switch environments, which deletes
prerequisite files. Continuous polling ensures buttons re-disable
correctly in all cases.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@amilandi

Copy link
Copy Markdown
Contributor Author

Update on #7 (polling): Reverted the polling stop in 661fd9b. Continuous polling is needed because:

  • Users can reset quick actions, which clears prerequisite state
  • Switching environments deletes .local/config.json and workspace/flightcheck/results.json
  • The 10s interval is lightweight (just fs.existsSync + file reads) and ensures buttons always reflect the true state

@avneeshraiusit

Copy link
Copy Markdown
Collaborator

Follow-up: Review Feedback Resolution

Thanks for the updates! Here's where things stand:

# Issue Status Notes
1 Python shell-out for wizard detection ✅ Fixed Pure Node.js readFileSync + Buffer.indexOf. No more spawning Python.
2 Clipboard hijack ✅ Fixed Now uses chat.open with { query, isPartialQuery: false }. Clipboard is fallback only.
3 Binary .vsix in repo ❌ Open Still committed — permanent repo bloat on every version bump.
4 settings.json comment stripping ❌ Open `ConvertFrom-Json
5 Global settings without backup ❌ Open 30+ global settings modified with no backup. Uninstalling the extension leaves VS Code broken.
6 Remove-Item -Recurse -Force without prompt ❌ Open Still silently deletes non-git directories matching the repo name.
7 Polling never stops ✅ Accepted Rationale is sound — users can reset state or switch environments. Cost is low.
9 macOS source killing terminal ✅ Fixed Changed to bash "$TEMP_DIR/..." across all bootstrap scripts.

Still blocking (IMO)

#4 is the most user-impacting. Many VS Code users have // comments in their settings.json. The ConvertFrom-JsonConvertTo-Json round-trip silently strips them all. Options:

  • Write essMaker.mode to a separate file the extension reads (e.g. ~/.ess-maker/config.json)
  • Use string manipulation to insert the key without full JSON deserialization
  • Use code --config CLI if available

#5 should at minimum save original values before overwriting (e.g. into globalState) and restore them when "Restore Standard Layout" is clicked or on extension uninstall.

#6 — a simple Read-Host "Remove $repoPath? (y/N)" or at least a visible warning before deletion would prevent accidental data loss.

#3 (binary in repo) is less urgent but worth a follow-up issue to build the VSIX in CI.

#4: settings.json comment preservation — Replace ConvertFrom-Json/
    ConvertTo-Json with regex-based string manipulation that inserts
    or updates the essMaker.mode key without touching other content.

#5: Settings backup/restore — applyChatOnlyLayout now saves original
    user global settings to globalState before overwriting. Restore
    Standard Layout reads from backup and restores original values
    (or removes the key if no original existed).

#6: 5-second abort window before deleting non-git directories —
    both Windows and Mac installers now warn and give the user time
    to Ctrl+C before removing a directory that matches the repo name
    but isn't a git repository.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@amilandi

Copy link
Copy Markdown
Contributor Author

Addressed the remaining items in b6b7d40:

#4 — settings.json comment preservation
Replaced ConvertFrom-Json | ConvertTo-Json with regex-based string manipulation. The installer now uses -replace to insert/update essMaker.mode without parsing or rewriting the full file. JSONC comments are preserved.

#5 — Settings backup/restore
applyChatOnlyLayout now saves original user global settings to globalState before overwriting (only on first apply). restoreStandardLayout reads from that backup and restores original values — or removes the key if the user had no prior value. Backup is cleared after restore.

#6 — 5-second abort window before deletion
Both Windows and Mac installers now print a clear warning and sleep 5 seconds before removing a non-git directory, giving users time to Ctrl+C if the directory contains their own data.

Only #3 (binary VSIX in git) remains open — will track as a follow-up for CI-based artifact publishing.

Avery Milandin and others added 4 commits June 23, 2026 12:49
Check .local/config.json for setup: complete before injecting /setup.
Returning users who re-run the installer no longer get prompted to
set up again. In lite mode, returning users get the chat panel opened
automatically so they can start working right away.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@amilandi
amilandi requested a review from avneeshraiusit June 23, 2026 22:03
All three Mac bootstrap scripts (standard, lite, flightcheck) were
ignoring --branch and --source-base-url CLI arguments, always fetching
install-ess-adk.sh from main. Now they parse the args and export
ESS_ADK_BRANCH so the inner installer clones the correct branch.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@avneeshraiusit

Copy link
Copy Markdown
Collaborator

Q: why did we leave "Only #3 (binary VSIX in git) remains open — will track as a follow-up for CI-based artifact publishing." ?

avneeshraiusit
avneeshraiusit previously approved these changes Jun 23, 2026

@avneeshraiusit avneeshraiusit left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approving with a suggestion

@amilandi

Copy link
Copy Markdown
Contributor Author

Re: #3 (binary VSIX in git) — We left this open because the installer currently fetches the VSIX directly from
aw.githubusercontent.com, so removing it from the repo requires changing the delivery mechanism (e.g., CI builds the VSIX and uploads to GitHub Releases, then the installer pulls from there instead). That's a separate piece of work we'll track as a follow-up — it doesn't block the current PR's functionality and the file is only ~24KB per version bump.

…o Setup

- Standard mode: installer uses 'code chat /setup' (opens in sidebar
  panel on the right) instead of extension injecting into editor area
- Rename 'Connect' button to 'Setup' throughout extension
- Remove flightcheck prerequisite from evaluate and push buttons
  (flightcheck may report false alarm failures)
- Mac installer: standard mode also uses code chat for sidebar panel

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@avneeshraiusit

Copy link
Copy Markdown
Collaborator

Approved

@amilandi amilandi reopened this Jun 24, 2026
@amilandi
amilandi merged commit b1976cf into main Jun 24, 2026
6 checks passed
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.

2 participants