Skip to content

Updated for Nexus SDK Ergonomics - Not ready to be merged yet!! - #5203

Open
Evanthx wants to merge 11 commits into
mainfrom
nexus-v2-2
Open

Updated for Nexus SDK Ergonomics - Not ready to be merged yet!!#5203
Evanthx wants to merge 11 commits into
mainfrom
nexus-v2-2

Conversation

@Evanthx

@Evanthx Evanthx commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

This adds and updates some information about Nexus SDK ergonomics.
Dev Experience page replaces the Nexus feature guide.

@Evanthx
Evanthx requested a review from a team as a code owner August 29, 2026 03:50
Copilot AI balanced review requested due to automatic review settings August 29, 2026 03:50
@vercel

vercel Bot commented Aug 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
temporal-documentation Ready Ready Preview Sep 8, 2026 11:26pm UTC

Request Review

@Evanthx Evanthx added the do-not-merge What it says on the label label Aug 29, 2026
@github-actions

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

📖 Docs PR preview links

Copilot AI 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.

🟡 Changes recommended

The Java guide duplicates existing documentation, lacks a runnable generated-contract setup, and leaves related Nexus pages inconsistent.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds prerelease Nexus SDK ergonomics documentation and a Java implementation guide.

Changes:

  • Documents the unified Temporal Operation Handler, code generation, and Activity-backed Operations.
  • Adds a Java prerelease developer guide.
  • Adds the new pages to Nexus navigation.
File summaries
File Description
sidebars.js Registers and groups the new pages.
docs/encyclopedia/nexus/temporal-operation-handler.mdx Explains the unified handler API.
docs/encyclopedia/nexus/nexus-standalone-activity.mdx Describes Activity-backed Operations.
docs/encyclopedia/nexus/nexus-code-generator.mdx Introduces generated Nexus contracts.
docs/develop/java/nexus/developer-experience.mdx Provides Java usage and deployment guidance.
Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 4
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/develop/java/nexus/developer-experience.mdx Outdated
APIs are experimental and may be subject to backwards-incompatible changes.
</ReleaseNoteHeader>

