-
Notifications
You must be signed in to change notification settings - Fork 2k
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
runner improvements (multiple tabs)-[INS-4779] #8244
base: feat/multiple-tab
Are you sure you want to change the base?
Conversation
@@ -160,6 +128,8 @@ export const Runner: FC<{}> = () => { | |||
const [bail, setBail] = useState<boolean>(true); | |||
const [isRunning, setIsRunning] = useState(false); | |||
|
|||
const runnerId = targetFolderId ? `${workspaceId}-${targetFolderId}` : workspaceId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
collection runner: workspaceId
folder runner: runnerId
If move the folder, the result will not be found
|
||
useInterval(() => { | ||
refreshPanes(); | ||
}, isRunning ? 1000 : null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only start interval when runner is running
} catch (e) { | ||
// the error could be from third party | ||
const errMsg = encodeURIComponent(e.error || e); | ||
return redirect(`/organization/${organizationId}/project/${projectId}/workspace/${workspaceId}/debug/runner?refresh-pane&error=${errMsg}&folder=${targetFolderId}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do not return redirect, because we can not receive the redirect response if we navigate to another route
1d3516e
to
f4cbf3c
Compare
aa45892
to
5ed1066
Compare
f4cbf3c
to
6f44e5c
Compare
7b37221
to
15dd057
Compare
return; | ||
} | ||
|
||
const index = currentTabs.tabList.findIndex(tab => deleteIds.includes(tab.id)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to be !deleteIds.includes(tab.id) here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to find the first deleted element and then navigate to the adjacent tab to the left of it
}, []); | ||
|
||
const handleTabClose = useCallback((ids: 'all' | string[]) => { | ||
if (ids === 'all') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will it clean all runner tab states under all orgs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already changed the data structure 9c2f31c, will only clean up the runner states in current org
runnerState: {
orgId: {
runnerId: {}
}
}
533da88
to
9c2f31c
Compare
Changes
runCollectionAction
runnerExecutions
EventBus
class