Skip to content

fix(tui/live): remove advertised session-picker key with no handler - #170

Merged
codeyevsky merged 3 commits into
solongate:mainfrom
Oscar-Williams:fix/live-help-session-picker
Oct 27, 2026
Merged

codeyevsky merged 3 commits into
solongate:mainfrom
Oscar-Williams:fix/live-help-session-picker

Conversation

@Oscar-Williams

Copy link
Copy Markdown

What and why

The Live help table listed s as a session picker, but onKey never handled that key. Pressing s did nothing; the help text was wrong. Commit 5ba8641 removed the session-picker handling and left this help row behind.

Remove the misleading binding. Add a regression test that drives each advertised help key through onKey and checks the Live state actually changes (unlike an unknown key).

Closes #148

How I checked it

New test against unpatched main (aa46149, still lists s):

$ go test ./live/ -count=1 -run TestLiveHelpAdvertisedKeysHaveHandlers -v
--- FAIL: TestLiveHelpAdvertisedKeysHaveHandlers/s (0.00s)
    live_keys_test.go:636: liveHelp advertises "s" ("session picker") but onKey left Live state unchanged (same as unknown key)

With the change, the same test passes. A temporary {"z", "fake key with no handler"} help row (no onKey case) fails the same way; removed after the check.

Also: gofmt on the touched files, go vet ./... in packages/tui, go test ./live/ -count=1, and ./scripts/sg-unit-check.sh (all green).

rg over the repo found no other "session picker" strings in help, docs, or README.

The Live help table listed "s" as a session picker, but onKey never
handled that key. Drop the misleading binding and add a regression
test that every advertised help key has a handler.

Closes solongate#148

Signed-off-by: Oscar <319719771+Oscar-Williams@users.noreply.github.com>
Rewrite TestLiveHelpAdvertisedKeysHaveHandlers to construct a KeyMsg
for each advertised help token, call onKey, and require a Live state
change relative to an unknown-key baseline. Drop the parallel handled
map so a fake help row without a handler fails the test.

Signed-off-by: Oscar <319719771+Oscar-Williams@users.noreply.github.com>
@codeyevsky
codeyevsky merged commit 63430a4 into solongate:main Oct 27, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tui/live: help screen advertises an 's' session-picker key with no handler

2 participants