fix(shell): resolve TypeScript errors in PTY terminal components
All checks were successful
Test / frontend-tests (pull_request) Successful in 1m39s
Test / frontend-typecheck (pull_request) Successful in 1m48s
PR Review Automation / review (pull_request) Successful in 4m26s
Test / rust-fmt-check (pull_request) Successful in 12m9s
Test / rust-clippy (pull_request) Successful in 13m43s
Test / rust-tests (pull_request) Successful in 15m24s

- Remove rows/cols from ITerminalOptions (not in xterm.js 5.x)
- Fix startPtyExecSessionCmd signature (add shell parameter)
- Fix startPtyAttachSessionCmd signature (handle optional container)
- Fix sendPtyStdinCmd call (send string directly, not byte array)

All TypeScript errors resolved, build now passes cleanly.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Shaun Arman 2026-06-09 17:12:41 -05:00
parent 7f12baec9c
commit 44d33035de
2 changed files with 5 additions and 10 deletions

View File

@ -29,8 +29,6 @@ const XTERM_OPTIONS: ITerminalOptions = {
fontFamily: '"JetBrains Mono", "Fira Code", monospace',
fontSize: 13,
convertEol: true,
rows: 24,
cols: 80,
};
export function InteractiveAttachModal({
@ -79,7 +77,7 @@ export function InteractiveAttachModal({
clusterId,
namespace,
pod,
container
container || ""
);
sessionIdRef.current = sid;
@ -111,8 +109,7 @@ export function InteractiveAttachModal({
// Handle user input
term.onData((data) => {
if (sid) {
const bytes = Array.from(new TextEncoder().encode(data));
sendPtyStdinCmd(sid, bytes).catch((err) => {
sendPtyStdinCmd(sid, data).catch((err) => {
term.write(`\r\n\x1b[31mError sending input: ${err}\x1b[0m\r\n`);
});
}

View File

@ -29,8 +29,6 @@ const XTERM_OPTIONS: ITerminalOptions = {
fontFamily: '"JetBrains Mono", "Fira Code", monospace',
fontSize: 13,
convertEol: true,
rows: 24,
cols: 80,
};
export function InteractiveShellModal({
@ -79,7 +77,8 @@ export function InteractiveShellModal({
clusterId,
namespace,
pod,
container
container || "",
"/bin/sh"
);
sessionIdRef.current = sid;
@ -111,8 +110,7 @@ export function InteractiveShellModal({
// Handle user input
term.onData((data) => {
if (sid) {
const bytes = Array.from(new TextEncoder().encode(data));
sendPtyStdinCmd(sid, bytes).catch((err) => {
sendPtyStdinCmd(sid, data).catch((err) => {
term.write(`\r\n\x1b[31mError sending input: ${err}\x1b[0m\r\n`);
});
}