# Pass 2: controls, handlers, menus, and native options

This independent pass starts with JSX event attributes, anchors, native selects/options, mapped menus, and details/summary disclosures rather than route names. The complete frontend and API source trees are parsed; `feature-tracking-source-scans.json` records all scanned files and counts. `feature-tracking-control-audit.json` preserves the dashboard/editor component sweep and initial exclusions.

Intentional click/double-click/context-menu/submit/drop actions and bounded checkbox/radio/select/file/range/color changes receive explicit source annotations. Customer text, prompts, row values, filenames, repository names, URLs, tokens, payment details, custom roles, and rendered DOM labels never define event names/properties. Typing, focus movement, hover, scroll, dragover, and propagation plumbing are excluded. Search/filter submission, enum selection, saved actions, and committed design edits remain measurable.

Static option expansion covers ask/plan/build, light/dark, sidebar groups/destinations, sources and attachment categories, known model IDs, preview device/source, database types/default booleans, form types, date ranges, filters, hosting environments, privacy/consent settings, standard/custom role categories, notification preferences, plans, design fonts, and palette swatches. Runtime values must match the immutable catalogue. Unknown future values produce no guessed category; custom role names become the fixed `custom` category.

Shared callback review covers keyboard paths that bypass button handlers: prompt send, homepage submit, question answer/dismiss, queued-message save/cancel, source queries, suggestion selection, design text/style commits and undo, plus pointer/keyboard preview resize. Native disclosures include hosting variable actions, development management, preview errors, account admin options, and analytics collection details. Anchors without original handlers now emit static categories without reading their URLs.

No-op propagation containers and row/child-button overlap were removed from tracking. Workspace selection/creation uses actual destination/returned IDs rather than the previous workspace query. Wrappers preserve handler types, return values, and async semantics; optional telemetry never blocks product actions.

Focused tests execute the real Signals queue and consent helpers. None/cookieless/replay-only/DNT/GPC/support/admin/preview-embed cases send no action events. Schema 2 carries no pathname/referrer/UTM fields, content properties, or inherited-prototype values. Authenticated unload uses keepalive fetch instead of an unauthenticated beacon, and batches drain once. Generic heatmap click capture is suppressed on dashboard/editor surfaces to prevent existing DOM-text capture from leaking customer content alongside the new events.

`node scripts/analytics/verify-feature-tracking.cjs` validates unique triples and explicit callsites. `src/lib/featureTracking.test.ts` exercises runtime/queue/consent boundaries. The one-time migration scripts were removed after annotations were reviewed; the catalogue and source annotations are maintained together. Root owns the remaining audit passes and real browser evidence.

Corrected final source audit on 2026-11-20: 403 frontend files and 505 API files scanned; 1,751 unique action triples, 35 feature categories, 85 catalogue source files, and 668 explicit source annotations. The later semantic option audit supersedes the earlier 954-action count. The verifier reported zero failures; focused runtime/privacy and native-auth tests passed 24 of 24.
