# Update file side-by-side diff now has explicit before/after separation lane

> Improved readability of update_file side-by-side diffs by adding a visible change lane (-│, +│, │) and explicit Before/After captions.

- Skill: `tools-only/update-file-side-by-side-diff-now-has-explicit-before-after` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add tools-only/update-file-side-by-side-diff-now-has-explicit-before-after`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tools-only/update-file-side-by-side-diff-now-has-explicit-before-after/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tools-only (https://skillmd.com/u/tools-only)
- Updated: 2026-09-29
- Page: https://skillmd.com/skills/tools-only/update-file-side-by-side-diff-now-has-explicit-before-after

---


# Update file side-by-side diff now has explicit before/after separation lane

## Summary

Improved readability of `update_file` side-by-side diffs by adding a visible change lane (`-│`, `+│`, ` │`) and explicit `Before`/`After` captions.

## Changes

- `src/tunacode/ui/renderers/tools/update_file.py`
  - Added symbolic constants for side-by-side layout widths and divider glyphs.
  - Changed middle diff column to a 2-character lane that combines change direction with a vertical separator.
  - Styled lane markers by direction (`delete` red, `insert` green, context dim).
  - Updated caption to: `Before: a/<file> │ After: b/<file>`.

- `tests/unit/ui/test_update_file_renderer.py`
  - Added assertion that rendered output includes:
    - `Before: a/file.py`
    - `After: b/file.py`
    - `-│` and `+│` markers

## Behavioral Impact

No tool contract changes. The renderer still parses unified diffs and retains unified-diff fallback when side-by-side parsing fails.

