Skip to content

ConfirmationHandler's options parameter is declared-but-never-produced after the structured-confirm retirement #5205

Description

@os-support-ai

Observation recorded while implementing #4314 (retire the structured confirm arm — maintainer ruling 2026-08-17). Filed unassigned per the PM's re-scope order on that card; observation-class, nothing user-reachable is broken.

What

ConfirmationHandler (packages/core/src/actions/ActionRunner.ts, the public handler type consumers pass to setConfirmHandler) declares an optional second parameter:

exporttypeConfirmationHandler=(message: string,options?: {title?: string;confirmText?: string;cancelText?: string;})=>Promise<boolean>;

The only producer of that argument was the structured confirm arm's forwarding inside ActionRunner's precedence read — retired in #4314. The runner now invokes confirmHandler(message) with one argument, always. The signature was deliberately left untouched by the retirement PR: packages/app-shell was held by another session that round, and narrowing a public handler type is its own contract call.

Consumers still reading the parameter

  • packages/app-shell/src/views/ActionConfirmDialog.tsx renders state.options?.confirmText with a translation fallback (actionConfirm.confirm).
  • packages/app-shell/src/hooks/useConsoleActionRuntime.tsx implements the handler as (message, options).

With no producer, options is now always undefined at runtime; those reads are dead-in-practice but type-check forever — the declared surface outlives the data that fed it.

Why this is the ADR-0049 shape

Declared-but-never-produced public surface: the same enforce-or-remove doctrine the #4314 ruling applied to the arm itself. Two ways it can resolve, both contract calls, neither decided here:

  1. Remove: retire the options parameter from ConfirmationHandler; app-shell's reads fold to their existing fallbacks. Narrowing a public handler type — needs the usual consumer radius over @object-ui/core dependents.
  2. A producer returns: the Structured confirm.message outranks confirmText in ActionRunner but has no translation-bundle key — and the types deprecate authors INTO it #4314 reopen condition (real demand brings the structured arm back WITH bundle keys _actions.{name}.confirm.* designed in) would make the dialog title/button labels translatable and options live again.

Whoever picks this up should re-check session holds on packages/app-shell first.


Generated by Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions