Skip to content

[feat] "Move to group" should place the workspace at the top of the group, not the bottom #5342

Open

Description

@robertn702

Describe the feature

When using "Move to group" on a workspace in the dashboard sidebar, the workspace is placed at the bottom of the target group. I'd like it to be placed at the top of the group instead (or, ideally, make the placement configurable).

Why: A workspace you're actively moving into a group is almost always one you're currently working on. Putting it at the bottom buries it — often below the fold in a large group — so you have to scroll to find the thing you just touched. Placing it at the top keeps the most recently-acted-on workspace immediately visible, matching the "most-recent-on-top" mental model.

Current behavior

Moving a workspace into a group appends it to the end. In useDashboardSidebarState.moveWorkspaceToSection the new tabOrder is computed with getNextTabOrder(siblingRows), which returns max(tabOrder) + 1 (bottom):

  • apps/desktop/src/renderer/routes/_authenticated/hooks/useDashboardSidebarState/useDashboardSidebarState.ts (~line 397)
  • apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/dashboardSidebarLocal/tabOrder.ts — getNextTabOrder()

This is not currently configurable — the placement is hardcoded to bottom, and the moveWorkspaceToSection tRPC mutation doesn't accept a placement parameter for the into-a-group case (the existing rootPlacement: "top" | "bottom" option only applies when moving a workspace out to the project root, not into a group).

Proposed change

Place moved workspaces at the top of the group. A getPrependTabOrder() helper already exists right next to getNextTabOrder() in tabOrder.ts and does exactly this (returns min(tabOrder) - 1), so the change is essentially swapping the call. Optionally, expose this as a preference (top vs. bottom) for users who prefer the current behavior.

Activity

  1. prayagtushar commented on Aug 3, 2026

    @prayagtushar

    Hi @robertn702
    I can work on this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions