Skip to content

Remove dead Tag::Attachable code and tags prompt#2829

Merged
monorkin merged 2 commits intomainfrom
remove-tag-attachable
Apr 10, 2026
Merged

Remove dead Tag::Attachable code and tags prompt#2829
monorkin merged 2 commits intomainfrom
remove-tag-attachable

Conversation

@flavorjones
Copy link
Copy Markdown
Member

Summary

  • Remove tags_prompt helper, Prompts::TagsController, its views, route, and Tag::Attachable concern — all dead since the Fizzy Do command system was removed in 89af906
  • Remove ActionText::Attachable from Tag entirely, since tags were never embedded as action-text-attachments in persisted rich text (only used in the command prompt input)
  • Update data transfer tests to use User (a genuinely attachable model) instead of Tag

Test plan

  • Full unit test suite passes (1495 tests, 0 failures)
  • Verified via grep that no remaining code references tags_prompt, Tag::Attachable, or the prompts/tags route

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.
@flavorjones flavorjones requested review from Copilot and monorkin April 9, 2026 21:26
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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’s ActionText::Attachable inclusion).
  • Updated ActionText rich text data-transfer tests to use User GIDs instead of Tag GIDs.

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.

Copy link
Copy Markdown
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 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

@monorkin monorkin merged commit 127156e into main Apr 10, 2026
17 checks passed
@monorkin monorkin deleted the remove-tag-attachable branch April 10, 2026 07:05
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.

3 participants