Skip to content

Conversation

@jzimdars
Copy link
Member

Hover or arrow to select cards in active columns on a board, then use hotkeys on them:

[ Move to Not Now. M Assign to Me, ] Move to Done

@jzimdars jzimdars requested review from jorgemanrubia and monorkin and removed request for jorgemanrubia December 19, 2025 20:41
Copy link
Contributor

@monorkin monorkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

I found a few small bugs and left a comment by the code that, I think, causes it.

There is one more bug which I couldn't pin point. Cards don't update when you move them from "Not now" to "Done", but the column does and the card moves.

screenrecording-2025-12-22_17-53-48.mp4

@jzimdars
Copy link
Member Author

Looks good.

I found a few small bugs and left a comment by the code that, I think, causes it.

There is one more bug which I couldn't pin point. Cards don't update when you move them from "Not now" to "Done", but the column does and the card moves.

screenrecording-2025-12-22_17-53-48.mp4

The hotkeys shouldn't work in the Not Now and Done columns because it really doesn't make sense to assign cards in those columns nor does it really make sense to move, for example, from Not Now to Done. I'll make sure those are properly disabled in the UI.

Avoids situations where the hotkey could be triggered on the board view
@dilberryhoundog
Copy link
Contributor

Looks good.

I found a few small bugs and left a comment by the code that, I think, causes it.

There is one more bug which I couldn't pin point. Cards don't update when you move them from "Not now" to "Done", but the column does and the card moves.

screenrecording-2025-12-22_17-53-48.mp4

Hi @monorkin, I just found a bug where moving a card from 'not now' to 'done' didn't destroy the not_now record, like it does when a card is resumed. This prevented it showing in "done" and "indexed_by=closed" filters. This could be why the cards in your screen recording are having strange behaviour. PR is here #2237

@monorkin
Copy link
Contributor

@dilberryhoundog that seems unrelated to this PR. I'll take a look at your PR in a bit.

Copy link
Contributor

@monorkin monorkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jzimdars Looks good now

@dilberryhoundog
Copy link
Contributor

dilberryhoundog commented Dec 23, 2025

@dilberryhoundog that seems unrelated to this PR. I'll take a look at your PR in a bit.

@monorkin Thank you. Yes it was unrelated.
Although the hotkeys have now been disabled in the not_now column the bug on 6e90a6d commit was:


Bug: Card duplication when closing from Not Now

Root Cause

When closing a card from "Not Now" using the ] hotkey, the Turbo Stream response failed to remove the card from its source location. The capture_card_location method only tracked @source_column (nil for postponed cards) and @was_in_stream (false for postponed cards), leaving no condition to handle the Not Now case. This caused the card to appear in both Done and Not Now until the next page refresh.

Fix

--- a/app/controllers/concerns/card_scoped.rb
+++ b/app/controllers/concerns/card_scoped.rb
@@ -21,6 +21,7 @@ module CardScoped
     def capture_card_location
       @source_column = @card.column
       @was_in_stream = @card.awaiting_triage?
+      @was_postponed = @card.postponed?
     end
--- a/app/views/cards/closures/create.turbo_stream.erb
+++ b/app/views/cards/closures/create.turbo_stream.erb
@@ -4,6 +4,8 @@
   <%= turbo_stream.replace(dom_id(@source_column), partial: "boards/show/column", method: :morph, locals: { column: @source_column }) %>
 <% elsif @was_in_stream %>
   <%= turbo_stream.replace("the-stream", partial: "boards/show/stream", method: :morph, locals: { board: @card.board, page: @page }) %>
+<% elsif @was_postponed %>
+  <%= turbo_stream.replace("not-now", partial: "boards/show/not_now", method: :morph, locals: { board: @card.board }) %>
 <% end %>

@jzimdars jzimdars merged commit 87977eb into main Dec 23, 2025
12 checks passed
@jzimdars jzimdars deleted the card-nav-hotkeys branch December 23, 2025 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants