diff --git a/experiments/test-docker-pull-output.js b/experiments/test-docker-pull-output.js new file mode 100644 index 0000000..a2d5c3c --- /dev/null +++ b/experiments/test-docker-pull-output.js @@ -0,0 +1,35 @@ +#!/usr/bin/env node +/** + * Test script to verify docker pull output format + * This test verifies that there is no empty line between + * the timeline marker and the virtual command line + */ + +const { + createVirtualCommandBlock, + createVirtualCommandResult, + createTimelineSeparator, +} = require('../js/src/lib/output-blocks'); + +console.log('Testing virtual command output format...\n'); + +// Simulate what dockerPullImage does +const image = 'alpine:latest'; + +// Print the virtual command line (should NOT have empty line after) +const commandBlock = createVirtualCommandBlock(`docker pull ${image}`); +console.log(commandBlock); + +// Expected: next line should be docker pull output, NOT an empty line +console.log('latest: Pulling from library/alpine'); +console.log('f6b4fb944634: Pull complete'); +console.log('Digest: sha256:865b95f46d98cf867a156fe4a135ad3fe50d2056aa3f25ed31662dff6da4eb62'); +console.log('Status: Downloaded newer image for alpine:latest'); +console.log('docker.io/library/alpine:latest'); + +// Print result marker and separator +console.log(); +console.log(createVirtualCommandResult(true)); +console.log(createTimelineSeparator()); + +console.log('\nāœ“ Test complete - verify no empty line after "$ docker pull alpine:latest"'); diff --git a/js/.changeset/fix-visual-continuity-73.md b/js/.changeset/fix-visual-continuity-73.md new file mode 100644 index 0000000..ed08503 --- /dev/null +++ b/js/.changeset/fix-visual-continuity-73.md @@ -0,0 +1,12 @@ +--- +'start-command': patch +--- + +fix: Remove empty line after virtual command to maintain visual continuity + +- Fixed visual continuity break in docker pull output +- Removed empty line between timeline marker (`│`) and virtual command line (`$ docker pull`) +- Output now flows continuously from timeline marker to command to output +- Applies to all virtual command blocks (currently docker pull operations) + +Fixes #73 diff --git a/js/src/lib/docker-utils.js b/js/src/lib/docker-utils.js index e9957e8..5768966 100644 --- a/js/src/lib/docker-utils.js +++ b/js/src/lib/docker-utils.js @@ -117,7 +117,6 @@ function dockerPullImage(image) { // Print the virtual command line console.log(createVirtualCommandBlock(`docker pull ${image}`)); - console.log(); let output = ''; let success = false; diff --git a/rust/changelog.d/73.md b/rust/changelog.d/73.md new file mode 100644 index 0000000..faf95d8 --- /dev/null +++ b/rust/changelog.d/73.md @@ -0,0 +1,8 @@ +fix: Remove empty line after virtual command to maintain visual continuity + +- Fixed visual continuity break in docker pull output +- Removed empty line between timeline marker (`│`) and virtual command line (`$ docker pull`) +- Output now flows continuously from timeline marker to command to output +- Applies to all virtual command blocks (currently docker pull operations) + +Fixes #73 diff --git a/rust/src/lib/isolation.rs b/rust/src/lib/isolation.rs index 8495c4f..5fbb808 100644 --- a/rust/src/lib/isolation.rs +++ b/rust/src/lib/isolation.rs @@ -488,7 +488,6 @@ pub fn docker_pull_image(image: &str) -> (bool, String) { "{}", crate::output_blocks::create_virtual_command_block(&format!("docker pull {}", image)) ); - println!(); let mut child = match Command::new("docker") .args(["pull", image])