Skip to content

Add IStatusReporter for user feedback during long operations #19

@siewers

Description

@siewers

Problem

Long-running operations like web authentication provide no feedback to the user. The auth flow happens inside NetatmoClientWebSessionAuth, so commands don't know when it's occurring and can't show spinners or status messages.

Proposal

Introduce an IStatusReporter interface that components can call to report status:

public interface IStatusReporter
{
    void Report(string message);
}
  • Pass it as a dependency to NetatmoClient and WebSessionAuth so both can report directly without relaying through each other
  • Provide different implementations depending on execution context:
    • Interactive: Spectre.Console spinner/status display
    • Unattended (background service): simple log lines or no-op
  • Detection could be automatic (Console.IsInputRedirected, Environment.UserInteractive) or explicitly set by the command

Scope

  • Define IStatusReporter interface
  • Implement interactive (Spectre) and unattended (plain text / no-op) variants
  • Wire into NetatmoClient and WebSessionAuth
  • Remove the login-specific spinner added in LoginCommand once this is in place

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions