Make every settings page reachable from the launcher
Settings had a search index and the launcher had script commands, and neither knew about the other: finding a setting meant opening Settings first and searching there. One command per page is now generated from the same sources the in-app search reads -- the sidebar page list, the group routing, and the schema labels -- so a setting searchable inside Settings is searchable from the launcher without a second list to maintain. Generating it surfaced a gap in the in-app search as well. Six pages had no vocabulary at all, because their contents come from the system rather than our schema, so searching "volume" found nothing in Settings either. They now carry entries, which improves both surfaces. The product prefix is dropped from every hand-written command title. The generated ones are qualified "Settings: <page>" instead: a bare page label collides with the feature of the same name, and two commands sharing a title are indistinguishable in a launcher. Claude-Session: https://claude.ai/code/session_01BRvzt4H8XXLPVH5MyYdk9L
This commit is contained in:
@@ -109,6 +109,19 @@ case "$action" in
|
||||
clipboard) qs ipc call clipboard open ;;
|
||||
overview) qs ipc call overview open ;;
|
||||
settings) qs ipc call settings open ;;
|
||||
|
||||
# Jump straight to one settings page. The launcher's per-page commands are
|
||||
# the only caller, and they are generated from the page list itself, so the
|
||||
# pattern below is a boundary check rather than a whitelist: an unknown page
|
||||
# would leave the settings window showing nothing at all.
|
||||
settings-page)
|
||||
page="${2:-}"
|
||||
if [[ ! "$page" =~ ^[a-z][a-z-]*$ ]]; then
|
||||
printf 'Usage: panama-action settings-page PAGE\n' >&2
|
||||
exit 2
|
||||
fi
|
||||
qs ipc call settings page "$page"
|
||||
;;
|
||||
health) qs ipc call health open ;;
|
||||
|
||||
dnd)
|
||||
@@ -149,7 +162,7 @@ case "$action" in
|
||||
;;
|
||||
*)
|
||||
printf 'Usage: panama-action {%s}\n' \
|
||||
'control-center|notifications|calendar|clipboard|overview|settings|health|dnd|caffeine|night-light|focus-start|focus-end|capture|intelligence|screenshot|microphone|gallery|restart-shell' >&2
|
||||
'control-center|notifications|calendar|clipboard|overview|settings|settings-page PAGE|health|dnd|caffeine|night-light|focus-start|focus-end|capture|intelligence|screenshot|microphone|gallery|restart-shell' >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user