Skip to content

docs(driver): Update disconnect event comment #24897

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 26, 2025

Conversation

RishhiB
Copy link
Contributor

@RishhiB RishhiB commented Jun 23, 2025

This PR updates documentation to reflect that the reason parameter on the disconnect event in IDocumentDeltaConnectionEventswill accept undefined to support clean, non-error disconnections.

The reason parameter in disconnect event listeners now accepts undefined:

  • Old signature: (reason?: IAnyDriverError) => void
  • New signature: (reason: IAnyDriverError | undefined) => void

1. Updated Interface Documentation

  • Updated the JSDoc comment for the disconnect event in IDocumentDeltaConnectionEvents

@Copilot Copilot AI review requested due to automatic review settings June 23, 2025 20:27
@RishhiB RishhiB requested a review from a team as a code owner June 23, 2025 20:27
@github-actions github-actions bot added changeset-present base: main PRs targeted against main branch labels Jun 23, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the documentation and changelog to reflect that the disconnect event’s reason parameter now accepts undefined, supporting clean, non-error disconnections.

  • Refined JSDoc on the disconnect event in IDocumentDeltaConnectionEvents and updated its TypeScript signature to (reason: IAnyDriverError | undefined).
  • Expanded the affected packages list in the changeset and clarified changelog wording.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/common/driver-definitions/src/storage.ts Updated JSDoc and method signature for disconnect to allow undefined
.changeset/fuzzy-turkeys-help.md Added new packages and adjusted changelog text around reason handling
Comments suppressed due to low confidence (2)

packages/common/driver-definitions/src/storage.ts:245

  • [nitpick] Since the interface signature has already been updated in this release, consider updating the wording from 'will change' to reflect that the signature has changed, or remove this note to avoid confusion.
	 * Signature will change from `(reason: IAnyDriverError) => void` to `(reason: IAnyDriverError | undefined) => void`.

.changeset/fuzzy-turkeys-help.md:16

  • [nitpick] This sentence may be confusing since accepting undefined is already introduced in this release; consider rephrasing or removing it.
In a future release, the `reason` parameter will also accept `undefined`.

Copy link
Contributor

@jzaffiro jzaffiro left a comment

Choose a reason for hiding this comment

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

A few comments, but looks good!

@tylerbutler
Copy link
Member

Seems like there was an announcement regarding this in the last release? Should it be removed from the release notes? https://github.com/microsoft/FluidFramework/releases/tag/client_v2.43.0#user-content-the-reason-parameter-on-the-disconnect-event-is-now-optional-to-allow-for-clean-non-error-disconnections-24840

@RishhiB
Copy link
Contributor Author

RishhiB commented Jun 25, 2025

Seems like there was an announcement regarding this in the last release? Should it be removed from the release notes? https://github.com/microsoft/FluidFramework/releases/tag/client_v2.43.0#user-content-the-reason-parameter-on-the-disconnect-event-is-now-optional-to-allow-for-clean-non-error-disconnections-24840

Yes Thank you for letting me know, ill change this

@RishhiB
Copy link
Contributor Author

RishhiB commented Jun 26, 2025

updated https://github.com/microsoft/FluidFramework/releases/tag/client_v2.43.0, removing .changeset/fuzzy-turkeys-help.md

@RishhiB RishhiB changed the title docs(driver): Update disconnect event comment and changeset docs(driver): Update disconnect event comment Jun 26, 2025
@RishhiB RishhiB merged commit 38fe87c into microsoft:main Jun 26, 2025
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
base: main PRs targeted against main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants