Problem
Browser product detection duplicates product metadata across data/products.yml, assets/js/page-context.ts, and assets/js/utils/product-mappings.ts.
InfluxDB 3 Cloud was added to data/products.yml, but /influxdb3/cloud/ was not added to the hardcoded browser mappings. As a result, page-context returns other for these pages. Ask AI cannot read the influxdb3_cloud ai_sample_questions, ai_input_placeholder, or ai_source_group_ids values and uses its generic defaults instead.
This drift is easy to repeat whenever a product or content path is added or renamed.
Proposed direction
Use data/products.yml as the canonical source for mapping documentation paths to product keys and product configuration. Pass or generate the browser-compatible mapping from that data, and have page-context and other consumers use one shared lookup rather than maintaining separate regular-expression and fallback tables.
Keep product-specific URL-service selection separate if it cannot be derived from product metadata, but do not duplicate documentation content-path-to-product-key mappings.
Acceptance criteria
- /influxdb3/cloud/ resolves to the influxdb3_cloud product configuration in browser page context.
- Ask AI uses the InfluxDB 3 Cloud sample questions, input placeholder, and source-group configuration from data/products.yml.
- Product path lookup has one canonical source derived from data/products.yml.
- Adding a product with a content_path does not require updating multiple hardcoded path maps.
- Automated tests verify the resolved product key or configuration, not only the page heading.
- Tests cover every products.yml entry that has a documentation content_path, including influxdb3_cloud.
Related context
PR #7669 adds InfluxDB 3 Cloud to the interactive version detector and version documentation. The Ask AI widget uses the separate page-context mapping described here, so that PR does not address this drift.
Problem
Browser product detection duplicates product metadata across data/products.yml, assets/js/page-context.ts, and assets/js/utils/product-mappings.ts.
InfluxDB 3 Cloud was added to data/products.yml, but /influxdb3/cloud/ was not added to the hardcoded browser mappings. As a result, page-context returns other for these pages. Ask AI cannot read the influxdb3_cloud ai_sample_questions, ai_input_placeholder, or ai_source_group_ids values and uses its generic defaults instead.
This drift is easy to repeat whenever a product or content path is added or renamed.
Proposed direction
Use data/products.yml as the canonical source for mapping documentation paths to product keys and product configuration. Pass or generate the browser-compatible mapping from that data, and have page-context and other consumers use one shared lookup rather than maintaining separate regular-expression and fallback tables.
Keep product-specific URL-service selection separate if it cannot be derived from product metadata, but do not duplicate documentation content-path-to-product-key mappings.
Acceptance criteria
Related context
PR #7669 adds InfluxDB 3 Cloud to the interactive version detector and version documentation. The Ask AI widget uses the separate page-context mapping described here, so that PR does not address this drift.