Skip to content

Conversation

@caarlos0
Copy link
Member

@caarlos0 caarlos0 commented Oct 17, 2025

This allows to disable the spinner completely.

Instead, it'll show a static text while working, and then disappear.

closes #908
closes #1147

Signed-off-by: Carlos Alexandro Becker <[email protected]>
Signed-off-by: Carlos Alexandro Becker <[email protected]>
Signed-off-by: Carlos Alexandro Becker <[email protected]>
@caarlos0 caarlos0 self-assigned this Oct 17, 2025
@caarlos0 caarlos0 requested a review from a team as a code owner October 17, 2025 20:46
@caarlos0 caarlos0 requested review from andreynering and aymanbagabas and removed request for a team October 17, 2025 20:46
Copy link
Member

@andreynering andreynering left a comment

Choose a reason for hiding this comment

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

The code looks good and works, but I think we can probably improve the UX a little bit, even if static.

Comment on lines 131 to 133
CompactMode bool `json:"compact_mode,omitempty" jsonschema:"description=Enable compact mode for the TUI interface,default=false"`
DiffMode string `json:"diff_mode,omitempty" jsonschema:"description=Diff mode for the TUI interface,enum=unified,enum=split"`
ReduceAnimations bool `json:"reduce_animations,omitempty" jsonschema:"description=Reduce animations in the TUI,default=false"`
Copy link
Member

Choose a reason for hiding this comment

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

We should eventually consider documenting these on the README. All of them are missing currently.

Maybe this is a good time to do it.

func (s *noAnim) SetLabel(label string) {
s.rendered = lipgloss.NewStyle().
Foreground(s.Color).
Render(cmp.Or(label, "Working") + ellipsisFrames[2])
Copy link
Member

@andreynering andreynering Oct 21, 2025

Choose a reason for hiding this comment

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

I think showing just a white Working... is a bit too boring. I wonder if we can improve it somehow. Perhaps add a colorful meaningful character as a prefix, at least to make it distinct from the actual text.

This is probably a job for @meowgorithm 🙂

Copy link
Member

Choose a reason for hiding this comment

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

Agreed—I can come up with some stuff.

Signed-off-by: Carlos Alexandro Becker <[email protected]>
Copy link
Member

@aymanbagabas aymanbagabas left a comment

Choose a reason for hiding this comment

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

Code LGTM

Copy link
Member

@meowgorithm meowgorithm left a comment

Choose a reason for hiding this comment

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

Let's update the README to expose the config + what do you think about adding an environment variable as well @caarlos0 and @andreynering (or is SSH_TTY enough)?

I'll also come up with some options for "Working…".

// If the FPS is 20 (50 milliseconds) this means that the ellipsis will
// change every 8 frames (400 milliseconds).
ellipsisAnimSpeed = 8
ellipsisanimSpeed = 8
Copy link
Member

Choose a reason for hiding this comment

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

Looks like you mistakenly reverted a rename here.

@andreynering
Copy link
Member

No strong opinion on the env. It should be simple to add, so why not?

Not sure on the name:

  • CRUSH_REDUCE_ANIMATIONS=1
  • CRUSH_DO_NOT_ANIMATE=1
  • ...

@caarlos0
Copy link
Member Author

caarlos0 commented Nov 6, 2025

@meowgorithm done

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.

Option to disable animations Disable ASCII animation on waiting

5 participants