Go to file
Jason Stirnaman f084fe3a31
Ask AI group filters (#6529)
* feat(askai): add Kapa.ai source group filtering for InfluxDB v3

- Add ai_source_group_ids field to all InfluxDB v3 products in data/products.yml
- Add getProductSourceGroupIds() function to retrieve source group IDs from product data
- Enables filtered AI responses using Kapa source groups for documentation pages
- Follows existing pattern for dynamic product configuration
- Implement version-specific config support (__v1, __v2 suffixes)
- Append version hints to example questions for InfluxDB database products only
- Make example questions generic (remove product-specific names)
- Tools (Telegraf, Chronograf, Kapacitor, Flux, Explorer) display questions without version hints
- Pre-fills chat input with [version: /path/] for InfluxDB database products
- Users can easily edit or remove the pre-filled text
- Works for manual opens (Cmd+K) and programmatic opens
- Converts module to TypeScript

* refactor(ask-ai): change version format to 'My version: <product name>'

Use human-readable product names instead of URL paths for better UX.
Example: 'My version: InfluxDB 3 Core' instead of '[version: /influxdb3/core/]'

* fix(ask-ai): restore working Kapa.open() pre-fill implementation

- Replace textarea detection with direct Kapa.open() call
- Add Kapa preinitialization code
- Use click handler on .ask-ai-open button with capture phase
- Handle conversation reset event to re-fill version context
- Remove console logging for cleaner production code

* fix(ask-ai): remove parentheses from example questions for consistency

Make example question format match the pre-fill format:
- Before: 'question (My version: product)'
- After: 'question My version: product'

This ensures users don't think there's a difference between the two formats.

* fix(askai): add Explorer product mapping for Ask AI widget

- Add influxdb3_explorer mapping to getCurrentProductData()
- Add explorer context to getContext() function
- Ensures Explorer pages use correct ai_sample_questions from products.yml
- Reorder Explorer questions with 'install and run' first

This fixes the issue where Explorer Ask AI widget was showing wrong
example questions by properly loading the influxdb3_explorer config.

* test(page-context): add comprehensive e2e tests for product mappings

Add Cypress tests to validate page-context.js correctly identifies:
- Product context values for all InfluxDB products
- Product data from products.yml configuration
- Version information
- AI sample questions and source group IDs
- Placeholder host values

Tests cover:
- InfluxDB 3 (Core, Enterprise, Explorer, Cloud variants, Clustered)
- InfluxDB v2 and v1
- InfluxDB Cloud (TSM)
- Tools (Telegraf, Chronograf, Kapacitor, Flux)

Validates the fix for Explorer Ask AI showing correct example questions.

Related to #jts-askai-group-filters branch work.

* feat(test): add --no-mapping flag to e2e test runner

Allow running functionality tests without requiring content file paths.
The --no-mapping flag skips content-to-URL mapping, making it easier
to run tests that don't depend on specific content files.

Usage:
  # With content mapping (for content-specific tests)
  node run-e2e-specs.js content/influxdb3/core/_index.md

  # Without content mapping (for functionality tests)
  node run-e2e-specs.js --spec cypress/e2e/page-context.cy.js --no-mapping

Benefits:
- Simplifies running functionality tests like page-context.cy.js
- Reduces test startup time by skipping unnecessary file mapping
- Makes test commands clearer about their purpose

The page-context test was updated to work correctly with this flag.

* deps: update caniuse and related hook files

* test: Add a `--no-mapping` flag to run tests without specific content files (i.e., test contains all the URLs it needs)

* chore(ask-ai): Format example questions

* test(page-context): add comprehensive e2e tests for all products in products.yml

- Expanded test suite from 6 to 27 tests covering all products
- Added tests for InfluxDB 3 products (Explorer, Core, Enterprise, Cloud Serverless, Cloud Dedicated, Clustered)
- Added tests for InfluxDB v2 and Cloud (TSM)
- Added tests for InfluxDB v1 and Enterprise v1
- Added tests for other products (Telegraf, Chronograf, Kapacitor, Flux)
- Validates page mappings in page-context.js
- Validates AI sample questions configuration in products.yml
- All 27 tests passing

* fix(page-context): correct enterprise_influxdb URL pattern matching

- Changed pattern from /enterprise_v1/ to /enterprise_influxdb/
- Fixes Ask AI example questions not showing correctly for Enterprise v1
- Pattern now matches actual URL structure /enterprise_influxdb/v1/
- All 27 e2e tests passing

* test(page-context): add UI validation for Ask AI widget configuration

- Added 4 tests checking Kapa widget script data attributes
- Tests verify data-modal-example-questions contains correct product-specific questions
- Validates Explorer, Core, Enterprise, and Enterprise v1 configurations
- All 31 tests passing (27 existing + 4 new UI tests)

* feat(ask-ai): add help in Ask AI widget placeholder

- InfluxDB placeholder recommends specifying product and version
- Fix page-context.js to use products.influxdb_cloud instead of products.cloud
- Add UI tests verifying version-specific naming in Kapa widget script tags

* feat(ask-ai): Tailors placeholder for each version/product. Disables "Viewing <product>" in disclaimer note.
2025-11-18 16:43:02 -06:00
.ci fix(influxdb3): influxdb3 install package command syntax and details (#6512) 2025-11-04 23:04:44 -06:00
.circleci Updated config.yml 2025-09-15 14:19:11 -05:00
.claude Jts agentsmd (#6486) 2025-10-28 07:20:13 -05:00
.context chore(qol): Add .context to store ephemeral, external, or temp files that LLMs can use to help with docs management. Move plans to .content/plans, untracked. 2025-07-01 12:43:17 -05:00
.github Ask AI group filters (#6529) 2025-11-18 16:43:02 -06:00
.husky/_ Ask AI group filters (#6529) 2025-11-18 16:43:02 -06:00
.vscode InfluxDB 3.4 offline tokens (#6346) 2025-08-28 07:03:03 -06:00
api-docs chore(deps): bump js-yaml from 4.1.0 to 4.1.1 in /api-docs 2025-11-14 18:17:12 +00:00
assets Ask AI group filters (#6529) 2025-11-18 16:43:02 -06:00
config chore(analytics): Migrate to GA4 Google tag. If on the local server, use debug mode and prevent tracking. Add the www.influxdata.com Google tag script. Remove the conditional from header.html. Remove the old, unused GTM ID 2025-06-25 21:47:48 -05:00
content Ask AI group filters (#6529) 2025-11-18 16:43:02 -06:00
cypress Ask AI group filters (#6529) 2025-11-18 16:43:02 -06:00
data Ask AI group filters (#6529) 2025-11-18 16:43:02 -06:00
deploy hotfix: Add support for .msi and .pqx file types 2025-10-27 19:19:00 -04:00
flux-build-scripts fix(JS): Rename CommonJS scripts to .cjs extension, keep type: module as the project default. Update and fix ESLint configuration. 2025-05-19 11:34:42 -05:00
helper-scripts Automate plugin documentation sync workflow between influxdb3_plugins and docs-v2 (#6329) 2025-10-20 17:18:34 -05:00
layouts Ask AI group filters (#6529) 2025-11-18 16:43:02 -06:00
scripts chore(docs): Redesign docs CLI tools for creating and editing content, add content/create.md tutorial page for the How to creat… (#6506) 2025-11-03 10:18:15 -06:00
shared/text chore(test): Remove shared code sample 2025-07-08 00:25:03 -05:00
static chore(powerbi): update powerbi pqx to latest version 2025-11-10 11:45:18 -06:00
telegraf-build fix(telegraf): Aggregator typo and intro 2025-09-23 13:39:08 -05:00
test chore: always verify GPG fingerprint 2025-07-09 10:13:29 -05:00
.editorconfig chore(ci): Improve CI lint and test runners 2024-06-21 18:41:07 -05:00
.frontmatter-schema.json feat(v3): WIP: Revise API specs for Core and Enterprise 2025-02-25 17:08:05 -06:00
.gitignore Jts agentsmd (#6486) 2025-10-28 07:20:13 -05:00
.mcp.json docs: Add .mcp.json config file for Docs MCP 2025-09-09 11:16:39 -05:00
.nvmrc End-to-end testing, CI script, and JavaScript QoL improvements: 2025-05-19 09:50:33 -05:00
.prettierignore Merge pull request #6079 from influxdata/chore-js-refactor-footer-scripts-modules 2025-06-09 14:40:37 -05:00
.prettierrc.yaml chore: Write data improvements 2024-06-24 15:42:10 -05:00
.remarkrc.yaml Jts contrib and linting fixes (#6494) 2025-10-27 20:24:25 -05:00
.s3deploy.yml added font file extensions to s3deploy caching config 2019-01-19 08:30:43 -07:00
.vale-instructions.ini Jts contrib and linting fixes (#6494) 2025-10-27 20:24:25 -05:00
.vale.ini chore(ci): Improve pre-commit hook, test harness, and linter 2024-07-23 15:08:28 -05:00
AGENTS.md chore(instructions): Agents file initial commit (#6492) 2025-10-27 19:59:08 -05:00
CLAUDE.md chore(instructions): restructure contributing instructions for humans and assistants 2025-10-08 15:48:44 -05:00
DOCS-CONTRIBUTING.md Jts contrib and linting fixes (#6494) 2025-10-27 20:24:25 -05:00
DOCS-FRONTMATTER.md Apply suggestion from @jstirnaman 2025-10-08 16:46:00 -05:00
DOCS-SHORTCODES.md chore(docs): Redesign docs CLI tools for creating and editing content, add content/create.md tutorial page for the How to creat… (#6506) 2025-11-03 10:18:15 -06:00
DOCS-TESTING.md chore(instructions): restructure contributing instructions for humans and assistants 2025-10-08 15:48:44 -05:00
Dockerfile.pytest chore: always verify GPG fingerprint 2025-07-09 10:13:29 -05:00
Dockerfile.tests chore(ci): Improve pre-commit hook, test harness, and linter 2024-07-23 15:08:28 -05:00
LICENSE added license and issue template, moved security.md 2019-10-07 10:27:36 -06:00
PLATFORM_REFERENCE.md chore(enterprise_influxdb): specify Enterprise v1 and remove new sign… (#6485) 2025-10-24 12:52:47 -05:00
README.md chore(docs): Redesign docs CLI tools for creating and editing content, add content/create.md tutorial page for the How to creat… (#6506) 2025-11-03 10:18:15 -06:00
broken_links_report.json fix(ci): resolve link validation workflow false failures 2025-07-28 22:39:40 -05:00
compose.yaml fix(influxdb3): influxdb3 install package command syntax and details (#6512) 2025-11-04 23:04:44 -06:00
cypress.config.js chore(ci): Removes old Cypress link checker test code 2025-08-18 10:51:57 -05:00
eslint.config.js Jts agentsmd (#6486) 2025-10-28 07:20:13 -05:00
hugo_stats.json fix: remove buffer-mem-limit-mb (#6341) 2025-08-27 08:32:06 -06:00
install-influxdb3-core.sh InfluxDB 3 Core & InfluxDB 3 Enterprise alpha release (#5760) 2025-01-13 07:21:11 -07:00
install_influxdb3.sh Core and Ent3 performance tuning guide and configuration options (#6421) 2025-10-21 13:14:31 -05:00
lefthook.yml fix(lint): disable remark formatting for content files to preserve GitHub Alerts (#6502) 2025-10-31 14:07:01 -05:00
package.json chore(deps): bump js-yaml from 4.1.0 to 4.1.1 2025-11-14 18:05:18 +00:00
tsconfig.json feat(influxdb): Version detector shortcode triggers a modal 2025-09-30 19:01:21 -05:00
yarn.lock Ask AI group filters (#6529) 2025-11-18 16:43:02 -06:00

README.md

InfluxData Product Documentation

This repository contains the InfluxData product documentation for InfluxDB and related tooling published at docs.influxdata.com.

Contributing

We welcome and encourage community contributions. For information about contributing to the InfluxData documentation, see Contribution guidelines.

Testing

For information about testing the documentation, including code block testing, link validation, and style linting, see Testing guide.

Documentation Tools

This repository includes a docs CLI tool for common documentation workflows:

# Create new documentation from a draft
npx docs create drafts/new-feature.md --products influxdb3_core

# Edit existing documentation from a URL
npx docs edit https://docs.influxdata.com/influxdb3/core/admin/

# Add placeholder syntax to code blocks
npx docs placeholders content/influxdb3/core/admin/upgrade.md

# Get help
npx docs --help

The docs command is automatically configured when you run yarn install.

Documentation

Comprehensive reference documentation for contributors:

Reporting a Vulnerability

InfluxData takes security and our users' trust very seriously. If you believe you have found a security issue in any of our open source projects, please responsibly disclose it by contacting security@influxdata.com. More details about security vulnerability reporting, including our GPG key, can be found at https://www.influxdata.com/how-to-report-security-vulnerabilities/.

Running the docs locally

  1. Clone this repository to your local machine.

  2. Install NodeJS, Yarn, Hugo, & Asset Pipeline Tools

    The InfluxData documentation uses Hugo, a static site generator built in Go. The site uses Hugo's asset pipeline, which requires the extended version of Hugo along with NodeJS tools like PostCSS, to build and process stylesheets and JavaScript.

    To install the required dependencies and build the assets, do the following:

    1. Install NodeJS

    2. Install Yarn

    3. In your terminal, from the docs-v2 directory, install the dependencies:

      cd docs-v2
      yarn install
      

      Note: The most recent version of Hugo tested with this documentation is 0.149.0.

      After installation, the docs command will be available via npx:

      npx docs --help
      
  3. To generate the API docs, see api-docs/README.md.

  4. Start the Hugo server

    Hugo provides a local development server that generates the HTML pages, builds the static assets, and serves them at localhost:1313.

    In your terminal, start the Hugo server:

    npx hugo server
    
  5. View the docs at localhost:1313.

Alternative: Use docker compose

  1. Clone this repository to your local machine. See how to clone a repository.

  2. Follow the instructions to install Docker Desktop and Docker Compose to your local machine.

  3. Use Docker Compose to start the Hugo server in development mode--for example, enter the following command in your terminal:

    docker compose up local-dev
    
  4. View the docs at localhost:1313.