fix(gtm): Fix white screen and implement URL persistence v2.6.1
- Fixed TypeError in SessionBrowser by adding defensive checks for the sessions array. - Implemented mandatory URL persistence: The research URL is now saved in DB, shown in UI, and included in reports. - Added 'Start New Analysis' button to the session browser for better UX flow. - Updated documentation to reflect v2.6.1 changes.
This commit is contained in:
@@ -282,6 +282,13 @@ def phase1(payload):
|
||||
|
||||
try:
|
||||
specs_data = json.loads(specs_response)
|
||||
|
||||
# FORCE URL PERSISTENCE: If input was a URL, ensure it's in the metadata
|
||||
if product_input.strip().startswith('http'):
|
||||
if 'metadata' not in specs_data:
|
||||
specs_data['metadata'] = {}
|
||||
specs_data['metadata']['manufacturer_url'] = product_input.strip()
|
||||
|
||||
data['specs'] = specs_data
|
||||
except json.JSONDecodeError:
|
||||
logging.error(f"Failed to decode JSON from Gemini response in phase1 (specs): {specs_response}")
|
||||
|
||||
Reference in New Issue
Block a user