Skip to content

[Durable Objects] Improve scanability of api/id.mdx name section#30900

Draft
iglesiasbrandon wants to merge 1 commit into
productionfrom
api-id-name-enhancements
Draft

[Durable Objects] Improve scanability of api/id.mdx name section#30900
iglesiasbrandon wants to merge 1 commit into
productionfrom
api-id-name-enhancements

Conversation

@iglesiasbrandon
Copy link
Copy Markdown
Collaborator

Summary

Companion to #30897 (which addresses Vy's review feedback on the ctx.id.name changelog). This PR enhances the API reference page at src/content/docs/durable-objects/api/id.mdx so that the detailed information about ctx.id.name lives at the canonical reference, not just in the changelog.

Changes

  • Bulleted list for undefined cases. The dense run-on sentence covering idFromString(), names > 1,024 bytes, and newUniqueId() is now a scannable three-bullet list. The newUniqueId() case is consolidated here for completeness (it was previously only in the first paragraph).
  • Alarms tip callout. Added a :::tip[Useful for alarms]::: callout between the bulleted list and the existing historical-caveat note. Alarms are the strongest use case for ctx.id.name — when an alarm fires, no client called the DO, so ctx.id.name is the only way to know which named object woke up. The existing historical-caveat note (pre-2026-03-15 alarms) is preserved unchanged.
  • In-DO code example. Added a new <Tabs> group (JavaScript + Python) showing ctx.id.name usage inside a Durable Object class, placed after the existing client-side code examples.

Related

- Break up the dense 'undefined' sentence into a bulleted list, and
  consolidate the newUniqueId() case into the same list for completeness.
- Add a tip callout highlighting alarms as a primary use case for
  ctx.id.name (companion to the existing historical-caveat note).
- Add an in-Durable-Object code example (JavaScript and Python) showing
  ctx.id.name in use, alongside the existing client-side examples.
@github-actions github-actions Bot added product:durable-objects Durable Objects: https://developers.cloudflare.com/workers/learning/using-durable-objects/ size/s labels May 18, 2026
@github-actions
Copy link
Copy Markdown
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/content/docs/durable-objects/ @elithrar, @vy-ton, @joshthoward, @oxyjun, @lambrospetrou, @mikenomitch, @cloudflare/product-owners

@github-actions
Copy link
Copy Markdown
Contributor

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

Labels

product:durable-objects Durable Objects: https://developers.cloudflare.com/workers/learning/using-durable-objects/ size/s

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants