Skip to content

Refactor sendFeedback utility and add ShareE2EEHistory command#296

Merged
Just-Insane merged 6 commits intoSableClient:devfrom
dozro:compat/msc4268
Mar 16, 2026
Merged

Refactor sendFeedback utility and add ShareE2EEHistory command#296
Just-Insane merged 6 commits intoSableClient:devfrom
dozro:compat/msc4268

Conversation

@dozro
Copy link
Contributor

@dozro dozro commented Mar 16, 2026

Description

This pull request refactors the feedback mechanism for command execution in useCommands.ts by replacing multiple inline implementations of feedback messaging with a centralized sendFeedback utility function. This change improves code maintainability and consistency. Additionally, a new experimental command is introduced.

Command feedback refactoring:

  • Replaced all inline sendFeedback implementations with calls to the shared sendFeedback utility function, standardizing feedback messages across commands and reducing code duplication. (src/app/hooks/useCommands.ts)

Code cleanup:

  • Removed unnecessary imports such as MatrixEvent since feedback messaging is now handled by the utility function. (src/app/hooks/useCommands.ts)

New command addition:

  • Added an experimental command ShareE2EEHistory to the Command enum. (src/app/hooks/useCommands.ts)

see matrix-org/matrix-spec-proposals#4268

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@dozro dozro requested a review from a team March 16, 2026 15:04
@Just-Insane
Copy link
Contributor

You mention /sharee2eehistory is experimental - is it gated behind an Experimental toggle? If not, it probably should be for now.

@dozro dozro marked this pull request as draft March 16, 2026 18:37
@dozro dozro marked this pull request as ready for review March 16, 2026 19:22
@dozro
Copy link
Contributor Author

dozro commented Mar 16, 2026

@Just-Insane
image

@Just-Insane
Copy link
Contributor

LGTM! Once this gets some testing in, we can remove the gate.

@Just-Insane Just-Insane added this pull request to the merge queue Mar 16, 2026
Merged via the queue into SableClient:dev with commit 67f0b9b Mar 16, 2026
8 checks passed
@dozro dozro deleted the compat/msc4268 branch March 16, 2026 19:29
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.

2 participants