-
Notifications
You must be signed in to change notification settings - Fork 852
Open
Labels
Description
Refactor: Separate output formatting from command logic in traffic_ctl
Summary
Output formatting responsibilities are split between CtrlCommand subclasses and BasePrinter subclasses. The intended design is that commands handle logic/RPC and printers handle output formatting. In practice, both sides do formatting and neither fully owns it.
This was the initial goal, but it got sidetracked — it was easy to implement the text formatting as early as possible in the command layer, and over time that pattern spread.
Desired state
Commands should produce structured data (or call domain-level output methods) and never construct user-facing text, check format flags, or reference concrete printer types. The output layer should fully own how data is rendered for each format.
This was the initial goal, but it got side tracked
Reactions are currently unavailable