Open the status menu from the plan's status badge#146
Merged
Conversation
"Move to…" read like a folder mover now that folders exist. The status badge in the plan header is the natural affordance: clicking it opens the same policy-gated status menu. The badge lives inside the broadcast-replaced #plan-header (rendered requestless, no current_user), so the menu still renders outside it. A new coplan--status-menu Stimulus controller spans both regions and only decorates the badge as interactive when a menu is present for the viewer. Removes the now-unused generic dropdown controller. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
With folders shipped, the "Move to…" button on the plan page read like a folder mover — but it changed the plan's status. Feedback from Hampton: the status badge itself should be the thing you click to change status.
What
▾caret, pointer cursor,role="button", andtabindex— but only for viewers allowed to change status; for everyone else it stays a plain label.dropdown_controller.js.How it respects the broadcast constraint
The badge lives inside the broadcast-replaced
#plan-header, which renders requestless (nocurrent_user), so the policy-gated menu — with itsbutton_toCSRF forms — must stay outside that region. The newcoplan--status-menuStimulus controller spans both: the badge ships in everyone's broadcast HTML as a plain span, andbadgeTargetConnecteddecorates it as interactive only when the scope also contains a menu. Broadcast replacements re-trigger the decoration automatically.Screenshot
Clicking the
DEVELOPING ▾badge:(screenshot verified locally — badge opens the menu anchored directly beneath it)
Testing
human_editing_spec: status change now driven by clicking the badge (role='button'selector also asserts the JS decoration ran); non-author spec asserts no menu and no interactive badge.🤖 Generated with Claude Code