Skip to content

[failproofai-540] docs: add contextual menu (copy-to-LLM + ask AI) to docs pages#540

Merged
NiveditJain merged 1 commit into
mainfrom
luv-540
Jul 16, 2026
Merged

[failproofai-540] docs: add contextual menu (copy-to-LLM + ask AI) to docs pages#540
NiveditJain merged 1 commit into
mainfrom
luv-540

Conversation

@NiveditJain

@NiveditJain NiveditJain commented Jul 16, 2026

Copy link
Copy Markdown
Member

What

Enable Mintlify's per-page contextual menu (contextual in docs/docs.json) so every docs page — all tabs, all 15 locales — offers readers:

  • Copy the page as Markdown / View the raw Markdown
  • Hand the page off to ChatGPT / Claude / Perplexity
  • Open it in an MCP client / Cursor / VS Code
  • Ask a question via the AI assistant

It's a single global setting, so no per-page edits are required.

Manual follow-up (dashboard)

The assistant ("Ask a question") option only functions once the assistant is toggled on in the Mintlify dashboard (app.mintlify.com/products/assistant, Pro plan and above). The copy-to-LLM options work immediately on deploy. Mintlify has no literal per-line ask — the assistant answers about the page (and the whole docs).

Testing

Changelog

Added under ### Docs in 0.0.14-beta.1.

🤖 Generated with Claude Code

https://claude.ai/code/session_013hyh7mTnLAwixTrAeHx4gH

Summary by CodeRabbit

  • New Features

    • Added a per-page contextual menu to the documentation site.
    • Users can copy pages as Markdown, view raw Markdown, and open content in ChatGPT, Claude, Perplexity, MCP clients, Cursor, or VS Code.
    • Added an “Ask a question” option for sites with the assistant enabled.
  • Documentation

    • Documented the available contextual menu options and configuration.

… docs pages (#540)

Enable Mintlify's `contextual` menu in docs/docs.json so every docs page
(all tabs, all 15 locales) offers: copy/view as Markdown, hand-off to
ChatGPT / Claude / Perplexity, open in MCP / Cursor / VS Code, and an
"Ask a question" AI-assistant option. It's a single global setting, so no
per-page edits are needed. The `assistant` option additionally requires
enabling the assistant in the Mintlify dashboard.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013hyh7mTnLAwixTrAeHx4gH
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9e2a5b22-26af-4758-9abb-a6e4f9224a35

📥 Commits

Reviewing files that changed from the base of the PR and between 026b0d6 and 5626dc0.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • docs/docs.json

📝 Walkthrough

Walkthrough

Adds a top-level contextual menu configuration to the docs site with actions for copying, viewing, sharing, and questioning pages. Updates the changelog with the available options and assistant requirement.

Changes

Contextual documentation menu

Layer / File(s) Summary
Configure contextual page actions
docs/docs.json, CHANGELOG.md
Adds contextual menu options for page actions and records the available actions, including the assistant enablement requirement for “Ask a question”.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: chhhee10

Poem

A rabbit hops through docs so bright,
With menus tucked just out of sight.
Copy, chat, and questions too,
Raw Markdown waits for you.
Config blooms—what a delightful view!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the docs page contextual menu change.
Description check ✅ Passed The description covers the change, testing, follow-up, and changelog details, and is mostly complete despite missing the template checklist.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@hermes-exosphere

Copy link
Copy Markdown
Contributor

Automated code review started - full review. Results will be posted here.

@hermes-exosphere

Copy link
Copy Markdown
Contributor

Build & test complete. Results:

  • JSON validity: ✓ (python3 -m json.tool passes)
  • All 9 contextual options validated against Mintlify official docs ✓
  • 15 locales preserved, navigation structure intact ✓
  • Unit tests: 2078 passed / 0 failed (121 test files)
  • MDX validation: 621 page(s) parsed cleanly ✓

Posting detailed review next.

@hermes-exosphere

Copy link
Copy Markdown
Contributor

🔍 Automated Code Review

📋 Executive Summary

This PR adds a Mintlify per-page contextual menu to the FailproofAI docs site — a single global config block in docs/docs.json that gives readers one-click access to copy-as-Markdown, raw Markdown view, hand-off to ChatGPT/Claude/Perplexity, open in MCP/Cursor/VS Code, and AI assistant Q&A. The CHANGELOG is updated with a concise entry under ### Docs in 0.0.14-beta.1. 2 files changed, 14 insertions — purely declarative, no code logic, no dependencies, no breaking changes. This is a clean, well-executed docs enhancement.


📊 Change Architecture

graph TD
    A["docs/docs.json
(+13 lines)"] -->|"adds contextual block
with 9 options"| B[Mintlify build pipeline]
    B --> C["Static site generation
(all 15 locales x 2 tabs)"]
    C --> D["Per-page contextual menu
(copy, view, LLM hand-off, IDE open, AI ask)"]
    
    E["CHANGELOG.md
(+1 line)"] -->|"docs entry at line 40"| F[0.0.14-beta.1 section]
    
    style A fill:#87CEEB
    style E fill:#87CEEB
    style D fill:#90EE90,color:#000
    style C fill:#90EE90,color:#000

    subgraph "Untouched"
        G[Navigation - 15 locales]
        H[Mintlify schema '$schema']
        I[Colors, logo, favicon]
        J[All 621 MDX pages]
    end
Loading

Legend: 🟢 New | 🔵 Modified | 🟡 Breaking Change Risk


🔴 Breaking Changes

No breaking changes detected. The contextual key is additive — existing Mintlify config keys ($schema, theme, colors, logo, favicon, navigation) are untouched. No API changes, no dependency changes, no serialization format changes. The 15 locales (en, zh, ja, ko, es, pt-BR, de, fr, ru, hi, tr, vi, it, ar, he) and their navigation structures are preserved exactly.


⚠️ Issues Found

  1. 🔵 Infodocs/docs.json:15-27 — Missing grok option. Mintlify officially supports grok in the contextual menu (verified against https://www.mintlify.com/docs/ai/contextual-menu). If FailproofAI users include Grok users who'd benefit from one-click page handoff, consider adding it. Non-blocking — the 9 selected options are all valid Mintlify options and work correctly.
  2. 🔵 InfoCHANGELOG.md:40 — New entry added at line 40 under ### Docs. The entry is clear but note that the "Ask a question" -> assistant option caveat (requires Mintlify Pro plan + dashboard toggle) is documented in the PR body but not in the changelog itself. This is fine for a changelog, but readers clicking "Ask a question" on the live docs may be confused if the assistant isn't enabled.

🔬 Logical / Bug Analysis

✅ No bugs found. This is a pure JSON config change with no executable code. Specifically verified:

Check Result
JSON well-formed? python3 -m json.tool passes
All contextual options valid? ✅ All 9 match Mintlify official docs
Duplicate keys? ✅ None
Navigation corrupted? ✅ All 15 locales verified intact
Required keys preserved? $schema, theme, name, colors, logo, favicon, navigation all present
$schema reference correct? https://mintlify.com/docs.json
MDX pages still parse? ✅ 621 pages clean
All unit tests pass? ✅ 2078 tests pass (121 files)
CHANGELOG placement correct? ✅ Under 0.0.14-beta.1 -> ### Docs

🧪 Evidence — Build & Test Results

JSON Validation
All options recognized by Mintlify ✓
Options (9): copy, view, assistant, chatgpt, claude, perplexity, mcp, cursor, vscode
Validation PASSED ✓

Languages: en, zh, ja, ko, es, pt-BR, de, fr, ru, hi, tr, vi, it, ar, he (15 locales)
Navigation structure intact ✓
All checks passed ✓
Test Results
Test Files  121 passed (121)
     Tests  2078 passed (2078)
  Duration  68.25s
MDX Validation
621 MDX page(s) parsed cleanly

🔗 Issue Linkage

⚠️ No linked issue. This is a self-contained feature enhancement — no issue reference needed for this kind of docs-config-only change.


👥 Human Review Feedback

No human review comments on this PR. Only bot comments from coderabbitai (rate-limited, no actionable feedback) and hermes-exosphere (review-started marker). No unresolved review threads.


💡 Suggestions

  1. Add grok to the contextual menu options — xAI's Grok is officially supported by Mintlify and could benefit users who use Grok for agent-related research.
  2. Consider adding download-pdf — Mintlify supports one-click PDF export. If FailproofAI users would benefit from downloading pages as PDFs (e.g., for offline reference or sharing with non-technical stakeholders), this is a zero-config addition.
  3. PR body caveat -> docs page note: The "Ask a question" assistant requires the Mintlify Pro plan + enabling in the dashboard. Consider adding a small note to the docs homepage or a tooltip so users exploring the docs know why "Ask a question" might not work immediately after deploy.

🏆 Verdict

VERDICT: APPROVED


Automated code review · 2026-07-16 20:22:00 UTC

@hermes-exosphere hermes-exosphere left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review: Approved. ✅

No breaking changes, all config valid, all tests pass (2078/2078), MDX clean (621 pages).

Minor suggestions (non-blocking):

  • Consider adding 'grok' and 'download-pdf' to contextual menu options
  • Document assistant-enablement caveat on docs site

@hermes-exosphere hermes-exosphere left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review: Approved. ✅

@NiveditJain
NiveditJain merged commit a14129d into main Jul 16, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants