From f032ece6784a3587f42597344de354f0d21e1966 Mon Sep 17 00:00:00 2001 From: anti Date: Fri, 24 Apr 2026 10:17:57 -0400 Subject: [PATCH] fix(web/session): log the cast to console when player mounts Diagnostic for the persistent "player mounts with chrome but plays black" symptom after the blob-URL fix. The player now gets {data: cast} correctly and parses at least enough to render the control bar, but duration shows --:-- and the terminal stays blank. Log the first 400 chars of the built cast + event/cols/rows so the operator can confirm in DevTools whether the malformed input is the cast itself or something downstream in the asciinema parser. --- decnet_web/src/components/SessionDrawer.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/decnet_web/src/components/SessionDrawer.tsx b/decnet_web/src/components/SessionDrawer.tsx index ebd5b528..db739125 100644 --- a/decnet_web/src/components/SessionDrawer.tsx +++ b/decnet_web/src/components/SessionDrawer.tsx @@ -136,6 +136,14 @@ const SessionDrawer: React.FC = ({ decky, sid, fields, onClo playerInstance.current = null; } const cast = buildCastBlob(header, playable); + // One-time diagnostic: when the player silently refuses to play, the + // cast text itself is usually the culprit. Log the first chunk so + // "yes, the header renders correctly" is a one-F12 check. + console.debug( + 'asciinema cast (first 400 chars):', + cast.slice(0, 400), + `| events=${playable.length} | cols=${header.width} rows=${header.height}`, + ); try { playerInstance.current = AsciinemaPlayer.create( { data: cast }, @@ -143,8 +151,6 @@ const SessionDrawer: React.FC = ({ decky, sid, fields, onClo { fit: 'width', terminalFontSize: '12px' }, ); } catch (err) { - // Surface to console so we have a fingerprint next time a cast - // parses as "valid" but refuses to play. console.error('asciinema-player failed to mount', err); } return () => {