Skip to content

Compare contiguous revision ranges in History - #354

Closed
wenjin-xyz wants to merge 1 commit into
block:mainfrom
wenjin-xyz:wenjin/history-range-diff
Closed

wenjin-xyz wants to merge 1 commit into
block:mainfrom
wenjin-xyz:wenjin/history-range-diff

Conversation

@wenjin-xyz

@wenjin-xyz wenjin-xyz commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Let readers select a continuous block of revisions and compare the net Markdown change, with shareable URLs and in-place recovery.

What changed and why

History previously showed the changes from one revision at a time. Readers who wanted to see what changed across several edits had to open each diff. Now, checking v3 through v5 shows the net change from the v2 snapshot to v5.

Checking a revision outside the range fills the gap. The comparison updates in place, and the URL keeps the selection for reloads and full-version navigation. History also shows newer revisions first when timestamps tie.

Evidence

Verified in the seeded demo in light and dark mode. Both runs showed v3–v5 selected and a v2 → v5 Markdown diff. The screenshots are captured. GitHub CLI requires repository write access to attach them to this PR.

How to try it

  1. From the PR branch, run bin/setup --skip-server, then bin/dev.
  2. Open http://localhost:3000/sign_in and sign in as hampton@example.com with no password.
  3. Open the seeded History demo. Expect v3–v5 checked and a v2 → v5 diff.
  4. Check v7. The selection fills in v6, and the diff updates to v2 → v7.
  5. Open View full version, then Back to history. Confirm the v3–v7 range stays selected.

Testing

  • Added JavaScript-enabled History browser specs for range selection, reloads, live updates, and retry.
  • Added model, request, and seed specs for revision ordering, range validation, and the demo.
  • Ran bundle exec rspec during implementation. The 3,415-example run found one test-helper error. After the fix, bundle exec rspec spec/requests/plan_versions_spec.rb spec/models/plan_spec.rb spec/lib/development_seed_spec.rb spec/system/history_spec.rb passed all 89 examples at 07c4dcc. The full suite was run before the test-helper correction.
  • Verified the demo in light and dark mode, including gap filling and the full-version round trip.
  • Attached a video or images demonstrating the change, if this PR adds or changes a feature or fixes a UI bug.
image image

Generated with Codex

Let readers select a continuous block of revisions and compare the\nnet Markdown change, with shareable URLs and in-place recovery.

Co-authored-by: figaro <cc878ad5fe81bba0f79d6e5d2726bbbefba3a08bbda27e6bb2e6b1265bc44d4d@buzz.block.builderlab.xyz>
@wenjin-xyz

Copy link
Copy Markdown
Contributor Author

Superseded by #357

@wenjin-xyz wenjin-xyz closed this Nov 27, 2026
HamptonMakes added a commit that referenced this pull request Nov 30, 2026
Compare revision ranges in History (replaces #354)
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.

1 participant