You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: restore the Agents window — stop gating the de-brand on Setup.hidden
REGRESSION, shipped in v0.6.0 + v0.7.0. My B4 de-brand (#12) forced
IChatEntitlementService.setForceHidden(true) to hide the "Sign in to use GitHub
Copilot" call-to-actions. I read Setup.hidden as "the Copilot setup CTA gate".
It is not — it is upstream's hide-ALL-chat/agent-UI flag, and forcing it also
hid:
- OPEN_AGENTS_WINDOW_PRECONDITION (chat/common/constants.ts) → "Open Agents
Window" vanished from the Command Palette, making the whole Agents window
(and the aquarium easter egg inside it) unreachable;
- the Agent Plugins view + its menus/actions (agentPluginsView.ts ×6);
- chat participants, createPluginAction, chatPluginActions, chatActions,
agent-sessions experiments.
Every other term of that precondition passes (chat.agent.enabled defaults true;
the window/auxiliary checks pass in the main window) — Setup.hidden.negate() was
the only failing term, so this was solely self-inflicted.
Fix:
- REMOVE the setForceHidden contribution → Setup.hidden returns to its default
(false) and every surface above comes back. chat.shared.contribution.ts is
pristine again and leaves the patch.
- Hide the two CTAs at the MENU ITEM instead — `when: ContextKeyExpr.false()`
on the Accounts-menu and title-bar entries (the same item-scoped pattern used
for "Ask @VScode", which has no blast radius). Drops two imports that this
orphans (strict build: TS6133).
Patch stays at 11 files (chat.shared out, chatSetupContributions in).
npm run compile-client → 0 errors. de-brand → 0 warnings.
Known remainder: the chat STATUS-BAR dashboard still offers "Sign in to use
GitHub Copilot" (chatStatusDashboard.ts) — it is created behind
`!sentiment.hidden`, i.e. the same Setup.hidden flag, so hiding it needs a
different, narrower gate. Tracked separately rather than re-breaking the window.
Lesson recorded in docs/CORE-PATCHES.md row 11: never gate a de-brand on
Setup.hidden — gate the item.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
# NOTE 1: use `diff HEAD` (not plain `diff`) — bootstrap's `git apply` may leave these STAGED,
43
43
# and plain `git diff` shows only UNSTAGED changes, silently dropping the staged patches.
@@ -72,7 +72,7 @@ compile-client` after touching a core file.**
72
72
| 8 |`welcomeWalkthrough/browser/walkThrough.contribution.ts`|**Remove** the "**Editor Playground**" action registration + Help item + their now-unused imports (`registerAction2`, `MenuRegistry`, `MenuId`, `EditorWalkThroughAction`). | De-brand (WS-C/M5). Its walkthrough is verbatim Microsoft VS Code content. Clean full removal (no leftover unused imports). |
73
73
| 9 |`welcomeOnboarding/browser/welcomeOnboarding.contribution.ts`| Developer command **"Welcome Onboarding 2026"** → `f1: false`. | De-brand (WS-A/B3). That command calls `onboardingService.show()`, which renders the verbatim **"Welcome to VS Code — Sign in to use GitHub Copilot"** modal. Patch #4 blocks it on *first run*; this hides the one remaining Command-Palette path to it. `f1:false` (not removal) keeps the action + its imports used. |
74
74
| 10 |`api/node/loopbackServer.ts` (`getHtml`) | Replace the `this._appName === 'Visual Studio Code'` / `'… - Insiders'` branches (which embedded the VS Code stable/Insiders **shields**, falling through to the blue VS Code **"book"** default) with a single **LevelCode chevron** data-URI. | De-brand (WS-C/L5). A latent bug **and** a leak: `appName` is now "LevelCode" so no branch matched → every GitHub OAuth success page flashed a VS Code logo. `this._appName` is still used in the page text, so no unused-field error. |
75
-
| 11 |`chat/browser/chat.shared.contribution.ts`|Add a `WorkbenchPhase.BlockRestore` contribution that calls `IChatEntitlementService.setForceHidden(true)`. | De-brand (WS-A/B4). `product.defaultChatAgent` is kept (assertDefined-d, ~15 files), which leaves `Setup.hidden=false` → a signed-out user sees "Sign in to use GitHub Copilot" CTAs in the Accounts menu, title bar, and Chat status. `setForceHidden(true)` flips**only** that gate — it does **not** disable AI/inline suggestions or suppress LevelCode's own AI-panel auto-open, unlike `chat.disableAIFeatures:true` (`layout.ts` first-run). No new imports (file already imports `registerWorkbenchContribution2` + `IChatEntitlementService`). |
75
+
| 11 |`chat/browser/chatSetup/chatSetupContributions.ts`|**Hide** the two GitHub Copilot sign-in call-to-actions (Accounts menu + title bar) with `when: ContextKeyExpr.false()`, and drop the two imports that becomes unused (`ChatEntitlementContextKeys`, `InEditorZenModeContext` — strict build). | De-brand (WS-A/B4). A sign-in funnel for an extension we don't ship. **Gated per MENU ITEM on purpose.** The previous attempt forced `IChatEntitlementService.setForceHidden(true)` instead — but `Setup.hidden` is upstream's *hide-ALL-chat/agent-UI* flag, not a CTA gate: it also gates `OPEN_AGENTS_WINDOW_PRECONDITION` (constants.ts), the**Agent Plugins view**, chat participants and several chat/plugin actions. That shipped in v0.6.0–v0.7.0 and made **Open Agents Window disappear from the Command Palette**. Never gate a de-brand on `Setup.hidden`; gate the item. |
76
76
77
77
## String + link rebrands — `scripts/de-brand.mjs` (NOT in the patch)
0 commit comments