-
Notifications
You must be signed in to change notification settings - Fork 63
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
philosophy/design: user interface and task representation, idea for harpoon-like behavior #203
Comments
I'm not sure exactly what you mean by "2. cmds". In general I think I'm only understanding 60-80% of what you're asking, but I'll do my best to answer.
Tasks do each have a unique ID. Fetching tasks by ID is not an official part of the public API, but if you have need of it I could add it. Currently the main way to access tasks is the
I don't think this should be built in to the task, but certainly this sort of thing could be done with a component
I'm not sure what you mean by this? The task output is just the combined stdout/stderr of the process, and by default we display it in a Neovim integrated terminal. As mentioned above, this output could also be captured and saved to disk, but is not done by default.
By "cmds" do you mean the
Are you talking about the action menu when you select a task in the sidebar? There's no maximum number of actions and I don't...really know why there would be? I'm also not sure what you mean by a "supervision window" or "underlying tests"
No, not the output. Since the tasks themselves are (usually) created with only serializable data, it's possible to save and restore them. This is used in the OverseerSaveBundle / OverseerLoadBundle commands and their associated API methods. This is also used for session manager plugins so you can save & restore your tasks. |
I'd like to be able to script certain behavior of the task runners for long running tasks as CI-like behavior, ie to Context of the thing I'd like to do: Nice (minimal) CI with 1. timeline view and 2. collection of started program arguments and 3. show currently started programs, 4. dependency resolution why what things were started. One would ideally with attach the relevant metadata to reproduce the program behavior, but often that is not feasible and/or too tedious. |
I think the design as it is now is very good and my motivation was more that I felt like the user interface feels abit slowish without being able to have keybindings like harpoon to do things on currently available tasks more quickly. Did you try harpoon yet? |
This sounds like a potentially very complex and very custom workflow. Nothing like this is directly built-in, but there are some building blocks that you could use that might get you there. First, check out the orchestrator strategy. If you're trying to run a sequence of tasks with various dependencies and want some sort of top-level UI, this is probably the closest we have. Check out test_orchestrator.lua for an example. I haven't tried harpoon, but I use a custom bufferline that supports pinning and switching with local function get_task_callback(i)
return function()
local tasks = require("overseer").list_tasks({ recent_first = true })
local task = tasks[i]
if task then
require("overseer").run_action(task)
end
end
end
for i = 1, 9 do
vim.keymap.set("n", "<leader>" .. i, get_task_callback(i), { desc = string.format("Run an action on task #%d", i) })
end Lastly you can also build your own custom components and add them to your tasks. That would allow you to hook into the task lifecycle and, for example, register each task with your own centralized registry that you can use for hot switching, display, or anything else. LMK if you have specific requests for an API or questions about how to best accomplish something. |
Coming from harpoon, harpoon tends to have a global index of buffers and terminals, which one can lazily add (stored as json on disk) and which one can open via numbering as index into the global table (0,1,...).
Harpoon does not support command formats and neither supports persistent buffers, which leads to a very cluttered session file. Neither does harpoon provide a cleanup function for unused indexed files etc.
What is the philosophy/design of overseer in how 1. tasks and 2. cmds and 3. the toggle interface ought to work?
The text was updated successfully, but these errors were encountered: