Remove dead Tag::Attachable code and tags prompt#2829
Conversation
The tags prompt was added for the Fizzy Do command system, but became dead code when commands were removed in 89af906. The commands_prompt was cleaned up but tags_prompt was missed. Remove the Tag::Attachable concern, Prompts::TagsController, its views and route, and the tags_prompt helper. Tag still includes ActionText::Attachable directly, which is needed by the data transfer system.
Tag was never actually embedded as an action-text-attachment in persisted rich text. It was only used in the Fizzy Do command prompt input which was not stored. The data transfer tests happened to use Tag as a convenient fixture — switch them to User, which is genuinely attachable via mentions.
There was a problem hiding this comment.
Pull request overview
Removes dead “tags prompt” functionality and Tag’s ActionText attachable integration that became unused after the legacy command system was removed, while keeping data-transfer coverage intact by switching the attachment-related tests to use User instead of Tag.
Changes:
- Removed
tags_prompt,Prompts::TagsController, its route, views, and the associated controller test. - Removed
Tag::Attachable(and Tag’sActionText::Attachableinclusion). - Updated ActionText rich text data-transfer tests to use
UserGIDs instead ofTagGIDs.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/models/account/data_transfer/action_text/rich_text_record_set_test.rb | Swaps Tag-based GID fixtures to User-based ones for attachment import transformation tests. |
| test/controllers/prompts/tags_controller_test.rb | Removes now-obsolete controller test for prompts/tags. |
| config/routes.rb | Drops the prompts/tags resource route. |
| app/views/prompts/tags/index.html.erb | Removes unused tags prompt index template. |
| app/views/prompts/tags/_tag.html.erb | Removes unused tag prompt item partial that depended on attachable_sgid. |
| app/models/tag/attachable.rb | Deletes the unused Tag::Attachable concern. |
| app/models/tag.rb | Removes Tag’s inclusion of the deleted Attachable concern. |
| app/helpers/rich_text_helper.rb | Removes the tags_prompt helper. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
monorkin
left a comment
There was a problem hiding this comment.
Looks good. I couldn't find any place that this is used. And without it everything works fine.
I did find another piece of dead code in the same helper - global_mentions_prompt
Summary
tags_prompthelper,Prompts::TagsController, its views, route, andTag::Attachableconcern — all dead since the Fizzy Do command system was removed in 89af906ActionText::Attachablefrom Tag entirely, since tags were never embedded as action-text-attachments in persisted rich text (only used in the command prompt input)Test plan
tags_prompt,Tag::Attachable, or the prompts/tags route