From e730610964bbce1e9e60577eeae2b8a7da3e6f97 Mon Sep 17 00:00:00 2001 From: Samudra Date: Wed, 30 Jul 2025 21:46:08 +0530 Subject: [PATCH 1/4] Fix: Ensure st.set_page_config is first Streamlit call in Home page --- ui-poc/Home.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/ui-poc/Home.py b/ui-poc/Home.py index af021a05..637e6d16 100644 --- a/ui-poc/Home.py +++ b/ui-poc/Home.py @@ -1,10 +1,4 @@ -import json -from datetime import datetime - -import requests import streamlit as st -from streamlit_cookies_manager import EncryptedCookieManager - # Configure the page st.set_page_config( page_title="Splitwiser", @@ -12,6 +6,17 @@ layout="wide", initial_sidebar_state="expanded", ) +# NOTE: +# set_page_config() must be the very first Streamlit command, +# placed right after `import streamlit as st` and before any +# other `st.` calls (even indirectly via imports). + +import json +from datetime import datetime + +import requests +from streamlit_cookies_manager import EncryptedCookieManager + # Initialize session state variables if "access_token" not in st.session_state: From 4647c43c967716257b0c71f0008eb2c3afcc32a1 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 30 Jul 2025 16:23:19 +0000 Subject: [PATCH 2/4] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- ui-poc/Home.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ui-poc/Home.py b/ui-poc/Home.py index 637e6d16..0709ce53 100644 --- a/ui-poc/Home.py +++ b/ui-poc/Home.py @@ -1,4 +1,9 @@ +from streamlit_cookies_manager import EncryptedCookieManager +import requests +from datetime import datetime +import json import streamlit as st + # Configure the page st.set_page_config( page_title="Splitwiser", @@ -11,12 +16,6 @@ # placed right after `import streamlit as st` and before any # other `st.` calls (even indirectly via imports). -import json -from datetime import datetime - -import requests -from streamlit_cookies_manager import EncryptedCookieManager - # Initialize session state variables if "access_token" not in st.session_state: From 054a0c7a6ed9a2a10d92f0a16236252d5672edff Mon Sep 17 00:00:00 2001 From: Devasy Patel <110348311+Devasy23@users.noreply.github.com> Date: Wed, 30 Jul 2025 22:27:16 +0530 Subject: [PATCH 3/4] Update ui-poc/Home.py Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- ui-poc/Home.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ui-poc/Home.py b/ui-poc/Home.py index 0709ce53..c3e5121d 100644 --- a/ui-poc/Home.py +++ b/ui-poc/Home.py @@ -1,8 +1,18 @@ +import streamlit as st + +# Configure the page – must come immediately after importing Streamlit +st.set_page_config( + page_title="Splitwiser", + page_icon="💰", + layout="wide", + initial_sidebar_state="expanded", +) + +# 3rd-party / std-lib imports – safe after the call above from streamlit_cookies_manager import EncryptedCookieManager import requests from datetime import datetime import json -import streamlit as st # Configure the page st.set_page_config( From 5f13e8ed7eb81ba8954b1e02ce960bf8c67f9369 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 30 Jul 2025 16:57:32 +0000 Subject: [PATCH 4/4] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- ui-poc/Home.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ui-poc/Home.py b/ui-poc/Home.py index c3e5121d..30118ec2 100644 --- a/ui-poc/Home.py +++ b/ui-poc/Home.py @@ -1,3 +1,7 @@ +from streamlit_cookies_manager import EncryptedCookieManager +import requests +from datetime import datetime +import json import streamlit as st # Configure the page – must come immediately after importing Streamlit @@ -8,11 +12,8 @@ initial_sidebar_state="expanded", ) + # 3rd-party / std-lib imports – safe after the call above -from streamlit_cookies_manager import EncryptedCookieManager -import requests -from datetime import datetime -import json # Configure the page st.set_page_config(