chore: remove unnecessary debug logging

Frontend:
- Remove 4 console.log statements from terminal.tsx that flooded the
  browser console with WebSocket traffic (open, received X bytes, sending Y,
  xterm focused)

Backend:
- Downgrade Dockerfile/entrypoint compilation logs from INFO to DEBUG in
  _prepare_manifest_instance
- Remove hex-dump diagnostic logging from docker_build.py (was for
  troubleshooting the backslash continuation bug, now fixed)
- Downgrade Dockerfile write log from INFO to DEBUG
This commit is contained in:
Alex Blank
2026-05-28 23:05:48 +02:00
parent f4802ece4d
commit e20d94d6ba
3 changed files with 2 additions and 24 deletions
+1 -4
View File
@@ -1104,14 +1104,11 @@ async def _prepare_manifest_instance(
dockerfile = compile_dockerfile(manifest)
entrypoint = compile_entrypoint(manifest)
logger.info(
logger.debug(
"Compiled Dockerfile for instance %s (%d chars)",
instance.id,
len(dockerfile),
)
logger.debug("Dockerfile content: %s", dockerfile)
logger.info("Compiled entrypoint for instance %s", instance.id)
logger.debug("Entrypoint content: %s", entrypoint)
build_ctx = {
"Dockerfile": dockerfile,
+1 -7
View File
@@ -31,13 +31,7 @@ def build_image(
# Write Dockerfile
dockerfile_path = Path(instance_dir) / "Dockerfile"
dockerfile_path.write_text(dockerfile, newline="\n")
logger.info("Wrote Dockerfile to %s (%d bytes)", dockerfile_path, len(dockerfile))
logger.debug("Dockerfile content:\n%s", dockerfile)
# Hex-dump first 8 lines so we can see exactly what bytes Docker receives
lines_for_hex = dockerfile.split("\n")[:8]
for i, line in enumerate(lines_for_hex, start=1):
logger.info("Dockerfile line %d hex: %s", i, line.encode("utf-8").hex())
logger.debug("Wrote Dockerfile to %s (%d bytes)", dockerfile_path, len(dockerfile))
# Write build context files
if build_context:
-13
View File
@@ -107,7 +107,6 @@ export const TerminalComponent = React.forwardRef<TerminalRef, TerminalProps>(
wsRef.current = ws;
ws.onopen = () => {
console.log(`[Terminal ${sessionId ?? "default"}] WebSocket opened`);
setStatus("connected");
setError(null);
reconnectAttemptsRef.current = 0;
@@ -139,10 +138,6 @@ export const TerminalComponent = React.forwardRef<TerminalRef, TerminalProps>(
if (!termRef.current) return;
if (event.data instanceof Blob) {
// eslint-disable-next-line no-console
console.log(
`[Terminal ${sessionId ?? "default"}] received ${(event.data as Blob).size} bytes`,
);
event.data.arrayBuffer().then((buffer) => {
const data = new Uint8Array(buffer);
termRef.current?.write(data);
@@ -313,9 +308,6 @@ export const TerminalComponent = React.forwardRef<TerminalRef, TerminalProps>(
// Open xterm first (must happen before fit)
term.open(container);
term.focus();
console.log(
`[Terminal ${sessionId ?? "default"}] xterm opened and focused`,
);
const ws = connectWebSocket();
// Initial fit after layout settles (terminal must be opened first)
@@ -340,11 +332,6 @@ export const TerminalComponent = React.forwardRef<TerminalRef, TerminalProps>(
// Handle terminal input
term.onData((data) => {
// eslint-disable-next-line no-console
console.log(
`[Terminal ${sessionId ?? "default"}] sending:`,
JSON.stringify(data),
);
const currentWs = wsRef.current;
if (currentWs?.readyState !== WebSocket.OPEN) return;