Skip to content

feat(UniverSheet): bump version 10.0.11#987

Merged
ArgoZhang merged 2 commits intomasterfrom
feat-univer
Apr 29, 2026
Merged

feat(UniverSheet): bump version 10.0.11#987
ArgoZhang merged 2 commits intomasterfrom
feat-univer

Conversation

@ArgoZhang
Copy link
Copy Markdown
Member

@ArgoZhang ArgoZhang commented Apr 29, 2026

Link issues

fixes #986

Summary By Copilot

Regression?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • Merge the latest code from the main branch

Summary by Sourcery

Add null safety handling when executing and disposing UniverSheet instances to prevent errors when the component state is missing.

Bug Fixes:

  • Prevent errors by safely returning when UniverSheet execution is invoked with a missing instance.
  • Avoid disposal-time failures by skipping cleanup when no UniverSheet instance is found for the given id.

Copilot AI review requested due to automatic review settings April 29, 2026 02:27
@bb-auto bb-auto Bot added the enhancement New feature or request label Apr 29, 2026
@bb-auto bb-auto Bot added this to the v9.2.0 milestone Apr 29, 2026
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Apr 29, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds null-guarding around UniverSheet instances retrieved from the shared Data store in JS interop functions to prevent errors when executing or disposing after removal or failed initialization, and bumps the BootstrapBlazor.UniverSheet project version to 10.0.11.

Sequence diagram for UniverSheet JS interop execute and dispose with null-guard

sequenceDiagram
    actor Blazor
    participant UniverSheetInterop as UniverSheetJSModule
    participant Data as DataStore
    participant Sheet as UniverSheetInstance

    Blazor->>UniverSheetInterop: execute(id, data)
    UniverSheetInterop->>Data: get(id)
    Data-->>UniverSheetInterop: univerSheet or null
    alt univerSheet is null
        UniverSheetInterop-->>Blazor: return
    else univerSheet exists
        UniverSheetInterop->>Sheet: use firstPush, backdrop, pushData
        Sheet-->>UniverSheetInterop: result
        UniverSheetInterop-->>Blazor: result
    end

    Blazor->>UniverSheetInterop: dispose(id)
    UniverSheetInterop->>Data: get(id)
    Data-->>UniverSheetInterop: univerSheet or null
    UniverSheetInterop->>Data: remove(id)
    alt univerSheet is null
        UniverSheetInterop-->>Blazor: return
    else univerSheet exists
        UniverSheetInterop->>Sheet: dispose()
        Sheet-->>UniverSheetInterop: disposed
        UniverSheetInterop-->>Blazor: return
    end
Loading

Flow diagram for UniverSheet execute and dispose null checks

flowchart TD
    A[execute called with id and data] --> B[univerSheet = Data.get id]
    B --> C{univerSheet is null?}
    C -->|Yes| D[return]
    C -->|No| E[read firstPush, backdrop, pushData]
    E --> F[process data]
    F --> G[return result]

    H[dispose called with id] --> I[univerSheet = Data.get id]
    I --> J[Data.remove id]
    J --> K{univerSheet is null?}
    K -->|Yes| L[return]
    K -->|No| M{univerSheet.dispose is function?}
    M -->|No| N[return]
    M -->|Yes| O[call univerSheet.dispose]
    O --> P[return]
Loading

File-Level Changes

Change Details Files
Add null checks before using UniverSheet instances in JS interop execute/dispose functions to avoid runtime errors when the instance is missing.
  • Guard execute() by returning early if the UniverSheet instance retrieved from the Data store is null before accessing its properties and functions.
  • Guard dispose() by returning early if the UniverSheet instance retrieved from the Data store is null before attempting to call dispose() on it.
src/components/BootstrapBlazor.UniverSheet/Components/UniverSheet.razor.js
Update the UniverSheet package/project version to 10.0.11.
  • Adjust project version metadata in the BootstrapBlazor.UniverSheet.csproj file to reflect the new 10.0.11 release.
src/components/BootstrapBlazor.UniverSheet/BootstrapBlazor.UniverSheet.csproj

Assessment against linked issues

Issue Objective Addressed Explanation
#986 Update the UniverSheet component/package version to 10.0.11 in the project (e.g., in the BootstrapBlazor.UniverSheet.csproj or related configuration).

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@ArgoZhang ArgoZhang merged commit 9136ce2 into master Apr 29, 2026
4 checks passed
@ArgoZhang ArgoZhang deleted the feat-univer branch April 29, 2026 02:28
Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • The null checks in execute and dispose only guard against null, but Data.get(id) is likely to return undefined when missing; consider using a broader check (e.g., if (!univerSheet) return;) to avoid runtime errors in that case.
  • In dispose, you call Data.remove(id) before verifying that univerSheet exists; consider performing the existence check first so that you only remove entries you actually retrieved.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The null checks in `execute` and `dispose` only guard against `null`, but `Data.get(id)` is likely to return `undefined` when missing; consider using a broader check (e.g., `if (!univerSheet) return;`) to avoid runtime errors in that case.
- In `dispose`, you call `Data.remove(id)` before verifying that `univerSheet` exists; consider performing the existence check first so that you only remove entries you actually retrieved.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Copy Markdown

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

Bumps the BootstrapBlazor.UniverSheet package version to 10.0.11 and adds defensive guards in the JS interop layer to safely no-op when an instance is not found.

Changes:

  • Update BootstrapBlazor.UniverSheet NuGet/package version to 10.0.11
  • Add null-guard checks in execute and dispose to avoid operating on a missing UniverSheet instance

Reviewed changes

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

File Description
src/components/BootstrapBlazor.UniverSheet/Components/UniverSheet.razor.js Adds early returns when the UniverSheet instance cannot be retrieved from the internal Data store.
src/components/BootstrapBlazor.UniverSheet/BootstrapBlazor.UniverSheet.csproj Updates the package version from 10.0.10 to 10.0.11.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(UniverSheet): bump version 10.0.11

2 participants