Skip to content

approveIssue() uses wrong cursor in board swimlane view #30

@Osso

Description

@Osso

Bug

When in board swimlane view, pressing a to approve a task always approves the wrong item (appears to always act on the last item regardless of visual cursor position).

Root Cause

approveIssue() in pkg/monitor/actions.go always reads from m.Cursor[PanelTaskList] and m.TaskListRows, but in swimlane view the visual cursor is m.BoardMode.SwimlaneCursor and the data is m.BoardMode.SwimlaneRows.

// actions.go — always uses regular task list cursor
cursor := m.Cursor[PanelTaskList]
row := m.TaskListRows[cursor]

The swimlane view renders using m.BoardMode.SwimlaneCursor (view.go:798), so the visual selection and the action target are different data structures.

Steps to Reproduce

  1. Have multiple tasks in in_review status
  2. Open td monitor (or sidecar's td panel)
  3. Enter board swimlane view
  4. Navigate to a specific reviewable task with j/k
  5. Press a to approve
  6. Wrong task gets approved (last item instead of visually selected one)

Pressing gg + j to reset cursor doesn't help — the two cursor states remain out of sync.

Expected

a should approve the task the cursor is visually on.

Workaround

Exit board mode with Esc/q to use the regular categorized task list, where the cursor and action target are in sync.

Environment

  • td v0.36.0 (also confirmed in v0.35.0 and main branch)
  • sidecar v0.72.0
  • Arch Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions