Skip to content

Switch to retentive outputs#20

Open
mzueva wants to merge 1 commit into
mainfrom
mzueva/use-retentive-outputs
Open

Switch to retentive outputs#20
mzueva wants to merge 1 commit into
mainfrom
mzueva/use-retentive-outputs

Conversation

@mzueva

@mzueva mzueva commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

(cherry picked from commit ce8582f)

(cherry picked from commit ce8582f)
@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello @mzueva, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the stability of the BlockModel by converting key outputs, specifically graphPFrame and table, to use a retentive mechanism. This change ensures that these outputs will hold their last valid state, even if their upstream data sources or computations temporarily become undefined, thereby improving the robustness and consistency of the model's data presentation.

Highlights

  • Output Mechanism Update: The graphPFrame and table outputs in model/src/index.ts have been updated from outputWithStatus to retentiveOutputWithStatus to ensure data persistence.
  • Changelog Entry Added: A new changeset file, .changeset/four-planes-walk.md, has been added to document the switch to retentive outputs for the @platforma-open/milaboratories.rarefaction.model package.
Changelog
  • .changeset/four-planes-walk.md
    • Added a new changeset file to document the 'Switch to retentive outputs' for the @platforma-open/milaboratories.rarefaction.model package.
  • model/src/index.ts
    • Changed outputWithStatus('graphPFrame', ...) to retentiveOutputWithStatus('graphPFrame', ...).
    • Changed outputWithStatus('table', ...) to retentiveOutputWithStatus('table', ...).
Activity
  • The pull request was created by mzueva and includes a cherry-picked commit ce8582fe590cbe9adc1fe62b8c4b11430903cc31. No further human activity (comments, reviews) has been recorded.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request successfully switches the graphPFrame and table outputs to use retentiveOutputWithStatus. This change aligns with the pull request title and description. However, it's important to consider the implications of this retentive behavior on downstream consumers of these outputs to ensure data consistency and expected user experience.

Comment thread model/src/index.ts
* OUTPUTS *
*************************/
.outputWithStatus('graphPFrame', (ctx) => {
.retentiveOutputWithStatus('graphPFrame', (ctx) => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The change from outputWithStatus to retentiveOutputWithStatus for graphPFrame implies that this output will now retain its last successfully computed value even if subsequent computations fail or return undefined. Please ensure that all consumers of this output are aware of this change and handle potentially stale data appropriately. For example, if a UI component previously expected an undefined output to clear its display, it might now show old data. This is a significant behavioral change that could lead to unexpected user experiences if not properly managed downstream.

Comment thread model/src/index.ts
return ctx.outputs?.resolve('rarefactionPFrame')?.getPColumns()?.map((p) => p.spec);
})
.outputWithStatus('table', (ctx) => {
.retentiveOutputWithStatus('table', (ctx) => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Similarly, the switch to retentiveOutputWithStatus for the table output means it will retain its last valid state. It's important to verify that any components consuming this table output are designed to handle this retentive behavior, especially concerning how they react to situations where new data might be undefined or an error, but the output still provides the previous valid data.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant