Skip to content

[Durable Objects] Address review feedback on ctx.id.name changelog#30897

Merged
iglesiasbrandon merged 1 commit into
productionfrom
address-vy-feedback-do-id-name
May 19, 2026
Merged

[Durable Objects] Address review feedback on ctx.id.name changelog#30897
iglesiasbrandon merged 1 commit into
productionfrom
address-vy-feedback-do-id-name

Conversation

@iglesiasbrandon
Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #30843 addressing the review comments from @vy-ton.

Changes

  • Renamed 2026-03-26-durable-object-id-name.mdx2026-03-15-durable-object-id-name.mdx to match the production rollout date documented in src/content/docs/durable-objects/api/id.mdx (the note about pre-2026-03-15 alarms).
  • Lead with the user-facing framing ("When your Worker accesses..." instead of "what you see client-side").
  • Removed the TypeScript-types backstory that distracted from the announcement; replaced with a forward-looking note that runtime now matches the Workers runtime types.
  • Replaced the fetch() code example with an RPC method (getRoomName()) to align with current Durable Objects best practices.
  • Dropped the redundant first bullet ("Populated when...") from the undefined cases list.
  • Linked the 1,024-byte caveat to the API reference where it is documented.
  • Added an alarms callout as a primary use case for ctx.id.name (no calling client to pass the name as an argument).
  • Added a local development note confirming ctx.id.name works with wrangler dev the same way it does in production.

Review thread

#30843 (review)

Addresses review feedback from #30843:
- Rename file and update frontmatter date to 2026-03-15 to match the
  production rollout date documented in src/content/docs/durable-objects/api/id.mdx.
- Lead with the user-facing 'When your Worker accesses...' framing.
- Remove the TypeScript-types backstory; emphasize that runtime now
  matches the Workers runtime types.
- Replace the fetch() code example with an RPC method.
- Drop the redundant 'Populated' bullet; link the 1,024-byte caveat to
  the API reference.
- Call out alarms as a primary use case.
- Note that this works in local development with wrangler dev.
@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/changelog/ @cloudflare/pm-changelogs, @cloudflare/product-owners


When your Worker accesses a Durable Object via `idFromName()` or `getByName()`, the same name is now available on `ctx.id.name` inside the object — no need to pass it through method arguments or persist it in storage. This brings the runtime behavior in line with the [Workers runtime types](/workers/languages/typescript/).

This is especially useful for [alarms](/durable-objects/api/alarms/), where there is no calling client to pass the name as an argument. When an alarm handler runs, `ctx.id.name` will hold the same name the object was originally accessed with.
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.

Suggested change
This is especially useful for [alarms](/durable-objects/api/alarms/), where there is no calling client to pass the name as an argument. When an alarm handler runs, `ctx.id.name` will hold the same name the object was originally accessed with.
This is especially useful for [alarms](/durable-objects/api/alarms/), where there is no calling client to pass the name as an argument. When an alarm handler runs, `ctx.id.name` will hold the same name the object was originally created with.

@iglesiasbrandon iglesiasbrandon marked this pull request as ready for review May 19, 2026 14:54
@iglesiasbrandon iglesiasbrandon requested review from a team as code owners May 19, 2026 14:54
@iglesiasbrandon iglesiasbrandon merged commit 338be8b into production May 19, 2026
22 checks passed
@iglesiasbrandon iglesiasbrandon deleted the address-vy-feedback-do-id-name branch May 19, 2026 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants