Skip to content

fix: prevent 'No App Specification Found' during spec generation#363

Merged
Shironex merged 2 commits intov0.8.0rcfrom
fix/app-spec-ui-bug
Jan 5, 2026
Merged

fix: prevent 'No App Specification Found' during spec generation#363
Shironex merged 2 commits intov0.8.0rcfrom
fix/app-spec-ui-bug

Conversation

@Shironex
Copy link
Copy Markdown
Collaborator

@Shironex Shironex commented Jan 5, 2026

Summary

  • Check generation status before trying to load the spec file
  • Prevents 500 errors and confusing "No App Specification Found" UI during generation
  • Shows proper "Generating Specification" UI when generation is in progress

Changes

  • useSpecLoading now checks specRegeneration.status() before reading the file
  • If generation is running, skip the file read and set isGenerationRunning flag
  • SpecView uses isGenerationRunning to show the generating UI properly

Check generation status before trying to load the spec file.
This prevents 500 errors and confusing UI during spec generation.

Changes:
- useSpecLoading now checks specRegeneration.status() first
- If generation is running, skip the file read and set isGenerationRunning
- SpecView uses isGenerationRunning to show generating UI properly

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 5, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @Shironex, 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 a user experience issue where the application UI would incorrectly display an error message or encounter server errors when an application specification was in the process of being generated. The changes introduce a mechanism to detect ongoing spec generation, allowing the UI to show an appropriate 'Generating Specification' message instead of misleading errors, thereby providing clearer feedback to the user.

Highlights

  • Improved Spec Generation UI: The UI now proactively checks the specification generation status, preventing the display of 'No App Specification Found' or 500 errors while a spec is actively being generated.
  • Dynamic Loading State: The useSpecLoading hook has been enhanced to include an isGenerationRunning state, which is used to inform the UI when generation is in progress, allowing for a more accurate 'Generating Specification' display.
  • Error Prevention: By checking the generation status before attempting to load the spec file, the system avoids trying to read a non-existent or incomplete file, thus preventing potential 500 errors and improving robustness.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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.

Copy link
Copy Markdown
Contributor

@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 effectively resolves an issue where a "No App Specification Found" message would flicker during spec generation. By adding a status check in the useSpecLoading hook, the application now correctly identifies when a generation process is active and avoids attempting to load the spec file prematurely. The changes in SpecView properly utilize the new isGenerationRunning flag to display the correct UI state to the user. The implementation is solid and directly addresses the problem. I've included one minor suggestion to enhance the robustness of the state management in use-spec-loading.ts.

Comment on lines +23 to +32
if (api.specRegeneration) {
const status = await api.specRegeneration.status();
if (status.success && status.isRunning) {
logger.debug('Spec generation is running, skipping load');
setIsGenerationRunning(true);
setIsLoading(false);
return;
}
setIsGenerationRunning(false);
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

This is a small refactoring for improved robustness. By moving setIsGenerationRunning(false) outside the if (api.specRegeneration) block, we ensure that isGenerationRunning is always reset to false if the generation is not running. This handles the edge case where api.specRegeneration might not be available and makes the state handling more predictable.

Suggested change
if (api.specRegeneration) {
const status = await api.specRegeneration.status();
if (status.success && status.isRunning) {
logger.debug('Spec generation is running, skipping load');
setIsGenerationRunning(true);
setIsLoading(false);
return;
}
setIsGenerationRunning(false);
}
if (api.specRegeneration) {
const status = await api.specRegeneration.status();
if (status.success && status.isRunning) {
logger.debug('Spec generation is running, skipping load');
setIsGenerationRunning(true);
setIsLoading(false);
return;
}
}
setIsGenerationRunning(false);

Address PR review feedback - ensure isGenerationRunning is always
reset to false when generation is not running, even if
api.specRegeneration is not available.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Shironex Shironex merged commit abab7be into v0.8.0rc Jan 5, 2026
6 checks passed
@Shironex Shironex deleted the fix/app-spec-ui-bug branch January 5, 2026 15:04
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