Skip to content

fix: pull from paginated local vs head-n based on last commit#21066

Merged
sergiou87 merged 5 commits intodesktop:developmentfrom
ashdawngary:fix/ash-20882-commit-history-unpublished-indicator
Dec 12, 2025
Merged

fix: pull from paginated local vs head-n based on last commit#21066
sergiou87 merged 5 commits intodesktop:developmentfrom
ashdawngary:fix/ash-20882-commit-history-unpublished-indicator

Conversation

@ashdawngary
Copy link
Contributor

@ashdawngary ashdawngary commented Sep 30, 2025

Closes #20882

Description

Upgrades loadLocalCommits to support paginated loading of local commits. Achieves this via a skip parameter which preserves behavior when undefined, otherwise retrieves commits from an offset on a range.

The original bug was due to loadLocalCommits only being called once with its initial batch size of 100 (hence why only 100 records will have the local commit tag on them), and the rest were loaded via loadCommitBatch. Now _loadNextCommitBatch will choose between loading locally or loadCommitBatch based on whether the last commit in the flattened page list is a local commit. If the original method fails or produces 0 entries, we use the latter as a backup too.

Screenshots

localcommitsfixed.mov

Tests Various conditions (< 100 commits), more than 100 commits etc

Release notes

Fixed issue of only up to 100 unpushed commits loading in history

Notes:

@github-actions github-actions bot added external Pull request originating outside of the Desktop core team triage For incoming issues labels Sep 30, 2025
@ashdawngary ashdawngary changed the title feat: pull from paginated local vs head-n based on last commit fix: pull from paginated local vs head-n based on last commit Sep 30, 2025
Copy link
Member

@sergiou87 sergiou87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes make sense and works as advertised, nice fix!

Only a couple of minor requests before merging.

@niik niik removed the triage For incoming issues label Nov 3, 2025
@ashdawngary
Copy link
Contributor Author

Changes make sense and works as advertised, nice fix!

Only a couple of minor requests before merging.

all set, thanks!

@ashdawngary
Copy link
Contributor Author

Changes make sense and works as advertised, nice fix!

Only a couple of minor requests before merging.

@sergiou87 this should be in a mergable state

sergiou87
sergiou87 previously approved these changes Dec 11, 2025
Copy link
Member

@sergiou87 sergiou87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!!! :shipit:

And thank you for the ping, it's been a hectic month and I forgot about this 😬 😳

@sergiou87 sergiou87 enabled auto-merge December 11, 2025 15:05
@sergiou87
Copy link
Member

@ashdawngary I think you need to run yarn lint:fix to fix the lint issues 😅 Let me know when that's done! Thank you 🙇‍♂️

auto-merge was automatically disabled December 12, 2025 00:14

Head branch was pushed to by a user without write access

@sergiou87
Copy link
Member

Sorry @ashdawngary 😭 But the macOS runner image we used for CI builds just got deprecated, I updated it in #21362

Do you mind updating your branch with the latest development so we can see all checks pass? 🙏

Thank you!

@ashdawngary
Copy link
Contributor Author

Sorry @ashdawngary 😭 But the macOS runner image we used for CI builds just got deprecated, I updated it in #21362

Do you mind updating your branch with the latest development so we can see all checks pass? 🙏

Thank you!

all set

Copy link
Member

@sergiou87 sergiou87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alll good!! Thanks again for your patience 🙇‍♂️

@sergiou87 sergiou87 merged commit 71b7134 into desktop:development Dec 12, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external Pull request originating outside of the Desktop core team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Commit history doesn't show more than 100 unpushed commits at once

3 participants