Repository navigation
Add an All lines toggle that shows every line of the file - #33
Merged
Merged
Conversation
The diff only showed the changes with a few lines of context, hiding the start of the file and the stretches between hunks. More context and Less context could step up to the whole file, but only in unified view, a few clicks at a time, and the choice reset on reload. A show_all_lines setting now asks git for the whole file as context. In the web UI it is the All lines button in the file header, shown in unified and split view, the e key and a palette command. In the TUI it is e, with "all lines" in the status bar. Both save the setting, so it holds across files and sessions. More and Less context now also show in split view, and stay out of the way while All lines is on. Bump version to 0.12.0 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xshwvphn2wQmVKLLS2G9kJ
# Conflicts: # pyproject.toml
# Conflicts: # AGENTS.md # diffui/server/models.py # diffui/server/state.py # diffui/static/lib/useKeyboard.js # tests/test_server.py
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.
Problem
A diff only shows the changes with 3 lines of context, so the start of the file and everything between hunks stays hidden. More context / Less context can step up to the whole file, but only in unified view (the buttons never show in split), a few clicks at a time, and the choice resets on reload. The TUI has no way to see more context at all.
What
An All lines toggle that shows every line of the file, in the web UI and the TUI, saved as the
show_all_linessetting so it holds across files and sessions.ekey (rebindable in Settings, listed in the shortcuts overlay) and a "Show all lines of the file" palette command. More / Less context now also show in split view, and are hidden while All lines is on.etoggles it, with "all lines" in the status bar and an entry in the help screen.How
SettingsUpdateandAppStategainshow_all_lines, likeword_wrap.context=1000000to/api/diff(FULL_CONTEXT), so git returns the whole file as one hunk. No server change was needed beyond the setting.contextRefnow holds the effective context,FULL_CONTEXTwhile the toggle is on, elsecontextLines.fetchDiffdrops a response whose context is no longer current, so the 3-line fetch at startup cannot overwrite the full one once the saved setting is read.ApiClient.difftakes acontext,ApiClient.update_settingssaves the toggle, and_apply_themereads it at startup along with the theme.Tests
test_settings_roundtripcoversshow_all_lines.test_e_shows_every_line_of_the_file_and_is_remembered(TUI):ebrings line 1 ofapp.pyinto the view and saves the setting, andeagain hides it and clears the setting.pytest(319 passed),ruff checkandruff format --checkare clean. Checked by hand in the web UI on a C# file in split view: the diff went from starting at line 29 to the whole file, the setting survived a reload, andeturned it off again. Also tried in the TUI.README and AGENTS.md are updated. Version bumped to 0.12.0, like #31 and #32: whichever of those merges first, the other ones only need the version line and the neighbouring settings lines (
models.py,state.py,test_server.py, the AGENTS.md settings table) resolved by keeping both sides.🤖 Generated with Claude Code
https://claude.ai/code/session_01Xshwvphn2wQmVKLLS2G9kJ