Allow users to re-open their own tickets#200
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates Nephthys’ ticket lifecycle so that resolved tickets can be re-opened (including by the original question asker), with clearer user-facing error messages when a user attempts an action they don’t have permission to perform. It also adjusts the helper permission check used for resolving/reopening to be based on BTS channel membership instead of the tickets channel.
Changes:
- Add a “Re-open thread” button to the resolved-ticket message and wire it to a new
reopenaction. - Add ephemeral error messages for unauthorized resolve/reopen attempts and for attempting to resolve/reopen tickets in invalid states.
- Update
can_resolve()to useSLACK_BTS_CHANNELmembership for helper permissions, and introduceENABLE_FEEDBACKenv gating for an optional feedback button.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| nephthys/utils/ticket_methods.py | Extends reply_to_ticket to support Block Kit blocks for richer resolved/reopened messages. |
| nephthys/utils/slack.py | Adds a Slack action handler for the new “reopen” button on resolved messages. |
| nephthys/utils/permissions.py | Changes resolve permission check to use BTS channel membership. |
| nephthys/utils/env.py | Adds a robust boolean env var parser and introduces ENABLE_FEEDBACK. |
| nephthys/macros/types.py | Fixes macro ephemeral reply to use snake_case Piccolo model attributes. |
| nephthys/macros/reopen.py | Refactors reopen macro to call the centralized actions.reopen logic. |
| nephthys/errors/errors.py | Introduces typed exceptions for “ticket not closed” and permission errors. |
| nephthys/actions/resolve.py | Adds user-facing ephemeral errors and posts a resolved message with action buttons. |
| nephthys/actions/reopen.py | Adds the core reopen action implementation (DB updates + Slack messaging). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced May 27, 2026
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.
Question askers can now re-open their own tickets, should they wish!
This PR also adds error messages for trying to resolve or re-open tickets you don't have permission to.
Finally, it changes the
can_resolve()permission check to check if you're in the BTS channel - previously, the tickets channel was used, which didn't make as much sense.This PR also lays the groundwork for ticket feedback, but that is not implemented in this PR.