This repository was archived by the owner on Jul 22, 2025. It is now read-only.
generated from discourse/discourse-plugin-skeleton
-
Notifications
You must be signed in to change notification settings - Fork 41
FIX: apply diffs more consistently #1367
Merged
Merged
Conversation
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
Member
SamSaffron
commented
May 24, 2025
- Do escaping direct in diff streamer, that way HTML tags and other unsafe chars can be displayed and fixed
- Add safeguard to ensure streaming always stops when it was terminated elsewhere
1. Do escaping direct in diff streamer, that way HTML tags and other unsafe chars can be displayed and fixed 2. Add safeguard to ensure streaming always stops when it was terminated elsewhere
keegangeorge
approved these changes
May 24, 2025
| unsubscribe() { | ||
| const channel = "/discourse-ai/ai-helper/stream_composer_suggestion"; | ||
| this.messageBus.subscribe(channel, this.updateResult); | ||
| this.messageBus.unsubscribe(channel, this.updateResult); |
Member
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh wow, nice catch
| // a little extra space for extra narrow desktop view | ||
| @media screen and (width <= 675px) { | ||
| @media screen and (max-width: 675px) { | ||
| span { |
Member
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably update this to use our viewport.until(md) mixin, but this is probably fine for now.
jjaffeux
reviewed
May 24, 2025
Comment on lines
+54
to
+55
| this.diffStreamer.isStreaming || | ||
| !this.diffStreamer.isDone || |
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like that when you are done you should not be streaming anymore. So setting isDone to true should also set isStreaming to false, otherwise we will plague the code with this double check.
Member
Author
|
Yeah agree probably being over protective
…On Sat, 24 May 2025 at 5:35 pm, Joffrey JAFFEUX ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In assets/javascripts/discourse/components/modal/diff-modal.gjs
<#1367 (comment)>
:
> + this.diffStreamer.isStreaming ||
+ !this.diffStreamer.isDone ||
I feel like that when you are done you should not be streaming anymore. So
setting isDone to true should also set isStreaming to false, otherwise we
will plague the code with this double check.
—
Reply to this email directly, view it on GitHub
<#1367 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAABIXKFQOF5TUQIQKRH4ID3AAOMPAVCNFSM6AAAAAB5Z6KO22VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDQNRWGIYTMMZXGE>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.