Repository navigation
fix: bound long-line tool diff previews - #60
Merged
Merged
Conversation
Co-authored-by: OpenAI Codex <noreply@openai.com>
Co-authored-by: OpenAI Codex <noreply@openai.com>
Co-authored-by: OpenAI Codex <noreply@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Edit and write cards now bound their input diff previews to 2,000 characters, including when a single line is longer than the limit. A notice explains the shortened preview; Show more reveals the complete diff and Copy input retains the full original text.
Part of #2
Closes #59
Verification
mise exec -- bun install --frozen-lockfilepassed.mise exec -- bun run lintpassed.mise exec -- bun run typecheckpassed.mise exec -- bun run test:unitpassed, 90 tests.mise exec -- bun run test:integrationpassed, 77 tests.mise run buildpassed, including the checks and production bundle.mise exec -- bun run test:e2epassed, 53 tests across seven real Electron suites.git diff --checkpassed.Proof
New component regressions cover the following behaviour.
bounds a single long edit line and preserves full inspection and copyingbounds a single long write line and preserves full inspection and copyingbounds multiple diff rows including the final partial rowdoes not shorten a 1999-character diff because of input path or labelsdoes not shorten a 2000-character diff because of input path or labelsThe new Electron suite tests
bounds a long write line, copies the full input and expands on requestand its edit equivalent. It loads actual temporary Pi archives, checks the rendered preview length, verifies the native clipboard, expands by keyboard, shortens again and checks narrow-window horizontal overflow. It waits for the virtual row measurement to place the history footer below the resized card, then captures the changed surface to.tmp/proof/andtest-results/tool-preview/for the existing CI artefact upload. Desktop proof shows the full card; minimum-window proof shows the reachable inspection controls after scrolling.Playwright Electron capture succeeded. Direct inline image upload is blocked because browser discovery returned
The browser access host is unavailable. Download the hosted Electron screenshot artefact. It includes the four PNGs undertest-results/tool-preview/; CI retains the artefact until 20 November 2026. The uploaded PNGs were downloaded and visually checked. Scratch captures and logs are excluded from the commit.The bound applies to the displayed diff, including line markers. Input path and label text no longer cause an otherwise short diff to offer Show more. This slice does not change saved archives or tool execution. Full expansion still renders the entire diff; broader tool-card work remains under #2.
The hosted desktop captures still draw the history footer across the tool card even though its DOM bounds pass the layout check. Local captures place it correctly. The bounded preview, truncation notice and inspection controls are visible in both. This discrepancy is recorded in #61 for investigation of capture timing versus virtual transcript layout. It is not claimed as fixed by this slice.