Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@9999years
Copy link
Contributor

At work, we use --detach-on-success (#312) to automatically exit the process-compose TUI when processes finish starting up. When processes fail to start up, engineers often don't notice that a process has failed, and instead assume that process-compose has a bug.

The UI makes it pretty easy to miss a failed process; the icon on the left of the table is red, but that's about it. The exit code is off to the right, and it's not immediately obvious that a 1 means there's a problem.

We can make the UI significantly more legible by coloring rows according to the process state. We'll reuse the color of the state icon for this. This displays nicely when rows are selected as well; a selected failed process will show up with black text on a red background, making the failure very clear (as opposed to the previous default blue background).

Before

image

After

image

At work, we use `--detach-on-success` (F1bonacc1#312) to automatically exit the
`process-compose` TUI when processes finish starting up. When processes
fail to start up, engineers often don't notice that a process has
failed, and instead assume that `process-compose` has a bug.

The UI makes it pretty easy to miss a failed process; the icon on the
left of the table is red, but that's about it. The exit code is off to
the right, and it's not immediately obvious that a 1 means there's a
problem.

We can make the UI significantly more legible by coloring rows according
to the process state. We'll reuse the color of the state icon for this.
This displays nicely when rows are selected as well; a selected failed
process will show up with black text on a red background, making the
failure very clear (as opposed to the previous default blue background).

Before: https://github.com/user-attachments/assets/be4f48a6-f472-401e-a479-282a61ddc433
After: https://github.com/user-attachments/assets/9736d70f-d72c-4f08-acef-435c102569d9
@sonarqubecloud
Copy link

9999years added a commit to 9999years/process-compose that referenced this pull request May 23, 2025
Related: F1bonacc1#339

When a process completes with a non-zero exit code, display "Failed" in
the "Status" column instead of "Completed". "Completed" sounds like
everything is OK, and "Failed" makes it clearer that something has gone
wrong.

Before: https://github.com/user-attachments/assets/be4f48a6-f472-401e-a479-282a61ddc433
After: https://github.com/user-attachments/assets/c41f5170-1579-4625-be9e-1042503d0d5f
Copy link
Contributor

@ryantm ryantm left a comment

Choose a reason for hiding this comment

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

awesome

Copy link
Owner

@F1bonacc1 F1bonacc1 left a comment

Choose a reason for hiding this comment

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

That's great @9999years,
I'm just wondering if we still need the icons column if we have colors.
On one hand I will be glad to get rid of them, on the other, I wasted a lot of time to handpick the most sensible ASCII representation of the state, staying away from emojis and their unpredictable rendering sizes, colors and shapes.

WDYT?

@9999years
Copy link
Contributor Author

@F1bonacc1 I think the icons are fun, honestly! I wouldn't be heartbroken if they were removed. But if I were picking the icons myself they would probably all be emoji, so you may wish to take my opinions with a grain of salt! 🧂😉

@F1bonacc1
Copy link
Owner

@F1bonacc1 I think the icons are fun, honestly! I wouldn't be heartbroken if they were removed. But if I were picking the icons myself they would probably all be emoji, so you may wish to take my opinions with a grain of salt! 🧂😉

Hmm... Now it's an even more difficult decision.
Can we agree that they should be either all emojis or all ASCII?

Otherwise, it drives my OCD crazy 😄

image

@9999years
Copy link
Contributor Author

I think that's probably because — and I'm embarrassed to admit this — my terminal is using the non-monospaced variant of PragmataPro, where some symbols are wider than others... let me see about this, I don't think any of the codepoints used have emoji presentation.

@9999years
Copy link
Contributor Author

OK, according to emoji-data.txt, ❌ U+274C CROSS MARK is an emoji. I think the rest are not though.

Now, all the status icons do not have emoji presentation.

Emoji presentation of codepoints is listed here:
https://unicode.org/Public/UNIDATA/emoji/emoji-data.txt

More detail on what 'emoji' means here:
https://www.unicode.org/reports/tr51/
@sonarqubecloud
Copy link

@9999years
Copy link
Contributor Author

OK, I replaced ❌ U+274C CROSS MARK with ✘ U+2718 HEAVY BALLOT X so that none of the status symbols have emoji presentation. Here's what it looks like now, with PragmataPro Mono:

image

I recently switched terminal emulators from iTerm2 to WezTerm, so the color scheme is a bit different this time, forgive me for this :)

@F1bonacc1 F1bonacc1 merged commit fc4b0dd into F1bonacc1:main Jul 16, 2025
5 checks passed
F1bonacc1 pushed a commit that referenced this pull request Jul 16, 2025
Related: #339

When a process completes with a non-zero exit code, display "Failed" in
the "Status" column instead of "Completed". "Completed" sounds like
everything is OK, and "Failed" makes it clearer that something has gone
wrong.

Before: https://github.com/user-attachments/assets/be4f48a6-f472-401e-a479-282a61ddc433
After: https://github.com/user-attachments/assets/c41f5170-1579-4625-be9e-1042503d0d5f
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.

3 participants