src/preferences/settings-window/SettingsSearchHighlightSpecs.md
Line coverage:
SettingsSearchHighlight.swift92% · refreshed 2026-05-27 by/coverage-explore
The Settings window has its own search box that filters + highlights matching controls. Two pieces make that work and are pinned here:
NSTextField rows (sidebar) and LightLabel rows (rounded sections).TableGroupView.makeText) must, as a side
effect of construction, register its string + a highlight target into the active
SettingsSearchIndex.Builder. This push-based, scoped registration is the same contract
SidebarListRow relies on; its absence was the sidebar-search regression these tests guard.makeText registers into whatever builder is active; called outside an indexed scope (no active
builder) it silently no-ops. Content rebuilt after the section's build scope (sidebar rows recreated
by refreshShortcutRows) is therefore re-published through SettingsWindow.refreshSectionSearchContent,
which re-opens an indexed { ... } scope — see [[SettingsSectionSearchContent]].Mirrors SettingsSearchHighlightTests.swift 1:1.
LightLabel.makeText pushes its string + target into the active builder (the regression guard).makeText silently no-ops.