diff --git a/daras_ai_v2/base.py b/daras_ai_v2/base.py index 1d396df17..9558568ec 100644 --- a/daras_ai_v2/base.py +++ b/daras_ai_v2/base.py @@ -160,7 +160,12 @@ def get_page_title(self, state) -> str | None: ) def get_recipe_page_title(self, state) -> str | None: - return state.get(StateKeys.page_title) or self.title + example_id, run_id, uid = extract_query_params(gooey_get_query_params()) + if not example_id and not run_id: + return state.get(StateKeys.page_title) or self.title + else: + recipe_doc_state = self.recipe_doc_sr().to_dict() + return recipe_doc_state.get(StateKeys.page_title) or self.title def render(self): with sentry_sdk.configure_scope() as scope: @@ -186,7 +191,6 @@ def render(self): self.render_report_form() return - st.session_state.setdefault(StateKeys.page_title, self.title) st.session_state.setdefault( StateKeys.page_notes, self.preview_description(st.session_state) ) @@ -194,7 +198,7 @@ def render(self): if example_id or run_id: with st.breadcrumbs(className="mt-5"): st.breadcrumb_item( - self.title.upper(), + self.get_recipe_page_title(st.session_state).upper(), link_to=self.app_url(), className="text-muted", style={"background-color": "#A5FFEE"},