transparency-dev / trillian-tessera

Go library for building tile-based transparency logs (tlogs)
Apache License 2.0
11 stars 11 forks source link

Refactor TUI to separate setup and runtime controls #117

Closed mhutchinson closed 3 months ago

mhutchinson commented 3 months ago

This makes it a bit more readable now, but really sets this up to grow in a way that doesn't turn into one enormous method with all of the UI logic in it.

codecov-commenter commented 3 months ago

Codecov Report

Attention: Patch coverage is 0% with 59 lines in your changes missing coverage. Please review.

Project coverage is 34.98%. Comparing base (46ec9c2) to head (e50fb86). Report is 38 commits behind head on main.

Files Patch % Lines
hammer/tui.go 0.00% 57 Missing :warning:
hammer/hammer.go 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #117 +/- ## ========================================== - Coverage 35.80% 34.98% -0.82% ========================================== Files 16 32 +16 Lines 1363 2707 +1344 ========================================== + Hits 488 947 +459 - Misses 801 1653 +852 - Partials 74 107 +33 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

mhutchinson commented 3 months ago

I'm always tempted to use the uppercase (W) to increase the number of workers. Is it reasonable to swap w and W?

I originally had it the other way around because that was more logical to me, but after using it the first few times I found that the most common use-case is to increase workers and having fewer keypresses (avoiding shift modifier) made that more comfortable. Feel free to raise an issue and we can get a vote for each system :-) Or we can just have two different keys for this?

It would be great if we can see the number of workers in the UI.

I'll see if we can get the number of workers displayed in the UI later today. I want this PR to stay as refactoring only. Keeping refactoring and behaviour changes separate is a really good practice to get into.