Skip to content

Replace ConsoleUtility prompts with Spectre.Console (already a dependency) #353

Open

Description

@ChrisonSimtian

Tier 1 — Replace. src/Fallout.Build/Utilities/ConsoleUtility.cs (~143 LOC) hand-reimplements interactive prompts — PromptForInput(), PromptForChoice() (arrow-key selection), ReadSecret() — with raw console state management.

Replace with

Spectre.Console — already referenced in Directory.Packages.props (v0.49.1). Use TextPrompt, SelectionPrompt<T>, and secret-masked prompts.

Why this is the easiest win

Dependency already present, the code is internal, and ~80 LOC of manual console handling simply disappears with better cross-platform behaviour.

Non-breaking

Internal utility — swap implementation, keep callers working. Target 2026 directly.

Acceptance

  • PromptForInput / PromptForChoice / ReadSecret backed by Spectre.Console
  • Manual Console cursor/key handling removed
  • Setup/secrets CLI flows (Program.Setup.cs, Program.Secrets.cs) behave identically

From dependency-consolidation audit, 2026-06-02.

Activity

  1. ChrisonSimtian commented on Jun 3, 2026

    @ChrisonSimtian
    CollaboratorAuthor

    Insights from a discarded prototype (old paths; map to onion structure after #359).

    • Spectre.Console already central (0.49.1) — just add the PackageReference, no inline Version.
    • Wrap with TextPrompt, SelectionPrompt<T>, .Secret(); keep the 3 public static signatures identical (non-breaking).
    • Scope is smaller than the issue states: the CLI (Program.Setup/Program.Secrets) already uses its own private Spectre helpers and does NOT call ConsoleUtility. Real remaining callers: CredentialStore (ReadSecret) and DelegateRequirementService (PromptForInput/PromptForChoice).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions