Skip to content

Workspace number follows creation order, but the sidebar renders grouped by space #2229

Description

@luis-barroso

Is this a reproducible bug?

  • I confirm this is a reproducible bug, not a feature request, idea, question, contribution proposal, or direction check.
  • I reproduced this bug on the version and environment reported below using the exact steps provided.

Current behavior

With the sidebar expanded, the workspace rows appear in one order. Collapsing the sidebar shows the same workspaces in a different order, so a workspace sits at a different position depending on whether the sidebar is expanded or collapsed.

herdr workspace list returns the same number for each workspace in both states.

Example:

Seven workspaces, created interleaved across two repos. herdr workspace list
returns identical output with the sidebar expanded and collapsed:

number id label worktree.repo_name
1 w1 intocare intocare
2 w4 portal portal
3 w6 intocare/ICP-19995-… intocare
4 w7 navigation (none)
5 w9 portal/ICP-20047-… portal
6 wA intocare/ICP-20009-… intocare
7 wB intocare/ICP-20006-… intocare

Grouped by space, as the expanded sidebar renders them:

intocare      →  1, 3, 6, 7
portal        →  2, 5
(ungrouped)   →  4

So the expanded sidebar reads 1, 3, 6, 7, 2, 5, 4 top to bottom, while the
collapsed rail reads 1, 2, 3, 4, 5, 6, 7. Same seven workspaces, two
orderings, never reconciled.

Expected behavior

Workspace rows appear in the same order whether the sidebar is expanded or collapsed. I prefer that it follows the order when the sidebar is expanded (workspaces grouped by space)

Reproduction

  1. Open a workspace in repo A (herdr worktree open).
  2. Open a plain workspace (herdr workspace create, no repo).
  3. Open a workspace in repo B.
  4. Open a second worktree workspace in repo A.
  5. Expand the sidebar and read the numbers top to bottom.
  6. Collapse the sidebar and compare the order.

Impact

With the sidebar collapsed I cannot tell which workspace is which by position, so I have to expand it first before switching.

Environment

  • Herdr version: 0.7.5
  • Update channel (stable or preview): stable (Homebrew)
  • Operating system: macOS 15 (Darwin 25.5.0)
  • Terminal: Ghostty
  • Shell, if relevant: zsh
  • Relevant config, if any: [ui] at defaults (agent_panel_sort = "spaces"), keys.prefix = "ctrl+a"

Metadata

Metadata

Assignees

No one assigned

    Labels

    maintainer-neededrequires maintainer judgment or maintainer-only reproduction

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions