Skip to content

[Experiment] Show a pip and popup when a Copilot sale is ongoing and the chat is closed - #331588

Merged
Logan Ramos (lramos15) merged 33 commits into
microsoft:mainfrom
rfeltis:rfeltis-promo-ui-treatment
Sep 24, 2026
Merged

Logan Ramos (lramos15) merged 33 commits into
microsoft:mainfrom
rfeltis:rfeltis-promo-ui-treatment

Conversation

@rfeltis

@rfeltis Ralph Feltis (rfeltis) commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Adds a dedicated Copilot-icon pip and promo popup for eligible discounted models while Chat is collapsed. Expanded Chat retains the existing input banner. Shared post-update components and model-picker promo behavior are unchanged. Clicking the pip or expanding the chat when the banner in the chat exists will dismiss the pip.

Will be run as an experiment: https://exp.microsoft.com/features/8af04802-561e-4474-8d57-f9e71d1fadd6/progressions?workspaceId=dbd12384-5001-4e90-a863-526321eaf233

Validation

69 targeted tests pass at 0a6e1869, covering configuration bypass, no enrollment for ineligible or hidden surfaces, delayed responses, revocation, existing status-entry behavior, the seen-promo rule, the cold-Chat CTA, and the card vendor icon and its size.

End-to-end proof was re-recorded against this branch tip (6f581e3) in a Codespace, driving the real Code OSS window with a mocked sale fixture on real upstream models. Icons and status bar are healthy (24-bit display). The closed-promo card uses a fixed 110px left wash at 33% button tint.

Treatment — copilotIconPopup

Sale arrives against a collapsed Chat: the Copilot pip appears, the promo card opens, and Try opens Chat and selects the promoted model. Telemetry records shown and CTA actions.

https://raw.githubusercontent.com/rfeltis/vscode/pr-331588-sale-media/treatment-cta.mp4?v=9

Control — none

Same sale against a collapsed Chat with chat.closedPromoNotification forced to none. No pip on the Copilot status icon. Opening Chat still shows no pip.

https://raw.githubusercontent.com/rfeltis/vscode/pr-331588-sale-media/control.mp4?v=10

Already met the sale — Local banner marks seen

Sale opens against a collapsed Chat: the treatment pip appears. Opening Chat on Local shows the sale banner (onDidShow records the promo id). Collapsing Chat after that does not restore the pip for the same sale.

https://raw.githubusercontent.com/rfeltis/vscode/pr-331588-sale-media/seen.mp4?v=10

Closed-chat cards on hosted models (still GitHub Copilot)

Same pip + card treatment when Copilot puts a hosted model on sale (OpenAI/GPT, MAI, Anthropic, Grok). Product LM vendor remains copilot; OpenAI / Microsoft / Anthropic / xAI are manufacturer metadata only. Open-chat banners are unchanged and not shown here. Card gradient: 33% tint, 110px stop.

GPT-5.3-Codex (OpenAI)

Copilot closed-chat sale card for GPT-5.3-Codex

MAI-Code-1.1-Flash (Microsoft)

Copilot closed-chat sale card for MAI-Code-1.1-Flash

Claude Opus 4.7 (Anthropic)

Copilot closed-chat sale card for Claude Opus 4.7

Grok 4.5 (xAI)

Copilot closed-chat sale card for Grok 4.5

Tracked as github/growth-eng#134.

Ralph Feltis (rfeltis) and others added 2 commits August 18, 2026 14:49
Arm via Chat: Start Model Picker Tour (F1), show an activity badge on Chat,
then open chat and spotlight the model picker when the view is revealed.

Co-authored-by: Copilot App <[email protected]>
When a model has a live discount, skip the chat-input banner and
open the post-update card with one Try CTA. The CTA opens chat and
switches the model the same way the banner does. Close and CTA share
the banner dismissal store. Remove the out-of-scope model picker tour.

