src/preferences/settings-window/SettingsSectionSearchContentSpecs.md
Holds a Settings section's searchable content as two parts:
SettingsSearchIndex.indexed { } scope
(section title, dropdowns, buttons, static labels). Immutable for the session.setDynamic.
This is where a section parks sidebar rows that get torn down and recreated after the initial build
(ControlsTab's "Shortcut 1" / "Shortcut 2" rows). Those rows are deliberately skipped by the
build-time walk so they live only here, and every rebuild swaps the dynamic part out completely.This is the fix for the regression where typing "sho" stopped highlighting rebuilt shortcut rows: the recreated rows' inline registration no-ops outside the build scope, and the base targets kept pointing at the removed labels. Re-publishing the current rows into the dynamic part — replacing, not appending — keeps highlight targets in sync with the live rows.
matches is true for an empty query, or when any base or dynamic string/target matches.setDynamic replaces the dynamic part: targets for removed rows are dropped (no stale
targets), and newly-added rows become searchable immediately.highlightMatches / clearHighlights drive both base and dynamic targets.Mirrors SettingsSectionSearchContentTests.swift 1:1.
setDynamic drives a match.highlightMatches.clearHighlights reverts dynamic targets too.