Skip to content

Conversation

viralcodex
Copy link

@viralcodex viralcodex commented Jun 30, 2025

Fix: #101
feat: Enhance GitHub integration with branch selection and caching

  • Added branch selection functionality in the frontend, allowing users to choose branches from GitHub repositories.
  • Implemented backend support for fetching repository branches and updated related services.
  • Enhanced caching mechanisms to store diagrams and explanations with branch context.
  • Added error handling for branch fetching and selection processes.
  • Made changes to mermaid system prompt to handle syntax issues for the code and prevent errors (does not work always but works about 90% of the time, have to implement some extra backend logic to clean and format the code)
  • Added Gemini service which can be used instead of Open AI service if you guys want to test/debug locally and don't have premium subscription for models (Gemini free tier is more than enough for running locally)

feat: Enhance GitHub integration with branch selection and caching

- Added branch selection functionality in the frontend, allowing users to choose branches from GitHub repositories.
- Implemented backend support for fetching repository branches and updated related services.
- Enhanced caching mechanisms to store diagrams and explanations with branch context.
- Updated UI components to accommodate branch selection and improve user experience.
- Added error handling for branch fetching and selection processes.
Copy link

vercel bot commented Jun 30, 2025

@viralcodex is attempting to deploy a commit to the Ahmed Khaleel's projects Team on Vercel.

A member of the Team first needs to authorize it.

@viralcodex
Copy link
Author

viralcodex commented Jun 30, 2025

here's the recording for the feature (please ignore the API issue as I've removed the changes I made for gemini back to openAI)

Screen.Recording.2025-06-30.at.9.12.39.PM.mp4

@viralcodex
Copy link
Author

viralcodex commented Jun 30, 2025

@ahmedkhaleel2004 @martin226 @jasminaaa20 Hi, please review this PR and let me know any changes are needed or not.
happy to contribute and thanks.

Improves branch selection logic in MainCard by handling initial load, resetting state more robustly, and removing unnecessary useEffects. Updates Dropdown to avoid resetting selectedBranch from within the component, delegating control to the parent. Removes debug console logs from both MainCard and useDiagram for cleaner output.
Added a check in MainCard to prevent form submission while branches are loading, displaying an error if attempted. Updated HomePage text for clarity, adjusted padding, and added instructions for visualizing specific branches.
Added 'pb-10' class to the div wrapping MainCard to provide additional bottom padding, improving layout spacing.
Corrects the logic for displaying the 'Loading branches...' message to show when branches are loading and the list is empty, instead of when branches are present.
@viralcodex viralcodex changed the title Added UI support for branch selection and mermaid prompt fixes Fix https://github.com/ahmedkhaleel2004/gitdiagram/issues/101 : Added UI support for branch selection and mermaid prompt fixes Jul 1, 2025
@viralcodex viralcodex changed the title Fix https://github.com/ahmedkhaleel2004/gitdiagram/issues/101 : Added UI support for branch selection and mermaid prompt fixes Fix https://github.com/ahmedkhaleel2004/gitdiagram/issues/101 Added UI support for branch selection and mermaid prompt fixes Jul 1, 2025
@viralcodex viralcodex changed the title Fix https://github.com/ahmedkhaleel2004/gitdiagram/issues/101 Added UI support for branch selection and mermaid prompt fixes Added UI support for branch selection and mermaid prompt fixes Jul 1, 2025
@gilgamesh2243
Copy link

Great work

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.

Doesn't support branches
2 participants