Co-authored-by: Copilot App <[email protected]>
Copilot AI balanced review requested due to automatic review settings August 19, 2026 01:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Replaces discounted chat promo banners with the reusable post-update sale card while preserving message-only banners and shared dismissal state.

Changes:

  • Adds sale-card display, dismissal, and model-switch commands.
  • Extends update-card metadata and dismissal handling.
  • Updates promo tests and adds model-picker onboarding scaffolding.
Show a summary per file
File Description
updateInfoParser.ts Parses dismissal command metadata.
postUpdateWidget.ts Supports dismissal callbacks and formatted feature icons.
chatPromoNotification.test.ts Updates promo behavior tests.
modelPickerWidget.ts Adds an onboarding target marker.
chatPromoNotification.ts Routes discounted promos to sale cards.
chatActions.ts Exports the toggle-chat action ID.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 6/6 changed files
  • Comments generated: 5
  • Review effort level: Balanced

Ralph Feltis (rfeltis) and others added 9 commits August 18, 2026 19:01
Keep TOGGLE_CHAT_ACTION_ID file-local and remove the onboarding
spotlight target from the model picker. Neither is needed for the
sale card.

Co-authored-by: Copilot App <[email protected]>
Add a banner|popup setting (default banner) with an ExP auto override.
Keep the post-update sale card on-screen when the window is narrow:
size to the viewport, drop the fixed 80px gutter, and re-place on layout.

Co-authored-by: Copilot App <[email protected]>
Take Logan's promo showBanner plumbing (hasPromoBanner is opt-out unless showBanner is false). Keep the closed-chat Copilot icon pip and popup after that gate.

Co-authored-by: Copilot App <[email protected]>
Drop the copied post-update widget changes, preview command, and unused
sale-card extras. Keep the collapsed-chat Copilot-icon pip and popup after
hasPromoBanner. Codex and Claude sales stay on their input banners.

Co-authored-by: Copilot App <[email protected]>
Keep the Copilot-icon popup only while Chat is collapsed so expanded Chat still uses the input banner. Drop extra SKU, entitlement, and unselectable gates, slim the card payload, and activate the pip via click, keyboard, and touch. Recover the pip class if the status entry rebuilds.

Co-authored-by: Copilot App <[email protected]>
Use typed card data and the shared Button, refresh changed promo payloads, recover replaced status entries and restore icons on disposal. Complete the Sale-to-Promo naming cleanup within the feature and cover refresh, dismissal and lifecycle regressions.

Co-authored-by: Copilot App <[email protected]>
Honor explicit closed-promo settings without reading ExP. Resolve the configured treatment only for eligible collapsed-chat promos with a visible status icon, preserve control banners, and reject stale responses. Remove eager experimental-default enrollment and cover override, visibility, refetch, failure and disposal behavior.

Co-authored-by: Copilot App <[email protected]>
@rfeltis Ralph Feltis (rfeltis) changed the title Show a sale card instead of the chat promo banner Show a Copilot-icon promo when Chat is collapsed Sep 9, 2026
The collapsed-chat pip could re-offer a sale the user had already met as a
banner in an open chat. Record a promo as seen the first time a chat input
actually renders it, and stand the pip down for that promo id. The record is
application-scoped, so it holds across windows and reloads, and a later sale
still gets its own pip. The experiment stays the last gate.

Co-authored-by: Copilot App <[email protected]>
Opening Chat from a collapsed state resolves its session asynchronously, so the
promo CTA read an undefined session and assumed the Local harness. A user who
met the sale as a pip therefore landed on whichever session Chat restored, and
the promoted model was never applied.

Co-authored-by: Copilot App <[email protected]>
The collapsed-chat promo card fell back to a generic sparkle after the
payload lost its provider icon. Pass the model provider icon through the
card input again and cover it with a rendering test.

Co-authored-by: Copilot App <[email protected]>
The hover host styles every codicon under .hover-contents with
font-size: inherit, which outranked the card's own rule and shrank the
model vendor mark to the card body font size. Scope the rule to the
promo hover so it wins, and pin the size in the widget test.

Co-authored-by: Copilot App <[email protected]>
@rfeltis Ralph Feltis (rfeltis) changed the title Show a Copilot-icon promo when Chat is collapsed Show a sale card instead of the chat promo banner Sep 14, 2026
Move closed-chat pip eligibility into the promo widget, hide the pip only
when Local chat is already showing the sale, and emit chatPromoWidgetShown,
chatPromoWidgetDismissed, and chatPromoWidgetAction telemetry with tests.

Co-authored-by: Copilot App <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Keep the status-bar pip discoverable, avoid permanent dismiss when the
hover cannot open, use high-contrast borders, and defer input-notification
onDidShow until the Chat host is actually visible.

Co-authored-by: Copilot App <[email protected]>
@rfeltis Ralph Feltis (rfeltis) changed the title Show a sale card instead of the chat promo banner [Experiment] Show a pip and popup when a Copilot sale is ongoing and the chat is closed Sep 15, 2026
Ralph Feltis and others added 3 commits September 15, 2026 16:04
Use a fixed 110px left wash at 33% button tint so every sale card gets
the same leading-edge gradient regardless of width.

Co-authored-by: Copilot App <[email protected]>
Split opportunity detection (closed Local Chat + eligible sale) and treatment
selection (config/policy/TAS) out of ChatPromoWidgetContribution so future
closed-Chat treatments can branch independently of the Copilot icon popup.

Co-authored-by: Copilot App <[email protected]>
Combine opportunity detection and treatment selection into one feature-local
helper owned by the promo contribution, matching tip-style non-Service naming.

Co-authored-by: Copilot App <[email protected]>
Remove setHostVisible / deferred onDidShow for hidden Chat hosts. That path
only covered collapsed-but-still-mounted Chat and is not a product case we want
to engineer for.

Co-authored-by: Copilot App <[email protected]>
ChatClosedPromoContribution owns eligibility, treatment, and background
listeners, and drives ChatPromoIconPopup as presentation-only.

Co-authored-by: Copilot App <[email protected]>
@rfeltis
Ralph Feltis (rfeltis) marked this pull request as ready for review September 16, 2026 22:56
Keep closed-promo constants/import alongside main's agent session cleanup tag and agentSessionsConfiguration import.

Co-authored-by: Copilot App <[email protected]>
Sinon withArgs is arity-typed to store(); count matching store calls by args instead. Type the hover mock options parameter.

Co-authored-by: Copilot App <[email protected]>
Use DOM.isHTMLElement and dataset dot notation, track labeled nodes without querySelectorAll, and scope status-bar lookups with no-restricted-syntax disables.

Co-authored-by: Copilot App <[email protected]>
Always forward the current opportunity model to the icon popup so title and payload updates apply even when the promo id is unchanged.

Co-authored-by: Copilot App <[email protected]>
Agent Host Provider Integration idle-release timeout is unrelated to the closed-chat promo changes.

Co-authored-by: Copilot App <[email protected]>
Replace the custom popup and DOM interception with the standard status-bar tooltip and action. Preserve status priority, seen-promo state, keyboard focus, and restored chat sessions, with focused regression coverage.

Refactors microsoft#331588.

Co-authored-by: Copilot <[email protected]>
@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

Benjamin Christopher Simmonds (@benibenj)

Matched files:

  • src/vs/workbench/browser/parts/statusbar/statusbarItem.ts

Preserve upstream tooltip toggling, configuration registration, and input-scoped notifications alongside the native status-bar promo refactor. Extend promo interaction coverage to verify toggling closes and reopens the offer without dismissing it.

Co-authored-by: Copilot <[email protected]>
Preserve upstream managed-hover cancellation when replacing a pinned promo tooltip. Keep focus handling and verify replacement content remains active until the hover is dismissed.

Co-authored-by: Copilot <[email protected]>
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.

5 participants