The image viewer was treating error strings from CardImage as image data and rendering them as if they were sixel output. The flow needs to be updated so that errors are shown as errors and image data is only rendered when the fetch succeeds.
◦ imageReadyMsg now includes err alongside sixelData
◦ fetchImageCmd returns imageReadyMsg{err: err} on failure and leaves sixelData empty
◦ ImageModel.Update sets m.Error on failure and only sets m.ImageData on success
◦ ImageModel.View renders a styled error when m.Error is present; otherwise renders the image data
The image viewer was treating error strings from
CardImageas image data and rendering them as if they weresixeloutput. The flow needs to be updated so that errors are shown as errors and image data is only rendered when the fetch succeeds.◦
imageReadyMsgnow includeserralongsidesixelData◦
fetchImageCmdreturnsimageReadyMsg{err: err}on failure and leavessixelDataempty◦
ImageModel.Updatesetsm.Erroron failure and only setsm.ImageDataon success◦
ImageModel.Viewrenders a styled error whenm.Erroris present; otherwise renders the image data