Skip to content

appid / persist splitter location (horizontal + vertical) / arrow keys / context lines + whitespace#2

Closed
selckin wants to merge 23 commits into
Marenz:masterfrom
selckin:master
Closed

appid / persist splitter location (horizontal + vertical) / arrow keys / context lines + whitespace#2
selckin wants to merge 23 commits into
Marenz:masterfrom
selckin:master

Conversation

@selckin

@selckin selckin commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Some gitk features I was missing

  • set appid so compositors can apply rules to the window
  • persist the location of splitters + make the file list resizeable
  • arrow keys browse through commits
  • diff option for number of context lines + ignore whitespace (visible on hover)

Entirely written by claude & tested by me, feel free to instantly deny or requests changes

Cheers

selckin added 12 commits June 21, 2026 17:52
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.
@selckin

selckin commented Jun 21, 2026

Copy link
Copy Markdown
Contributor Author

Sorry for the noise, only wanted those first few, forgot it wasn't on a branch

@selckin selckin closed this Jun 21, 2026
@Marenz

Marenz commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Def. open to improvements though. Feel free to open a new clean PR

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.

2 participants