Problem
Long-running operations like web authentication provide no feedback to the user. The auth flow happens inside NetatmoClient → WebSessionAuth, 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
Problem
Long-running operations like web authentication provide no feedback to the user. The auth flow happens inside
NetatmoClient→WebSessionAuth, so commands don't know when it's occurring and can't show spinners or status messages.Proposal
Introduce an
IStatusReporterinterface that components can call to report status:NetatmoClientandWebSessionAuthso both can report directly without relaying through each otherConsole.IsInputRedirected,Environment.UserInteractive) or explicitly set by the commandScope
IStatusReporterinterfaceNetatmoClientandWebSessionAuthLoginCommandonce this is in place