Fold thirty-one settings pages into fifteen categories with tabs
The sidebar was a flat scan of thirty-one rows; now it reads like a settings app. Multi-subject categories (Input, Network & Sharing, Applications, Users & Accounts, Privacy & Security, System) carry an Appearance-style tab strip above the page, drawn by the shell so the leaf pages themselves are untouched. The taxonomy lives in one new file, services/SettingsRoutes.qml; the sidebar, the strip, route validation, search breadcrumbs, and both generators derive from it. ShellState.settingsPage still holds leaf ids, so every deep link, IPC call, and search result keeps working — and now lands on the exact tab. Dictation moves out of Sound onto its own page under Input, with a handoff back to Sound for the microphone. The strip scrolls when System's nine tabs outgrow a tiled window. All 161 contracts pass. Claude-Session: https://claude.ai/code/session_01Ms2FbjQy31TVf3CEvQhGM8
This commit is contained in:
@@ -104,12 +104,20 @@ EXTRACT
|
||||
)
|
||||
[[ "$missing" -eq 0 ]] || fail "$missing schema label(s) are not findable by search"
|
||||
|
||||
# ── Results only ever route to pages the shell can open ──────────────────────
|
||||
allowed="$(grep -oE 'const allowed = \[[^]]*\]' "$repo_dir/config/dot/quickshell/services/ShellState.qml" \
|
||||
| grep -oE '"[a-z-]+"' | tr -d '"' | sort -u)"
|
||||
for query in wallpaper blur timezone screenshot pointer lock volume gaps; do
|
||||
# ── Results only ever route to leaves the shell can open ─────────────────────
|
||||
# A search result carries a leaf id, never a category: it has to land on the
|
||||
# exact tab holding the setting, not on whichever tab that category opens
|
||||
# first. SettingsRoutes is where the leaves are declared -- a tabless category
|
||||
# is one, and so is every tab.
|
||||
routes="$repo_dir/config/dot/quickshell/services/SettingsRoutes.qml"
|
||||
leaves="$( {
|
||||
grep -oE '\{ page: "[a-z-]+", label: "[^"]*", icon: "[^"]*", tabs: \[\] \}' "$routes"
|
||||
grep -oE '\{ page: "[a-z-]+", label: "[^"]*" \}' "$routes"
|
||||
} | sed -E 's/\{ page: "([a-z-]+)".*/\1/' | sort -u)"
|
||||
[[ -n "$leaves" ]] || fail 'no leaf pages could be read from SettingsRoutes, so this proves nothing'
|
||||
for query in wallpaper blur timezone screenshot pointer lock volume gaps dictation; do
|
||||
page="$(find_top "$query" | jq -r .topPage)"
|
||||
grep -qx "$page" <<<"$allowed" || fail "search routed '$query' to unknown page '$page'"
|
||||
grep -qx "$page" <<<"$leaves" || fail "search routed '$query' to '$page', which is not a page anyone can land on"
|
||||
done
|
||||
|
||||
trap - EXIT
|
||||
|
||||
Reference in New Issue
Block a user