Commit Graph

446 Commits (c99c2e87ed8d0ea7c9ae4040716ecdfc6bafdcf7)

Author SHA1 Message Date
Copilot 15e8f67683
resolve conflicts: merge copilot/fix-broken-docker-link into copilot/resolve-conflicts (#6976)
* Initial plan

* Add aliases to fix broken Docker Hub links to serve documentation

Co-authored-by: jstirnaman <212227+jstirnaman@users.noreply.github.com>

* fix(influxdb3): correct broken links causing 404s (#6958)

- Fix Power BI links in visualization-tools.md for cloud-dedicated,
  cloud-serverless, and clustered to use new visualize-data/ path
  instead of old process-data/visualize/ path
- Fix influxctl cluster list link in cloud-dedicated/admin/clusters/list.md
  to include missing cluster/ path segment

https://claude.ai/code/session_01SV14CdHN4GGVuATt9n7STn

Co-authored-by: Claude <noreply@anthropic.com>

* fix(influxdb3): backfill missing product URLs in localStorage (#6961)

* fix(influxdb3): backfill missing product URLs in localStorage

Returning visitors with stale localStorage (created before core/enterprise
products were added) had undefined URL values for new products. The
updateUrls() function then replaced Hugo-rendered hostnames like
localhost:8181 with the string "undefined" in api-endpoint blocks.

Fix by merging DEFAULT_STORAGE_URLS as fallbacks when reading from
localStorage, so new product keys are always present.

closes #6960

https://claude.ai/code/session_01GJZ2yMR5DBk1feqTD5LeHW

* test(influxdb3): add Cypress tests for localStorage URL backfill

Adds 2 E2E tests for the fix in #6960:

1. Stale localStorage (missing `core` key) should not cause "undefined"
   to appear in api-endpoint or code blocks on the plugins page.
2. Fresh localStorage should be initialized with all expected product
   URL keys (oss, cloud, core, enterprise, serverless, dedicated, clustered).

Run with:
  node cypress/support/run-e2e-specs.js --spec "cypress/e2e/influxdb-url.cy.js" --no-mapping

https://claude.ai/code/session_01GJZ2yMR5DBk1feqTD5LeHW

---------

Co-authored-by: Claude <noreply@anthropic.com>

* Remove `>` CLI prompts from runnable code blocks in InfluxQL/Flux/MongoDB docs (#6948)

* Initial plan

* fix(docs): remove > prompt from runnable code blocks

Remove leading `>` CLI prompt characters from code blocks that are meant
to be executed by users. Only keep `>` in code blocks that demonstrate
console output (showing both the command at the prompt AND the result output).

Changes affect 34 files across InfluxDB v1, Enterprise InfluxDB, shared
influxql-v3 reference, and Telegraf content:
- InfluxQL queries and management commands (sql/bash/no-lang blocks)
- Flux REPL examples (js blocks)
- MongoDB shell commands (shell blocks)

Preserved (unchanged):
- Console session blocks showing command + output (Type B: mixed > and non-> lines)
- Telegraf metric output blocks (text language with > measurement,tags format)
- diff blocks with < and > diff markers

Co-authored-by: jstirnaman <212227+jstirnaman@users.noreply.github.com>

* Apply suggestions from code review

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Apply suggestions from code review

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Update content/enterprise_influxdb/v1/query_language/continuous_queries.md

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jstirnaman <212227+jstirnaman@users.noreply.github.com>
Co-authored-by: Jason Stirnaman <jstirnaman@influxdata.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Add agentic workflow daily-repo-status (#6963)

* PR workflow: Improve review status signals and reduce noise (#6938)

* Initial plan

* Improve PR review workflow status signals and add agent personas

- Add Job 4 (report-skipped) to explicitly report when visual review is skipped
- Update resolve-review-urls.js to output skip status and reason
- Add clear agent persona headers to all bot comments (Preview Bot, Doc Review Bot)
- Reduce URL duplication by having visual review reference PR Preview comment
- Update copilot-visual-review.md template with completion signal format
- Add consistent status tables with emojis for clear at-a-glance status

Co-authored-by: jstirnaman <212227+jstirnaman@users.noreply.github.com>

* Address code review feedback

- Remove unnecessary comment about fallback default in resolve-review-urls.js
- Use plain text sanitization for skip reasons in preview comments
- Add clarifying comment about string comparison in GitHub Actions outputs

Co-authored-by: jstirnaman <212227+jstirnaman@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jstirnaman <212227+jstirnaman@users.noreply.github.com>
Co-authored-by: Jason Stirnaman <jstirnaman@influxdata.com>

* Initial plan

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jstirnaman <212227+jstirnaman@users.noreply.github.com>
Co-authored-by: Jason Stirnaman <jstirnaman@influxdata.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-22 09:13:27 -05:00
Jason Stirnaman ab8223d11e
fix(ui): fix Ask AI code control and add e2e tests (#6955)
* feat(ui): add Ask AI to code block controls menu

Add an "Ask AI" option to the code controls dropdown menu on all code
blocks. Uses data-ask-ai-query attribute if provided by the template,
otherwise builds a query from the code content. Delegates to the
existing Kapa widget integration via the ask-ai-open click handler.

* fix(ui): fix Ask AI code control and add e2e tests

## Summary

- Add "Ask AI" option to the code controls dropdown (three-dot menu) on all code blocks
- Uses `data-ask-ai-query` attribute from the template if available, otherwise builds a query from the code content
- Delegates to the existing Kapa widget via the `ask-ai-open` click handler contract
- Reorder menu items: Copy → Ask AI → Fill window

## Bug fix

Fix Ask AI button not opening the Kapa widget. jQuery `.trigger('click')`
doesn't dispatch native DOM events, so the native
`document.addEventListener` in ask-ai-trigger.js never received the click.
Switch to native `.click()` and remove `href="#"` to prevent scroll-to-top.

## Tests

Add Cypress e2e test suite (`code-controls.cy.js`) with 16 tests covering:
- Initialization: code blocks wrapped, controls appended, menu item order
- Toggle: open/close on click, close on outside click, independent menus
- Copy to clipboard: success lifecycle, revert after timeout
- Fullscreen: modal open/close, body scroll lock, placeholder restore
- Ask AI: Kapa modal opens, query built with code content (MutationObserver)

* fix(ui): apply icon spacing to all code control menu items

Move .cf-icon margin-right rule from .copy-code and .fullscreen-toggle
to the shared li level so it applies to all menu items including Ask AI.

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* fix(ui): add keyboard accessibility to code controls menu

Replace clickable <span> and <li> elements with proper <button> elements
and ARIA roles for keyboard and assistive-technology access:

- Toggle: <span> → <button> with aria-label and aria-expanded
- Menu items: <li> → <li role="none"><button role="menuitem">
- Menu: <ul> gets role="menu"
- SCSS: add :focus-visible styles, reset button defaults
- JS: toggle handler updates aria-expanded on open/close

Also fix tests to match actual behavior:
- Remove bogus "close other menus" test that manually closed first menu
  before opening second (tested nothing)
- Remove duplicate "close on re-click" test (same as outside-click)
- Add "keep menu open when copy is clicked" (stopPropagation behavior)
- Add accessibility markup validation test

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-16 21:05:47 -05:00
Jason Stirnaman 61161cc280
feat(ent3): add experimental badge for --use-pacha-tree (#6857)
* fix(ent3): Add link target and experimental caution for PachaTree option.

* feat(ent3): add experimental badge for --use-pacha-tree

Document the experimental PachaTree storage engine option with a
styled badge and caution callout. Add reusable .badge.experimental
class using the existing caution color palette for light/dark modes.

- Add experimental badge to serve options table and config-options
- Add badge theme variables referencing $article-caution-* colors
- Use custom heading ID to preserve #use-pacha-tree anchor
2026-02-23 14:58:35 -06:00
Jason Stirnaman b4a0eea0a3
feat: add InfluxDB documentation MCP server integration (#6830)
* chore(deps): update yarn dependencies

Run yarn to update lockfile with latest compatible versions.

* feat: add InfluxDB documentation MCP server integration

- Enable MCP widget in Ask AI (data-mcp-enabled, data-mcp-server-url)
- Restructure mcp-server.md with anchor TOC for database and docs MCP
- Add documentation MCP server page for products without database MCP:
  - cloud-serverless, clustered, v2, cloud (TSM), telegraf
  - Place in Reference section (or telegraf_v1_ref menu)
- Add shared content file for docs-only MCP server
- Add "Connect to documentation MCP" link in format-selector dropdown
- Add related MCP links to all get-started/setup pages

* fix: correct JSON syntax and product-aware MCP docs URL

- Fix JSON syntax errors in Cloud Dedicated config examples (= → :)
- Add missing comma in Docker args array for local server config
- Make format-selector MCP docs URL product-aware using Hugo path detection

* docs: add MCP pages for v1 products, fix menu, add screenshot

- Fix cloud-serverless identify-version menu parent to "Administer InfluxDB Cloud"
- Add MCP server pages for influxdb/v1 and enterprise_influxdb/v1 in Tools menu
- Update format-selector with v1 and enterprise_influxdb/v1 MCP docs paths
- Add MCP tool search screenshot showing search_influxdb_knowledge_sources

* Update content/influxdb3/cloud-serverless/get-started/setup.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update content/telegraf/v1/mcp-server.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-17 20:42:56 -06:00
Scott Anderson 39508ff6f1
feat(feature-boards): embed product feature boards in the docs (#6767)
Co-authored-by: Jason Stirnaman <jstirnaman@influxdata.com>
2026-01-30 12:41:02 -07:00
Jason Stirnaman 68f00e6805
fix(version-detector): centralize Grafana links and DRY up host examples (#6693)
* fix(version-detector): use centralized getGrafanaLink for all Grafana URLs

Refactor handleAuthorizationHelp to use getGrafanaLink() instead of
hardcoded URLs, ensuring all Grafana links come from a single source.

Also fix incorrect URLs in getGrafanaLink mapping:
- InfluxDB OSS 2.x: /visualize-data/ → /tools/
- InfluxDB Enterprise: /influxdb/enterprise/ → /enterprise_influxdb/v1/
- InfluxDB Cloud (TSM): /visualize-data/ → /tools/
- InfluxDB Cloud v1: now links to Enterprise v1 docs (Cloud v1 is
  Enterprise under the hood)

* refactor(version-detector): DRY up localhost:8086 references

Extract HOST_EXAMPLES to a class-level constant and add DEFAULT_HOST
and DEFAULT_HOST_PORT constants to eliminate duplicate localhost:8086
strings throughout the code.

- Move hostExamples from local variable to class constant
- Use DEFAULT_HOST for URL placeholder and comparison checks
- Use DEFAULT_HOST_PORT for docker curl command examples

* feat(ask-ai): Support source group IDs in Ask AI trigger links

* feat(version-detector): Present context-aware links

- Add ai_source_group_ids fields to ProductConfig interface
- Improve SCSS for doc and Ask AI links
- Update Grafana docs to add aliases and context param for detector
- Update modal partial to include AI source group IDs in config
- Remove custom Cypress commands for version detector
- Update E2E tests to use direct Cypress commands
2026-01-26 18:42:09 -06:00
Scott Anderson 5ade5e0178
fix(telegraf): link to plugins docs in the docs, update plugin cards (#6761) 2026-01-22 12:45:55 -07:00
Scott Anderson dc62d0d011
Telegraf Controller (alpha) Documentation (#6685)
* feat: telegraf-controller scaffolding (#6625)

* feat: telegraf-ui scaffolding

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Jason Stirnaman <jstirnaman@influxdata.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jason Stirnaman <jstirnaman@influxdata.com>

* chore: add agent management docs for telegraf controller (#6635)

* chore: add agent management docs for telegraf controller

* fix: apply suggestions from copilot PR review

* Apply suggestions from code review

Co-authored-by: Jason Stirnaman <jstirnaman@influxdata.com>

* chore(controller): italicize required callout

* fix(controller): fixed bad shortcode syntax

---------

Co-authored-by: Jason Stirnaman <jstirnaman@influxdata.com>

* Install Telegraf Controller (#6676)

* feat(telegraf-controller): install telegraf controller

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Manage configs with Telegraf Controller (#6681)

* chore(telegraf-controller): WIP manage configs docs

* feat(telegraf-controller): WIP manage configs

* feat(telegraf-controller): add dynamic value syntax highlighting

* feat(telegraf-controller): finish config management docs

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore(telegraf-controller): add info about updating config name and description

* chore(telegraf-controller): fix type in update config

* Apply suggestions from code review

Co-authored-by: Jason Stirnaman <jstirnaman@influxdata.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jason Stirnaman <jstirnaman@influxdata.com>

* chore(telegraf-controller): add content to telegraf controller landing page (#6684)

* chore: update search for telegraf controller

* fix(links): ignore influxdata slack links

* fix(links): skip nssm download in link checks

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jason Stirnaman <jstirnaman@influxdata.com>
2025-12-31 14:49:32 -07:00
Jason Stirnaman c2093c8212
Feature: Generate documentation in LLM-friendly Markdown (#6555)
* feat(llms): LLM-friendly Markdown, ChatGPT and Claude links.

This enables LLM-friendly documentation for entire sections,
allowing users to copy complete documentation sections with a single click.

Lambda@Edge now generates .md files on-demand with:
- Evaluated Hugo shortcodes
- Proper YAML frontmatter with product metadata
- Clean markdown without UI elements
- Section aggregation (parent + children in single file)

The llms.txt files are now generated automatically during build from
content structure and product metadata in data/products.yml, eliminating
the need for hardcoded files and ensuring maintainability.

**Testing**:
- Automated markdown generation in test setup via cy.exec()
- Implement dynamic content validation that extracts HTML content and
  verifies it appears in markdown version

**Documentation**:
Documents LLM-friendly markdown generation

**Details**:
Add gzip decompression for S3 HTML files in Lambda markdown generator

HTML files stored in S3 are gzip-compressed but the Lambda was attempting
to parse compressed data as UTF-8, causing JSDOM to fail to find article
elements. This resulted in 404 errors for .md and .section.md requests.

- Add zlib gunzip decompression in s3-utils.js fetchHtmlFromS3()
- Detect gzip via ContentEncoding header or magic bytes (0x1f 0x8b)
- Add configurable DEBUG constant for verbose logging
- Add debug logging for buffer sizes and decompression in both files

The decompression adds ~1-5ms per request but is necessary to parse
HTML correctly. CloudFront caching minimizes Lambda invocations.

Await async markdown conversion functions

The convertToMarkdown and convertSectionToMarkdown functions are async
but weren't being awaited, causing the Lambda to return a Promise object
instead of a string. This resulted in CloudFront validation errors:
"The body is not a string, is not an object, or exceeds the maximum size"

**Troubleshooting**:

- Set DEBUG for troubleshooting in lambda

* feat(llms): Add build-time LLM-friendly Markdown generation

Implements static Markdown generation during Hugo build.

**Key Features:**
- Two-phase generation: HTML→MD (memory-bounded), MD→sections (fast)
- Automatic redirect detection via file size check (skips Hugo aliases)
- Product detection using compiled TypeScript product-mappings module
- Token estimation for LLM context planning (4 chars/token heuristic)
- YAML serialization with description sanitization

**Performance:**
- ~105 seconds for 5,000 pages + 500 sections
- ~300MB peak memory (safe for 2GB CircleCI environment)
- 23 files/sec conversion rate with controlled concurrency

**Configuration Parameters:**
- MIN_HTML_SIZE_BYTES (default: 1024) - Skip files below threshold
- CHARS_PER_TOKEN (default: 4) - Token estimation ratio
- Concurrency: 10 workers (CI), 20 workers (local)

**Output:**
- Single pages: public/*/index.md (with frontmatter + content)
- Section bundles: public/*/index.section.md (aggregated child pages)

**Files Changed:**
- scripts/build-llm-markdown.js (new) - Main build script
- scripts/lib/markdown-converter.cjs (renamed from .js) - Core conversion
- scripts/html-to-markdown.js - Updated import path
- package.json - Updated exports for .cjs module

Related: Replaces Lambda@Edge on-demand generation (5s response time)
with build-time static generation for production deployment.

feat(deploy): Add staging deployment workflow and update CI

Integrates LLM markdown generation into deployment workflows with
a complete staging deployment solution.

**CircleCI Updates:**
- Switch from legacy html-to-markdown.js to optimized build:md
- 2x performance improvement (105s vs 200s+ for 5000 pages)
- Better memory management (300MB vs variable)
- Enables section bundle generation (index.section.md files)

**Staging Deployment:**
- New scripts/deploy-staging.sh for local staging deploys
- Complete workflow: Hugo build → markdown gen → S3 upload
- Environment variable driven configuration
- Optional step skipping for faster iteration
- CloudFront cache invalidation support

**NPM Scripts:**
- Added deploy:staging command for convenience
- Wraps deploy-staging.sh script

**Documentation:**
- Updated DOCS-DEPLOYING.md with comprehensive guide
- Merged staging/production workflows with Lambda@Edge docs
- Build-time generation now primary, Lambda@Edge fallback
- Troubleshooting section with common issues
- Environment variable reference
- Performance metrics and optimization tips

**Benefits:**
- Manual staging validation before production
- Consistent markdown generation across environments
- Faster CI builds with optimized script
- Better error handling and progress reporting
- Section aggregation for improved LLM context

**Usage:**
```bash
export STAGING_BUCKET="test2.docs.influxdata.com"
export AWS_REGION="us-east-1"
export STAGING_CF_DISTRIBUTION_ID="E1XXXXXXXXXX"

yarn deploy:staging
```

Related: Completes build-time markdown generation implementation

refactor: Remove Lambda@Edge implementation

Build-time markdown generation has replaced Lambda@Edge on-demand
generation as the primary method. Removed Lambda code and updated
documentation to focus on build-time generation and testing.

Removed:
- deploy/llm-markdown/ directory (Lambda@Edge code)
- Lambda@Edge section from DOCS-DEPLOYING.md

Added:
- Testing and Validation section in DOCS-DEPLOYING.md
- Focus on build-time generation workflow

* feat: Add Rust HTML-to-Markdown prototype

Implements core markdown-converter.cjs functions in Rust for performance comparison.

Performance results:
- Rust: ~257 files/sec (10× faster)
- JavaScript: ~25 files/sec average

Recommendation: Keep JavaScript for now, implement incremental builds first.
Rust migration provides 10× speedup but requires 3-4 weeks integration effort.

Files:
- Cargo.toml: Rust dependencies (html2md, scraper, serde_yaml, clap)
- src/main.rs: Core conversion logic + CLI benchmark tool
- benchmark-comparison.js: Side-by-side performance testing
- README.md: Comprehensive findings and recommendations

* fix(ui): improve dropdown positioning on viewport resize

- Ensure dropdown stays within viewport bounds (min 8px padding)
- Reposition dropdown on window resize and scroll events
- Clean up event listeners when dropdown closes

* chore(deps): add remark and unified packages for markdown processing

Add remark-parse, remark-frontmatter, remark-gfm, and unified for
enhanced markdown processing capabilities.

* fix(edge): add return to prevent trailing-slash redirect for valid extensions

Without the return statement, the Lambda@Edge function would continue
executing after the callback, eventually hitting the trailing-slash
redirect logic. This caused .md files to redirect to URLs with trailing
slashes, which returned 404 from S3.

* fix(md): add built-in product mappings and full URL support

- Add URL_PATTERN_MAP and PRODUCT_NAME_MAP constants directly in the
  CommonJS module (ESM product-mappings.js cannot be require()'d)
- Update generateFrontmatter() to accept baseUrl parameter and construct
  full URLs for the frontmatter url field
- Update generateSectionFrontmatter() similarly for section pages
- Update all call sites to pass baseUrl parameter

This fixes empty product fields and relative URLs in generated markdown
frontmatter when served via Lambda@Edge.

* feat(md): add environment flag for base URL control

Add -e, --env flag to html-to-markdown.js to control the base URL
in generated markdown frontmatter. This matches Hugo's -e flag behavior
and allows generating markdown with staging or production URLs.

Also update build-llm-markdown.js with similar environment support.

* feat(md): add Rust markdown converter and improve validation

- Add Rust-based HTML-to-Markdown converter with NAPI-RS bindings
- Update Cypress markdown validation tests
- Update deploy-staging.sh with force upload flag

* deploy-staging.sh:
  - Defaults STAGING_URL to https://test2.docs.influxdata.com
  if not set
  - Exports it so yarn build:md -e staging can use it
  - Displays it in the summary

* Delete scripts/prototypes/rust-markdown/benchmark-comparison.js

* Delete scripts/prototypes directory

* fix(llms): Include full URL for section page Markdown and list of child pages

* feat(llms): clarify format selector text for AI use case

Update button and dropdown text to make the AI/LLM purpose clearer:
- Button: "Copy page for AI" / "Copy section for AI"
- Sublabel: "Clean Markdown optimized for AI assistants"
- Section sublabel: "{N} pages combined as clean Markdown for AI assistants"

Cypress tests updated and passing (13/13).

---------

Co-authored-by: Scott Anderson <scott@influxdata.com>
2025-12-01 12:32:28 -06:00
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
Jason Stirnaman 26ca68d405
Merge branch 'master' into update-grafana-docs 2025-10-06 17:34:12 -05:00
Scott Anderson c3468f667d
feat(sample-data): add new wind sample dataset (#6440)
* feat(sample-data): add new wind sample dataset

* Apply suggestions from code review

Co-authored-by: Jason Stirnaman <jstirnaman@influxdata.com>

* fix(js): fix syntax error and lint

---------

Co-authored-by: Jason Stirnaman <jstirnaman@influxdata.com>
2025-10-06 12:08:35 -06:00
Jason Stirnaman 9833b9bf90
Merge pull request #6399 from influxdata/feature/influxdb-version-detector
Feature/influxdb version detector
2025-10-04 16:03:53 -05:00
Scott Anderson 5735f5f704
feat(caches): update explorer docs with information about querying LVCs and DVCs (#6437) 2025-10-01 09:43:16 -06:00
Jason Stirnaman 2690de8a72
Merge branch 'master' into feature/influxdb-version-detector 2025-10-01 10:38:32 -05:00
Scott Anderson 1b1e78eb0b
chore(docker): add notice about docker latest tag changes (#6435)
* chore(docker): add notice about docker latest tag changes

* chore(docker): added more to the notification exclude list
2025-10-01 08:03:08 -06:00
Jason Stirnaman e93e78be0a feat(influxdb): Version detector shortcode triggers a modal
Creates an interactive InfluxDB version detector component in TypeScript and a shortcode that generates a button to trigger
the version detector modal.
The shortcode takes a parameter that displays a predefined set of links for results.
- Support URL pattern matching and ping header analysis
- Add questionnaire-based product identification logic
- Adds the shortcode in a note in /influxdb3/core/visualize-data/grafana/
- Set up TypeScript configuration for the project
  - Configure automatic TypeScript compilation in pre-commit hooks
- Add to Grafana documentation pages
- Remove last remnants of old Cypress link checker
- Add Cypress tests, but many are still broken

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Apply suggestions from code review

Co-authored-by: Scott Anderson <sanderson@users.noreply.github.com>

Update layouts/shortcodes/influxdb-version-detector.html

Co-authored-by: Scott Anderson <sanderson@users.noreply.github.com>

Update assets/js/influxdb-version-detector.ts

Co-authored-by: Scott Anderson <sanderson@users.noreply.github.com>

Update assets/styles/components/_influxdb-version-detector.scss

Co-authored-by: Scott Anderson <sanderson@users.noreply.github.com>

Fixes:
- Fix Hugo template to include product names in detector config
- Change elimination scores from -100 to -1000 for proper filtering
- Add scoring logic for generic "InfluxDB" product (OSS v2.x)
- Exclude generic "InfluxDB" from results (too vague)
- Add comprehensive test scenario checklist to Cypress tests
- Free license now correctly excludes Enterprise, Clustered, Dedicated
- Self-hosted now correctly excludes all Cloud products
- SQL language now correctly excludes v1 and v2 products
- Results now show only specific products (OSS 1.x, OSS 2.x, etc.)
Changes:
- When users answer "I'm not sure" to all questions, show a helpful
message directing them to the reference table instead of showing
a weak ranking with low confidence.
- Detect when all questionnaire answers are "unknown"
- Display custom message explaining lack of information
- Auto-expand reference table for easy product identification
- Hide ranked results when insufficient information provided
- Make product names clickable in the quick reference table to allow
users to quickly navigate to product documentation after identifying
their InfluxDB version.
2025-09-30 19:01:21 -05:00
Jason Stirnaman 3e4864a836 Instructions files cleanup:
- Follow Copilot guidelines for naming instructions files according to the directory they apply to
- Copy instructions files as CLAUDE.md to the relevant directory.
- Update placeholder instructions
- Optimize Copilot instructions
- Remove Claude instructions and reference the Copilot instructions file instead

TODO: update the commit hook script to correctly generate and place the files.
2025-09-23 10:37:10 -05:00
Jason Stirnaman 69068a64bf fix(askai): Ask AI modal position and font:Removes Ask AI modal style overrides to correct positioning in the window.
For API reference docs, decreases the trigger button size and fixes the button and modal font.
2025-09-03 17:38:03 -05:00
Jason Stirnaman 44a2c95518 fix(askai): adjust X modal position for desktop widths 2025-09-02 16:28:44 -05:00
Jason Stirnaman f1c5a0b408 hotfix: minor change to invalidate JS 2025-09-02 14:17:41 -05:00
Scott Anderson ebe1ec9750
InfluxDB 3 Explorer 1.2 (#6350)
* feat(explorer): WIP cache management docs

* feat(explorer): add cache management guides, fix js bugs

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-29 08:44:59 -06:00
Jason Stirnaman 999d16e821 hotfix(analytics): typo 2025-07-14 13:11:24 -05:00
Scott Anderson 51e75e2ad6 Merge branch 'master' into explorer-ga 2025-06-27 23:08:23 -06:00
Scott Anderson 050c971de7
updated explorer messaging from beta to ga (#6152) 2025-06-26 11:36:55 -05:00
Jason Stirnaman d20492b6fe 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
Jason Stirnaman 7d6ae51183 chore(enterprise3): Strongly recommend to provide the email address when using Docker, especially Docker Compose, in order for license generation to complete:
- Install Enterprise
- Admin license
- If only one pagination button (prev or next), allow it to fill the width.
- Combines core and enterprise install into a shared page.
2025-06-17 16:50:55 -05:00
Scott Anderson f38ca674bf
Add release artifacts to Clustered release notes (#6132)
* WIP add build artifacts to clustered release notes

* added artifacts helper script, added artifacts, added artifact links to clustered release notes

* add instructions for downloading release artifacts manually

* added jq installation links
2025-06-10 16:57:08 -05:00
Jason Stirnaman 377a157faa chore(js): Cleanup and add note about list-filters 2025-06-09 17:45:36 -05:00
Jason Stirnaman 8193057986
Update assets/js/datetime.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-09 17:17:34 -05:00
Jason Stirnaman 3609fc9c92 chore(ci): Fail the commit if a module imports or uses debug helpers 2025-06-09 17:12:40 -05:00
Jason Stirnaman ad85c958d0
Merge branch 'master' into chore-js-refactor-footer-scripts-modules 2025-06-09 16:48:48 -05:00
Jason Stirnaman 717ec5cd1d chore(js): Extract Hugo params imports to single-purpose modules, fix environment-specific Hugo configs, use Hugo environments instead of specifying the config file, configure source maps and ESM for development and testing 2025-06-09 16:46:26 -05:00
Jason Stirnaman cd087af85d chore(js): Format fixes 2025-06-09 14:42:38 -05:00
Jason Stirnaman 4973026adf Merge pull request #6079 from influxdata/chore-js-refactor-footer-scripts-modules
Chore: JavaScript: refactor footer scripts modules
2025-06-09 14:40:37 -05:00
Jameelah Mercer b91612f987
Merge branch 'master' into docs/generalize-grafana-multinode 2025-06-09 06:15:32 -07:00
Scott Anderson 48b7025fda
removed references to OCI in clustered, fix toc-contents js, closes influxdata/DAR#503 (#6125) 2025-06-05 17:38:26 -05:00
Jason Stirnaman f819f48de9
Revert "Chore: JavaScript: refactor footer scripts modules" 2025-06-05 09:46:37 -05:00
Jason Stirnaman 6b424ef106
Merge branch 'master' into chore-js-refactor-footer-scripts-modules 2025-06-04 17:10:11 -05:00
Maya Strandboge 18b78b7214
Release influxctl v2.10.1 (#6115)
* Release influxctl v2.10.1

* influxctl 2.10.1 release notes

* corrected influxctl version number

---------

Co-authored-by: Scott Anderson <sanderson@users.noreply.github.com>
Co-authored-by: Scott Anderson <scott@influxdata.com>
2025-06-04 16:15:52 -05:00
Scott Anderson ef5fc1862e updated js syntax and resolved merge conflicts 2025-06-04 14:51:27 -06:00
Jason Stirnaman aac841a749 fix(ci): Disable unnecessary SCSS processing when building JS assets.
- Build resources if not cached
- Ensure node_modules dependencies are available for asset processing
- Be more precise in the template when building assets in production mode and avoid conflicts with SCSS and CSS processing.
- Ignore node_modules when loading source maps
- Add .vscode/launch.json with debugging configuration for localhost:1313. In VSCode, go to Run and select the site to launch Chrome, connect to Developer Tools, and start debugging.
- Add support for debugging in VS Code without using source maps. Adds a debug helpers module for developers to use in IDE debugging and interact with the browser console. This is a workaround for lack of good source map support with js.Build and the Hugo asset pipeline.

Background:
Hugo and js.Build don't have good support for external source maps.
Internal source mapping is also unreliable; the base64 in the source map reference for some files is too long for the browser console to keep on 1 line--remaining characters are printed on the next line, resulting in a syntax error.
2025-06-04 14:21:26 -05:00
Jason Stirnaman f908bab51f Update assets/js/components/diagram.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-04 13:24:51 -05:00
Jason Stirnaman d184f45434 Update assets/js/flux-group-keys.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-04 13:24:51 -05:00
Jason Stirnaman c43df7508f chore(js): Remove unnecessary JS module config, remove redundant index.js 2025-06-04 13:24:51 -05:00
Jason Stirnaman 483b41753a fix(style): datetime shortcode text blends with dark background
- When span.current-timestamp (and related shortcodes) are children of .article--content, the text isn't visible in the dark theme--it blends with the background.
- Add specific style settings for datetime shortcodes so that the timestamp text is visible outside of a table.
2025-06-04 13:24:51 -05:00
Jason Stirnaman de585ddfe6 fix(js): datetime: import jquery, clone date before mutating, define variable 2025-06-04 13:24:51 -05:00
Jason Stirnaman 67d3044e4a Update assets/js/datetime.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-04 13:24:51 -05:00
Jason Stirnaman e3f49f6e47 Update assets/js/datetime.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-04 13:24:51 -05:00
Jason Stirnaman c214ff44a8 fix(js): Apply fixes for CoPilot suggestions. 2025-06-04 13:24:51 -05:00