Skip to content

#Ieeesoc Fix diff view showing both "waiting for runtime" and diffs when agent is stopped Fixes #8061 #8680

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nhxe
Copy link

@nhxe nhxe commented May 24, 2025

End-user friendly description of the problem this fixes or functionality this introduces.
Fixes a bug in the diff viewer where stopping the agent caused both the "waiting for runtime" message and previously loaded diffs to appear simultaneously. The UI now correctly hides diffs when the agent is not running.

Summarize what the PR does, explaining any non-trivial design decisions.
This PR updates the GitChanges component to properly reflect the runtime state of the agent:

  • Introduces an early return when the agent is inactive, ensuring only the "waiting for runtime" message is displayed.
  • Prevents stale diffs from rendering when the runtime becomes inactive after diffs have been loaded.
  • Adds default handling and type safety for edge cases like unknown or blank error messages.
  • Improves key usage in diff list rendering for stability (key={${change.path}-${change.status}}).
  • Uses filter(Boolean) to avoid rendering empty or falsy status messages.

These changes ensure a clearer and more consistent user experience in diff view handling, especially during runtime transitions.

Link of any specific issues this addresses:
Fixes #8061

@nhxe nhxe requested review from rbren and amanape as code owners May 24, 2025 05:19
Copy link
Member

@amanape amanape left a comment

Choose a reason for hiding this comment

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

You also have a package.json and package-lock.json in the root directory. Please remove them as we have the proper ones in the /frontend directory

Copy link
Member

Choose a reason for hiding this comment

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

This change will potentially break the translations. Even if they don't this change should be reverted for consistent naming

Copy link
Member

Choose a reason for hiding this comment

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

Please revert this change as we depend on React Router types here

Copy link
Member

Choose a reason for hiding this comment

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

This file is unrelated to the issue, please revert

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.

[Bug]: Stopping the agent with changes in diff view cause the diff view to render the "waiting for runtime" message + diffs
2 participants