Cover LineDiff's CRLF, removal-only and large-diff branches
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 90/100
Research direction
Read src/Prompuff.Application/Services/LineDiff.cs around the fallback and SplitLines, then add the three branch tests to tests/Prompuff.Application.Tests/LineDiffTests.cs. Run dotnet test tests/Prompuff.Application.Tests. Done when the CRLF, null-text, and 2,001-line fallback cases verify the specified change counts, kinds, order, and line numbers.
Written by the indexing model from the issue text.
Description
The History tab's diff comes from LineDiff. Its tests cover additions, edits and identical texts, but three branches have no test:
SplitLinesturns\r\ninto\n, so a body with Windows line endings and the same body with LF endings should show no changes.- When the new text is empty or null, every old line is
Removed. - When the changed middle is bigger than
MaxTableCells(4,000,000 cells, so more than about 2,000 lines on each side), it skips the LCS table and lists every old line as removed, then every new line as added.
What to do
Add a test for each branch to LineDiffTests. For the large one, build two texts of 2,001 lines that share no line, such as a0…a2000 and b0…b2000, and check kinds, order and line numbers, not only the counts. Tests only; don't change LineDiff.
Where to look
src/Prompuff.Application/Services/LineDiff.cs: the fallback at line 58,SplitLinesat line 117.tests/Prompuff.Application.Tests/LineDiffTests.cs.
Done when
-
"a\r\nb"against"a\nb"gives onlyUnchangedlines, andCountChangesis(0, 0). -
CountChanges("a\nb", null)is(0, 2), andComputemarks both linesRemovedwith old line numbers 1 and 2. - The large-diff test checks that all 2,001
Removedlines come before the 2,001Addedlines, with the right line numbers. - Nothing under
src/changes.
Testing it
dotnet test tests/Prompuff.Application.Tests
- Dominant language
- C#
- Stars
- 0
- Forks
- 1
- Avg merge
- 1h 21m
- Merged PRs (30d)
- 22
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from hazeliscoding/prompuff
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
hazeliscoding/prompuff#34 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
hazeliscoding/prompuff#22 ·
Maintainers usually reply within 1 day
-
good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 92/100
hazeliscoding/prompuff#13 ·
Maintainers usually reply within 1 day
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
hazeliscoding/prompuff#12 ·
Maintainers usually reply within 1 day
-
TranslationsOpenenhancement later
Difficulty 5/5 Over a week Newbie friendliness 25/100
hazeliscoding/prompuff#62 ·
Maintainers usually reply within 1 day
All issues in hazeliscoding/prompuff
Similar issues
-
devtools
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
clawsweeper:fix-shape-clear clawsweeper:needs-maintainer-review clawsweeper:no-new-fix-pr clawsweeper:not-repro-on-main impact:ux-release-blocker issue-rating: 🦪 silver shellfish P0
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
openclaw/openclaw-windows-node#1843 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
-
kind:ux size:S type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
elsa-workflows/elsa-foundation#3256 ·
Maintainers usually reply within 1 day
-
[Bug]: Revit selector reads process ids 2000-2099 as years (flaky AgentClientTests.AYearOrAProcessIdSelectsTheHost)Possibly taken @Wurschdhaud claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
pyrevitlabs/pyRevit#3817 ·
Maintainers usually reply within 1 day