kz930 commented on code in PR #9060:
URL: https://github.com/apache/texera/pull/9060#discussion_r4434919581
##########
frontend/src/app/workspace/component/result-panel/result-panel.component.ts:
##########
@@ -132,10 +101,7 @@ export class ResultPanelComponent implements OnInit,
OnDestroy {
const [xOffset, yOffset, _] = calculateTotalTranslate3d(translates);
this.returnPosition = { x: -xOffset, y: -yOffset };
this.updateReturnPosition(DEFAULT_HEIGHT, this.height);
- this.registerAutoRerenderResultPanel();
- this.registerAutoOpenResultPanel();
- this.registerResultClearedHandler();
- this.handleResultPanelForVersionPreview();
+ this.registerFollowHighlight();
Review Comment:
Not intended, thanks. A run selects the first Python UDF again, and keeps
the selection if a UDF is already the one selected (3f0efddb3). The sink
selection on completion stays dropped.
##########
frontend/src/app/workspace/component/result-panel/console-frame/console-frame.component.ts:
##########
@@ -316,4 +343,67 @@ export class ConsoleFrameComponent implements OnInit,
OnChanges {
getMessageLabel(message: ConsoleMessage): string {
return this.labelMapping.get(message.msgType.name) ?? "";
}
+
+ /** The operator a shown message came from, when it came from one still on
the canvas. */
+ messageOperatorId(message: ConsoleMessage): string | undefined {
+ const operatorId = this.messageOperator.get(message);
+ return isDefined(operatorId) &&
this.workflowActionService.getTexeraGraph().hasOperator(operatorId)
+ ? operatorId
+ : undefined;
+ }
+
+ operatorLabel(operatorId: string): string {
+ const graph = this.workflowActionService.getTexeraGraph();
+ if (!graph.hasOperator(operatorId)) return operatorId;
+ const operator = graph.getOperator(operatorId);
+ return operator.customDisplayName ?? operator.operatorType;
+ }
+
+ /** Show only this operator's messages. The panel follows the highlight, so
this highlights it. */
+ showOperator(operatorId: string): void {
+ this.workflowActionService.highlightOperators(false, operatorId);
+ }
+
+ /** Back to every operator's messages, by clearing the highlight the panel
follows. */
+ showAllOperators(): void {
+ const wrapper = this.workflowActionService.getJointGraphWrapper();
+
wrapper.unhighlightOperators(...wrapper.getCurrentHighlightedOperatorIDs());
+ }
+
+ /** The errors that stopped the run or the compilation, as console messages.
*/
+ private fatalErrorMessages(): OperatorConsoleMessage[] {
+ const errors: WorkflowFatalError[] = [
+ ...this.executeWorkflowService.getErrorMessages(),
+
...Object.values(this.workflowCompilingService.getWorkflowCompilationErrors()),
+ ];
+ return errors.map(error => {
+ // The same error gives the same message on every render. A new one each
time would read as
+ // a message just arrived, and the list would jump to its end while the
user scrolls up.
+ let row = this.fatalErrorRows.get(error);
Review Comment:
Thanks, fixed in 3f0efddb3. The rows are now keyed by the error's content
without its timestamp, so a recompile that sends the same error keeps the list
in place, and the spec covers it.
##########
frontend/src/app/workspace/component/result-panel/console-frame/console-frame.component.ts:
##########
@@ -316,4 +343,67 @@ export class ConsoleFrameComponent implements OnInit,
OnChanges {
getMessageLabel(message: ConsoleMessage): string {
return this.labelMapping.get(message.msgType.name) ?? "";
}
+
+ /** The operator a shown message came from, when it came from one still on
the canvas. */
+ messageOperatorId(message: ConsoleMessage): string | undefined {
+ const operatorId = this.messageOperator.get(message);
+ return isDefined(operatorId) &&
this.workflowActionService.getTexeraGraph().hasOperator(operatorId)
+ ? operatorId
+ : undefined;
+ }
+
+ operatorLabel(operatorId: string): string {
+ const graph = this.workflowActionService.getTexeraGraph();
+ if (!graph.hasOperator(operatorId)) return operatorId;
+ const operator = graph.getOperator(operatorId);
+ return operator.customDisplayName ?? operator.operatorType;
+ }
+
+ /** Show only this operator's messages. The panel follows the highlight, so
this highlights it. */
+ showOperator(operatorId: string): void {
+ this.workflowActionService.highlightOperators(false, operatorId);
+ }
+
+ /** Back to every operator's messages, by clearing the highlight the panel
follows. */
+ showAllOperators(): void {
+ const wrapper = this.workflowActionService.getJointGraphWrapper();
+
wrapper.unhighlightOperators(...wrapper.getCurrentHighlightedOperatorIDs());
Review Comment:
Good catch. It now goes through
`WorkflowActionService.unhighlightOperators`, and the spec checks that the
awareness update is sent (3f0efddb3).
##########
frontend/src/app/workspace/component/result-panel/result-panel.component.html:
##########
@@ -89,31 +89,12 @@
<h4
id="title"
cdkDragHandle>
- Result Panel{{operatorTitle ? ': ' + operatorTitle : ''}}
+ Console
</h4>
- <nz-tabs
+ <texera-console-frame
Review Comment:
The main merge (fe818e721) keeps AI Fix as a tab beside the console, shown
on the same conditions as on main: Copilot on, one Python UDF selected, an
error in its console. The screenshot in the body shows it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]