The user reports that "the github stuff isn't showing under the upload or canvas sections anymore." This indicates that the GitHub repository browser functionality, which was previously visible in the application, is no longer appearing where expected.
Based on the code review, here's how the GitHub integration is currently implemented:
-
The
GitHubRepoBrowser
component (insrc/components/GitHubRepoBrowser/GitHubRepoBrowser.tsx
) provides the GitHub browsing functionality. -
In
App.tsx
, the component is conditionally rendered in two scenarios:- It should appear below the canvas when a template is loaded AND
showBrowser
state is true (lines 149-153) - However, it's not shown alongside the FileUpload component in the initial view (when no template is loaded)
- It should appear below the canvas when a template is loaded AND
-
The
showBrowser
state is initialized totrue
by default (line 21 in App.tsx), but there's no GitHub browser shown in the initial upload view.
-
Missing Initial Integration: The GitHub browser was likely previously shown alongside the FileUpload component, but this integration is now missing.
-
Conditional Rendering Issue: The conditions for showing the GitHub browser may have changed or are not being met.
-
CSS/Layout Issue: The component might be rendered but hidden due to CSS or layout issues.
Modify the App.tsx file to:
- Add the GitHubRepoBrowser component to the initial view (when no template is loaded)
- Ensure the GitHubRepoBrowser is properly displayed when a template is loaded
Specifically, we need to update the layout in the initial view (lines 108-116) to include the GitHubRepoBrowser component below the FileUpload component.
-
Modify the Initial View Layout:
- Update the grid layout to accommodate both components
- Add the GitHubRepoBrowser component below the FileUpload component
-
Ensure Proper State Management:
- Verify the
showBrowser
state is properly initialized and toggled - Add a toggle button in the initial view if needed
- Verify the
-
Test the Integration:
- Verify the GitHub browser appears in both views
- Test the workflow loading functionality from GitHub
The main change will be in App.tsx, specifically in the section where the initial view is rendered (lines 108-116). We'll need to:
{
/* Top: File upload when no template is loaded */
}
{
!template && (
<div className="grid grid-cols-1 lg:grid-cols-12 gap-8">
<div className="lg:col-span-12 space-y-8">
{/* File Upload Component */}
<div className="bg-[hsl(var(--card))] rounded-lg shadow-lg">
<FileUpload onFileUpload={handleFileUpload} />
</div>
{/* GitHub Browser Component - Add this section */}
<div className="bg-[hsl(var(--card))] rounded-lg shadow-lg">
<GitHubRepoBrowser onWorkflowSelect={handleFileUpload} />
</div>
</div>
</div>
);
}
After implementing these changes:
- The GitHub browser will be visible below the file upload component when no template is loaded
- The GitHub browser will continue to be visible below the canvas when a template is loaded (if showBrowser is true)
- Users will be able to browse and load workflows from GitHub repositories in both views
This solution restores the GitHub integration functionality that was previously available in the application.