Skip to content

Task selection is lost when moving tasks between Kanban columns #492

Closed

Description

@uNyanda
  • Date: 2026-07-26
  • Type: Bug
  • Severity: Minor

Environment

  • OS: Linux
  • WM: Niri
  • Compositor: Wayland
  • Software version: 2.18.0

Description

When moving a task between Kanban columns using Shift+H or Shift+L, the task is moved successfully, but the selection does not remain on the moved task after it changes columns.

As a result, moving a task across multiple columns requires manually locating and selecting the task again after each move.

Steps to reproduce

  1. Open Tasks and switch to Kanban view.
  2. Select a task.
  3. Press Shift+H or Shift+L to move the task to an adjacent column.
  4. Observe that the task is moved successfully.
  5. Attempt to move the same task to another column.

Expected Behaviour

After a task is moved, the selection should remain on the moved task so it can continue to be moved across additional columns without requiring it to be selected again.

Actual Behaviour

After the task is moved to another column, the selection is lost. The user must manually locate and reselect the task before it can be moved again.

Example

Current workflow

  1. Select a task.
  2. Press Shift+L.
  3. Locate the moved task in the next column.
  4. Select it again.
  5. Press Shift+L again.

Expected workflow

  1. Select a task.
  2. Press Shift+L.
  3. Press Shift+L again.
  4. Continue moving the task until it reaches the desired column.

Additional Notes

The task itself is moved correctly. The issue is only that keyboard focus does not follow the moved task into its new column.

The selection should remain on the moved task regardless of whether the task has a priority marker (!high, !med, !low) or no priority marker at all.

Activity

  1. adibhanna commented on Jul 27, 2026

    @adibhanna
    Contributor

    Fixed in v2.19.0 — thanks @uNyanda.

    You called it a minor issue; it turned out to be worse than the selection going missing. Reproducing it on a three-column board:

    backlog: [Mover task]   doing: [Anchor one]   review: [Anchor two]
    

    with the ring on Mover task, one Shift+L gave:

    doing: [Anchor one, Mover task]   review: [>Anchor two]
    

    The card moved correctly, but the ring landed on Anchor two in the next column — so the second Shift+L moved Anchor two, a task I had never selected, out of its column. Selection loss and a wrong-task move are the same bug.

    Two causes stacked:

    1. The cursor was set to "target column, card 0". Columns sort by priority and due date, so a moved card usually arrives below the cards already there — card 0 is somebody else. This is why you saw it behave differently depending on priority markers: with no !priority on the moved task it sinks below the ones that have it.
    2. An emptied column disappears. backlog held only the moved card, so the rebuilt board dropped it and every column to its right shifted down one index — the index the move had just aimed at now pointed one column further right.

    The cursor now re-derives both halves from the rebuilt board: the target column by id, and the card by its identity (source note plus its index within that note, which a column move doesn't change). So the ring stays on the card you moved, wherever the board decides to put it, and Shift+L Shift+L Shift+L walks a task across the board exactly as you described. Shift+H walks it back.

    Also fixed while in there: < / > (reorder columns) dropped the card selection to the top of the column, which was the same mistake in miniature — reordering columns doesn't move the cards inside them.

    One thing this doesn't change, in case you hit it: on an auto-discovered @field board, a column with no cards left disappears entirely, so if you move the only card out of backlog you can't Shift+H it back — there's no column to move to. Pinning the columns you want with kanban_statuses in config.toml under [view] keeps them on the board whether or not they hold cards. If the disappearing column is a nuisance in its own right, that's worth its own issue.

    Verified by driving the packaged app: before the fix, the second keystroke moved the wrong card; after it, the same two keystrokes walk the same card two columns to the right. Five unit tests cover the cursor helper, including the vanished-column case.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions