From 1f06c5f43c71d2e019c4ccb57df93b649d9749ce Mon Sep 17 00:00:00 2001 From: konard Date: Thu, 8 Jan 2026 20:03:29 +0100 Subject: [PATCH 1/6] Initial commit with task details Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: https://github.com/link-foundation/start/issues/73 --- CLAUDE.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..a364d59 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,5 @@ +Issue to solve: https://github.com/link-foundation/start/issues/73 +Your prepared branch: issue-73-163864f76573 +Your prepared working directory: /tmp/gh-issue-solver-1767899007659 + +Proceed. From 11e8636dbf510fb600ad5b61db1cacdfebf7dd31 Mon Sep 17 00:00:00 2001 From: konard Date: Thu, 8 Jan 2026 20:07:49 +0100 Subject: [PATCH 2/6] fix: Add empty line before result marker for visual continuity (#73) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ensures consistent visual formatting around commands by adding an empty line before the result marker (✓/✗) after command output. This follows the visual continuity pattern: 1. Command line ($ ...) 2. Empty line 3. Command output 4. Empty line (added by this fix) 5. Result marker (✓ or ✗) Changes: - JS: Add console.log() before result marker in docker-utils.js - Rust: Add println!() before result marker in isolation.rs - Add tests documenting the expected visual format 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- js/src/lib/docker-utils.js | 4 +- js/test/output-blocks.test.js | 28 +++++++++++ rust/src/lib/isolation.rs | 4 +- rust/tests/output_blocks_test.rs | 83 ++++++++++++++++++++++++++++++++ 4 files changed, 117 insertions(+), 2 deletions(-) diff --git a/js/src/lib/docker-utils.js b/js/src/lib/docker-utils.js index 7e6c587..8fbb6a9 100644 --- a/js/src/lib/docker-utils.js +++ b/js/src/lib/docker-utils.js @@ -142,7 +142,9 @@ function dockerPullImage(image) { success = false; } - // Print result marker and separator (no empty line needed - already printed after command) + // Print empty line before result marker for visual separation (issue #73) + // This ensures output is visually separated from the result marker + console.log(); console.log(createVirtualCommandResult(success)); console.log(createTimelineSeparator()); diff --git a/js/test/output-blocks.test.js b/js/test/output-blocks.test.js index f950c3d..0c92141 100644 --- a/js/test/output-blocks.test.js +++ b/js/test/output-blocks.test.js @@ -533,13 +533,41 @@ describe('output-blocks module', () => { // $ docker pull alpine:latest // // + // // ✓ // │ // $ echo hi // // hi + // // ✓ }); + + it('output formatting follows visual continuity pattern', () => { + // Issue #73: All commands should have consistent formatting: + // 1. Command line ($ ...) + // 2. Empty line (visual separation) + // 3. Command output + // 4. Empty line (visual separation) + // 5. Result marker (✓ or ✗) + // + // This test documents the expected output structure that + // dockerPullImage and runInDocker should produce. + + // Verify createCommandLine produces the correct format + const commandLine = createCommandLine('docker pull alpine:latest'); + expect(commandLine).toBe('$ docker pull alpine:latest'); + + // Verify createVirtualCommandBlock matches + const virtualCommandLine = createVirtualCommandBlock( + 'docker pull alpine:latest' + ); + expect(virtualCommandLine).toBe(commandLine); + + // Verify result markers + expect(createVirtualCommandResult(true)).toBe('✓'); + expect(createVirtualCommandResult(false)).toBe('✗'); + }); }); }); diff --git a/rust/src/lib/isolation.rs b/rust/src/lib/isolation.rs index 4c0118c..1b017e0 100644 --- a/rust/src/lib/isolation.rs +++ b/rust/src/lib/isolation.rs @@ -533,7 +533,9 @@ pub fn docker_pull_image(image: &str) -> (bool, String) { let success = child.wait().map(|s| s.success()).unwrap_or(false); - // Print result marker and separator (no empty line needed - already printed after command) + // Print empty line before result marker for visual separation (issue #73) + // This ensures output is visually separated from the result marker + println!(); println!( "{}", crate::output_blocks::create_virtual_command_result(success) diff --git a/rust/tests/output_blocks_test.rs b/rust/tests/output_blocks_test.rs index f3eb4e5..0d1cbbd 100644 --- a/rust/tests/output_blocks_test.rs +++ b/rust/tests/output_blocks_test.rs @@ -350,3 +350,86 @@ fn test_visual_continuity_start_block_for_docker_isolation() { ); assert!(!block.contains("$ echo hi"), "Command should be deferred"); } + +// Issue #73: Visual Continuity Tests +#[test] +fn test_visual_continuity_output_formatting() { + // Issue #73: All commands should have consistent formatting: + // 1. Command line ($ ...) + // 2. Empty line (visual separation) + // 3. Command output + // 4. Empty line (visual separation) + // 5. Result marker (✓ or ✗) + // + // This test documents the expected output structure. + + use start_command::{ + create_command_line, create_virtual_command_block, create_virtual_command_result, + }; + + // Verify createCommandLine produces the correct format + let command_line = create_command_line("docker pull alpine:latest"); + assert_eq!(command_line, "$ docker pull alpine:latest"); + + // Verify createVirtualCommandBlock matches createCommandLine + let virtual_command_line = create_virtual_command_block("docker pull alpine:latest"); + assert_eq!(virtual_command_line, command_line); + + // Verify result markers + assert_eq!(create_virtual_command_result(true), "✓"); + assert_eq!(create_virtual_command_result(false), "✗"); +} + +#[test] +fn test_visual_continuity_command_output_pattern() { + // Issue #73: The expected output pattern for docker isolation with virtual commands: + // + // │ session uuid-abc + // │ start 2026-01-08 12:00:00 + // │ + // │ isolation docker + // │ mode attached + // │ image alpine:latest + // │ container docker-1234 + // │ + // $ docker pull alpine:latest + // + // latest: Pulling from library/alpine + // ... + // + // ✓ + // │ + // $ echo hi + // + // hi + // + // ✓ + // + // The key aspects tested here: + // 1. Start block ends with │ when defer_command is true + // 2. Virtual command and user command follow the same pattern: + // command -> empty line -> output -> empty line -> result marker + + let extra = vec![ + "[Isolation] Environment: docker, Mode: attached", + "[Isolation] Image: alpine:latest", + "[Isolation] Session: docker-1234", + ]; + let start_block = create_start_block(&StartBlockOptions { + session_id: "uuid-abc", + timestamp: "2026-01-08 12:00:00", + command: "echo hi", + extra_lines: Some(extra), + style: None, + width: None, + defer_command: true, + }); + + // When defer_command is true, start block should end with empty timeline line + let lines: Vec<&str> = start_block.lines().collect(); + assert_eq!( + lines.last().unwrap(), + &"│", + "Start block with defer_command should end with │" + ); +} From 688f1f5b57351cfe922636170b541434adae5e4b Mon Sep 17 00:00:00 2001 From: konard Date: Thu, 8 Jan 2026 20:10:58 +0100 Subject: [PATCH 3/6] chore: Add changelog fragments for visual continuity fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add JS changeset for empty line before result marker - Update Rust changelog.d/73.md with complete fix description 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../visual-continuity-result-marker.md | 29 +++++++++++++++++++ rust/changelog.d/73.md | 22 +++++++------- 2 files changed, 40 insertions(+), 11 deletions(-) create mode 100644 js/.changeset/visual-continuity-result-marker.md diff --git a/js/.changeset/visual-continuity-result-marker.md b/js/.changeset/visual-continuity-result-marker.md new file mode 100644 index 0000000..63514e2 --- /dev/null +++ b/js/.changeset/visual-continuity-result-marker.md @@ -0,0 +1,29 @@ +--- +'start-command': patch +--- + +fix: Add empty line before result marker for visual continuity + +- Added empty line before result marker (✓/✗) after command output +- Ensures consistent visual formatting: command → empty line → output → empty line → result marker +- Applied to both docker pull virtual commands and user commands +- Tests document the expected visual format + +Expected format: +``` +│ +$ docker pull alpine:latest + +latest: Pulling from library/alpine +... + +✓ +│ +$ echo hi + +hi + +✓ +``` + +Fixes #73 diff --git a/rust/changelog.d/73.md b/rust/changelog.d/73.md index 87bf489..2968fb6 100644 --- a/rust/changelog.d/73.md +++ b/rust/changelog.d/73.md @@ -1,25 +1,25 @@ -fix: Fix visual continuity in docker isolation mode +fix: Complete visual continuity fix for docker isolation mode - Fixed empty line placement in docker isolation output - Empty line is now correctly placed AFTER the command (`$ docker pull alpine:latest`) - instead of BEFORE it -- Maintains consistent visual structure in timeline output -- Added tests for visual continuity behavior +- Added empty line BEFORE the result marker (`✓` or `✗`) for visual separation +- Ensures consistent visual formatting around all commands -Before: +Expected format: ``` │ - $ docker pull alpine:latest + latest: Pulling from library/alpine -``` +... -After: -``` +✓ │ -$ docker pull alpine:latest +$ echo hi -latest: Pulling from library/alpine +hi + +✓ ``` Fixes #73 From f97cbc96d0106b75a5fb3d8fc23b4b0db95129b8 Mon Sep 17 00:00:00 2001 From: konard Date: Thu, 8 Jan 2026 20:25:56 +0100 Subject: [PATCH 4/6] style: Format changeset file with prettier MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- js/.changeset/visual-continuity-result-marker.md | 1 + 1 file changed, 1 insertion(+) diff --git a/js/.changeset/visual-continuity-result-marker.md b/js/.changeset/visual-continuity-result-marker.md index 63514e2..872e29b 100644 --- a/js/.changeset/visual-continuity-result-marker.md +++ b/js/.changeset/visual-continuity-result-marker.md @@ -10,6 +10,7 @@ fix: Add empty line before result marker for visual continuity - Tests document the expected visual format Expected format: + ``` │ $ docker pull alpine:latest From 69760663cf4b715ffbb4dadfebc1a585ed99882a Mon Sep 17 00:00:00 2001 From: konard Date: Thu, 8 Jan 2026 21:24:28 +0100 Subject: [PATCH 5/6] chore: Trigger CI (empty commit) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 From af970c8be1ab7c7ab34beab2826b9fa5a521e8a7 Mon Sep 17 00:00:00 2001 From: konard Date: Thu, 8 Jan 2026 22:46:26 +0100 Subject: [PATCH 6/6] Revert "Initial commit with task details" This reverts commit 1f06c5f43c71d2e019c4ccb57df93b649d9749ce. --- CLAUDE.md | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md deleted file mode 100644 index a364d59..0000000 --- a/CLAUDE.md +++ /dev/null @@ -1,5 +0,0 @@ -Issue to solve: https://github.com/link-foundation/start/issues/73 -Your prepared branch: issue-73-163864f76573 -Your prepared working directory: /tmp/gh-issue-solver-1767899007659 - -Proceed.