Keep always-on instructions concise and route specialized work through focused skills. Split large skills into progressive references and add dedicated change, desktop, sync, and performance guidance.
2.1 KiB
2.1 KiB
Settings Search
Settings search uses an explicit registry; it does not scrape JSX.
Required Integration
- Add/update items in
packages/ui/src/lib/settings/search.ts. - Add a matching
data-settings-item="..."anchor to the rendered setting. - Use localized labels/descriptions from every
packages/ui/src/lib/i18n/messages/*.settings.tsdictionary. - For a new top-level page, add metadata in
packages/ui/src/lib/settings/metadata.tsand searchable content unless the page is purely navigational.
Registry Rules
- Index stable controls, section headers, and static create/connect actions.
- Use IDs matching page and target, such as
appearance.language. - Prefer the visible label key as
titleKey. - Add
descriptionKeyonly when it improves context. - Add useful synonyms/acronyms as keywords.
- Do not generate items for dynamic entities such as individual agents, providers, projects, skills, hosts, or sessions.
Conditional Targets
- Do not index a target hidden behind selected-entity state unless search selection prepares that state first.
- Keep item
isAvailableidentical to actual render visibility. - Put page-level availability in
metadata.tsand item-specific guards insearch.ts. - Distinguish desktop shell from local desktop origin when the feature requires local privileges.
- For split pages, index predictable static surfaces and update
prepareSettingsSearchTargetwhen a result must open a draft/editor before highlighting.
Highlight Anchor
- Put
data-settings-itemon the smallest stable container that visually owns the setting. - Do not add layout-only wrappers solely for search.
- Keep highlight styling token-based and subtle; it lives under
[data-settings-search-highlight="true"]inpackages/ui/src/index.css.
Audit
- Every registry ID has a matching anchor.
- Every title/description key exists in every Settings locale.
- Every non-navigational page has appropriate coverage.
- Search visibility matches platform/runtime/mobile rendering.
- Conditional state is prepared before highlight.
- Empty-query Settings navigation remains unchanged.