Context
This follow-up task was identified during the review of PR #74.
Source PR: #74
PR Title: feat: patterns example Session 4 (patterns #17-21) — dialogs, tabs & navigation
Suggested by: @claude[bot] (PR comments, rounds 1, 5, 9, 10)
Task Description
The Keyboard Shortcuts pattern's command panel currently shows a disabled <input type="search"> as a visual stub:
{{/* Decorative — wiring to a Change()/Submit() handler is out of scope ... disabled removes the false affordance ... */}}
<input type="search" placeholder="Type a command…" disabled aria-label="Command search">
A more pedagogically complete pattern would actually wire the input — e.g., a Change() handler that filters a list of commands as the user types, or a Submit() handler that logs the typed query into the activity log.
Why Not in PR #74
PR #74 scoped pattern #21 narrowly to "global keyboard event binding via lvt-on:window:keydown". The full command-palette experience (search filter, command execution) would expand the pattern's scope substantially.
Suggested Implementation
Option A: Filter-as-you-type
- Add
Commands []string to ShortcutsState
- Add
Filter string to track the search query
- Wire the input with
lvt-form:debounce-300 and a Change(state, ctx) handler that updates Filter and re-filters Commands
Option B: Search-and-log
- Wrap the input in a
<form method="POST">
- Add a
Search(state, ctx) handler that pushes the query into state.Log like the existing Open/Close events
Either would give learners adapting this pattern a more complete reference.
Auto-created by prmonitor from PR review comments.
Context
This follow-up task was identified during the review of PR #74.
Source PR: #74
PR Title: feat: patterns example Session 4 (patterns #17-21) — dialogs, tabs & navigation
Suggested by: @claude[bot] (PR comments, rounds 1, 5, 9, 10)
Task Description
The Keyboard Shortcuts pattern's command panel currently shows a disabled
<input type="search">as a visual stub:{{/* Decorative — wiring to a Change()/Submit() handler is out of scope ... disabled removes the false affordance ... */}} <input type="search" placeholder="Type a command…" disabled aria-label="Command search">A more pedagogically complete pattern would actually wire the input — e.g., a
Change()handler that filters a list of commands as the user types, or aSubmit()handler that logs the typed query into the activity log.Why Not in PR #74
PR #74 scoped pattern #21 narrowly to "global keyboard event binding via
lvt-on:window:keydown". The full command-palette experience (search filter, command execution) would expand the pattern's scope substantially.Suggested Implementation
Option A: Filter-as-you-type
Commands []stringtoShortcutsStateFilter stringto track the search querylvt-form:debounce-300and aChange(state, ctx)handler that updatesFilterand re-filtersCommandsOption B: Search-and-log
<form method="POST">Search(state, ctx)handler that pushes the query intostate.Loglike the existing Open/Close eventsEither would give learners adapting this pattern a more complete reference.
Auto-created by prmonitor from PR review comments.