diff --git a/apps/mobile/src/app/(tabs)/shell/detail.tsx b/apps/mobile/src/app/(tabs)/shell/detail.tsx index e8ddf00..377a47f 100644 --- a/apps/mobile/src/app/(tabs)/shell/detail.tsx +++ b/apps/mobile/src/app/(tabs)/shell/detail.tsx @@ -46,7 +46,8 @@ function ShellDetail() { const listenerId = connection.addChannelListener((data: ArrayBuffer) => { // Forward bytes to terminal (no string conversion) - xterm?.write(new Uint8Array(data)); + const uInt8 = new Uint8Array(data); + xterm?.write(uInt8); }); return () => { @@ -118,7 +119,7 @@ function ShellDetail() { theme.colors.background, theme.colors.textPrimary, ); - xtermRef.current?.setFont?.('Menlo, ui-monospace, monospace', 14); + xtermRef.current?.setFont?.('Menlo, ui-monospace, monospace', 50); }} onMessage={(message) => { if (message.type === 'initialized') { diff --git a/packages/react-native-xtermjs-webview/src/index.tsx b/packages/react-native-xtermjs-webview/src/index.tsx index c2e6676..3fd7fe6 100644 --- a/packages/react-native-xtermjs-webview/src/index.tsx +++ b/packages/react-native-xtermjs-webview/src/index.tsx @@ -66,6 +66,7 @@ export function XtermJsWebView({ // ---- RN -> WebView message sender via injectJavaScript + window MessageEvent const send = (obj: OutboundMessage) => { const payload = JSON.stringify(obj); + console.log('sending msg', payload); const js = `window.dispatchEvent(new MessageEvent('message',{data:${JSON.stringify( payload, )}})); true;`; @@ -148,6 +149,7 @@ export function XtermJsWebView({ onMessage={(event) => { try { const msg: InboundMessage = JSON.parse(event.nativeEvent.data); + console.log('received msg', msg); if (msg.type === 'initialized') { onMessage?.({ type: 'initialized' }); return;