Skip to content

support separate tabs for each coder_script on the workspace page #15614

Closed

Description

@matifali

Currently, we show all coder_script logs in a single UI container, which makes it challenging to debug which script has an issue.
Image

It would help to move these to separate tabs for each coder_script starting from startup_script. It may look like this:

Here the name can be rendered from coder_script.display_name and icon from coder_script.icon

Image

The main changes requested are:

  1. Split logs from each script into separate tabs.
  2. Each tab should have a display name set to coder_script.display_name
  3. Each tab should have an icon set to coder_script.icon
  4. Each tab should show the exit status code of the last command by a change in color.

Activity

  1. MrPeacockNLB commented on Nov 21, 2024

    @MrPeacockNLB
    Contributor

    Ah... I do not know if tabs are the right solution. We have more than 20 scripts currently and more to come. It may work for less than 10 scripts or so. Maybe it would be better only to show only the agent startup_script output and show the logs of the script as mentioned in #15395 . As a bonus one could see which script has an exit code greater than 0 in the build timeline.

    Maybe a seperate tab for logstream-kube events makes sense...

    Just my 2 ¢

  2. MrPeacockNLB commented on Nov 21, 2024

    @MrPeacockNLB
    Contributor

    I nice gimick would be if one could see a count down how much scripts are not finished as an indicator...

  3. matifali commented on Nov 21, 2024

    @matifali
    MemberAuthor

    Thank you for the feedback.

    We have more than 20 scripts currently, and more to come.

    Let's allow the output of some scripts to be hidden, by setting a parameter hide = true for the coder_script. Do you think you would need the output of all 20 scripts? The download button would download logs for all of them, making them accessible when needed.

    As a bonus one could see which script has an exit code greater than 0 in the build timeline.

    I think this will be useful in the logs view, too. We can color-code the tabs based on error codes. Same for Build logs. Red if script returns a non-zero error.

    I nice gimmick would be if one could see a count of how many scripts are not finished as an indicator...

    This could be a separate nice-to-have feature request. As some scripts may never finish (running a process)

    cc: @dannykopping, @BrunoQuaresma and @chrifro

  4. chrifro commented on Nov 26, 2024

    @chrifro
    Contributor

    Here is a draft of how it could look. Let me know what you think @matifali

    1. default view
      Image

    2. more than 8 apps
      Image

  5. matifali commented on Nov 26, 2024

    @matifali
    MemberAuthor

    This is great @chrifro.

    Note

    for engineers, we would also need to update the download logs flow to create the zip of files containing logs from individual coder_script resources.

  6. MrPeacockNLB commented on Nov 26, 2024

    @MrPeacockNLB
    Contributor

    For daily usage there is no need to see logs in different tabs. This is only needed when debugging or developing a feature of the template. For enduser a.k.a. developer should be the "all" tab enough to follow progress in the build steps (if it the default tab). As already mentioned if one could open the logs via #15395 then this would be enough for debugging and developing purpose from my point of view. There may be other opinions about this. Hiding the scripts is useful as they may have never any output.

  7. MrPeacockNLB commented on Nov 26, 2024

    @MrPeacockNLB
    Contributor

    @chrifro please consider also the optional logs from logstream kube. See #12929

  8. MrPeacockNLB commented on Nov 27, 2024

    @MrPeacockNLB
    Contributor

    Also an indicator of last exit code should be useful. See coder/coder-logstream-kube#61 . It could be mark Logstream Kube in red when a non 0 exit code has happend.

    Please feel free to move this to a better issue...

  9. added
    design readydesign is approved and ready for implementation
    and removed on Jun 30, 2025
  10. added
    needs-evaluationUse this label on feature requests that require joint evaluation by Product and Engineering teams.
    on Jul 28, 2025
  11. djarbz commented on Oct 3, 2025

    @djarbz

    For daily usage there is no need to see logs in different tabs. This is only needed when debugging or developing a feature of the template. For enduser a.k.a. developer should be the "all" tab enough to follow progress in the build steps (if it the default tab). As already mentioned if one could open the logs via #15395 then this would be enough for debugging and developing purpose from my point of view. There may be other opinions about this. Hiding the scripts is useful as they may have never any output.

    Personally, I would like to have the tabs even as a "developer". If this gets implemented, what is the harm in showing the tabs? The "All" stream that is shown currently can and should be the default tab, but I see no reason why we can't have more.

    We could also have a setting in the template to hide for everyone or hide by role similar to how dynamic options can be hidden for non-admins.

  12. removed
    needs-evaluationUse this label on feature requests that require joint evaluation by Product and Engineering teams.
    on Dec 29, 2025
  13. matifali commented on Feb 5, 2026

    @matifali
    MemberAuthor

    @chrifro do you think it's time to revisit this. I think it's a very important improvement we can make to solve the issue we see in #21946.

  14. chrifro commented on Feb 6, 2026

    @chrifro
    Contributor

    Sure I can look into it. What it the solution (shown here) missing @matifali ?

  15. matifali commented on Feb 6, 2026

    @matifali
    MemberAuthor

    @chrifro I think this is good enough. We just need to validate with Engineering and find out if we need any backend changes.

    Also, how do we want to aggregate and show this information on the larger health banner from the individual scripts? #21946

  16. added and removed
    design readydesign is approved and ready for implementation
    on Feb 23, 2026
  17. self-assigned this
    on Mar 13, 2026
  18. matifali commented on Apr 16, 2026

    @matifali
    MemberAuthor

    @chrifro @jakehwll when can we close this?

  19. jakehwll commented on Apr 16, 2026

    @jakehwll
    Contributor

    Not sure why this reopened, I think its fine to close 🙂

    Theres more work to be done but the tabs are implemented which this describes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions