Build v0.18.0#23
Conversation
…istent UI appearance
…-exception fix: Handle CancellationException in signOut and CompletionProvider
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 724a4aaf24
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } catch (CancellationException e) { | ||
| // LS connection is in a broken/uninitialized state; clear local auth state so the user is signed out. | ||
| setCopilotUser(null); | ||
| setCopilotStatus(CopilotStatusResult.NOT_SIGNED_IN); | ||
| CopilotStatusResult notSignedIn = new CopilotStatusResult(); |
There was a problem hiding this comment.
Propagate canceled sign-out instead of forcing success
Treating CancellationException as a successful sign-out is incorrect for canceled RPCs: cancellation only means the request did not complete, not that the server actually revoked auth. This branch forces local state to NotSignedIn, so callers that check !result.isSignedIn() will show a success path even when sign-out never executed (for example during LS restart/shutdown), leaving users with misleading state and potential re-auth on next status refresh.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Pull request overview
This PR updates the v0.18.0 build by improving UI theming consistency in preference controls (background inheritance) and by handling cancellation scenarios more gracefully in core completion/auth flows.
Changes:
- Add a reusable
PreferencePageUtils.inheritParentBackground(Control)helper and apply it to several preference UI components (including resize-time refresh). - Treat
CancellationExceptionas a clean cancellation outcome in completion execution and sign-out flows. - Align Anypoint Studio MuleSoft MCP preference page background handling with parent background.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/preferences/WrappableNoteLabel.java | Applies parent-background inheritance at creation and on resize to keep note rendering consistent with preference page theming. |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/preferences/WrappableIconLink.java | Applies parent-background inheritance at creation and on resize to keep icon/link controls themed consistently. |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/preferences/PreferencePageUtils.java | Introduces inheritParentBackground and applies it to preference links to standardize background behavior. |
| com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/completion/CompletionProvider.java | Returns CANCEL_STATUS on CancellationException during completion requests. |
| com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/AuthStatusManager.java | Treats sign-out cancellation as a local sign-out by clearing local auth status. |
| com.microsoft.copilot.eclipse.anypoint/src/com/microsoft/copilot/eclipse/anypoint/MuleSoftMcpPreferencePage.java | Sets container/widget backgrounds to better match preference page background in Anypoint Studio. |
| private static void useParentBackground(Control control) { | ||
| if (control != null && !control.isDisposed() && control.getParent() != null | ||
| && !control.getParent().isDisposed()) { | ||
| control.setBackground(control.getParent().getBackground()); | ||
| } | ||
| } |
| } catch (CancellationException e) { | ||
| // LS connection is in a broken/uninitialized state; clear local auth state so the user is signed out. | ||
| setCopilotUser(null); | ||
| setCopilotStatus(CopilotStatusResult.NOT_SIGNED_IN); | ||
| CopilotStatusResult notSignedIn = new CopilotStatusResult(); | ||
| notSignedIn.setStatus(CopilotStatusResult.NOT_SIGNED_IN); | ||
| return notSignedIn; | ||
| } |
No description provided.