Skip to content

TUI.App --interactive demo's advertised keyboard controls (arrows/Space/R/T) do nothing — InteractiveDemo.HandleInput is unreachable #115

Description

@matt-edmondson

What's wrong

InteractiveDemo.CreateInstructionsPanel() (TUI.App/InteractiveDemo.cs) tells the user "↑/↓ - Increment/Decrement Counter", "SPACE - Add +10", "R - Reset", "T - Toggle Theme". But the real input path is UIApplication.ProcessInputAsync (TUI.Core/Services/UIApplication.cs:232) → IUIElement.HandleInput → OnHandleInput, and none of the shipped element types (TextElement, BorderElement, StackPanel, UIElementBase) override OnHandleInput — it defaults to return false (UIElementBase.cs:113). InteractiveDemo.HandleInput(string key) (lines 156-194) — the only code that actually updates _counter/_statusText/theme — is a standalone public static method with exactly one reference in the whole assembly: its own definition. Nothing in Program.cs or InteractiveDemo.RunAsync() calls it.

Failure scenario

Running dotnet run --project TUI.App -- --interactive and pressing any of the keys advertised in the on-screen instructions panel visibly does nothing.

Suggested fix

Either wire real key input into InteractiveDemo.HandleInput (e.g. have UIApplication expose a hook, or give the root element a custom OnHandleInput override that dispatches to it), or remove the unused method and the false claims in the instructions panel.

Acceptance criteria

Pressing an advertised key while running the interactive demo visibly updates the counter/status/theme as documented, or the misleading instructions panel is removed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions