Fix missing import streamlit as st in subsection files for empty folders#177
Draft
Copilot wants to merge 2 commits into
Draft
Fix missing import streamlit as st in subsection files for empty folders#177Copilot wants to merge 2 commits into
import streamlit as st in subsection files for empty folders#177Copilot wants to merge 2 commits into
Conversation
Agent-Logs-Url: https://github.com/Multiomics-Analytics-Group/vuegen/sessions/e3bf64da-1cbe-4d24-90f2-03fc7bce1b3d Co-authored-by: enryH <2833836+enryH@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix missing streamlit import for empty folders
Fix missing Apr 9, 2026
import streamlit as st in subsection files for empty folders
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a subsection folder contains no recognized files,
_generate_subsectionproduced a Python file missingimport streamlit as st, causing runtime failures — the subsection header and footer always emitst.markdown()calls regardless of component count.Changes
streamlit_reportview.py— After_combine_components, unconditionally inject the three base imports (import streamlit as st,from pathlib import Path,section_dir = ...) intosubsection_importsif not already present. Previously these only arrived via_generate_component_imports, which is never called when the component list is empty.tests/test_empty_folder.py— Three new tests: empty subsection contains all base imports; non-empty subsection is unaffected.