-
Notifications
You must be signed in to change notification settings - Fork 672
fix: Add Pop up when Plan Approval session is end and also handle old plan… #1002
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
NirajC-Microsoft
wants to merge
4
commits into
dev-v4
Choose a base branch
from
bug-psl-43627
base: dev-v4
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
94bf0c0
Add Pop up when Plan Approval session is end and also handle old plan…
NirajC-Microsoft c1c11a9
revert httpClient.py changes
NirajC-Microsoft 12fdcf1
Resolved Copilot comment and update unit test cases
NirajC-Microsoft c163c16
Resolved Copilot comment and update unit test cases - 1
NirajC-Microsoft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| import React from 'react'; | ||
| import { | ||
| Dialog, | ||
| DialogSurface, | ||
| DialogTitle, | ||
| DialogContent, | ||
| DialogBody, | ||
| DialogActions, | ||
| Button, | ||
| } from '@fluentui/react-components'; | ||
| import { Warning20Regular } from '@fluentui/react-icons'; | ||
| import "../../styles/Panel.css"; | ||
|
|
||
| interface PlanTimeoutDialogProps { | ||
| isOpen: boolean; | ||
| onGoHome: () => void; | ||
| onCancel: () => void; | ||
| } | ||
|
|
||
| const PlanTimeoutDialog: React.FC<PlanTimeoutDialogProps> = ({ | ||
| isOpen, | ||
| onGoHome, | ||
| onCancel, | ||
| }) => { | ||
| return ( | ||
| <Dialog open={isOpen}> | ||
| <DialogSurface> | ||
| <DialogBody> | ||
| <DialogTitle> | ||
| <div className="plan-cancellation-dialog-title"> | ||
| <Warning20Regular className="plan-cancellation-warning-icon" /> | ||
| Session Timed Out | ||
| </div> | ||
| </DialogTitle> | ||
| <DialogContent> | ||
| The plan approval request has timed out because no action was taken. | ||
| Please go to the Home page and create a new task. | ||
| </DialogContent> | ||
| <DialogActions> | ||
| <Button | ||
| appearance="secondary" | ||
| onClick={onCancel} | ||
| > | ||
| Cancel | ||
| </Button> | ||
| <Button | ||
| appearance="primary" | ||
| onClick={onGoHome} | ||
| > | ||
| Go To Home Page | ||
| </Button> | ||
| </DialogActions> | ||
| </DialogBody> | ||
| </DialogSurface> | ||
| </Dialog> | ||
| ); | ||
| }; | ||
|
|
||
| export default PlanTimeoutDialog; | ||
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| """Custom exceptions for orchestration module.""" | ||
|
|
||
|
|
||
| class PlanSupersededError(Exception): | ||
| """Raised when a plan's approval wait is cancelled because the user started a new task.""" | ||
|
|
||
| def __init__(self, plan_id: str): | ||
| self.plan_id = plan_id | ||
| super().__init__(f"Plan {plan_id} was superseded by a new task") | ||
|
|
||
|
|
||
| class PlanTimeoutError(Exception): | ||
| """Raised when user does not approve/reject the plan within the timeout window.""" | ||
|
|
||
| def __init__(self, plan_id: str, timeout_seconds: float = 0): | ||
| self.plan_id = plan_id | ||
| self.timeout_seconds = timeout_seconds | ||
| super().__init__( | ||
| f"Plan {plan_id} approval timed out after {timeout_seconds}s" | ||
| ) |
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.