storkit: done 442_refactor_deduplicate_stage_display_name_into_shared_module
This commit is contained in:
-24
@@ -1,24 +0,0 @@
|
||||
---
|
||||
name: "Consolidate is_permission_approval into chat::util"
|
||||
---
|
||||
|
||||
# Refactor 440: Consolidate is_permission_approval into chat::util
|
||||
|
||||
## Current State
|
||||
|
||||
- TBD
|
||||
|
||||
## Desired State
|
||||
|
||||
Three copies of `is_permission_approval` exist across Slack (`chat/transport/slack/commands.rs`), WhatsApp (`chat/transport/whatsapp/commands.rs`), and Matrix (`chat/transport/matrix/bot/messages.rs`). The Slack and WhatsApp versions are identical; the Matrix version is a superset that also strips @mentions. Consolidate into a single `pub` function in `chat::util` using the Matrix superset behavior, then delete the 3 private copies.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- [ ] Single pub fn is_permission_approval exists in chat::util
|
||||
- [ ] All 3 private copies are removed
|
||||
- [ ] Matrix @mention-stripping behavior is preserved in the shared version
|
||||
- [ ] All call sites use the shared version
|
||||
|
||||
## Out of Scope
|
||||
|
||||
- TBD
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
---
|
||||
name: "Deduplicate stage_display_name into shared module"
|
||||
---
|
||||
|
||||
# Refactor 442: Deduplicate stage_display_name into shared module
|
||||
|
||||
## Current State
|
||||
|
||||
- TBD
|
||||
|
||||
## Desired State
|
||||
|
||||
`stage_display_name` has a `pub fn` in `chat/transport/matrix/notifications.rs` and a private copy in `chat/transport/matrix/delete.rs` with slightly different casing ("backlog" vs "Backlog", "in-progress" vs "Current"). The delete.rs copy should use the canonical version from notifications.rs, adjusting the callsite if the casing difference matters.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- [ ] Private stage_display_name in delete.rs is removed
|
||||
- [ ] delete.rs uses the pub version from notifications.rs
|
||||
- [ ] Display casing is consistent or callsite is adjusted to handle the difference
|
||||
|
||||
## Out of Scope
|
||||
|
||||
- TBD
|
||||
Reference in New Issue
Block a user