[Durable Objects] Improve scanability of api/id.mdx name section#30900
Draft
iglesiasbrandon wants to merge 1 commit into
Draft
[Durable Objects] Improve scanability of api/id.mdx name section#30900iglesiasbrandon wants to merge 1 commit into
iglesiasbrandon wants to merge 1 commit into
Conversation
- 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.
Contributor
|
This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:
|
Contributor
|
Preview URL: https://46e83013.preview.developers.cloudflare.com Files with changes (up to 15)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Companion to #30897 (which addresses Vy's review feedback on the
ctx.id.namechangelog). This PR enhances the API reference page atsrc/content/docs/durable-objects/api/id.mdxso that the detailed information aboutctx.id.namelives at the canonical reference, not just in the changelog.Changes
undefinedcases. The dense run-on sentence coveringidFromString(), names > 1,024 bytes, andnewUniqueId()is now a scannable three-bullet list. ThenewUniqueId()case is consolidated here for completeness (it was previously only in the first paragraph).:::tip[Useful for alarms]:::callout between the bulleted list and the existing historical-caveat note. Alarms are the strongest use case forctx.id.name— when an alarm fires, no client called the DO, soctx.id.nameis the only way to know which named object woke up. The existing historical-caveat note (pre-2026-03-15 alarms) is preserved unchanged.<Tabs>group (JavaScript + Python) showingctx.id.nameusage inside a Durable Object class, placed after the existing client-side code examples.Related