Skip to content

Fix: Hide Sidebar and Chat UI on Login Screen #71

@PragnyaKhandelwal

Description

@PragnyaKhandelwal

Issue Addressed:
When accessing the login page, the sidebar and chat interface were still visible in the background. This was confusing to users and exposed post-login UI before authentication.

What Was Happening:

  • UI elements like sidebar, chatbot tone, and chatbox were always being rendered.
  • There was no check to restrict visibility based on login state.
Image

Suggested Fix (What I Can Implement):

  • Introduce a login state flag using st.session_state['is_logged_in'] to track user authentication status.
  • Wrap all post-login UI elements (such as the sidebar, chatbot tone selector, and chat interface) within an if st.session_state['is_logged_in']: condition.
  • Ensure that only the login form is visible until the user successfully logs in.
  • Trigger a st.rerun() after successful login to refresh the app UI and render the appropriate components.

I would like to contribute here and work on this in resolving the issue.

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions