Skip to content

fix: let the diff view wake up before its first curtain call - #2496

Merged
love-linger merged 1 commit into
sourcegit-scm:developfrom
gadfly3173:fix/diff-blank-on-double-tap-change
Jun 30, 2026
Merged

fix: let the diff view wake up before its first curtain call#2496
love-linger merged 1 commit into
sourcegit-scm:developfrom
gadfly3173:fix/diff-blank-on-double-tap-change

Conversation

@gadfly3173

Copy link
Copy Markdown
Contributor

Double-tapping a change in the Info tab raced against the tab switch: the view poked the TabControl directly while SelectedChanges was still clearing DiffContext to null, so the right-hand AvaloniaEdit rendered blank until a later file switch rebuilt it.

Drive the switch through the ViewModel instead -- set SelectedChanges first, then ActiveTabIndex, and raise OnPropertyChanged so the existing DiffContext compensation in the setter reliably fires before the Changes tab materializes.

Double-tapping a change in the Info tab raced against the tab switch:
the view poked the TabControl directly while SelectedChanges was still
clearing DiffContext to null, so the right-hand AvaloniaEdit rendered
blank until a later file switch rebuilt it.

Drive the switch through the ViewModel instead -- set SelectedChanges
first, then ActiveTabIndex, and raise OnPropertyChanged so the existing
DiffContext compensation in the setter reliably fires before the Changes
tab materializes.
@love-linger love-linger self-assigned this Jun 30, 2026
@love-linger
love-linger merged commit 190b4d9 into sourcegit-scm:develop Jun 30, 2026
14 checks passed
@gadfly3173
gadfly3173 deleted the fix/diff-blank-on-double-tap-change branch June 30, 2026 03:12
skoonin added a commit to skoonin/sourcegit-sk that referenced this pull request Jul 24, 2026
* ux: new style for page switcher in repository

Signed-off-by: leo <longshuang@msn.cn>

* fix: escape BRE special characters when selecting author from suggestions (sourcegit-scm#2494)

* code_review: PR sourcegit-scm#2494

Since `EscapeForBRE` is only used when selecting item in suggestion popup (and the
searching command runs immediately after it), directly call `EscapeForBRE` to generate
the searching filter

Signed-off-by: leo <longshuang@msn.cn>

* refactor: move recent commit messages from repository settings to ui-states

Signed-off-by: leo <longshuang@msn.cn>

* refactor: reorder context menu items of selected branch

Signed-off-by: leo <longshuang@msn.cn>

* fix: let the diff view wake up before its first curtain call (sourcegit-scm#2496)

Double-tapping a change in the Info tab raced against the tab switch:
the view poked the TabControl directly while SelectedChanges was still
clearing DiffContext to null, so the right-hand AvaloniaEdit rendered
blank until a later file switch rebuilt it.

Drive the switch through the ViewModel instead -- set SelectedChanges
first, then ActiveTabIndex, and raise OnPropertyChanged so the existing
DiffContext compensation in the setter reliably fires before the Changes
tab materializes.

* fix: versions of `git` prior to v2.45.0 will reject a value of `commentChar` that consists of more than a single ASCII byte (sourcegit-scm#2500)

* ux: max height of group list in `Move Repository Node` popup (sourcegit-scm#2502)

Signed-off-by: leo <longshuang@msn.cn>

* fix: null check for RevisionFileSearchSuggestion on key down (sourcegit-scm#2501)

* fix: prevent crash in Chart.Render when repository has no commits (sourcegit-scm#2504)

* refactor: do not render chart if no commit collected in statistics

Signed-off-by: leo <longshuang@msn.cn>

* fix: hide file manager and terminal options for invalid repositories (sourcegit-scm#2503)

* code_review: PR sourcegit-scm#2503

- Use `Directory.Exists(_id)` instead of `IsInvalid` since we have alread makes sure it's a repository
- For invalid repository node, only show `Delete` entry in context menu

Signed-off-by: leo <longshuang@msn.cn>

* ux: default select the `ROOT` group in `Move Repository Node` popup (sourcegit-scm#2502)

Signed-off-by: leo <longshuang@msn.cn>

* refactor: change the `Open Local Repository` hotkey to `Ctrl+L` on Windows/Linux

- Add missing hotkey tooltips
- Because on Windows/Linux (WSL), the hotkey `Ctrl+Shift+O` will be parsed as `Key.ImeProcessed`,
   change the hotkey to open local repository to `Ctrl+L`

Signed-off-by: leo <longshuang@msn.cn>

* ux!: change the hotkeys to clone/open repository

- Hotkey to clone remote repository: `Ctrl+R`/`⌘+R` (R means remote)
- Hotkey to open local repository: `Ctrl+L`/`⌘+L` (L means local)

Signed-off-by: leo <longshuang@msn.cn>

* feature: add hotkey `Ctrl+N` to open commit details panel in a seperate window (sourcegit-scm#2506)

Signed-off-by: leo <longshuang@msn.cn>

* refactor: use `*` instead `*.*` to choose file without specified extensions (sourcegit-scm#2467)

Signed-off-by: leo <longshuang@msn.cn>

* ux: style for search panel in text editor

Signed-off-by: leo <longshuang@msn.cn>

* ux: dropdown menu position

Signed-off-by: leo <longshuang@msn.cn>

* localization: update Spanish translation (sourcegit-scm#2510)

+ Add missing strings.
+ Change old instaces of lines with text `untracked` to `sin rastrear` for consistency.

* doc: Update translation status and sort locale files

* localization: update Russian translate (sourcegit-scm#2514)

* doc: Update translation status and sort locale files

* localization: complete Greek (el_GR) translation (sourcegit-scm#2515)

Add the 30 remaining Text.* keys that were missing from el_GR relative to
en_US, bringing the Greek locale to full coverage. Wording follows the
existing el_GR conventions (git jargon such as checkout, rebase, commit,
Patch, HEAD kept as loanwords; 'mode' kept for git file-mode codes).

(cherry picked from commit 2274c41)

* doc: Update translation status and sort locale files

* ux: use `Ctrl/⌘+W` to close sub-windows

Signed-off-by: leo <longshuang@msn.cn>

* localization: update Chinese translations

Signed-off-by: leo <longshuang@msn.cn>

* doc: Update translation status and sort locale files

* project: upgrade AvaloniaEdit

Signed-off-by: leo <longshuang@msn.cn>

* fix: diff view does not update when selecting between an unstage new submodule and other file

Signed-off-by: leo <longshuang@msn.cn>

* ux: submodule diff style

Signed-off-by: leo <longshuang@msn.cn>

* refactor: improve submodule diff loading

Signed-off-by: leo <longshuang@msn.cn>

* enhance: do not query file content if revision is an empty tree hash

Signed-off-by: leo <longshuang@msn.cn>

* refactor: creating diff object for image/binary/submodule

Signed-off-by: leo <longshuang@msn.cn>

* project: add .tss to .gitignore (sourcegit-scm#2520)

* code_style: remove unnecessary spaces at end of line

Signed-off-by: leo <longshuang@msn.cn>

* localization: update Traditional Chinese translations (sourcegit-scm#2526)

* version: Release 2026.15

Signed-off-by: leo <longshuang@msn.cn>

* version: start 2026.17-sk-dev

* build: opt out of Avalonia build telemetry

AvaloniaStatsTask writes to ~/Library/Application Support/AvaloniaUI, which fails in restricted/sandboxed build environments. Opt out to keep builds hermetic.

* docs: note upstream v2026.15 sync and fork customizations

Add a Fork customizations section to the README (marked fork-only) and an Unreleased CHANGELOG entry for the upstream sync.

---------

Signed-off-by: leo <longshuang@msn.cn>
Co-authored-by: leo <longshuang@msn.cn>
Co-authored-by: JC-Chung <52159296+JC-Chung@users.noreply.github.com>
Co-authored-by: Gadfly <gadfly@gadfly.vip>
Co-authored-by: Javier J. Martínez M. <56406225+jjesus-dev@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: AquariusStar <48148723+AquariusStar@users.noreply.github.com>
Co-authored-by: Panayotis <panayotis@panayotis.com>
Co-authored-by: Paolo Ghibaudo <ghiboz@users.noreply.github.com>
Co-authored-by: Chiahong <36815907+ChiahongHong@users.noreply.github.com>
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