Skip to content

gitlab stack reorder command always shows the spinner even during terminal based editor session

Checklist

  • I'm using the latest version of the extension (Run glab --version)
    • Extension version: 1.67.0
  • Operating system and version: mac OS Sequoia 15.6.1
  • Gitlab.com or self-managed instance? self-managed instance, but likely both

Summary

When running the gitlab stack reorder command, the / Reordering spinner keeps rotating during editing diffs order via the terminal-based editor (e.g. nano), making it almost impossible to correctly edit diffs order.

Environment

  • OS: Darwin 24.6.0 arm64
  • SHELL: /bin/zsh
  • TERM: xterm-256color
  • GLAB: glab 1.67.0 (1e957280)

Note that I use oh-my-zsh with the default out-of-the-box config for my built-in Mac OS terminal, without further customisation, although I suspect the bug can be reproduced with any interactive terminal.

Steps to reproduce

  1. Make sure that glab uses a text-based editor, e.g. by running glab config set editor nano.
  2. On an existing stacked diff, run glab stack reorder and try to reorder diffs.

What is the current bug behavior?

The spinner keeps spinning even if e.g. nano is taking over the whole terminal.

What is the expected correct behavior?

The spinner should disappear.

Possible fixes

It seems that the code contains two concurrent spinners, and the code for starting the spinner doesn't check for duplication.

https://gitlab.com/gitlab-org/cli/-/blob/39408d1201ed3302203a0dc71fb8be858448447c/internal/commands/stack/reorder/stack_reorder.go#L46

Edited by Kasidit Iamthong
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information