Temporal has unified the Workflow handler and the synchronous operation handler into a single handler, and added the ability to back an Operation with a [Standalone Activity](/nexus/standalone-activity).
Comment on lines +19 to +20
The Nexus Code Generator, [`nexgen`](https://github.com/temporalio/nex-gen), turns one schema into client code for Go, Java, Python, and TypeScript.
Both sides of a [Nexus Service](/nexus/services) generate from the same file, so neither hand-writes the types and neither can drift from the contract.
Comment on lines +95 to +97
You can hand-write that package, but the preferred way is to generate it with the [Nexus Code Generator](https://github.com/temporalio/nex-gen).
You write the contract once as a JSON definition file and run `nexgen` against it, and it emits the typed models,
runtime validators, and the Service definition itself.
@jsundai

jsundai commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Taking a quick look at this. Will do a deeper look this week.

Comment thread docs/encyclopedia/nexus/nexus-code-generator.mdx Outdated
Comment thread docs/encyclopedia/nexus/nexus-code-generator.mdx Outdated
@CLAassistant

CLAassistant commented Sep 2, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Comment thread docs/encyclopedia/nexus/nexus-code-generator.mdx
Comment thread docs/encyclopedia/nexus/nexus-standalone-activity.mdx
@Evanthx
Evanthx requested review from jsundai and a balanced review from Copilot September 2, 2026 17:57

Copilot AI 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.

🟡 Changes recommended

The new guides duplicate existing feature guides, omit collateral updates, and incorrectly claim .NET code-generation support.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (2)

docs/develop/java/nexus/developer-experience.mdx:4

  • This creates a second full Nexus feature guide beside docs/develop/java/nexus/feature-guide.mdx; 602 of this page's 696 lines duplicate that guide. The documented SDK structure defines Nexus as a Quickstart plus one feature guide (readme/INFORMATION-ARCHITECTURE.md:150-151). Merge the ergonomics updates into the existing feature guide instead of publishing parallel guides that can drift.
title: Nexus Developer Experience - Java SDK feature guide

docs/encyclopedia/nexus/temporal-operation-handler.mdx:19

  • The parent and lifecycle pages still describe the old handler model: docs/encyclopedia/nexus/nexus.mdx:50-55 says asynchronous Operations only start Workflows and treats Updates as synchronous, while docs/encyclopedia/nexus/nexus-operations.mdx:16,36-39 still documents Workflow-backed async and separate New-Workflow-Run-Operation/New-Sync-Operation builders. Update those pages alongside this unified handler so readers do not get conflicting definitions of async backings and handler APIs.
Temporal has unified the Workflow handler and the synchronous operation handler into a single handler, and added the ability to back an Operation with a [Standalone Activity](/nexus/standalone-activity).
  • Files reviewed: 9/9 changed files
  • Comments generated: 5
  • Review effort level: Balanced

Comment on lines +96 to +110
You can hand-write that package, but the preferred way is to generate it with the [Nexus Code Generator](https://github.com/temporalio/nex-gen).
You write the contract once as a JSON definition file and run `nexgen` against it, and it emits the typed models,
runtime validators, and the Service definition itself.

This is what makes a Nexus Service polyglot. Both sides generate from the same definition file: the handler implements
the Service, the caller invokes its Operations, and neither hand-writes a request or response type. A Python handler
and a Go caller share no code, but they both run off that same service contract - so they interoperate with no
coordination between the teams beyond the contract itself.

The generated validators check every payload against the contract, when a value is parsed off the wire and again when
it is serialized onto it, so bad data is rejected at the boundary rather than reaching your Workflow. A value validates
identically in every language, which is what lets a caller and a handler written in different languages trust the same
contract. See the [`chat.nexusrpc.yaml`](https://github.com/temporalio/nex-gen/blob/main/samples/schemas/chat.nexusrpc.yaml)
sample contract and the [Definition files](https://github.com/temporalio/nex-gen#definition-files) section of the
`nexgen` README for the file format.
---
id: developer-experience
slug: /develop/dotnet/nexus/developer-experience
title: Nexus Developer Experience - .NET SDK feature guide
---
id: developer-experience
slug: /develop/go/nexus/developer-experience
title: Nexus Developer Experience - Go SDK feature guide
---
id: developer-experience
slug: /develop/python/nexus/developer-experience
title: Nexus Developer Experience - Python SDK feature guide
---
id: developer-experience
slug: /develop/typescript/nexus/developer-experience
title: Nexus Developer Experience - TypeScript SDK feature guide
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

✅ Docs build passed

@jsundai

jsundai commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Let's keep the feature guide as the title for now. The content of the dev experience page should all still be there since it's folded into the page but we can keep the feature page metadata - this also avoids changing all the redirects/urls. I added a callout that there's a new developer experience. Going to make a few more edits.

@bergundy bergundy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I started reviewing the whole guide and stopped myself. I am debating whether to spend time on that or not. The nexgen docs were fully reviewed.


:::note

This Feature Guide includes the new Nexus developer experience: pre-release APIs for the [Temporal Operation Handler](/nexus/temporal-operation-handler) and [Nexus Standalone Activity](/nexus/standalone-activity). These APIs are experimental and may change.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think we should call this feature "Nexus standalone activity", but you can say that this guide covers invoking a standalone activity from a nexus handler.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: I would say "subject to change".

Handlers should be reliable since the [circuit breaker](/nexus/operations#circuit-breaking) trips after 5 consecutive retryable errors, blocking all Operations from the caller to that Endpoint.

The `Temporalio.Nexus` namespace has utilities to help create Nexus Operations:
Every Operation is written with [`TemporalOperationHandler`](/nexus/temporal-operation-handler). Mark a method

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I feel like this statement is confusing. We don't show the TemporalOperationHandler just the shorthand TemporalOperation.

Comment thread docs/develop/dotnet/nexus/feature-guide.mdx Outdated
Comment on lines +4 to +5
sidebar_label: Nexus Code Generator
description: The Nexus Code Generator turns one schema into typed models, runtime validators, and Nexus Service definitions for Go, Java, Python, and TypeScript.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we call this nexgen to match the language everywhere?
Same goes for the name of the file.

Comment thread docs/encyclopedia/nexus/nexus-code-generator.mdx Outdated
Comment thread docs/encyclopedia/nexus/nexus-code-generator.mdx Outdated
Comment thread docs/encyclopedia/nexus/nexus-code-generator.mdx Outdated
Comment thread docs/encyclopedia/nexus/nexus-code-generator.mdx Outdated
Comment thread docs/encyclopedia/nexus/nexus-code-generator.mdx Outdated
Comment thread docs/encyclopedia/nexus/nexus-code-generator.mdx
@jsundai

jsundai commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Making a few more edits and doing final review today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge What it says on the label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants