Add local/remote classes to the group header buttons and introduce a
--group-accent CSS variable used with color-mix for background, text tint,
hover state, and an inset accent shadow. Local headers use --color-info and
remote headers use --color-accent.
This is a visual-only change (no toggle/behavior changes): group headers now
have a subtle, distinct accent for local vs. remote sections instead of a
uniform muted surface.
Add a new Tauri command to produce a diff between the working file and a historical commit (get_file_restore_patch) and support a new apply action ("restore-lines") that validates and applies only text-line changes for a single regular file.
Behavior changes and constraints:
- Fetch a filtered reverse diff for a file in a commit so UI can display selectable lines from an older revision.
- Applying "restore-lines" verifies the target is a regular file, rejects binary/metadata patches, and ensures the patch only modifies the selected file.
- Restored lines are applied to the working tree without staging other changes; the index is preserved.
- The operation rejects stale patches or patches targeting the wrong file.
UI wiring:
- Compare dialog gets a "Restore lines…" action for applicable modified files and opens the line-patch dialog in restore mode.
- Line-patch dialog gains a restore mode (restoreCommit) with adjusted UI/rendering to pair removed/added lines, helper text, and dedicated "Restore selected" / "Restore hunk" actions.
- App integration handles fetching the restore patch, applying selected lines, and refreshing views.
Tests:
- Add tests covering correct behavior (preserve unstaged/staged changes and index) and guard cases (stale/wrong-file patches).
Annotate file history entries with matches_working_tree and surface that
information in the UI so the most recent commit can be identified as
"current version" when its content equals the working tree.
- Backend: add FileHistoryCommit and annotate_file_history(...) which checks
(only for regular files) whether the newest commit's blob matches the
working tree via `git diff --quiet`. list_file_history now returns the
annotated commits.
- Types: add optional matches_working_tree to GitCommit shape used by the UI.
- UI: show a "Current version"/"Aktueller Stand" badge and disable Diff/Restore
actions for entries that match the working tree (text localized for de/en).
Also add a test that verifies the matching behavior across file edits,
staging, committing and deletion. No external API breaking changes.
Previously the enabled repository select used cursor:grab, which could
mislead users into thinking the tab was draggable even when reordering
wasn't active. Change the non-disabled state to cursor:pointer to more
accurately indicate clickability. The grabbing cursor is still used
while reordering, so no change to drag UX.
Add a floating SidebarSectionMenu component and wiring in App.svelte to let users show/hide individual left-sidebar panels (worktrees, tags, stashes, files). Visibility is tracked in new sidebarVisibility state and persisted to localStorage under SIDEBAR_VISIBILITY_KEY. The menu opens via contextmenu on the left sidebar and returns focus to the invoking element when closed.
- Panels and resize handles now respect visibility (buildLeftSidebarRows, sidebarHandleVisible, expandedSidebarPanels).
- Branch panel remains always visible and cannot be toggled; stored preferences only apply to the other panels.
- Safe fallbacks: localStorage errors are ignored so the feature still works without persistence; menu includes keyboard navigation and appropriate ARIA roles.