appid / persist splitter location (horizontal + vertical) / arrow keys / context lines + whitespace#2
Closed
selckin wants to merge 23 commits into
Closed
appid / persist splitter location (horizontal + vertical) / arrow keys / context lines + whitespace#2selckin wants to merge 23 commits into
selckin wants to merge 23 commits into
Conversation
Enable eframe's persistence feature and persist ONLY the diff-panel splitter height (~/.local/share/gitkay/app.ron) via App::save / cc.storage: persist_egui_memory() returns false, so the whole egui-memory blob (which would also restore every ScrollArea offset) is not saved; the height is captured from the panel response each frame and re-applied as default_height on startup. Window geometry is deliberately not persisted (persist_window = false): eframe's window-size round-trip grows the window on every Wayland restart (fractional scaling + client-side decorations).
Replace the content-computed sidebar width with an egui SidePanel::right so the divider between the diff and the file list is a draggable splitter. Its width is persisted across runs like the diff-panel height: read from cc.storage into default_width in new(), captured from the panel response each frame, and written under "file_list_width" in App::save. The sidebar still only appears when the selected commit touches files.
Up/Down move the selection to the previous/next commit (loading its diff) when the search bar isn't focused. graph_scroll_to now carries a scroll alignment so clicks and search jumps still center the target, while arrow navigation scrolls minimally — only when the selection would leave the viewport.
When the search bar is focused, Up/Down step backward/forward through the matches (wrapping), mirroring Enter's forward cycling. Outside the search bar they still move the commit-list selection.
A toolbar revealed on hover at the top of the diff panel adds a context-lines stepper (0-99, default 3) and an 'Ignore whitespace' (-w) checkbox. It's a floating overlay (egui Area), so it never takes vertical space from the diff. The settings flow through a DiffSettings struct into all three diff paths (commit, uncommitted, staged), persist across runs via App::save, and re-run the current diff immediately when changed. Settings are read before the startup diff so persisted values apply on launch.
Wraps 'cargo install --path . --locked --force' so a local checkout installs gitkay into ~/.cargo/bin, overwriting any existing copy.
Route github.ref_name through env vars in the release packaging steps (build/rpm/deb) so the tag name reaches bash as data instead of being spliced into the script at template-expansion time. Closes 5 zizmor template-injection findings. Pin dtolnay/rust-toolchain to the stable-branch commit SHA (with an explicit toolchain: stable input) in both ci.yml and release.yml, replacing the mutable @stable branch ref.
…ease publishing Add least-privilege permissions: contents: read at the workflow level for both CI and release; the release job alone gets contents: write where it creates the GitHub release. Set persist-credentials: false on every actions/checkout so the GITHUB_TOKEN is not left in .git/config for later steps to read. Remove the cargo cache from the release build to close the cache-poisoning vector into published binaries (CI keeps its cache; it publishes nothing). Replace softprops/action-gh-release with the preinstalled gh CLI (gh release create), routing the tag through env to avoid template injection. Resolves the unpinned third-party action and superfluous-action findings.
gh release create errored on re-run when a release already existed for the tag (HTTP 422), unlike the softprops action it replaced. Split into 'view-or-create' + 'gh release upload --clobber' so re-running the release job updates the existing release instead of failing.
Add a completeness check after collecting artifacts: fail loudly if any of the tar.gz/rpm/deb classes is missing, which also guarantees release/ is non-empty before the upload glob runs.
Decouple the build job's upload-artifact path from the raw ${{ github.ref_name }} expression (use a gitkay-*-<target>.tar.gz glob), matching the env-routed ref used elsewhere.
Contributor
Author
|
Sorry for the noise, only wanted those first few, forgot it wasn't on a branch |
Owner
|
Def. open to improvements though. Feel free to open a new clean PR |
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.
Some gitk features I was missing
Entirely written by claude & tested by me, feel free to instantly deny or requests changes
Cheers