main ← fix-tag-revisions
opened 04:11PM - 23 Feb 26 UTC
When editing the first post of a topic, we send `tags: []` via `PUT /t/:id` even… when the topic has no tags. Since `[].present?` is `false`, the existing tag cleanup logic was skipped, leaving a no-op tags key in the changes hash. This caused `PostRevisor#topic_changed?` to return `true` (it checks key presence, not value), bypassing the grace period and creating an empty hidden revision.
To fix this I added the condition in `TopicsController#update` to use `has_key?` instead of `present?`, and delete the tags key when both the incoming tags and existing tags are empty. Also added matching normalization in `PostRevisor#revise!`