Skip to content

Commit 4c04b43

Browse files
committed
Fix #229: Improve logging for focus and visibility state changes; refine run polling log output
1 parent 6fdb2ed commit 4c04b43

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

src/store/store.ts

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ export class RunStore extends EventEmitter<RunStoreEvent> {
2525

2626
setFocused(focused: boolean) {
2727
this._isFocused = focused;
28-
logDebug(`[Store]: Focus state changed to ${focused}`);
28+
logDebug(`[Store]: Focus state changed to ${String(focused)}`);
2929
}
3030

3131
setViewVisible(visible: boolean) {
3232
this._isViewVisible = visible;
33-
logDebug(`[Store]: View visibility changed to ${visible}`);
33+
logDebug(`[Store]: View visibility changed to ${String(visible)}`);
3434
}
3535

3636
getRun(runId: number): WorkflowRun | undefined {
@@ -100,17 +100,10 @@ export class RunStore extends EventEmitter<RunStoreEvent> {
100100
});
101101

102102
const run = result.data;
103-
log(`Polled run: ${run.id} Status: ${run.status} Conclusion: ${run.conclusion}`);
103+
log(`Polled run: ${run.id} Status: ${run.status || "null"} Conclusion: ${run.conclusion || "null"}`);
104104
this.addRun(updater.repoContext, run);
105105

106-
if (
107-
run.status === "completed" ||
108-
run.status === "cancelled" ||
109-
run.status === "failure" ||
110-
run.status === "success" ||
111-
run.status === "skipped" ||
112-
run.status === "timed_out"
113-
) {
106+
if (run.status === "completed") {
114107
if (updater.handle) {
115108
clearInterval(updater.handle);
116109
}

src/treeViews/workflows.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ import {WorkflowNode} from "./workflows/workflowNode";
1818
import {getWorkflowNodes, WorkflowsRepoNode} from "./workflows/workflowsRepoNode";
1919
import {WorkflowStepNode} from "./workflows/workflowStepNode";
2020

21-
type WorkflowsTreeNode =
21+
export type WorkflowsTreeNode =
2222
| AuthenticationNode
2323
| NoGitHubRepositoryNode
24+
| WorkflowsRepoNode
2425
| WorkflowNode
2526
| WorkflowRunNode
2627
| PreviousAttemptsNode

0 commit comments

Comments
 (0)