Skip to content

Fix unstable loading#118

Merged
erohinaelena merged 2 commits intomainfrom
fix-unstable-loading
Feb 1, 2026
Merged

Fix unstable loading#118
erohinaelena merged 2 commits intomainfrom
fix-unstable-loading

Conversation

@erohinaelena
Copy link
Contributor

No description provided.

@gemini-code-assist
Copy link

Summary of Changes

Hello @erohinaelena, 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 addresses an unstable loading issue by performing a comprehensive update of project dependencies and implementing a mechanism to stabilize the pFrame output within the graph rendering component. These changes aim to improve the reliability and consistency of data loading and display, preventing potential rendering glitches or inconsistent states.

Highlights

  • Dependency Updates: Numerous @milaboratories and @platforma-sdk packages have been updated across pnpm-lock.yaml and pnpm-workspace.yaml, indicating a significant upgrade of project dependencies.
  • pFrame Output Stabilization: The GraphPage.vue component now uses a cached pFrame value, updated via a watch effect, and wraps it in an OutputWithStatus object before passing it to the GraphMaker component. This aims to provide a more stable data source for graph rendering.
  • Code Refinements in model/src/index.ts: Minor changes include removing a redundant type annotation in a .sections() callback and changing .outputWithStatus() to .output() for the pFrame definition, suggesting an API simplification or alignment.
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.

@erohinaelena erohinaelena added this pull request to the merge queue Feb 1, 2026
Copy link

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

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 aims to fix an unstable loading issue by changing how the pFrame output is handled. The model was updated to use output() instead of outputWithStatus(), and caching logic was added to the UI to prevent flickering. While the caching approach is sound for improving UI stability, the implementation has a significant drawback: it hardcodes a success status (ok: true), which can hide computation errors from the user and lead to stale data being displayed without any warning. My review includes suggestions to address this by either reverting the model change and handling the status flags from outputWithStatus correctly, or finding an alternative way to track the computation status. I've also included a minor suggestion for code cleanup.

})

.outputWithStatus('pFrame', (ctx) => {
.output('pFrame', (ctx) => {

Choose a reason for hiding this comment

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

high

Changing from outputWithStatus to output seems to be the root cause for the complex caching logic and potential error-hiding in GraphPage.vue. While this might fix the 'unstable loading', it loses the error and stability status that outputWithStatus provides.

Have you considered keeping outputWithStatus and instead adjusting the UI to correctly handle the stable and ok flags from the OutputWithStatus object? This would likely be a more robust solution that doesn't hide computation errors from the user.

Comment on lines +55 to +57
const graphMakerPframe = computed(() => {
return {ok: true, value: cachedPFrame.value, stable: cachedPFrame.value !== undefined} as OutputWithStatus<PFrameHandle>;
});

Choose a reason for hiding this comment

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

high

Hardcoding ok: true here can hide errors from the user. If the pFrame computation fails, app.model.outputs.pFrame will likely be undefined. Your caching logic will then cause the UI to show stale data, but since ok is true, no error will be indicated. This can be very misleading.

If the change in model/src/index.ts to use output() is to be kept, you need a way to determine the actual status of the computation to set ok correctly. Without a proper status, the UI might appear to be working correctly when it's actually broken.

};

const cachedPFrame = ref<PFrameHandle | undefined>(app.model.outputs.pFrame);
watch(() => app.model.outputs.pFrame, async (handle) => {

Choose a reason for hiding this comment

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

medium

The async keyword is unnecessary here as there are no await calls inside the watcher callback.

watch(() => app.model.outputs.pFrame, (handle) => {

Merged via the queue into main with commit 67c7306 Feb 1, 2026
8 checks passed
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

Comments