Skip to content

fix(tui): name what Esc discards in the ask overlay - #1208

Open
Gilbert09 wants to merge 1 commit into
mainfrom
posthog/ask-overlay-escape-scope
Open

fix(tui): name what Esc discards in the ask overlay#1208
Gilbert09 wants to merge 1 commit into
mainfrom
posthog/ask-overlay-escape-scope

Conversation

@Gilbert09

Copy link
Copy Markdown
Member

Problem

The credential prompt (wizard_ask) walks a source's fields one question at a
time. Esc declines the whole request — cancelPendingQuestion builds a
cancelled answer for every question in it, so anything already typed is thrown
away and the agent reads the result as "the user declined" and drops to its
browser-handoff fallback.

The overlay labelled that key ESC skip, with no scope, and the
required-field nudge said "press ESC to skip". On a multi-question request
both read as "skip this field". Several of the fields a source asks for are
optional (tunnel settings, an alternative connection string), so a user
passing on one of those had every reason to reach for Esc — and lost the whole
source.

Cancelled prompts are the dominant loss in this flow: a majority of runs that
accepted the offer recorded at least one cancelled wizard_ask, and most of
those were user-initiated rather than timeouts. This does not explain all of
them, but a destructive key labelled with a non-destructive word is a defect
either way.

Changes

  • New pure helper askEscapeHint(total, answered), used by both hints:
    skip for a single question, skip all N questions for more, and
    skip all N questions, discarding the M you answered once the user is
    partway through.
  • Optional text questions now say so: isRequiredButEmpty has always let an
    empty Enter through for required === false, it just never told anyone,
    leaving Esc as the only visible exit.

Copy and affordance only — the cancellation contract the ask bridge and the
task skill depend on is unchanged, so a full cancel still reads as a decline
and is still refunded against the per-run ask cap.

Test plan

  • Unit tests for askEscapeHint alongside the existing handleAskKey /
    isRequiredButEmpty cases in WizardAskScreen.test.ts.
  • pnpm build && pnpm test && pnpm fix — 2604 tests pass.

Created with PostHog Desktop

Esc declines the whole wizard_ask request, discarding every answer already
typed, but the footer labelled it "skip" with no scope — which on a
multi-question request reads as "skip this field". Name the scope, and
surface the per-field exit that optional text fields already accept.

Generated-By: PostHog Desktop
Task-Id: 16f6ce62-6989-4bdb-a4ac-8e233ff96060
@Gilbert09
Gilbert09 requested a review from a team as a code owner September 4, 2026 11:57
Copilot AI lite review requested due to automatic review settings September 4, 2026 11:57

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

🧙 Wizard CI

Run the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands:

Test all apps:

  • /wizard-ci all

Test all apps in a directory:

  • /wizard-ci ai-observability
  • /wizard-ci basic-integration
  • /wizard-ci mcp-analytics
  • /wizard-ci replay-vision
  • /wizard-ci revenue
  • /wizard-ci self-driving
  • /wizard-ci warehouse
  • /wizard-ci warehouse-seeded

Test an individual app:

  • /wizard-ci ai-observability/anthropic
  • /wizard-ci ai-observability/google-adk
  • /wizard-ci ai-observability/groq
Show more apps
  • /wizard-ci ai-observability/manual-capture
  • /wizard-ci ai-observability/openai
  • /wizard-ci ai-observability/openai-agents
  • /wizard-ci ai-observability/opentelemetry
  • /wizard-ci ai-observability/vercel-ai
  • /wizard-ci basic-integration/android
  • /wizard-ci basic-integration/angular
  • /wizard-ci basic-integration/astro
  • /wizard-ci basic-integration/django
  • /wizard-ci basic-integration/fastapi
  • /wizard-ci basic-integration/flask
  • /wizard-ci basic-integration/flutter
  • /wizard-ci basic-integration/javascript-node
  • /wizard-ci basic-integration/javascript-web
  • /wizard-ci basic-integration/laravel
  • /wizard-ci basic-integration/next-js
  • /wizard-ci basic-integration/nuxt
  • /wizard-ci basic-integration/python
  • /wizard-ci basic-integration/rails
  • /wizard-ci basic-integration/react-native
  • /wizard-ci basic-integration/react-router
  • /wizard-ci basic-integration/sveltekit
  • /wizard-ci basic-integration/swift
  • /wizard-ci basic-integration/tanstack-router
  • /wizard-ci basic-integration/tanstack-start
  • /wizard-ci basic-integration/vue
  • /wizard-ci mcp-analytics/custom-dispatcher
  • /wizard-ci mcp-analytics/typescript-sdk
  • /wizard-ci replay-vision/javascript-node
  • /wizard-ci replay-vision/next-js
  • /wizard-ci replay-vision/react-vite
  • /wizard-ci revenue/stripe
  • /wizard-ci self-driving/astro
  • /wizard-ci self-driving/fastapi
  • /wizard-ci self-driving/nuxt
  • /wizard-ci self-driving/react-router
  • /wizard-ci self-driving/sveltekit
  • /wizard-ci warehouse/monorepo-env
  • /wizard-ci warehouse/multi-source-next
  • /wizard-ci warehouse/stripe-node
  • /wizard-ci warehouse/zero-source
  • /wizard-ci warehouse-seeded/next-stripe
  • /wizard-ci warehouse-seeded/next-stripe-declined

Test against a Context Mill branch:

  • /wizard-ci all context-mill:my-branch

Add context-mill:<branch> to any command above to pin the Context Mill branch. It defaults to main.

Results will be posted here when complete.

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