Skip to content

fix(stapp): raise Loop prompt textarea height from 1 to 68 to satisfy Streamlit minimum (closes #632)#668

Open
Kailigithub wants to merge 1 commit into
lsdefine:mainfrom
Kailigithub:fix/issue-632-stapp-textarea-height
Open

fix(stapp): raise Loop prompt textarea height from 1 to 68 to satisfy Streamlit minimum (closes #632)#668
Kailigithub wants to merge 1 commit into
lsdefine:mainfrom
Kailigithub:fix/issue-632-stapp-textarea-height

Conversation

@Kailigithub

Copy link
Copy Markdown
Contributor

Summary

Raise the Loop prompt textarea minimum height from 1px to 68px to satisfy Streamlit's hard lower bound on st.text_area, which was throwing StreamlitAPIException during sidebar render and collapsing the whole page so the main chat input never appeared.

Root Cause

The exception originates at frontends/stapp.py:145 (was line 124 at the time the issue was filed):

st.text_area("Loop prompt", ..., height=1)

Streamlit's runtime validation rejects height=1 with:

StreamlitAPIException: Invalid height 1px for st.text_area - must be at least 68 pixels.

Sidebar rendering fails → the entire page collapses → the user sees no chat input dialog.

Fix

-    st.text_area("Loop prompt", ..., key="loop_prompt_input", height=1)
+    st.text_area("Loop prompt", ..., key="loop_prompt_input", height=68)

68px is exactly Streamlit's documented minimum. The existing sidebar CSS still overrides the visible height (min-height: 1.6em !important; height: auto !important), so the field continues to grow with content — this change only unblocks Streamlit's API gate.

Scope

  • 1 line changed in frontends/stapp.py
  • No tests added: the failure is a UI-rendering crash on Streamlit side, not a unit-testable logic path.

Closes #632

… Streamlit minimum

Streamlit enforces a minimum height of 68px on st.text_area; height=1
triggers StreamlitAPIException on every sidebar render, which collapses
the whole page so the main chat input never appears (issue lsdefine#632).
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.

执行launch.pyw后无对话框

1 participant