Repository navigation
Tell which lines an edit in the feed changed - #84
Open
markusressel wants to merge 1 commit into
Open
markusressel wants to merge 1 commit into
markusressel wants to merge 1 commit into
Conversation
Edit summaries get `ranges` (line, count, nearest heading with its occurrence and offset) and `textHash` of the text after the edit, so clients highlight the changed lines instead of whole sections. Ranges compare the session start with its end, merge changes up to 3 lines apart and stop at 20. Headings in the front matter no longer count. Feature `feed-ranges`, activity.db migration 4, see docs/dashboard.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
Feed entries of kind
editednow say exactly which lines changed, so the app and the web client can highlight those lines instead of the section from heading to heading. Requested by Markus via the Android client; the contract was agreed with it and is indocs/dashboard.md("Changed lines").summary.ranges:[{line, count, heading, headingOccurrence, offset}]in text order, on the text after the last edit of the editing session.count: 0marks removed lines.summary.textHash: the first 16 hex digits of SHA-256 over that text. When it matches, the client uses the absolute lines; otherwise it goes by heading + offset.# commentsin the front matter no longer count as headings, which also affectssummary.headings.activity.dbaddsfeed.rangesandfeed.text_hash. Older entries haveranges: nulland notextHash.feed-ranges. OpenAPI:FeedSummaryandFeedRangeupdated.Tests:
go test ./...and golangci-lint are clean.🤖 Generated with Claude Code