Commit Graph
4 Commits
Author SHA1 Message Date
Eva SarafianouandCursor b9c2bd733f docs: restore generated plugin SDK reference pages (#37788)
* docs: restore generated plugin SDK reference pages

Reimplements the Hugo-era plugingodocs/pluginjsdocs/pluginmanifestdocs
shortcode pipeline natively in Docusaurus, so the server plugin SDK,
web app plugin SDK, and manifest reference pages render full generated
content again instead of "Generated content (migrating)" placeholders.

Two new Go generators (gen-plugin-godocs, gen-plugin-manifest-docs) and
one Node generator (gen-plugin-jsdocs.mjs) read server/public/plugin,
server/public/model, and webapp/channels/src/plugins/registry.ts
directly from this monorepo and emit gitignored JSON consumed by new
PluginGoDocs/PluginGoExample/PluginJsDocs/PluginManifestDocs React
components, wired into prestart/prebuild alongside the existing
sidebar/OpenAPI generators.

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs: remove migration plan doc from this PR

Was a handoff/status doc for the implementing agent, not meant to ship
as part of the change itself.

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs: make plugin-godocs/manifest-docs builds atomic

build:plugin-godocs and build:plugin-manifest-docs redirected straight
into data/plugin-*.json, which doesn't exist on a clean checkout (the
redirection itself would fail before the generator ever ran) and, on a
subsequent failed run, would truncate a previously-good JSON file
before failing. Create data/ up front, write to a .tmp file, and only
mv it into place once the generator exits successfully.

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs: fix review findings in plugin doc generators

gen-plugin-manifest-docs:
- jsonFieldName now excludes unexported fields (matching encoding/json)
  and falls back to the Go field name when there's no tag or the tag's
  name component is empty (e.g. json:",omitempty"), instead of
  dropping the field entirely.
- exprTypeDocs's SelectorExpr case now resolves a qualified type only
  when its package qualifier actually points at the model package
  (checked against the declaring file's imports), instead of matching
  any x.Sel identifier by name alone regardless of which package it
  qualifies.

gen-plugin-godocs:
- The example-code loop now falls back to example.Code when
  example.Play is nil (go/doc leaves Play nil when it can't synthesize
  a whole runnable program), and propagates printer.Fprint errors
  instead of discarding them.

No output change for the current server/public/plugin or
server/public/model content — verified via a full regen.

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs: drop legacy-repo comment references, align jsdocs generator parser

Remove "port of the old mattermost-developer-documentation Hugo
shortcode" comments from the plugin doc generators/components now that
they're fully native to this monorepo, and switch gen-plugin-jsdocs.mjs
from the TypeScript compiler API to @typescript-eslint/typescript-estree
to match the old script's parser/shape, while keeping the more robust
reArg-declared-parameter-name and node-scoped comment-attachment logic.

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs: bump plugin doc generators' go.mod to go 1.26

go 1.23 was arbitrarily low; align with a current Go version. go run
auto-downloads a matching toolchain on older local installs, so this
doesn't reintroduce a dependency on server/public/go.mod's version.

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs: handle RestElement in gen-plugin-jsdocs parameter extraction

paramNamesFromPattern silently dropped rest parameters/destructured rest
members (e.g. (a, ...rest) or {a, ...rest}), since RestElement matched
none of its type checks. No effect on today's registry.ts output (no
rest patterns currently used there), but keeps the extraction correct if
one is ever introduced.

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs: simplify plugin doc generators README note

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs: check stdout write errors in plugin doc generators

os.Stdout.Write's return errors were discarded, so a failed/partial
write (e.g. broken pipe, disk full) would still exit 0. Combined with
the npm scripts' > file.tmp && mv pattern, a truncated write could be
treated as a successful generation. Fatal on either write failing.

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs: flatten Server/Webapp plugin SDK reference sidebar nesting

server/server-reference.md and webapp/webapp-reference.md were the only
file in their respective folders, so the sidebar generator (which only
collapses a folder into a single entry when it has an index.md) rendered
them as a "Server" > "Server plugin SDK reference" category with one
child instead of one flat entry, unlike every sibling reference folder
(rest-api/index.md, bot-accounts/index.md, etc.).

Rename both to index.md to match that convention, and update the ~20
cross-referencing links (many with #anchor fragments) that pointed at
the old /reference/server/server-reference and /reference/webapp/webapp-
reference paths.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-21 15:21:21 +03:00
Eva Sarafianou bcc9ce5e4a docs(P14): reconcile developer docs drift through Mattermost Blocks (#38043)
* docs(P14): reconcile developer docs drift through Mattermost Blocks

* docs: fix developer docs MDX conversion

* docs: clarify developer redirect filtering

* docs: remove partial developer redirects
2026-08-20 12:27:30 +03:00
Eva SarafianouandCursor 6417c9342a docs: port P13/P14 content drift into monorepo (#37590)
* docs(P13c): add missing manage-plugins.mdx to Administration Guide Configure

source/administration-guide/configure/manage-plugins.rst existed in the
Sphinx repo pre-fork but was never carried over during the initial P2
move or the P13c Configure reconciliation pass. Port it verbatim
(RST -> MDX) with links/anchors verified against the current docs/main
tree (mmctl-command-line-tool, plugins, plugins-configuration-settings,
popular-integrations, environment-configuration-settings#maximum-file-size,
air-gapped-deployment).

#### Release Note
```release-note
NONE
```

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs(P13/P14): port remaining content drift into monorepo

Ports outstanding content-only drift identified in docs-experimental
phase-P13/P14: V11.9 docs major release content, Azure Blob Storage
guide, ID-attribute case-sensitivity notes, ranked attribute types and
attribute value masking for ABAC, plugin management guide linkage, and
the P14 markdown action buttons reference page with its
interactive-messages cross-reference. Excludes all automation/workflow
files, which are handled separately.

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs(sidebar): link top-level category headers to their landing page

buildCategory() only recognized a literal index.md(x) filename as a
category's landing page, but Overview, Deployment Guide, Administration
Guide, Security & Compliance, End User Guide, Integrations Guide, Get
Help, and Use Case Guide all use a *-index.md(x) filename instead (to
avoid collisions when flattening for URL stability). As a result,
clicking most top-level sidebar categories only expanded/collapsed the
list instead of navigating to their overview page. Recognize the
*-index.md(x) convention as a fallback so these categories link
correctly, matching the existing Deployment Guide/Overview behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs(P13/P14): fix blog link typo and restore dropped Open Source Components entry

Audit against Sphinx source (docs/source/product-overview/) found two
drops from the 7e915c99f8 content-drift port:

- mattermost-v11-changelog.mdx: blog link slug had an erroneous "-0"
  (mattermost-v11-9-0-is-now-available -> mattermost-v11-9-is-now-available),
  likely copy-pasted from the v11.8.0 entry above it.
- mobile-app-changelog.mdx: the 2.42.0 release entry's "Open Source
  Components" subsection (voximplant/react-native-foreground-service
  removal) was dropped entirely during the RST->MDX port.

#### Release Note
```release-note
NONE
```

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs(fix): remove standalone SQL comment line breaking MDX parse

A lone "--" comment line inside a <pre><code> SQL block was parsed by
remark as a setext heading underline, splitting the surrounding
paragraph and leaving the <code> tag unclosed. CI caught this in the
docusaurus build. Merge the comment into the surrounding paragraph.

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs(fix): escape curly braces in JSONB path literal breaking SSG render

'{options}' inside a SQL <pre><code> block was parsed by MDX as a JSX
expression referencing an undefined "options" identifier, causing
"ReferenceError: options is not defined" during static site
generation. Escape the braces the same way already done for other
JSONB path literals elsewhere in this file. Verified with a full local
docusaurus build.

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs(sidebar): reuse the landing-file resolver for nested category sorting/labels

The prior fix only applied the index.md(x) / *-index.md(x) fallback to
a category's own link resolution. Nested category sort keys and the
category label fallback still assumed a literal index.mdx, so a
sub-directory using the *-index.md(x) naming convention would sort by
its default position (9999) instead of its declared sidebar_position,
and its category label would fall back to a humanized directory name
instead of the landing page's title. Factor the resolver into a shared
findIndexFile() helper and use it in both places.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-21 13:40:08 +03:00
Eva SarafianouandCursor 1d3bbc638b feat(docs): move docs-experimental content into monorepo docs/ (#37330)
* feat(docs): move docs-experimental content into monorepo docs/

Co-authored-by: Cursor <cursoragent@cursor.com>

* Remove plan related files and comments

* Cleanup comments, remove generated files

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-02 18:42:57 +03:00