Skip to content
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

feature(monitor): add Jobs tab in tui mode #8601

Conversation

Alizter
Copy link
Collaborator

@Alizter Alizter commented Sep 6, 2023

When dune monitor is run with --display tui, we now get an extra tab that can be clicked. This displays the currently running jobs and recently finished ones.

@Alizter Alizter force-pushed the ps/branch/feature_monitor___add_jobs_tab_in_tui_mode branch from 47d7e3a to 6cef4ba Compare September 8, 2023 12:37
@Alizter Alizter marked this pull request as ready for review September 8, 2023 12:37
@Alizter Alizter force-pushed the ps/branch/feature_monitor___add_jobs_tab_in_tui_mode branch 3 times, most recently from 84a63db to 954c540 Compare September 9, 2023 15:52
@Alizter Alizter force-pushed the ps/branch/feature_monitor___add_jobs_tab_in_tui_mode branch 2 times, most recently from 56c0616 to 177b444 Compare September 10, 2023 17:13
@Alizter Alizter marked this pull request as draft September 10, 2023 17:16
@Alizter
Copy link
Collaborator Author

Alizter commented Sep 10, 2023

Marking this as draft for now, as I still need to improve some things.

@Alizter Alizter force-pushed the ps/branch/feature_monitor___add_jobs_tab_in_tui_mode branch 2 times, most recently from 83bc90e to 53625ce Compare September 10, 2023 18:56
@Alizter Alizter force-pushed the ps/branch/feature_monitor___add_jobs_tab_in_tui_mode branch from 53625ce to 30a2179 Compare September 10, 2023 19:25
@@ -0,0 +1,11 @@
module type S = sig
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to get rid of this module?

~f:(fun (_ : Job.Id.t) displayed_job -> displayed_job.row, displayed_job)
|> Int.Map.of_list_exn
in
(* CR-someday amokhov: We should highlight jobs that were running for longer than 5s
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these comments are copy-pasted

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes but they are relevant.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are duplicated because we have the same issue with both jobs display backends. The coloring issues will have to be solved independently however the description shortening and anonymous action filtering could share a solution.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do coloring issues have to be solved independently? We can use Pp.t to set the colors in both.

}
end

type t =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about the names Tab and Tab.Bar instead?

}
end

module Display (_ : Jobs_display_intf.S with type state = State.t) : sig
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can easily get rid of this functor and just have a function that takes a record.

@Alizter
Copy link
Collaborator Author

Alizter commented Oct 4, 2023

FTR, this is waiting on #8619. We decided that we want this feature in and out of TUI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants