Skip to content

Commit 081b023

Browse files
authored
Merge branch 'main' into java-workflow-streams
2 parents 83b7e9c + d38d63a commit 081b023

556 files changed

Lines changed: 34663 additions & 4749 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/mermaid-ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Mermaid CI
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "docs/**"
7+
- "scripts/lint-mermaid.mjs"
8+
- "package.json"
9+
- "yarn.lock"
10+
- ".github/workflows/mermaid-ci.yml"
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
mermaid:
17+
name: Validate Mermaid syntax
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout Repository
21+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
22+
23+
- name: Setup Node.js Environment
24+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
25+
with:
26+
node-version: "24"
27+
cache: "yarn"
28+
29+
- name: Install Dependencies
30+
run: yarn install --frozen-lockfile
31+
32+
- name: Lint Mermaid Diagrams
33+
run: yarn lint:mermaid

.github/workflows/update-custom-role-permissions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
token: ${{ steps.generate_token.outputs.token }}
2929

3030
- name: Setup Node
31-
uses: actions/setup-node@v6
31+
uses: actions/setup-node@v6.4.0
3232
with:
3333
node-version: '20'
3434

.github/workflows/vale-ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,7 @@ jobs:
2222
level: info
2323
filter_mode: diff_context
2424
fail_on_error: false
25+
# Scope linting to docs only; do not put the path in vale_flags —
26+
# the action runs `vale ${vale_flags} sync`, so a path there breaks sync.
27+
files: docs
2528
vale_flags: "--config=.vale-ci.ini"

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ temp/
2222
.env.test.local
2323
.env.production.local
2424
.vs
25-
AGENTS.md
26-
CLAUDE.md
2725
.claude/*
2826
.omc
2927

@@ -55,3 +53,4 @@ test-results/*
5553
screenshots
5654
# Ignore cookbook recipes since they are synced from the remote repo
5755
ai-cookbook
56+
scripts/mermaid-compare/*

AGENTS.md

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
# AGENTS.md
2+
3+
Guidance for AI coding agents working in the [Temporal documentation](https://github.com/temporalio/documentation) repository.
4+
5+
## Read these first
6+
7+
| Topic | File |
8+
|-------|------|
9+
| Where content belongs | [INFORMATION-ARCHITECTURE.md](./INFORMATION-ARCHITECTURE.md) |
10+
| React components in MDX | [COMPONENTS.md](./COMPONENTS.md) |
11+
| Mermaid diagrams | [MERMAID.md](./readme/MERMAID.md) |
12+
| LLM Markdown pipeline | [MARKDOWN_PIPELINE.md](./MARKDOWN_PIPELINE.md) |
13+
| Component → Markdown mapping | [COMPONENT_REGISTRY.md](./COMPONENT_REGISTRY.md) |
14+
15+
## Repository overview
16+
17+
- **Site:** Docusaurus static site for [docs.temporal.io](https://docs.temporal.io).
18+
- **Content:** MDX files under `docs/`. URLs are served at the site root (`/workflows`), not under `/docs/`.
19+
- **UI code:** React components in `src/components/`. Sidebar navigation is in `sidebars.js`.
20+
- **Redirects:** Legacy URL changes go in `vercel.json` before or alongside file moves.
21+
22+
## Where to put content
23+
24+
Use [INFORMATION-ARCHITECTURE.md](./INFORMATION-ARCHITECTURE.md) to choose the section.
25+
26+
## Style Guide
27+
28+
Follow [STYLE.md](./STYLE.md) and Vale rules in `vale/styles/`. The most common mistakes:
29+
30+
### Temporal terms are proper nouns
31+
32+
Capitalize Temporal core terms. Do not capitalize generic uses.
33+
34+
- Correct: "Register the Activity in the Workflow."
35+
- Incorrect: "Register the activity in the workflow."
36+
37+
Vale enforces many substitutions automatically. See `vale/styles/Temporal/terms.yml`.
38+
39+
### Temporal Service, not Cluster
40+
41+
In body prose, use **Temporal Service**, not **Cluster** or **Temporal Cluster**.
42+
43+
- Correct: "The Worker polls the Temporal Service for tasks."
44+
- Incorrect: "The Worker polls the Cluster for tasks."
45+
46+
Exceptions: **Multi-Cluster Replication**, code/config identifiers, and CLI command names.
47+
48+
### Identifier abbreviation
49+
50+
Outside Temporal core terms, spell out "identifier." For core terms, use `Id` (not `ID` or `id`).
51+
52+
- Correct: "Provide an order identifier as a Workflow Id."
53+
- Incorrect: "Provide an order ID as a Workflow ID."
54+
55+
In code blocks, follow each language's conventions.
56+
57+
### Headings
58+
59+
- Use **sentence case**: "How to get started with Temporal"
60+
- Prefer **infinitive verb forms** or questions: "How to install Temporal", not "Installing Temporal"
61+
- Develop pages: task-oriented headings ("Start a Workflow Execution")
62+
63+
### Writing style
64+
65+
Follow [STYLE.md](./STYLE.md) and the [Google developer documentation style guide](https://developers.google.com/style) for tone (conversational, second person, active voice) and structure (short paragraphs, one idea per sentence). A few additions specific to model output:
66+
67+
- Cut filler that adds no information: "it's worth noting that," "in order to," "simply," "easily," "just."
68+
- Avoid vague intensifiers doing the work a specific fact should do: "powerful," "robust," "seamless," "cutting-edge," "leverage" (use "use"), "unlock," "elevate," "streamline." Replace with what the thing actually does.
69+
- Don't pad a page to look thorough. Prefer brevity over overly-verbose paragraphs.
70+
- Do not add emojis to documentation prose and use em-dashes sparingly.
71+
72+
### Word choice
73+
74+
Prefer common, concrete verbs and nouns.
75+
76+
| Prefer | Instead of |
77+
|--------|------------|
78+
| use | utilize, leverage |
79+
| help | facilitate |
80+
| to | in order to |
81+
| many | numerous, various (when you can be specific, be specific) |
82+
83+
### Tense and time
84+
85+
Document current behavior. Don't make future promises. Tie claims to a version, release note, or release stage when that matters.
86+
87+
| Prefer | Instead of |
88+
|--------|------------|
89+
| Temporal Server v1.31.0 and later supports Cassandra 5.0.4 and later. | A future release will support Cassandra 5. |
90+
91+
## Frontmatter
92+
93+
Typical fields:
94+
95+
```yaml
96+
---
97+
id: page-id
98+
title: Page title
99+
sidebar_label: Short label
100+
description: One sentence for SEO and previews.
101+
keywords:
102+
- keyword
103+
tags:
104+
- Concepts
105+
---
106+
```
107+
108+
- Write `description` as a single clear sentence.
109+
- Do not change `id` or `slug` without a redirect plan.
110+
- Match `tags` and `keywords` to sibling pages in the same section.
111+
- Use existing concepts and keywords. Don't add new ones unless it's a new feature.
112+
113+
## MDX and components
114+
115+
- Pages are `.mdx` with YAML frontmatter (see [Frontmatter](#frontmatter) above).
116+
- Import shared components from `@site/src/components` unless a page uses a one-off import path already established nearby.
117+
- Before adding a component, check [COMPONENTS.md](./COMPONENTS.md) and [COMPONENT_REGISTRY.md](./COMPONENT_REGISTRY.md).
118+
- Reuse existing components (`Tabs`, `SdkTabs`, `CaptionedImage`, `ViewSourceCodeNotice`, etc.) instead of inventing inline HTML patterns.
119+
- Interactive demos live in `src/components/elements/`. Export new public components from `src/components/index.js` when needed.
120+
121+
122+
## URLs and navigation
123+
124+
Adding or moving pages usually requires:
125+
126+
- Updating `sidebars.js` for navigation placement
127+
- Adding redirects in `vercel.json` when the public URL changes
128+
- Fixing internal links across the repo
129+
130+
## Code samples and Snipsync
131+
132+
- Prefer code extracted from CI-enabled sample repos via [Snipsync](https://github.com/temporalio/snipsync).
133+
- Snippets are wrapped in `<!--SNIPSTART id-->` / `<!--SNIPEND-->`. Edit the **source repo** named inside the wrapper, then run `yarn snipsync`.
134+
135+
## Commands
136+
137+
Requires Node.js 24+ and Yarn.
138+
139+
```bash
140+
yarn # Install dependencies
141+
yarn start # Dev server at http://localhost:3000
142+
yarn build # Production build; catches MDX/build errors
143+
yarn check-links # Broken link check (run after build)
144+
yarn snipsync # Refresh Snipsync code snippets
145+
```
146+
147+
Vale linting (style):
148+
149+
```bash
150+
yarn lint:py # Example: lint Python SDK docs
151+
yarn vale # Full Vale run via assembly script
152+
```

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@AGENTS.md

COMPONENTS.md

Lines changed: 3 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,10 @@ Whether you’re using core components or experimenting with new ones, this guid
2020
- [Using Components in MDX Source Files](#using-components-in-mdx-source-files)
2121
- [Using IntegrationsGrid](#using-integrationsgrid)
2222
- [Using CaptionedImage](#using-captionedimage)
23-
- [Using DiscoverableDisclosure](#using-discoverabledisclosure)
2423
- [Using DocsTable](#using-docstable)
2524
- [Using PhotoCarousel](#using-photocarousel)
2625
- [Using RelatedRead](#using-relatedread)
2726
- [Using ToolTipTerm](#using-tooltipterm)
28-
- [Using ZoomingImage](#using-zoomingimage)
2927
- [Using SdkGuideLinks](#using-sdkguidelinks)
3028
- [Using ReleaseNoteHeader](#using-release-note-header)
3129

@@ -118,9 +116,9 @@ import * as Components from '@site/src/components';
118116
Components imported this way use the "Components." prefix before their name:
119117

120118
```
121-
<Components.DiscoverableDisclosure>
119+
<Components.RelatedRead>
122120
...Content that is folded away...
123-
</Components.DiscoverableDisclosure>
121+
</Components.RelatedRead>
124122
```
125123

126124
## Using IntegrationsGrid
@@ -155,7 +153,7 @@ For example, the Python SDK integrations page pre-filters to Python:
155153
<IntegrationsGrid defaultSdks={["Python"]} />
156154
```
157155

158-
Valid SDK values are `"Java"`, `"Python"`, `"TypeScript"`, and `"Ruby"`.
156+
Valid SDK values are `"Go"`, `"Java"`, `"Python"`, `"TypeScript"`, and `"Ruby"`.
159157

160158
### Filter behavior
161159

@@ -253,23 +251,6 @@ One click will zoom out, another will zoom back.
253251
Most rendering will allow readers to pull the image around to view all parts of the image.
254252
On non-mobile systems, cursors will change to interactive elements when hovered above zoomable items to indicate interaction.
255253

256-
## Using DiscoverableDisclosure
257-
258-
Role: Provide a more discoverable `<Details>` section.
259-
260-
Unlike Details, it does not require a separate `<Summary>`.
261-
262-
Usage:
263-
264-
```
265-
<DiscoverableDisclosure label = "your_summary_text">
266-
...your content...
267-
</DiscoverableDisclosure>
268-
```
269-
270-
An additional `prompt` prop enables you to specify the leading text.
271-
Normally it defaults to `prompt = "Dive deeper — "`.
272-
273254
## Using DocsTable
274255

275256
In certain rare instances, standard Markdown tables won't work for our needs.
@@ -442,25 +423,6 @@ Use the `tooltip` prop to add non-reusable content specific to one tooltip term.
442423
<Components.ToolTipTerm term="your term" tooltip="any custom content you want to add" />
443424
```
444425

445-
## Using ZoomingImage
446-
447-
Role: Provide image "asides" embedded into instructions where a standard image would normally interfere.
448-
449-
A ZoomingImage is presented at a very small size, with the understanding that it is too small to view.
450-
An optional component, the image uses a magnifying glass and text prompt for discovery.
451-
See the instructions for [Prometheus Grafana](http://docs.temporal.io/cloud/metrics/prometheus-grafana#grafana-data-sources-configuration) for an example.
452-
453-
Reserve ZoomingImages for situations where the image itself is an obstacle to communicating steps or other content.
454-
It provides opt-in supplementary information.
455-
456-
Usage:
457-
458-
```
459-
<ZoomingImage src="/path/to/image" alt="Alt text" />
460-
```
461-
462-
Images are normally stored in the '/static' folder in `img` or `diagrams`.
463-
464426
## Using SdkGuideLinks
465427

466428
Role: Render a vertical list of SDK guide links, each with a colored block icon and label, linking readers to the relevant SDK-specific page.

COMPONENT_REGISTRY.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,12 @@ Generated by `scripts/audit-components.mjs`. Run to update.
2424
| `AWSRegions` | 2 | `transclude` ||
2525
| `GCPRegions` | 2 | `transclude` ||
2626
| `PatternCards` | 2 | `cards` ||
27-
| `DiscoverableDisclosure` | 1 | `transparent` ||
2827
| `CustomRolePermissionsTable` | 1 | `transclude` ||
2928
| `InvitationContent` | 1 | `strip-block` ||
3029
| `RetrySimulator` | 1 | `strip-block` ||
3130
| `SayHelloWorkflow` | 1 | `UNKNOWN` ||
3231
| `ISayHelloNexusService` | 1 | `UNKNOWN` ||
3332
| `CallerWorkflow` | 1 | `UNKNOWN` ||
34-
| `SdkLogos` | 1 | `strip-block` ||
3533
| `StandaloneActivityDemo` | 1 | `UNKNOWN` ||
3634
| `SdkSvg` | 1 | `strip-block` ||
3735
| `SdkGuideLinks` | 1 | `UNKNOWN` ||

CONTRIBUTING.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,19 @@ If you are considering using a custom slug, answer these questions first:
165165
# Social share images (og:image)
166166

167167
Every doc page automatically gets a social-share preview card generated at build time — the image that
168-
shows up when a link to the page is shared in Slack, X, LinkedIn, etc. It's built from the page's `title`,
169-
`description`, and a section label derived from its folder (e.g. `develop/go/...` → "Go SDK"). There's
170-
nothing to do for a normal page.
168+
shows up when a link to the page is shared in Slack, X, LinkedIn, etc. It's built from the page's `title`
169+
and `description`. There's nothing to do for a normal page.
170+
171+
The image itself is rendered by a `postBuild` step (`plugins/og-image/`), but *which* image a page points
172+
at is decided earlier, during MDX compilation (`plugins/og-image/remarkPlugin.js`), which writes it into
173+
the page's front matter as a real `image` field — the same field you'd set manually (below). This matters
174+
because it's what makes the image survive past the initial page load: Docusaurus renders `<head>` through
175+
`react-helmet-async`, which re-renders it again on the client the moment a page hydrates. A tag injected
176+
after the fact by patching the built HTML would get silently wiped out and replaced with the site-wide
177+
default as soon as a real browser (or anything else that executes JavaScript) hydrated the page — only
178+
tools that read the raw HTML without running JS (like `curl`, or most social-share scrapers) would ever
179+
see it. Going through real front matter means Docusaurus's own metadata rendering produces the same tag
180+
both times, so there's nothing for hydration to revert.
171181

172182
If you want a page to use a different image instead of the generated one, you have two options:
173183

@@ -200,6 +210,11 @@ This only happens during `yarn build` (see below) — running `yarn start` won't
200210
overridden images, since it skips the production build step entirely. The generator itself lives in
201211
`plugins/og-image/`.
202212

213+
Note that `yarn build` always runs in production mode (`NODE_ENV=production`), whether that's on your
214+
machine, a Vercel preview deployment for a PR, or the real production deploy — so `yarn build && yarn
215+
serve` locally is enough to preview real generated cards on new content before pushing anything; you don't
216+
need to wait for an actual deploy.
217+
203218
# Local development command reference
204219

205220
The following commands are available to aid in local development:

MARKDOWN_PIPELINE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Each component maps to a strategy in `COMPONENT_REGISTRY` (in `scripts/mdx-to-md
108108
| `Tabs` / `TabItem` | `tabs` / `tabitem` | All tabs flattened, each under a **bold label** header |
109109
| `SdkTabs` / `SdkTabs.<Lang>` | `sdk-tabs` | Same, with language labels (`DotNet`**.NET**) |
110110
| `CodeSnippet` | `code-snippet` | Fenced code block using the `language` prop |
111-
| `CaptionedImage`, `EnlargeImage`, `ZoomingImage`, `Components.CaptionedImage` | `captioned-image` | `![alt or caption or title](src)` |
111+
| `CaptionedImage`, `EnlargeImage`, `Components.CaptionedImage` | `captioned-image` | `![alt or caption or title](src)` |
112112
| `PhotoCarousel` | `photo-carousel` | One `![caption](url)` per entry in the `images`/`captions` arrays |
113113
| `CallToAction` | `call-to-action` | `- [h3 title](href): p description` |
114114
| `ReleaseNoteHeader` | `release-note-header` | `> **Public Preview** — Go, Java…` availability note + body blockquote. The self-closing form (`<ReleaseNoteHeader … />`) emits just the note and leaves the page body intact. |
@@ -120,8 +120,8 @@ Each component maps to a strategy in `COMPONENT_REGISTRY` (in `scripts/mdx-to-md
120120
| `IntegrationsGrid` | `integrations-grid` | Markdown list resolved from `integrations-data.json`, filtered by the `defaultSdks` prop |
121121
| `HomePageHero` | `home-page-hero` | Homepage hero's headline, intro paragraphs, and link cards (content mirrored from the component) |
122122
| `QuickstartCards`, `PatternCards` | `cards` | Markdown link list parsed from the inline `items={[{href,title,description}]}` prop |
123-
| `ZoomPanPinch`, `DiscoverableDisclosure` | `transparent` | Wrapper stripped; inner content passed through |
124-
| `DocCardList`, `CardList`, `LandingCard`, `ThemedImage`, `SdkLogos`, `SdkSvg`, `CloudRegionCount`, `RetrySimulator`, `ServerlessWorkerDemo`, `OperationsTable`, `InvitationContent` | `strip-block` | Removed entirely (visual/dynamic, no extractable text) |
123+
| `ZoomPanPinch` | `transparent` | Wrapper stripped; inner content passed through |
124+
| `DocCardList`, `CardList`, `LandingCard`, `ThemedImage`, `SdkSvg`, `CloudRegionCount`, `RetrySimulator`, `ServerlessWorkerDemo`, `OperationsTable`, `InvitationContent` | `strip-block` | Removed entirely (visual/dynamic, no extractable text) |
125125
| `DL`, `DT`, `DD`, `DefinitionList` | `strip-tag` | Tags stripped, text content kept |
126126
| `details` / `summary` | `details` / `summary` | `<summary>` becomes a heading; body expanded inline |
127127

0 commit comments

Comments
 (0)