Fix "M" hotkey using stale user from fragment cache

Add a SelfAssignmentsController to resolve the current user at request
time, avoiding the use of an incorrect user id baked into a cached URL.

ref: #2211 originally added the "M" hotkey
ref: https://app.fizzy.do/5986089/cards/3722
This commit is contained in:
Mike Dalessio
2026-01-16 13:41:30 -05:00
parent 8ada756f33
commit 2527f07365
5 changed files with 64 additions and 4 deletions
@@ -79,7 +79,7 @@ export default class extends Controller {
const selection = this.#selectedCard
if (!selection) return
const url = selection.card.dataset.cardAssignToMeUrl
const url = selection.card.dataset.cardAssignToSelfUrl
if (url) {
event.preventDefault()
await post(url, { responseKind: "turbo-stream" })