devtools icon indicating copy to clipboard operation
devtools copied to clipboard

let hosts override the interactive auth banner

Open danielroe opened this issue 3 months ago • 0 comments

Clear and concise description of the problem

we're working on an interactive terminal UI for nuxt cli, and part of this is being able to embed elements like notifications, prompts, and so on (see https://github.com/nuxt/cli/pull/1488)...

for DevTools, the OTP banner is the one bit of output we cannot easily re-skin.

Suggested solution

we do have somewhere it could live (a sticky notice on the dev panel that dismisses on keypress), but we can't get the code out of devtools

createInteractiveAuth takes banner?: (info: { code, url }) => void, but it isn't currently threaded through.

we could do something like this:

// vite.config.ts, or from a framework integration
devtools: {
  banner: ({ code, url }) => myTui.notify(`DevTools auth code ${code} (or open ${url})`),
}

it would fall back to the current default when it's unset, so nothing would change for plain vite dev.

Alternative

No response

Additional context

No response

Validations

  • [x] Follow our Code of Conduct
  • [x] Read the Contributing Guide.
  • [x] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

danielroe avatar Aug 24 '26 20:08 danielroe