Skip to content

Compare Markdown versions formatted - #688

Merged
vdolek merged 4 commits into
claude/project-thread-j435zh-comparefrom
claude/project-thread-j435zh-compare-md
Oct 31, 2026
Merged

vdolek merged 4 commits into
claude/project-thread-j435zh-comparefrom
claude/project-thread-j435zh-compare-md

Conversation

@EvilBrainsBot

@EvilBrainsBot EvilBrainsBot commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Requested by Martin · project thread

Summary

Part 2 of #671: Markdown versions compare formatted in read-only Milkdown, with a Formátovaně / Zdrojový kód switch to part 1's source compare. Stacked on #683.

Changes

  • Side by side keeps facing blocks level; one column shows removed text, blocks, rows and items where they stood.
  • Blocks align on equal blocks first, then by shared text; text changes come from presentableDiff. Tables compare by cell, rows known by their first cell.
  • A changed format is purple with a tooltip ("nově tučně"); a block names its changes of type and format on a chip after its text ("nadpis 2 → odstavec; nově tučně"). Legend below.
  • Předchozí / Další změna, summary "+3 −2 bloky", diacritics-insensitive search with a count. No collapsing, no zoom; no HTML runs, no image loads.
  • Versions equal formatted open the source compare.
  • markdown-diff.js is pure and tested in Node; SDD-012 states the compare.

Screenshots

PŘED: porovnání Markdownu jen jako zdrojový kód
PO: porovnání Markdownu formátovaně
Formátované porovnání vedle sebe, začátek
Formátované porovnání vedle sebe, tabulka, seznam, štítky a legenda
Tooltip u změny formátu „nově tučně“
Formátované porovnání v jednom sloupci, 1440
Formátované porovnání v jednom sloupci, 390
Hledání „zhotovitel“ ve formátovaném porovnání
Přepnutí na zdrojový kód

Part of #671


Generated by Claude Code

@EvilBrainsBot
EvilBrainsBot requested a review from vdolek as a code owner October 30, 2026 20:53
@EvilBrainsBot EvilBrainsBot added the agent-in-progress An agent is working on this pull request label Oct 30, 2026 — with Claude
@EvilBrainsBot EvilBrainsBot self-assigned this Oct 30, 2026
EvilBrainsBot pushed a commit that referenced this pull request Oct 30, 2026
@vdolek
vdolek added this pull request to stack #684 October 30, 2026 21:03

Copy link
Copy Markdown
Member Author

Code Review

  • A search typed while a newly shown layout is still building is kept and runs once the layout is built.
  • Clearing the search in the text or code compare returns empty matches without folding both texts.
  • Comments on diffMarkdown and align shortened.
  • Verified in the browser: raw HTML in the compared versions shows as text, nothing executes, no image loads.

Generated by Claude Code

@github-actions github-actions Bot added agent-done Waiting for the owner's review and merge and removed agent-in-progress An agent is working on this pull request labels Oct 30, 2026
@EvilBrainsBot EvilBrainsBot added agent-in-progress An agent is working on this pull request and removed agent-done Waiting for the owner's review and merge labels Oct 30, 2026 — with Claude
EvilBrainsBot pushed a commit that referenced this pull request Oct 30, 2026

Copy link
Copy Markdown
Member Author

Code Review

  • The block label names each format stretch as its tooltip does and stays inside its column.
  • The hidden note after a format stretch is gone; the visible label names the change for assistive technology.

Generated by Claude Code

@github-actions github-actions Bot added agent-done Waiting for the owner's review and merge and removed agent-in-progress An agent is working on this pull request labels Oct 30, 2026
@EvilBrainsBot
EvilBrainsBot force-pushed the claude/project-thread-j435zh-compare-md branch from 312bf62 to ef99c2d Compare October 30, 2026 22:14
vdolek
vdolek previously approved these changes Oct 31, 2026
@EvilBrainsBot
EvilBrainsBot force-pushed the claude/project-thread-j435zh-compare-md branch from ef99c2d to e94e5ca Compare October 31, 2026 12:03
A Markdown compare opens formatted in read-only Milkdown editors, side by
side with facing blocks level or in one column with the removed content in
place. Blocks align on the exact diff of equal blocks first, then by shared
text; text changes come from presentableDiff of @codemirror/merge, which the
CodeMirror bundle exports as diffTexts. Tables compare by cell, rows known by
their first cell. A change of marks or block type is named in a tooltip or a
chip. The Formátovaně / Zdrojový kód switch opens part 1's source compare,
which versions equal formatted show on their own.

