Repository navigation
Return std::optional from Utility::stringToEnum - #1249
Merged
Merged
Conversation
TheOneRing
force-pushed
the
work/oauth2
branch
from
November 10, 2026 10:59
4dddf8d to
9f48100
Compare
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
A reconnect notification can cancel the retry timer before the failed OAuth job is deleted, preventing a replacement refresh and leaving authentication and queued sync work blocked indefinitely.
No open issues 🎉
What changed in this PR
This PR makes enum conversion failures explicit with std::optional, updating OAuth prompt handling and saved issue filters. It also expands OAuth refresh recovery to preserve credentials during persistent service failures.
Changes:
- Update enum conversion and its callers to handle unknown values.
- Add refresh backoff and reconnect retries, preserve client identity, and improve credential-error handling.
- Expand refresh regression tests and remove an obsolete registration fixture.
| File | Description |
|---|---|
test/testoauth/testoauth.cpp |
Add reusable refresh fixtures and tests for failure recovery and reconnects. |
test/testoauth/testDynamicTokenRefresh/clientRegistrationReply.json |
Remove the obsolete refresh-registration response fixture. |
src/libsync/creds/oauth.cpp |
Handle optional prompt values and refine refresh registration, errors, and token validation. |
src/libsync/creds/httpcredentials.h |
Declare retry timer state and network-change handlers. |
src/libsync/creds/httpcredentials.cpp |
Add ongoing backoff retries and immediate retries on reconnect. |
src/libsync/creds/credentialmanager.cpp |
Correct completion handling during backend retries and parsing failures. |
src/libsync/common/utility.h |
Return an optional enum value from string conversion. |
src/gui/issueswidget.cpp |
Reset saved filters when enum conversion fails. |
Review effort: Balanced
TheOneRing
requested review from
fracturehill
and
a balanced review from Copilot
November 10, 2026 11:07
TheOneRing
force-pushed
the
work/oauth2
branch
from
November 11, 2026 08:31
9f48100 to
ac549dc
Compare
fracturehill
approved these changes
Nov 11, 2026
TheOneRing
force-pushed
the
work/oauth2
branch
from
November 16, 2026 10:59
ac549dc to
d9f75e5
Compare
TheOneRing
enabled stacked auto-merge (rebase)
November 16, 2026 11:00
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.

This fixes a bug where the supported OAuth prompts where incorrectly computed.
It also fixes the assert in SyncFileItemStatusSetSortFilterProxyModel when the filter items changed.