diff --git a/poc4_active_source_20260714/HMM_BRAND_REFRESH.md b/poc4_active_source_20260714/HMM_BRAND_REFRESH.md index 43f9ce2..92a8a42 100644 --- a/poc4_active_source_20260714/HMM_BRAND_REFRESH.md +++ b/poc4_active_source_20260714/HMM_BRAND_REFRESH.md @@ -6,3 +6,4 @@ - 외부 KB 로고·전용 글꼴 의존성을 제거하고, 애플리케이션 내부 SVG 워드마크와 해양 청색 계열로 표시한다. - 기존 MCP, VPD, 데이터베이스 스키마 및 도구 계약은 변경하지 않는다. - 로그인 유지 기능은 서버 비밀키로 서명한 7일 만료 토큰을 사용하며, 로그아웃 시 즉시 폐기한다. +- 화면 수정의 단일 진입점은 `src/poc4/hmm_ui.py`다. 색상·레이아웃·로그인/헤더 브랜드는 이 모듈에서만 관리한다. diff --git a/poc4_active_source_20260714/apps/poc4/mcp_discovery_ui.py b/poc4_active_source_20260714/apps/poc4/mcp_discovery_ui.py index 134dbf3..c1aecc8 100644 --- a/poc4_active_source_20260714/apps/poc4/mcp_discovery_ui.py +++ b/poc4_active_source_20260714/apps/poc4/mcp_discovery_ui.py @@ -52,6 +52,11 @@ from src.oci_genai_sdk import ( ) from src.poc3.model_registry import load_model_registry, resolve_model_profile from src.poc3.questions import COMMON_DEMO_QUESTIONS +from src.poc4.hmm_ui import ( + apply_hmm_theme, + render_hmm_header, + render_hmm_login_brand, +) LOG = logging.getLogger(__name__) @@ -1359,6 +1364,89 @@ html, body, [data-testid="stAppViewContainer"], .stApp { """ +HMM_CLEAN_THEME_CSS = """ + +""" + @dataclass(frozen=True) class McpServer: @@ -1799,8 +1887,8 @@ def _question_label(question: object) -> str: return f"{question_id} · {category} · {text}" -def _apply_kb_theme() -> None: - st.markdown(HMM_MINIMAL_THEME_CSS, unsafe_allow_html=True) +def _apply_hmm_theme() -> None: + apply_hmm_theme(st) def _portal_auth_value(name: str) -> str: @@ -1900,17 +1988,7 @@ def _clear_portal_remembered_session() -> None: def _render_portal_login() -> None: with st.container(key="kb_login_container"): - st.markdown( - f""" -
-
HMM
-
HMM SHIPPING & LOGISTICS DEMO
-

HMM AI 업무 에이전트

-

사용자 인증 후 해운·물류 AI 질의와 보안 관리 기능을 이용할 수 있습니다.

-
- """, - unsafe_allow_html=True, - ) + render_hmm_login_brand(st) if not _portal_auth_configured(): st.error("포털 로그인 설정을 확인해 주세요.") return @@ -1963,27 +2041,8 @@ def _logout_portal() -> None: st.rerun() -def _render_kb_header() -> None: - st.markdown( - f""" -
-
-
-
-
HMM Digital Operations Demo
-
Connect Values · Navigate Growth · AI 업무 질의
-
-
-

HMM AI 업무 에이전트

-

- 사용자 권한을 기준으로 해운·물류 업무의 AI 질의 응답과 보안 관리를 수행하는 - DEMO 화면입니다. -

-
-
- """, - unsafe_allow_html=True, - ) +def _render_hmm_header() -> None: + render_hmm_header(st) def _render_vpd_user_card(preset: VpdTokenPreset) -> None: @@ -6859,7 +6918,7 @@ def main() -> None: st.set_page_config( page_title="HMM AI Operations Console", page_icon="⛴️", layout="wide" ) - _apply_kb_theme() + _apply_hmm_theme() _restore_portal_remembered_session() if not st.session_state.get(PORTAL_AUTHENTICATED_KEY, False): _render_portal_login() @@ -6923,7 +6982,7 @@ def main() -> None: ) if st.session_state.get(query_model_profile_key) not in model_profile_keys: st.session_state[query_model_profile_key] = default_query_model_profile - _render_kb_header() + _render_hmm_header() with st.sidebar: st.caption( f"포털 사용자 · {st.session_state.get(PORTAL_AUTH_USER_KEY, '')}" diff --git a/poc4_active_source_20260714/src/poc4/__init__.py b/poc4_active_source_20260714/src/poc4/__init__.py new file mode 100644 index 0000000..ae16b2b --- /dev/null +++ b/poc4_active_source_20260714/src/poc4/__init__.py @@ -0,0 +1 @@ +"""PoC4 UI support modules.""" diff --git a/poc4_active_source_20260714/src/poc4/hmm_ui.py b/poc4_active_source_20260714/src/poc4/hmm_ui.py new file mode 100644 index 0000000..72cbf9a --- /dev/null +++ b/poc4_active_source_20260714/src/poc4/hmm_ui.py @@ -0,0 +1,76 @@ +"""Small, self-contained HMM presentation layer for the PoC4 Streamlit app.""" + +HMM_CLEAN_THEME_CSS = """ + +""" + + +def apply_hmm_theme(st: object) -> None: + st.markdown(HMM_CLEAN_THEME_CSS, unsafe_allow_html=True) + + +def render_hmm_login_brand(st: object) -> None: + st.markdown( + """ +
+
HMM
+
HMM SHIPPING & LOGISTICS DEMO
+

HMM AI 업무 에이전트

+

사용자 인증 후 해운·물류 AI 질의와 보안 관리 기능을 이용할 수 있습니다.

+
+ """, + unsafe_allow_html=True, + ) + + +def render_hmm_header(st: object) -> None: + st.markdown( + """ +
+
HMM
+

AI 업무 에이전트

+

사용자 권한에 맞는 업무 질의와 보안 관리 기능을 제공합니다.

+
+ """, + unsafe_allow_html=True, + )