Part of #671.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UovdgewekkrSiyay5dgc3v
A query typed while the Markdown compare of the layout just shown is
still building was dropped; it is now kept and searched once the layout
is built. Clearing the search of a text compare no longer folds both
texts. Shorter comments in the Markdown diff.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UovdgewekkrSiyay5dgc3v
A changed format was named only in a tooltip, which touch cannot reach.
Each block now names its changes of type and format on one label after
its text; the tooltip stays over the stretch. A long label wraps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UovdgewekkrSiyay5dgc3v
The label joins a block's stretch names as the tooltips show them and
stays inside its column. The hidden note after a stretch went, as the
visible label already reads the change out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UovdgewekkrSiyay5dgc3v
@EvilBrainsBot
EvilBrainsBot force-pushed the claude/project-thread-j435zh-compare-md branch from e94e5ca to 6016333 Compare October 31, 2026 12:21
@vdolek
vdolek merged commit 50fa112 into master Oct 31, 2026
2 checks passed
@vdolek
vdolek deleted the claude/project-thread-j435zh-compare-md branch October 31, 2026 12:41
vdolek pushed a commit that referenced this pull request Oct 31, 2026
<!-- claude-projects-attribution: {"github_login":"EvilBrainsBot"} -->
_Requested by **Martin** · [project
thread](https://claude.ai/code/project/chan_018WzBMUTj3Q3JGkpeCYsRag?thread=cmsg_018WzBMUTj3Q3JGkpeCYsRag4G6iJAPNh37G6D1UBZkeqJ)_

Stacked on #688.

## Summary
The editor toolbar gets Změny: the edited text against the version being
edited, or another picked version, in one column.

## Changes
- Text, code and Markdown source show the diff in the editor itself
(`unifiedMergeView`), so edits, undo, search, Ctrl+S and the
unsaved-changes guard work as before.
- Formatted Markdown shows the read-only formatted compare in place of
the editor; format buttons are disabled while it shows.
- Předchozí změna, Další změna and the summary move into
`CompareChanges`, shared with both preview compares.
- A version over 1 MB, not in UTF-8 or failing to load says why; the
edited text stays editable.
- SDD-012 states the editor's Změny.

## Screenshots
![Změny v kódu proti verzi
1](https://raw.githubusercontent.com/EvilBrainsTechnology/EvilCase/docs/images/pull-request/692/editor-changes-code.png)
![Změny v kódu, další
změna](https://raw.githubusercontent.com/EvilBrainsTechnology/EvilCase/docs/images/pull-request/692/editor-changes-step.png)
![Změny v kódu na
telefonu](https://raw.githubusercontent.com/EvilBrainsTechnology/EvilCase/docs/images/pull-request/692/editor-changes-code-390.png)
![Změny ve formátovaném
Markdownu](https://raw.githubusercontent.com/EvilBrainsTechnology/EvilCase/docs/images/pull-request/692/editor-changes-markdown.png)
![Změny ve formátovaném Markdownu na
telefonu](https://raw.githubusercontent.com/EvilBrainsTechnology/EvilCase/docs/images/pull-request/692/editor-changes-markdown-390.png)
![Změny ve zdrojovém kódu
Markdownu](https://raw.githubusercontent.com/EvilBrainsTechnology/EvilCase/docs/images/pull-request/692/editor-changes-markdown-source.png)
![Verze není v kódování
UTF-8](https://raw.githubusercontent.com/EvilBrainsTechnology/EvilCase/docs/images/pull-request/692/editor-changes-not-utf8.png)
![Soubor s jedinou
verzí](https://raw.githubusercontent.com/EvilBrainsTechnology/EvilCase/docs/images/pull-request/692/editor-changes-single.png)
![PŘED: lišta
editoru](https://raw.githubusercontent.com/EvilBrainsTechnology/EvilCase/docs/images/pull-request/692/editor-toolbar-pred.png)
![PO: lišta
editoru](https://raw.githubusercontent.com/EvilBrainsTechnology/EvilCase/docs/images/pull-request/692/editor-toolbar-po.png)

Closes #671

---
_Generated by [Claude
Code](https://claude.ai/code/session_01UovdgewekkrSiyay5dgc3v)_

---------

Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot removed the agent-done Waiting for the owner's review and merge label Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants