@@ -2926,27 +2926,43 @@ class WorkflowExecutionDescription(WorkflowExecution):
29262926
29272927 raw_description : temporalio .api .workflowservice .v1 .DescribeWorkflowExecutionResponse
29282928 """Underlying protobuf description."""
2929- static_summary : Optional [str ]
2930- """Gets the single-line fixed summary for this workflow execution that may appear in
2931- UI/CLI. This can be in single-line Temporal markdown format."""
2932- static_details : Optional [str ]
2933- """Gets the general fixed details for this workflow execution that may appear in UI/CLI.
2934- This can be in Temporal markdown format and can span multiple lines."""
2929+
2930+ _static_summary : Optional [str ] = None
2931+ _static_details : Optional [str ] = None
2932+ _metadata_decoded : bool = False
2933+
2934+ async def static_summary (self ) -> Optional [str ]:
2935+ """Gets the single-line fixed summary for this workflow execution that may appear in
2936+ UI/CLI. This can be in single-line Temporal markdown format.
2937+ """
2938+ if not self ._metadata_decoded :
2939+ await self ._decode_metadata ()
2940+ return self ._static_summary
2941+
2942+ async def static_details (self ) -> Optional [str ]:
2943+ """Gets the general fixed details for this workflow execution that may appear in UI/CLI.
2944+ This can be in Temporal markdown format and can span multiple lines.
2945+ """
2946+ if not self ._metadata_decoded :
2947+ await self ._decode_metadata ()
2948+ return self ._static_details
2949+
2950+ async def _decode_metadata (self ) -> None :
2951+ """Internal method to decode metadata lazily."""
2952+ self ._static_summary , self ._static_details = await _decode_user_metadata (
2953+ self .data_converter , self .raw_description .execution_config .user_metadata
2954+ )
2955+ self ._metadata_decoded = True
29352956
29362957 @staticmethod
29372958 async def _from_raw_description (
29382959 description : temporalio .api .workflowservice .v1 .DescribeWorkflowExecutionResponse ,
29392960 converter : temporalio .converter .DataConverter ,
29402961 ) -> WorkflowExecutionDescription :
2941- (summ , deets ) = await _decode_user_metadata (
2942- converter , description .execution_config .user_metadata
2943- )
29442962 return WorkflowExecutionDescription ._from_raw_info ( # type: ignore
29452963 description .workflow_execution_info ,
29462964 converter ,
29472965 raw_description = description ,
2948- static_summary = summ ,
2949- static_details = deets ,
29502966 )
29512967
29522968
0 commit comments