repo
stringlengths
5
53
pr_number
int32
1
321k
task_type
stringclasses
2 values
issue_text
stringlengths
0
81.2k
pr_title
stringlengths
1
319
pr_body
stringlengths
0
105k
base_sha
stringlengths
40
40
head_sha
stringlengths
40
40
gold_diff
stringlengths
0
202M
changed_files
listlengths
0
100
review_threads
listlengths
0
100
test_patch
stringlengths
0
23.4M
merged
bool
1 class
Tyrrrz/DiscordChatExporter
1,491
comment_to_fix
Encrypt Discord token at rest in settings file (machine-bound)
```suggestion if (string.IsNullOrWhiteSpace(value)) ```
c59374598a47008b0e86ba37cfaf47207739241d
98bd5d9578af346214e3158392d538cbdfa6fb09
diff --git a/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs b/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs new file mode 100644 index 000000000..c9e70d6ce --- /dev/null +++ b/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs @@ -0,0 +1,90 @@ +using System; +using System.Security...
[ "DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs" ]
[ { "comment": "```suggestion\n if (string.IsNullOrWhiteSpace(value))\n```", "path": "DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs", "hunk": "@@ -0,0 +1,146 @@\n+using System;\n+using System.IO;\n+using System.Security.Cryptography;\n+using System.Text;\n+using System.Text.Json;\n+u...
true
Tyrrrz/DiscordChatExporter
1,491
comment_to_fix
Encrypt Discord token at rest in settings file (machine-bound)
Can we do `var padding = RandomNumberGenerator.GetBytes(RandomNumberGenerator.GetInt32(1, MaxPaddingLength + 1))`? And then inline references to `padLen` as `padding.Length`
c59374598a47008b0e86ba37cfaf47207739241d
98bd5d9578af346214e3158392d538cbdfa6fb09
diff --git a/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs b/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs new file mode 100644 index 000000000..c9e70d6ce --- /dev/null +++ b/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs @@ -0,0 +1,90 @@ +using System; +using System.Security...
[ "DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs" ]
[ { "comment": "Can we do `var padding = RandomNumberGenerator.GetBytes(RandomNumberGenerator.GetInt32(1, MaxPaddingLength + 1))`?\n\nAnd then inline references to `padLen` as `padding.Length`", "path": "DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs", "hunk": "@@ -0,0 +1,146 @@\n+using Syst...
true
Tyrrrz/DiscordChatExporter
1,491
comment_to_fix
Encrypt Discord token at rest in settings file (machine-bound)
Question: can we calculate the padding length, then allocate a byte array for the entire output and use Span overloads to write to specific parts of it?
c59374598a47008b0e86ba37cfaf47207739241d
98bd5d9578af346214e3158392d538cbdfa6fb09
diff --git a/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs b/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs new file mode 100644 index 000000000..c9e70d6ce --- /dev/null +++ b/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs @@ -0,0 +1,90 @@ +using System; +using System.Security...
[ "DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs" ]
[ { "comment": "Question: can we calculate the padding length, then allocate a byte array for the entire output and use Span overloads to write to specific parts of it?", "path": "DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs", "hunk": "@@ -0,0 +1,146 @@\n+using System;\n+using System.IO;\n...
true
Tyrrrz/DiscordChatExporter
1,491
comment_to_fix
Encrypt Discord token at rest in settings file (machine-bound)
Pass it as a project property instead, before PublishMacOSBundle
c59374598a47008b0e86ba37cfaf47207739241d
98bd5d9578af346214e3158392d538cbdfa6fb09
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5bccbc84c..eccfb44a1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -127,6 +127,7 @@ jobs: dotnet publish ${{ matrix.app }} -p:Version=${{ github.ref_type == 'tag' && github.ref_name || format('...
[ ".github/workflows/main.yml" ]
[ { "comment": "Pass it as a project property instead, before PublishMacOSBundle", "path": ".github/workflows/main.yml", "hunk": "@@ -123,6 +123,8 @@ jobs:\n uses: actions/setup-dotnet@baa11fbfe1d6520db94683bd5c7a3818018e4309 # v5.1.0\n \n - name: Publish app\n+ env:\n+ ENCRY...
true
Tyrrrz/DiscordChatExporter
1,491
comment_to_fix
Encrypt Discord token at rest in settings file (machine-bound)
```suggestion **Warning**: although the token is stored with encryption, it may still be recovered by an attacker who has access to your system. ``` One tiny improvement, apply to all translations
c59374598a47008b0e86ba37cfaf47207739241d
98bd5d9578af346214e3158392d538cbdfa6fb09
diff --git a/DiscordChatExporter.Gui/Localization/LocalizationManager.English.cs b/DiscordChatExporter.Gui/Localization/LocalizationManager.English.cs index 7f7fc479d..165ac567e 100644 --- a/DiscordChatExporter.Gui/Localization/LocalizationManager.English.cs +++ b/DiscordChatExporter.Gui/Localization/LocalizationManage...
[ "DiscordChatExporter.Gui/Localization/LocalizationManager.English.cs" ]
[ { "comment": "```suggestion\n **Warning**: although the token is stored with encryption, it may still be recovered by an attacker who has access to your system.\n```\n\nOne tiny improvement, apply to all translations", "path": "DiscordChatExporter.Gui/Localization/LocalizationManager.English....
true
Tyrrrz/DiscordChatExporter
1,491
comment_to_fix
Encrypt Discord token at rest in settings file (machine-bound)
Inline this method call
c59374598a47008b0e86ba37cfaf47207739241d
98bd5d9578af346214e3158392d538cbdfa6fb09
diff --git a/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs b/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs new file mode 100644 index 000000000..c9e70d6ce --- /dev/null +++ b/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs @@ -0,0 +1,90 @@ +using System; +using System.Security...
[ "DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs" ]
[ { "comment": "Inline this method call", "path": "DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs", "hunk": "@@ -0,0 +1,135 @@\n+using System;\n+using System.IO;\n+using System.Security.Cryptography;\n+using System.Text;\n+using System.Text.Json;\n+using System.Text.Json.Serialization;\n+\n+...
true
Tyrrrz/DiscordChatExporter
1,491
comment_to_fix
Encrypt Discord token at rest in settings file (machine-bound)
Inline this method inside `Lazy`
c59374598a47008b0e86ba37cfaf47207739241d
98bd5d9578af346214e3158392d538cbdfa6fb09
diff --git a/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs b/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs new file mode 100644 index 000000000..c9e70d6ce --- /dev/null +++ b/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs @@ -0,0 +1,90 @@ +using System; +using System.Security...
[ "DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs" ]
[ { "comment": "Inline this method inside `Lazy`", "path": "DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs", "hunk": "@@ -0,0 +1,135 @@\n+using System;\n+using System.IO;\n+using System.Security.Cryptography;\n+using System.Text;\n+using System.Text.Json;\n+using System.Text.Json.Serializati...
true
Tyrrrz/DiscordChatExporter
1,491
comment_to_fix
Encrypt Discord token at rest in settings file (machine-bound)
Move it to an extension on the `Environment` static class, in `Utils/Extensions/EnvironmentExtensions.cs`. Use newer extension blocks to achieve this.
c59374598a47008b0e86ba37cfaf47207739241d
98bd5d9578af346214e3158392d538cbdfa6fb09
diff --git a/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs b/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs new file mode 100644 index 000000000..c9e70d6ce --- /dev/null +++ b/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs @@ -0,0 +1,90 @@ +using System; +using System.Security...
[ "DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs" ]
[ { "comment": "Move it to an extension on the `Environment` static class, in `Utils/Extensions/EnvironmentExtensions.cs`. Use newer extension blocks to achieve this.", "path": "DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs", "hunk": "@@ -0,0 +1,135 @@\n+using System;\n+using System.IO;\n+u...
true
Tyrrrz/DiscordChatExporter
1,491
comment_to_fix
Encrypt Discord token at rest in settings file (machine-bound)
```suggestion // Load it as is and encrypt it on next save. ```
c59374598a47008b0e86ba37cfaf47207739241d
98bd5d9578af346214e3158392d538cbdfa6fb09
diff --git a/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs b/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs new file mode 100644 index 000000000..c9e70d6ce --- /dev/null +++ b/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs @@ -0,0 +1,90 @@ +using System; +using System.Security...
[ "DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs" ]
[ { "comment": "```suggestion\n // Load it as is and encrypt it on next save.\n```", "path": "DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs", "hunk": "@@ -0,0 +1,135 @@\n+using System;\n+using System.IO;\n+using System.Security.Cryptography;\n+using System.Text;\n+using System.Text.J...
true
Tyrrrz/DiscordChatExporter
1,491
comment_to_fix
Encrypt Discord token at rest in settings file (machine-bound)
```suggestion var paddingLength = data[12]; ```
c59374598a47008b0e86ba37cfaf47207739241d
98bd5d9578af346214e3158392d538cbdfa6fb09
diff --git a/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs b/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs new file mode 100644 index 000000000..c9e70d6ce --- /dev/null +++ b/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs @@ -0,0 +1,90 @@ +using System; +using System.Security...
[ "DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs" ]
[ { "comment": "```suggestion\n var paddingLength = data[12];\n```", "path": "DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs", "hunk": "@@ -0,0 +1,135 @@\n+using System;\n+using System.IO;\n+using System.Security.Cryptography;\n+using System.Text;\n+using System.Text.Json;\n+using...
true
Tyrrrz/DiscordChatExporter
1,491
comment_to_fix
Encrypt Discord token at rest in settings file (machine-bound)
```suggestion var cipher = data.AsSpan(29); ```
c59374598a47008b0e86ba37cfaf47207739241d
98bd5d9578af346214e3158392d538cbdfa6fb09
diff --git a/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs b/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs new file mode 100644 index 000000000..c9e70d6ce --- /dev/null +++ b/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs @@ -0,0 +1,90 @@ +using System; +using System.Security...
[ "DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs" ]
[ { "comment": "```suggestion\n var cipher = data.AsSpan(29);\n```", "path": "DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs", "hunk": "@@ -0,0 +1,135 @@\n+using System;\n+using System.IO;\n+using System.Security.Cryptography;\n+using System.Text;\n+using System.Text.Json;\n+using...
true
Tyrrrz/DiscordChatExporter
1,491
comment_to_fix
Encrypt Discord token at rest in settings file (machine-bound)
Can be inlined?
c59374598a47008b0e86ba37cfaf47207739241d
98bd5d9578af346214e3158392d538cbdfa6fb09
diff --git a/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs b/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs new file mode 100644 index 000000000..c9e70d6ce --- /dev/null +++ b/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs @@ -0,0 +1,90 @@ +using System; +using System.Security...
[ "DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs" ]
[ { "comment": "Can be inlined?", "path": "DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs", "hunk": "@@ -0,0 +1,135 @@\n+using System;\n+using System.IO;\n+using System.Security.Cryptography;\n+using System.Text;\n+using System.Text.Json;\n+using System.Text.Json.Serialization;\n+\n+namespac...
true
Tyrrrz/DiscordChatExporter
1,491
comment_to_fix
Encrypt Discord token at rest in settings file (machine-bound)
I don't like `plaintext` as a name because this is a byte array
c59374598a47008b0e86ba37cfaf47207739241d
98bd5d9578af346214e3158392d538cbdfa6fb09
diff --git a/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs b/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs new file mode 100644 index 000000000..c9e70d6ce --- /dev/null +++ b/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs @@ -0,0 +1,90 @@ +using System; +using System.Security...
[ "DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs" ]
[ { "comment": "I don't like `plaintext` as a name because this is a byte array", "path": "DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs", "hunk": "@@ -0,0 +1,135 @@\n+using System;\n+using System.IO;\n+using System.Security.Cryptography;\n+using System.Text;\n+using System.Text.Json;\n+usi...
true
Tyrrrz/DiscordChatExporter
1,491
comment_to_fix
Encrypt Discord token at rest in settings file (machine-bound)
```suggestion <EncryptionSalt Condition="'$(EncryptionSalt)' == ''">HimalayanPinkSalt</EncryptionSalt> ```
c59374598a47008b0e86ba37cfaf47207739241d
98bd5d9578af346214e3158392d538cbdfa6fb09
diff --git a/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj b/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj index ad3070d30..e5e27df3f 100644 --- a/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj +++ b/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj @@ -8,6 +8,15 @@ <AvaloniaUseCompi...
[ "DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj" ]
[ { "comment": "```suggestion\n <EncryptionSalt Condition=\"'$(EncryptionSalt)' == ''\">HimalayanPinkSalt</EncryptionSalt>\n```", "path": "DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj", "hunk": "@@ -18,6 +18,31 @@\n <EnableAotAnalyzer>false</EnableAotAnalyzer>\n </PropertyGroup>\n \n+ ...
true
Tyrrrz/DiscordChatExporter
1,491
comment_to_fix
Encrypt Discord token at rest in settings file (machine-bound)
Can we use this library? https://www.nuget.org/packages/ThisAssembly.Project Evaluate for security risks
c59374598a47008b0e86ba37cfaf47207739241d
98bd5d9578af346214e3158392d538cbdfa6fb09
diff --git a/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj b/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj index ad3070d30..e5e27df3f 100644 --- a/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj +++ b/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj @@ -8,6 +8,15 @@ <AvaloniaUseCompi...
[ "DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj" ]
[ { "comment": "Can we use this library? https://www.nuget.org/packages/ThisAssembly.Project\n\nEvaluate for security risks", "path": "DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj", "hunk": "@@ -18,6 +18,31 @@\n <EnableAotAnalyzer>false</EnableAotAnalyzer>\n </PropertyGroup>\n \n+ <!-- Se...
true
Tyrrrz/DiscordChatExporter
1,491
comment_to_fix
Encrypt Discord token at rest in settings file (machine-bound)
Move above the group that contains `PublishMacOSBundle`
c59374598a47008b0e86ba37cfaf47207739241d
98bd5d9578af346214e3158392d538cbdfa6fb09
diff --git a/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj b/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj index ad3070d30..e5e27df3f 100644 --- a/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj +++ b/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj @@ -8,6 +8,15 @@ <AvaloniaUseCompi...
[ "DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj" ]
[ { "comment": "Move above the group that contains `PublishMacOSBundle`", "path": "DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj", "hunk": "@@ -18,6 +18,31 @@\n <EnableAotAnalyzer>false</EnableAotAnalyzer>\n </PropertyGroup>\n \n+ <!-- Set ENCRYPTION_SALT env var in CI to use a build-speci...
true
Tyrrrz/DiscordChatExporter
1,491
comment_to_fix
Encrypt Discord token at rest in settings file (machine-bound)
Move one line above
c59374598a47008b0e86ba37cfaf47207739241d
98bd5d9578af346214e3158392d538cbdfa6fb09
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5bccbc84c..eccfb44a1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -127,6 +127,7 @@ jobs: dotnet publish ${{ matrix.app }} -p:Version=${{ github.ref_type == 'tag' && github.ref_name || format('...
[ ".github/workflows/main.yml" ]
[ { "comment": "Move one line above", "path": ".github/workflows/main.yml", "hunk": "@@ -128,6 +128,7 @@ jobs:\n -p:Version=${{ github.ref_type == 'tag' && github.ref_name || format('999.9.9-ci-{0}', github.sha) }}\n -p:CSharpier_Bypass=true\n -p:PublishMacOSBundle=${{ starts...
true
Tyrrrz/DiscordChatExporter
1,491
comment_to_fix
Encrypt Discord token at rest in settings file (machine-bound)
```suggestion private static readonly Lazy<byte[]> Key = new(() => ``` No need to mention that
c59374598a47008b0e86ba37cfaf47207739241d
98bd5d9578af346214e3158392d538cbdfa6fb09
diff --git a/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs b/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs new file mode 100644 index 000000000..c9e70d6ce --- /dev/null +++ b/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs @@ -0,0 +1,90 @@ +using System; +using System.Security...
[ "DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs" ]
[ { "comment": "```suggestion\n private static readonly Lazy<byte[]> Key = new(() =>\n```\n\nNo need to mention that", "path": "DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs", "hunk": "@@ -0,0 +1,97 @@\n+using System;\n+using System.Security.Cryptography;\n+using System.Text;\n+using Sys...
true
Tyrrrz/DiscordChatExporter
1,491
comment_to_fix
Encrypt Discord token at rest in settings file (machine-bound)
Update to reference actual variable names
c59374598a47008b0e86ba37cfaf47207739241d
98bd5d9578af346214e3158392d538cbdfa6fb09
diff --git a/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs b/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs new file mode 100644 index 000000000..c9e70d6ce --- /dev/null +++ b/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs @@ -0,0 +1,90 @@ +using System; +using System.Security...
[ "DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs" ]
[ { "comment": "Update to reference actual variable names", "path": "DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs", "hunk": "@@ -0,0 +1,97 @@\n+using System;\n+using System.Security.Cryptography;\n+using System.Text;\n+using System.Text.Json;\n+using System.Text.Json.Serialization;\n+using...
true
Tyrrrz/DiscordChatExporter
1,491
comment_to_fix
Encrypt Discord token at rest in settings file (machine-bound)
Sort in the order they appear in the above comment
c59374598a47008b0e86ba37cfaf47207739241d
98bd5d9578af346214e3158392d538cbdfa6fb09
diff --git a/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs b/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs new file mode 100644 index 000000000..c9e70d6ce --- /dev/null +++ b/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs @@ -0,0 +1,90 @@ +using System; +using System.Security...
[ "DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs" ]
[ { "comment": "Sort in the order they appear in the above comment", "path": "DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs", "hunk": "@@ -0,0 +1,97 @@\n+using System;\n+using System.Security.Cryptography;\n+using System.Text;\n+using System.Text.Json;\n+using System.Text.Json.Serialization...
true
Tyrrrz/DiscordChatExporter
1,491
comment_to_fix
Encrypt Discord token at rest in settings file (machine-bound)
Let's call this `cipherSource` instead?
c59374598a47008b0e86ba37cfaf47207739241d
98bd5d9578af346214e3158392d538cbdfa6fb09
diff --git a/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs b/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs new file mode 100644 index 000000000..c9e70d6ce --- /dev/null +++ b/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs @@ -0,0 +1,90 @@ +using System; +using System.Security...
[ "DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs" ]
[ { "comment": "Let's call this `cipherSource` instead?", "path": "DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs", "hunk": "@@ -0,0 +1,97 @@\n+using System;\n+using System.Security.Cryptography;\n+using System.Text;\n+using System.Text.Json;\n+using System.Text.Json.Serialization;\n+using D...
true
Tyrrrz/DiscordChatExporter
1,491
comment_to_fix
Encrypt Discord token at rest in settings file (machine-bound)
```suggestion public static string GetMachineId() ```
c59374598a47008b0e86ba37cfaf47207739241d
98bd5d9578af346214e3158392d538cbdfa6fb09
diff --git a/DiscordChatExporter.Gui/Utils/Extensions/EnvironmentExtensions.cs b/DiscordChatExporter.Gui/Utils/Extensions/EnvironmentExtensions.cs new file mode 100644 index 000000000..8390309c3 --- /dev/null +++ b/DiscordChatExporter.Gui/Utils/Extensions/EnvironmentExtensions.cs @@ -0,0 +1,54 @@ +using System; +using ...
[ "DiscordChatExporter.Gui/Utils/Extensions/EnvironmentExtensions.cs" ]
[ { "comment": "```suggestion\n public static string GetMachineId()\n```", "path": "DiscordChatExporter.Gui/Utils/Extensions/EnvironmentExtensions.cs", "hunk": "@@ -0,0 +1,47 @@\n+using System;\n+using System.IO;\n+\n+namespace DiscordChatExporter.Gui.Utils.Extensions;\n+\n+internal static class En...
true
Tyrrrz/DiscordChatExporter
1,491
comment_to_fix
Encrypt Discord token at rest in settings file (machine-bound)
```suggestion // Unix: /etc/machine-id (set once by systemd at first boot) foreach (var path in new[] { "/etc/machine-id", "/var/lib/dbus/machine-id" }) { try { var id = File.ReadAllText(path).Trim(); if (!string...
c59374598a47008b0e86ba37cfaf47207739241d
98bd5d9578af346214e3158392d538cbdfa6fb09
diff --git a/DiscordChatExporter.Gui/Utils/Extensions/EnvironmentExtensions.cs b/DiscordChatExporter.Gui/Utils/Extensions/EnvironmentExtensions.cs new file mode 100644 index 000000000..8390309c3 --- /dev/null +++ b/DiscordChatExporter.Gui/Utils/Extensions/EnvironmentExtensions.cs @@ -0,0 +1,54 @@ +using System; +using ...
[ "DiscordChatExporter.Gui/Utils/Extensions/EnvironmentExtensions.cs" ]
[ { "comment": "```suggestion\n // Unix: /etc/machine-id (set once by systemd at first boot)\n foreach (var path in new[] { \"/etc/machine-id\", \"/var/lib/dbus/machine-id\" })\n {\n try\n {\n var id = File.ReadAllText(path).Trim();...
true
Tyrrrz/DiscordChatExporter
1,491
comment_to_fix
Encrypt Discord token at rest in settings file (machine-bound)
```suggestion // Last-resort fallback ```
c59374598a47008b0e86ba37cfaf47207739241d
98bd5d9578af346214e3158392d538cbdfa6fb09
diff --git a/DiscordChatExporter.Gui/Utils/Extensions/EnvironmentExtensions.cs b/DiscordChatExporter.Gui/Utils/Extensions/EnvironmentExtensions.cs new file mode 100644 index 000000000..8390309c3 --- /dev/null +++ b/DiscordChatExporter.Gui/Utils/Extensions/EnvironmentExtensions.cs @@ -0,0 +1,54 @@ +using System; +using ...
[ "DiscordChatExporter.Gui/Utils/Extensions/EnvironmentExtensions.cs" ]
[ { "comment": "```suggestion\n // Last-resort fallback\n```", "path": "DiscordChatExporter.Gui/Utils/Extensions/EnvironmentExtensions.cs", "hunk": "@@ -0,0 +1,47 @@\n+using System;\n+using System.IO;\n+\n+namespace DiscordChatExporter.Gui.Utils.Extensions;\n+\n+internal static class Environmen...
true
Tyrrrz/DiscordChatExporter
1,491
comment_to_fix
Encrypt Discord token at rest in settings file (machine-bound)
This can throw. Try/catch with fallback to an empty string.
c59374598a47008b0e86ba37cfaf47207739241d
98bd5d9578af346214e3158392d538cbdfa6fb09
diff --git a/DiscordChatExporter.Gui/Utils/Extensions/EnvironmentExtensions.cs b/DiscordChatExporter.Gui/Utils/Extensions/EnvironmentExtensions.cs new file mode 100644 index 000000000..8390309c3 --- /dev/null +++ b/DiscordChatExporter.Gui/Utils/Extensions/EnvironmentExtensions.cs @@ -0,0 +1,54 @@ +using System; +using ...
[ "DiscordChatExporter.Gui/Utils/Extensions/EnvironmentExtensions.cs" ]
[ { "comment": "This can throw. Try/catch with fallback to an empty string.", "path": "DiscordChatExporter.Gui/Utils/Extensions/EnvironmentExtensions.cs", "hunk": "@@ -0,0 +1,47 @@\n+using System;\n+using System.IO;\n+\n+namespace DiscordChatExporter.Gui.Utils.Extensions;\n+\n+internal static class Enviro...
true
Tyrrrz/DiscordChatExporter
1,491
comment_to_fix
Encrypt Discord token at rest in settings file (machine-bound)
Move this below the following `PropertyGroup`
c59374598a47008b0e86ba37cfaf47207739241d
98bd5d9578af346214e3158392d538cbdfa6fb09
diff --git a/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj b/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj index ad3070d30..e5e27df3f 100644 --- a/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj +++ b/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj @@ -8,6 +8,15 @@ <AvaloniaUseCompi...
[ "DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj" ]
[ { "comment": "Move this below the following `PropertyGroup`", "path": "DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj", "hunk": "@@ -1,4 +1,10 @@\n <Project Sdk=\"Microsoft.NET.Sdk\">\n+ <!-- Set EncryptionSalt as a project property. CI injects the real salt via\n+ -p:EncryptionSalt=... a...
true
Tyrrrz/DiscordChatExporter
1,491
comment_to_fix
Encrypt Discord token at rest in settings file (machine-bound)
Move this right below the property group that contains "EncryptionSalt"
c59374598a47008b0e86ba37cfaf47207739241d
98bd5d9578af346214e3158392d538cbdfa6fb09
diff --git a/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj b/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj index ad3070d30..e5e27df3f 100644 --- a/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj +++ b/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj @@ -8,6 +8,15 @@ <AvaloniaUseCompi...
[ "DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj" ]
[ { "comment": "Move this right below the property group that contains \"EncryptionSalt\"", "path": "DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj", "hunk": "@@ -38,6 +44,11 @@\n <PackageReference Include=\"Material.Icons.Avalonia\" />\n <PackageReference Include=\"Microsoft.Extensions.De...
true
Tyrrrz/DiscordChatExporter
1,491
comment_to_fix
Encrypt Discord token at rest in settings file (machine-bound)
```suggestion <!-- Expose this property in code --> <ProjectProperty Include="EncryptionSalt" /> ```
c59374598a47008b0e86ba37cfaf47207739241d
98bd5d9578af346214e3158392d538cbdfa6fb09
diff --git a/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj b/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj index ad3070d30..e5e27df3f 100644 --- a/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj +++ b/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj @@ -8,6 +8,15 @@ <AvaloniaUseCompi...
[ "DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj" ]
[ { "comment": "```suggestion\n <!-- Expose this property in code -->\n <ProjectProperty Include=\"EncryptionSalt\" />\n```", "path": "DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj", "hunk": "@@ -8,6 +8,14 @@\n <AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDef...
true
Tyrrrz/DiscordChatExporter
1,491
comment_to_fix
Encrypt Discord token at rest in settings file (machine-bound)
Can we do this: 1. Generate padding length 2. Initialize a byte array that fits the entire encrypted output 3. Use span overloads (e.g. FillBytes) to populate the correct areas of the array
c59374598a47008b0e86ba37cfaf47207739241d
98bd5d9578af346214e3158392d538cbdfa6fb09
diff --git a/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs b/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs new file mode 100644 index 000000000..c9e70d6ce --- /dev/null +++ b/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs @@ -0,0 +1,90 @@ +using System; +using System.Security...
[ "DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs" ]
[ { "comment": "Can we do this:\n\n1. Generate padding length\n2. Initialize a byte array that fits the entire encrypted output\n3. Use span overloads (e.g. FillBytes) to populate the correct areas of the array", "path": "DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs", "hunk": "@@ -0,0 +1,9...
true
Tyrrrz/DiscordChatExporter
1,491
comment_to_fix
Encrypt Discord token at rest in settings file (machine-bound)
```suggestion public static string? TryGetMachineId() ``` Actually, make this return `null` in case of failure, let the callsite decide what fallback to use (empty string)
c59374598a47008b0e86ba37cfaf47207739241d
98bd5d9578af346214e3158392d538cbdfa6fb09
diff --git a/DiscordChatExporter.Gui/Utils/Extensions/EnvironmentExtensions.cs b/DiscordChatExporter.Gui/Utils/Extensions/EnvironmentExtensions.cs new file mode 100644 index 000000000..8390309c3 --- /dev/null +++ b/DiscordChatExporter.Gui/Utils/Extensions/EnvironmentExtensions.cs @@ -0,0 +1,54 @@ +using System; +using ...
[ "DiscordChatExporter.Gui/Utils/Extensions/EnvironmentExtensions.cs" ]
[ { "comment": "```suggestion\n public static string? TryGetMachineId()\n```\n\nActually, make this return `null` in case of failure, let the callsite decide what fallback to use (empty string)", "path": "DiscordChatExporter.Gui/Utils/Extensions/EnvironmentExtensions.cs", "hunk": "@@ -0,0 +1,54 @@\...
true
Tyrrrz/DiscordChatExporter
1,491
comment_to_fix
Encrypt Discord token at rest in settings file (machine-bound)
```suggestion var tokenData = Encoding.UTF8.GetBytes(value); ```
c59374598a47008b0e86ba37cfaf47207739241d
98bd5d9578af346214e3158392d538cbdfa6fb09
diff --git a/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs b/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs new file mode 100644 index 000000000..c9e70d6ce --- /dev/null +++ b/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs @@ -0,0 +1,90 @@ +using System; +using System.Security...
[ "DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs" ]
[ { "comment": "```suggestion\n var tokenData = Encoding.UTF8.GetBytes(value);\n```", "path": "DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs", "hunk": "@@ -0,0 +1,91 @@\n+using System;\n+using System.Security.Cryptography;\n+using System.Text;\n+using System.Text.Json;\n+using System...
true
Tyrrrz/DiscordChatExporter
1,491
comment_to_fix
Encrypt Discord token at rest in settings file (machine-bound)
```suggestion // Layout: nonce (12 bytes) | paddingLength (1 byte) | tag (16 bytes) | cipher (paddingLength + tokenBytes.Length) ```
c59374598a47008b0e86ba37cfaf47207739241d
98bd5d9578af346214e3158392d538cbdfa6fb09
diff --git a/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs b/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs new file mode 100644 index 000000000..c9e70d6ce --- /dev/null +++ b/DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs @@ -0,0 +1,90 @@ +using System; +using System.Security...
[ "DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs" ]
[ { "comment": "```suggestion\n // Layout: nonce (12 bytes) | paddingLength (1 byte) | tag (16 bytes) | cipher (paddingLength + tokenBytes.Length)\n```", "path": "DiscordChatExporter.Gui/Services/TokenEncryptionConverter.cs", "hunk": "@@ -0,0 +1,91 @@\n+using System;\n+using System.Security.Cryptog...
true
Tyrrrz/DiscordChatExporter
1,491
comment_to_fix
Encrypt Discord token at rest in settings file (machine-bound)
`EncryptionSalt` fallback here won’t take effect when the value is provided via `-p:EncryptionSalt=...` (global MSBuild properties override project properties). In CI (and especially on fork PRs where the secret is unavailable), this can result in an empty `EncryptionSalt` at compile time. Consider either not passing t...
c59374598a47008b0e86ba37cfaf47207739241d
98bd5d9578af346214e3158392d538cbdfa6fb09
diff --git a/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj b/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj index ad3070d30..e5e27df3f 100644 --- a/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj +++ b/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj @@ -8,6 +8,15 @@ <AvaloniaUseCompi...
[ "DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj" ]
[ { "comment": "`EncryptionSalt` fallback here won’t take effect when the value is provided via `-p:EncryptionSalt=...` (global MSBuild properties override project properties). In CI (and especially on fork PRs where the secret is unavailable), this can result in an empty `EncryptionSalt` at compile time. Conside...
true
Tyrrrz/DiscordChatExporter
1,491
comment_to_fix
Encrypt Discord token at rest in settings file (machine-bound)
`-p:EncryptionSalt=${{ secrets.ENCRYPTION_SALT }}` will still pass an empty global MSBuild property on fork PRs (secrets are unavailable), which prevents the project’s conditional default from applying. Consider making the publish argument conditional (only include `-p:EncryptionSalt=...` when the secret is non-empty) ...
c59374598a47008b0e86ba37cfaf47207739241d
98bd5d9578af346214e3158392d538cbdfa6fb09
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5bccbc84c..eccfb44a1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -127,6 +127,7 @@ jobs: dotnet publish ${{ matrix.app }} -p:Version=${{ github.ref_type == 'tag' && github.ref_name || format('...
[ ".github/workflows/main.yml" ]
[ { "comment": "`-p:EncryptionSalt=${{ secrets.ENCRYPTION_SALT }}` will still pass an empty global MSBuild property on fork PRs (secrets are unavailable), which prevents the project’s conditional default from applying. Consider making the publish argument conditional (only include `-p:EncryptionSalt=...` when the...
true
Tyrrrz/DiscordChatExporter
1,491
comment_to_fix
Encrypt Discord token at rest in settings file (machine-bound)
```suggestion <EncryptionSalt>HimalayanPinkSalt</EncryptionSalt> ```
c59374598a47008b0e86ba37cfaf47207739241d
98bd5d9578af346214e3158392d538cbdfa6fb09
diff --git a/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj b/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj index ad3070d30..e5e27df3f 100644 --- a/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj +++ b/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj @@ -8,6 +8,15 @@ <AvaloniaUseCompi...
[ "DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj" ]
[ { "comment": "```suggestion\n <EncryptionSalt>HimalayanPinkSalt</EncryptionSalt>\n```", "path": "DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj", "hunk": "@@ -8,6 +8,15 @@\n <AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>\n </PropertyGroup>\n \n+ <Prop...
true
Tyrrrz/DiscordChatExporter
1,489
issue_to_patch
Migrate to Centralized NuGet Package Management (CPM)
- [x] Explore all .csproj files and collect package references - [x] Create `Directory.Packages.props` with all 34 package versions centrally managed (alphabetically sorted) - [x] Update all `.csproj` files to remove `Version="..."` attributes from `<PackageReference>` elements - [x] Add `Directory.Packages.props` to t...
01d02034452021772a5fdc77d96e0cf977a12045
812192a28b04e8442b639b87c9117542dba1f910
diff --git a/Directory.Packages.props b/Directory.Packages.props new file mode 100644 index 000000000..45b9afe33 --- /dev/null +++ b/Directory.Packages.props @@ -0,0 +1,42 @@ +<Project> + <PropertyGroup> + <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> + </PropertyGroup> + + <ItemGroup> + ...
[ "Directory.Packages.props", "DiscordChatExporter.Cli.Tests/DiscordChatExporter.Cli.Tests.csproj", "DiscordChatExporter.Cli.dockerfile", "DiscordChatExporter.Cli/DiscordChatExporter.Cli.csproj", "DiscordChatExporter.Core/DiscordChatExporter.Core.csproj", "DiscordChatExporter.Gui/DiscordChatExporter.Gui.csp...
[]
true
Tyrrrz/DiscordChatExporter
1,487
issue_to_patch
Option to reverse message order ### Version v2.46 ### Flavor CLI (Command-Line Interface) ### Platform Debian ### Export format HTML ### Steps to reproduce Look at how im using this; https://piratemc.com/changelogs/ Then look at the dates of the posts, to find the latest changelogs, people have to scroll ri...
Add option to reverse message order in exports
- [x] Add `bool IsReverseMessageOrder` to `ExportRequest` (above `Locale`, replacing the former `MessageOrder` enum) - [x] Add `GetMessagesInReverseAsync` to `DiscordClient` — uses `before`-based pagination, streams messages without buffering - [x] Add `TryGetFirstMessageAsync` private helper in `DiscordClient` (uses `...
d2c0e2169b0a8f37c59ed3c3eb8238741ae3f8dc
a9bf55c94af1d4160a1574cab8e283e75208360e
diff --git a/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs b/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs index 09ab2691f..070c8e88f 100644 --- a/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs +++ b/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs @@ -83,6 +83,12 @@ publ...
[ "DiscordChatExporter.Cli.Tests/Specs/HtmlContentSpecs.cs", "DiscordChatExporter.Cli.Tests/Specs/JsonContentSpecs.cs", "DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs", "DiscordChatExporter.Core/Discord/DiscordClient.cs", "DiscordChatExporter.Core/Exporting/ChannelExporter.cs", "DiscordChatExpo...
[ { "comment": "Invert this @copilot ", "path": "DiscordChatExporter.Core/Exporting/ChannelExporter.cs", "hunk": "@@ -65,26 +64,37 @@ request.After is not null\n );\n }\n \n- var fetchedMessages = new List<Message>();\n+ // Choose the message stream based on the requested...
diff --git a/DiscordChatExporter.Cli.Tests/Specs/HtmlContentSpecs.cs b/DiscordChatExporter.Cli.Tests/Specs/HtmlContentSpecs.cs index fcb1356a9..601cfdd3c 100644 --- a/DiscordChatExporter.Cli.Tests/Specs/HtmlContentSpecs.cs +++ b/DiscordChatExporter.Cli.Tests/Specs/HtmlContentSpecs.cs @@ -1,7 +1,12 @@ -using System.Lin...
true
Tyrrrz/DiscordChatExporter
1,487
comment_to_fix
Add option to reverse message order in exports
Invert this @copilot
d2c0e2169b0a8f37c59ed3c3eb8238741ae3f8dc
a9bf55c94af1d4160a1574cab8e283e75208360e
diff --git a/DiscordChatExporter.Core/Exporting/ChannelExporter.cs b/DiscordChatExporter.Core/Exporting/ChannelExporter.cs index 68ca75b49..7e3c400c6 100644 --- a/DiscordChatExporter.Core/Exporting/ChannelExporter.cs +++ b/DiscordChatExporter.Core/Exporting/ChannelExporter.cs @@ -64,15 +64,23 @@ request.After is not nu...
[ "DiscordChatExporter.Core/Exporting/ChannelExporter.cs" ]
[ { "comment": "Invert this @copilot ", "path": "DiscordChatExporter.Core/Exporting/ChannelExporter.cs", "hunk": "@@ -65,26 +64,37 @@ request.After is not null\n );\n }\n \n- var fetchedMessages = new List<Message>();\n+ // Choose the message stream based on the requested...
true
Tyrrrz/DiscordChatExporter
1,487
comment_to_fix
Add option to reverse message order in exports
Just "...format_in_the_reverse_order" is enough. Apply to other tests too.
d2c0e2169b0a8f37c59ed3c3eb8238741ae3f8dc
a9bf55c94af1d4160a1574cab8e283e75208360e
diff --git a/DiscordChatExporter.Cli.Tests/Specs/HtmlContentSpecs.cs b/DiscordChatExporter.Cli.Tests/Specs/HtmlContentSpecs.cs index fcb1356a9..601cfdd3c 100644 --- a/DiscordChatExporter.Cli.Tests/Specs/HtmlContentSpecs.cs +++ b/DiscordChatExporter.Cli.Tests/Specs/HtmlContentSpecs.cs @@ -1,7 +1,12 @@ -using System.Lin...
[ "DiscordChatExporter.Cli.Tests/Specs/HtmlContentSpecs.cs" ]
[ { "comment": "Just \"...format_in_the_reverse_order\" is enough. Apply to other tests too.", "path": "DiscordChatExporter.Cli.Tests/Specs/HtmlContentSpecs.cs", "hunk": "@@ -44,4 +49,41 @@ public async Task I_can_export_a_channel_in_the_HTML_format()\n \"Yeet\"\n );\n }\n+...
true
Tyrrrz/DiscordChatExporter
1,487
comment_to_fix
Add option to reverse message order in exports
```suggestion // Assert ``` Apply to other tests too
d2c0e2169b0a8f37c59ed3c3eb8238741ae3f8dc
a9bf55c94af1d4160a1574cab8e283e75208360e
diff --git a/DiscordChatExporter.Cli.Tests/Specs/HtmlContentSpecs.cs b/DiscordChatExporter.Cli.Tests/Specs/HtmlContentSpecs.cs index fcb1356a9..601cfdd3c 100644 --- a/DiscordChatExporter.Cli.Tests/Specs/HtmlContentSpecs.cs +++ b/DiscordChatExporter.Cli.Tests/Specs/HtmlContentSpecs.cs @@ -1,7 +1,12 @@ -using System.Lin...
[ "DiscordChatExporter.Cli.Tests/Specs/HtmlContentSpecs.cs" ]
[ { "comment": "```suggestion\n // Assert\n```\n\nApply to other tests too", "path": "DiscordChatExporter.Cli.Tests/Specs/HtmlContentSpecs.cs", "hunk": "@@ -44,4 +49,41 @@ public async Task I_can_export_a_channel_in_the_HTML_format()\n \"Yeet\"\n );\n }\n+\n+ [Fac...
true
Tyrrrz/DiscordChatExporter
1,487
comment_to_fix
Add option to reverse message order in exports
```suggestion Description = "How the messages should be ordered.", ``` The possible values are auto-documented by the CLI framework.
d2c0e2169b0a8f37c59ed3c3eb8238741ae3f8dc
a9bf55c94af1d4160a1574cab8e283e75208360e
diff --git a/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs b/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs index 09ab2691f..070c8e88f 100644 --- a/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs +++ b/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs @@ -83,6 +83,12 @@ publ...
[ "DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs" ]
[ { "comment": "```suggestion\n Description = \"How the messages should be ordered.\",\n```\n\nThe possible values are auto-documented by the CLI framework.", "path": "DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs", "hunk": "@@ -131,6 +131,14 @@ public string? AssetsDirPath\n [Comm...
true
Tyrrrz/DiscordChatExporter
1,487
comment_to_fix
Add option to reverse message order in exports
```suggestion var messages = ```
d2c0e2169b0a8f37c59ed3c3eb8238741ae3f8dc
a9bf55c94af1d4160a1574cab8e283e75208360e
diff --git a/DiscordChatExporter.Core/Exporting/ChannelExporter.cs b/DiscordChatExporter.Core/Exporting/ChannelExporter.cs index 68ca75b49..7e3c400c6 100644 --- a/DiscordChatExporter.Core/Exporting/ChannelExporter.cs +++ b/DiscordChatExporter.Core/Exporting/ChannelExporter.cs @@ -64,15 +64,23 @@ request.After is not nu...
[ "DiscordChatExporter.Core/Exporting/ChannelExporter.cs" ]
[ { "comment": "```suggestion\n var messages =\n```", "path": "DiscordChatExporter.Core/Exporting/ChannelExporter.cs", "hunk": "@@ -64,15 +64,27 @@ request.After is not null\n );\n }\n \n- await foreach (\n- var message in discord.GetMessagesAsync(\n- ...
true
Tyrrrz/DiscordChatExporter
1,487
comment_to_fix
Add option to reverse message order in exports
This should be moved above `Locale`. Update all similar code areas where these symbols appear in order.
d2c0e2169b0a8f37c59ed3c3eb8238741ae3f8dc
a9bf55c94af1d4160a1574cab8e283e75208360e
diff --git a/DiscordChatExporter.Core/Exporting/ExportRequest.cs b/DiscordChatExporter.Core/Exporting/ExportRequest.cs index c814df8a6..aae3a9216 100644 --- a/DiscordChatExporter.Core/Exporting/ExportRequest.cs +++ b/DiscordChatExporter.Core/Exporting/ExportRequest.cs @@ -33,6 +33,8 @@ public partial class ExportReques...
[ "DiscordChatExporter.Core/Exporting/ExportRequest.cs" ]
[ { "comment": "This should be moved above `Locale`. Update all similar code areas where these symbols appear in order.", "path": "DiscordChatExporter.Core/Exporting/ExportRequest.cs", "hunk": "@@ -45,6 +45,8 @@ public partial class ExportRequest\n \n public bool IsUtcNormalizationEnabled { get; }\n \...
true
Tyrrrz/DiscordChatExporter
1,487
comment_to_fix
Add option to reverse message order in exports
Let's move above `ShouldFormatMarkdown`. Apply the same to `ExportRequest`, GUI `SettingsService`/view model/view, etc etc.
d2c0e2169b0a8f37c59ed3c3eb8238741ae3f8dc
a9bf55c94af1d4160a1574cab8e283e75208360e
diff --git a/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs b/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs index 09ab2691f..070c8e88f 100644 --- a/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs +++ b/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs @@ -83,6 +83,12 @@ publ...
[ "DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs" ]
[ { "comment": "Let's move above `ShouldFormatMarkdown`. Apply the same to `ExportRequest`, GUI `SettingsService`/view model/view, etc etc.", "path": "DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs", "hunk": "@@ -131,6 +131,9 @@ public string? AssetsDirPath\n [CommandOption(\"utc\", Descri...
true
Tyrrrz/DiscordChatExporter
1,487
comment_to_fix
Add option to reverse message order in exports
Move this above the other method
d2c0e2169b0a8f37c59ed3c3eb8238741ae3f8dc
a9bf55c94af1d4160a1574cab8e283e75208360e
diff --git a/DiscordChatExporter.Core/Discord/DiscordClient.cs b/DiscordChatExporter.Core/Discord/DiscordClient.cs index 28d5e255a..67c5d80ad 100644 --- a/DiscordChatExporter.Core/Discord/DiscordClient.cs +++ b/DiscordChatExporter.Core/Discord/DiscordClient.cs @@ -564,6 +564,28 @@ var threadJson in response } ...
[ "DiscordChatExporter.Core/Discord/DiscordClient.cs" ]
[ { "comment": "Move this above the other method", "path": "DiscordChatExporter.Core/Discord/DiscordClient.cs", "hunk": "@@ -580,6 +580,20 @@ var threadJson in response\n return response.EnumerateArray().Select(Message.Parse).LastOrDefault();\n }\n \n+ private async ValueTask<Message?> TryG...
true
Tyrrrz/DiscordChatExporter
1,487
comment_to_fix
Add option to reverse message order in exports
I'm confused. Shouldn't we be getting the oldest message? I.e. the first message in the channel?
d2c0e2169b0a8f37c59ed3c3eb8238741ae3f8dc
a9bf55c94af1d4160a1574cab8e283e75208360e
diff --git a/DiscordChatExporter.Core/Discord/DiscordClient.cs b/DiscordChatExporter.Core/Discord/DiscordClient.cs index 28d5e255a..67c5d80ad 100644 --- a/DiscordChatExporter.Core/Discord/DiscordClient.cs +++ b/DiscordChatExporter.Core/Discord/DiscordClient.cs @@ -564,6 +564,28 @@ var threadJson in response } ...
[ "DiscordChatExporter.Core/Discord/DiscordClient.cs" ]
[ { "comment": "I'm confused. Shouldn't we be getting the oldest message? I.e. the first message in the channel?", "path": "DiscordChatExporter.Core/Discord/DiscordClient.cs", "hunk": "@@ -670,6 +684,99 @@ public async IAsyncEnumerable<Message> GetMessagesAsync(\n }\n }\n \n+ public async I...
true
Tyrrrz/DiscordChatExporter
1,487
comment_to_fix
Add option to reverse message order in exports
Move this in accordance with the order in `SettingsService`. Also apply to the translations.
d2c0e2169b0a8f37c59ed3c3eb8238741ae3f8dc
a9bf55c94af1d4160a1574cab8e283e75208360e
diff --git a/DiscordChatExporter.Gui/Localization/LocalizationManager.cs b/DiscordChatExporter.Gui/Localization/LocalizationManager.cs index 7ab62e9f8..71974f21c 100644 --- a/DiscordChatExporter.Gui/Localization/LocalizationManager.cs +++ b/DiscordChatExporter.Gui/Localization/LocalizationManager.cs @@ -135,6 +135,8 @@...
[ "DiscordChatExporter.Gui/Localization/LocalizationManager.cs" ]
[ { "comment": "Move this in accordance with the order in `SettingsService`. Also apply to the translations.", "path": "DiscordChatExporter.Gui/Localization/LocalizationManager.cs", "hunk": "@@ -143,6 +143,8 @@ public partial class LocalizationManager\n public string ReuseAssetsTooltip => Get();\n ...
true
Tyrrrz/DiscordChatExporter
1,487
comment_to_fix
Add option to reverse message order in exports
```suggestion dialog.IsReverseMessageOrder, ```
d2c0e2169b0a8f37c59ed3c3eb8238741ae3f8dc
a9bf55c94af1d4160a1574cab8e283e75208360e
diff --git a/DiscordChatExporter.Gui/ViewModels/Components/DashboardViewModel.cs b/DiscordChatExporter.Gui/ViewModels/Components/DashboardViewModel.cs index ecbead8f8..71e9429f6 100644 --- a/DiscordChatExporter.Gui/ViewModels/Components/DashboardViewModel.cs +++ b/DiscordChatExporter.Gui/ViewModels/Components/Dashboard...
[ "DiscordChatExporter.Gui/ViewModels/Components/DashboardViewModel.cs" ]
[ { "comment": "```suggestion\n dialog.IsReverseMessageOrder,\n```", "path": "DiscordChatExporter.Gui/ViewModels/Components/DashboardViewModel.cs", "hunk": "@@ -278,6 +278,7 @@ await Parallel.ForEachAsync(\n dialog.ShouldFormatMarkdown,\n ...
true
Tyrrrz/DiscordChatExporter
1,487
comment_to_fix
Add option to reverse message order in exports
```suggestion public bool IsReverseMessageOrder { get; init; } ```
d2c0e2169b0a8f37c59ed3c3eb8238741ae3f8dc
a9bf55c94af1d4160a1574cab8e283e75208360e
diff --git a/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs b/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs index 09ab2691f..070c8e88f 100644 --- a/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs +++ b/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs @@ -83,6 +83,12 @@ publ...
[ "DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs" ]
[ { "comment": "```suggestion\n public bool IsReverseMessageOrder { get; init; }\n```", "path": "DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs", "hunk": "@@ -83,6 +83,9 @@ public string OutputPath\n )]\n public int ParallelLimit { get; init; } = 1;\n \n+ [CommandOption(\"reverse...
true
Tyrrrz/DiscordChatExporter
1,487
comment_to_fix
Add option to reverse message order in exports
```suggestion [CommandOption("reverse", Description = "Export messages in reverse chronological order (newest first).")] ```
d2c0e2169b0a8f37c59ed3c3eb8238741ae3f8dc
a9bf55c94af1d4160a1574cab8e283e75208360e
diff --git a/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs b/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs index 09ab2691f..070c8e88f 100644 --- a/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs +++ b/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs @@ -83,6 +83,12 @@ publ...
[ "DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs" ]
[ { "comment": "```suggestion\n [CommandOption(\"reverse\", Description = \"Export messages in reverse chronological order (newest first).\")]\n```\n", "path": "DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs", "hunk": "@@ -83,6 +83,9 @@ public string OutputPath\n )]\n public int Par...
true
Tyrrrz/DiscordChatExporter
1,487
comment_to_fix
Add option to reverse message order in exports
```suggestion [nameof(ReverseMessageOrderLabel)] = "Reverse messages", ```
d2c0e2169b0a8f37c59ed3c3eb8238741ae3f8dc
a9bf55c94af1d4160a1574cab8e283e75208360e
diff --git a/DiscordChatExporter.Gui/Localization/LocalizationManager.English.cs b/DiscordChatExporter.Gui/Localization/LocalizationManager.English.cs index 9cb791624..7f7fc479d 100644 --- a/DiscordChatExporter.Gui/Localization/LocalizationManager.English.cs +++ b/DiscordChatExporter.Gui/Localization/LocalizationManage...
[ "DiscordChatExporter.Gui/Localization/LocalizationManager.English.cs" ]
[ { "comment": "```suggestion\n [nameof(ReverseMessageOrderLabel)] = \"Reverse messages\",\n```", "path": "DiscordChatExporter.Gui/Localization/LocalizationManager.English.cs", "hunk": "@@ -104,6 +104,9 @@ Directory paths must end with a slash to avoid ambiguity.\n [nameof(MessageFi...
true
Tyrrrz/DiscordChatExporter
1,487
comment_to_fix
Add option to reverse message order in exports
```suggestion [nameof(ReverseMessageOrderLabel)] = "Зворотній порядок повідомлень", ```
d2c0e2169b0a8f37c59ed3c3eb8238741ae3f8dc
a9bf55c94af1d4160a1574cab8e283e75208360e
diff --git a/DiscordChatExporter.Gui/Localization/LocalizationManager.Ukrainian.cs b/DiscordChatExporter.Gui/Localization/LocalizationManager.Ukrainian.cs index 068cf8f96..b3ce2f48b 100644 --- a/DiscordChatExporter.Gui/Localization/LocalizationManager.Ukrainian.cs +++ b/DiscordChatExporter.Gui/Localization/Localization...
[ "DiscordChatExporter.Gui/Localization/LocalizationManager.Ukrainian.cs" ]
[ { "comment": "```suggestion\n [nameof(ReverseMessageOrderLabel)] = \"Зворотній порядок повідомлень\",\n```", "path": "DiscordChatExporter.Gui/Localization/LocalizationManager.Ukrainian.cs", "hunk": "@@ -104,6 +104,9 @@ Шляхи до директорій повинні закінчуватись \n [nameof(MessageFi...
true
Tyrrrz/DiscordChatExporter
1,487
comment_to_fix
Add option to reverse message order in exports
1. The snapshot is not useful here since immediately after we do an effectively identical query with `limit=100`. The first request already snapshots the whole range. 2. We need the first message (i.e. oldest) to properly calculate duration/progress. We can get it by sending a `limit=1` request with `after=after ?? 0`....
d2c0e2169b0a8f37c59ed3c3eb8238741ae3f8dc
a9bf55c94af1d4160a1574cab8e283e75208360e
diff --git a/DiscordChatExporter.Core/Discord/DiscordClient.cs b/DiscordChatExporter.Core/Discord/DiscordClient.cs index 28d5e255a..67c5d80ad 100644 --- a/DiscordChatExporter.Core/Discord/DiscordClient.cs +++ b/DiscordChatExporter.Core/Discord/DiscordClient.cs @@ -564,6 +564,28 @@ var threadJson in response } ...
[ "DiscordChatExporter.Core/Discord/DiscordClient.cs" ]
[ { "comment": "1. The snapshot is not useful here since immediately after we do an effectively identical query with `limit=100`. The first request already snapshots the whole range.\n2. We need the first message (i.e. oldest) to properly calculate duration/progress. We can get it by sending a `limit=1` request w...
true
Tyrrrz/DiscordChatExporter
1,487
comment_to_fix
Add option to reverse message order in exports
Progress reporting in `GetMessagesInReverseAsync()` becomes effectively always 100% when `after` is null because `totalDuration` is set to `exportedDuration`. If progress is meant to be meaningful without an `after` bound, consider using the oldest message in range (e.g., via a helper like `TryGetFirstMessageAsync`) to...
d2c0e2169b0a8f37c59ed3c3eb8238741ae3f8dc
a9bf55c94af1d4160a1574cab8e283e75208360e
diff --git a/DiscordChatExporter.Core/Discord/DiscordClient.cs b/DiscordChatExporter.Core/Discord/DiscordClient.cs index 28d5e255a..67c5d80ad 100644 --- a/DiscordChatExporter.Core/Discord/DiscordClient.cs +++ b/DiscordChatExporter.Core/Discord/DiscordClient.cs @@ -564,6 +564,28 @@ var threadJson in response } ...
[ "DiscordChatExporter.Core/Discord/DiscordClient.cs" ]
[ { "comment": "Progress reporting in `GetMessagesInReverseAsync()` becomes effectively always 100% when `after` is null because `totalDuration` is set to `exportedDuration`. If progress is meant to be meaningful without an `after` bound, consider using the oldest message in range (e.g., via a helper like `TryGet...
true
Tyrrrz/DiscordChatExporter
1,487
comment_to_fix
Add option to reverse message order in exports
`TryGetFirstMessageAsync()` is currently unused. If it’s not needed, consider removing it to avoid dead code; if it is intended for reverse-export progress/range calculations, wire it into `GetMessagesInReverseAsync()` (and ensure it enforces the `before` bound using message IDs rather than timestamps). ```suggestion ...
d2c0e2169b0a8f37c59ed3c3eb8238741ae3f8dc
a9bf55c94af1d4160a1574cab8e283e75208360e
diff --git a/DiscordChatExporter.Core/Discord/DiscordClient.cs b/DiscordChatExporter.Core/Discord/DiscordClient.cs index 28d5e255a..67c5d80ad 100644 --- a/DiscordChatExporter.Core/Discord/DiscordClient.cs +++ b/DiscordChatExporter.Core/Discord/DiscordClient.cs @@ -564,6 +564,28 @@ var threadJson in response } ...
[ "DiscordChatExporter.Core/Discord/DiscordClient.cs" ]
[ { "comment": "`TryGetFirstMessageAsync()` is currently unused. If it’s not needed, consider removing it to avoid dead code; if it is intended for reverse-export progress/range calculations, wire it into `GetMessagesInReverseAsync()` (and ensure it enforces the `before` bound using message IDs rather than timest...
true
Tyrrrz/DiscordChatExporter
1,487
comment_to_fix
Add option to reverse message order in exports
`GetMessagesInReverseAsync()` claims to snapshot the upper boundary via `lastMessage`, but when `before` is null the first request uses no `before` cursor, so messages posted after `lastMessage` was fetched can still be included. This can also break progress math (messages newer than `lastMessage`). Consider anchoring ...
d2c0e2169b0a8f37c59ed3c3eb8238741ae3f8dc
a9bf55c94af1d4160a1574cab8e283e75208360e
diff --git a/DiscordChatExporter.Core/Discord/DiscordClient.cs b/DiscordChatExporter.Core/Discord/DiscordClient.cs index 28d5e255a..67c5d80ad 100644 --- a/DiscordChatExporter.Core/Discord/DiscordClient.cs +++ b/DiscordChatExporter.Core/Discord/DiscordClient.cs @@ -564,6 +564,28 @@ var threadJson in response } ...
[ "DiscordChatExporter.Core/Discord/DiscordClient.cs" ]
[ { "comment": "`GetMessagesInReverseAsync()` claims to snapshot the upper boundary via `lastMessage`, but when `before` is null the first request uses no `before` cursor, so messages posted after `lastMessage` was fetched can still be included. This can also break progress math (messages newer than `lastMessage`...
true
Tyrrrz/DiscordChatExporter
1,487
comment_to_fix
Add option to reverse message order in exports
```suggestion // Keep track of the last message in range in order to calculate the progress var lastMessage = default(Message); ```
d2c0e2169b0a8f37c59ed3c3eb8238741ae3f8dc
a9bf55c94af1d4160a1574cab8e283e75208360e
diff --git a/DiscordChatExporter.Core/Discord/DiscordClient.cs b/DiscordChatExporter.Core/Discord/DiscordClient.cs index 28d5e255a..67c5d80ad 100644 --- a/DiscordChatExporter.Core/Discord/DiscordClient.cs +++ b/DiscordChatExporter.Core/Discord/DiscordClient.cs @@ -564,6 +564,28 @@ var threadJson in response } ...
[ "DiscordChatExporter.Core/Discord/DiscordClient.cs" ]
[ { "comment": "```suggestion\n // Keep track of the last message in range in order to calculate the progress\n var lastMessage = default(Message);\n```", "path": "DiscordChatExporter.Core/Discord/DiscordClient.cs", "hunk": "@@ -670,6 +692,100 @@ public async IAsyncEnumerable<Message> GetMes...
true
Tyrrrz/DiscordChatExporter
1,487
comment_to_fix
Add option to reverse message order in exports
```suggestion ```
d2c0e2169b0a8f37c59ed3c3eb8238741ae3f8dc
a9bf55c94af1d4160a1574cab8e283e75208360e
diff --git a/DiscordChatExporter.Core/Discord/DiscordClient.cs b/DiscordChatExporter.Core/Discord/DiscordClient.cs index 28d5e255a..67c5d80ad 100644 --- a/DiscordChatExporter.Core/Discord/DiscordClient.cs +++ b/DiscordChatExporter.Core/Discord/DiscordClient.cs @@ -564,6 +564,28 @@ var threadJson in response } ...
[ "DiscordChatExporter.Core/Discord/DiscordClient.cs" ]
[ { "comment": "```suggestion\n```", "path": "DiscordChatExporter.Core/Discord/DiscordClient.cs", "hunk": "@@ -670,6 +692,100 @@ public async IAsyncEnumerable<Message> GetMessagesAsync(\n }\n }\n \n+ public async IAsyncEnumerable<Message> GetMessagesInReverseAsync(\n+ Snowflake chann...
true
Tyrrrz/DiscordChatExporter
1,487
comment_to_fix
Add option to reverse message order in exports
```suggestion ```
d2c0e2169b0a8f37c59ed3c3eb8238741ae3f8dc
a9bf55c94af1d4160a1574cab8e283e75208360e
diff --git a/DiscordChatExporter.Core/Discord/DiscordClient.cs b/DiscordChatExporter.Core/Discord/DiscordClient.cs index 28d5e255a..67c5d80ad 100644 --- a/DiscordChatExporter.Core/Discord/DiscordClient.cs +++ b/DiscordChatExporter.Core/Discord/DiscordClient.cs @@ -564,6 +564,28 @@ var threadJson in response } ...
[ "DiscordChatExporter.Core/Discord/DiscordClient.cs" ]
[ { "comment": "```suggestion\n```", "path": "DiscordChatExporter.Core/Discord/DiscordClient.cs", "hunk": "@@ -670,6 +692,100 @@ public async IAsyncEnumerable<Message> GetMessagesAsync(\n }\n }\n \n+ public async IAsyncEnumerable<Message> GetMessagesInReverseAsync(\n+ Snowflake chann...
true
Tyrrrz/DiscordChatExporter
1,487
comment_to_fix
Add option to reverse message order in exports
```suggestion // Report progress based on timestamps ```
d2c0e2169b0a8f37c59ed3c3eb8238741ae3f8dc
a9bf55c94af1d4160a1574cab8e283e75208360e
diff --git a/DiscordChatExporter.Core/Discord/DiscordClient.cs b/DiscordChatExporter.Core/Discord/DiscordClient.cs index 28d5e255a..67c5d80ad 100644 --- a/DiscordChatExporter.Core/Discord/DiscordClient.cs +++ b/DiscordChatExporter.Core/Discord/DiscordClient.cs @@ -564,6 +564,28 @@ var threadJson in response } ...
[ "DiscordChatExporter.Core/Discord/DiscordClient.cs" ]
[ { "comment": "```suggestion\n // Report progress based on timestamps\n```", "path": "DiscordChatExporter.Core/Discord/DiscordClient.cs", "hunk": "@@ -670,6 +692,100 @@ public async IAsyncEnumerable<Message> GetMessagesAsync(\n }\n }\n \n+ public async IAsyncEnumerable<Messa...
true
Tyrrrz/DiscordChatExporter
1,487
comment_to_fix
Add option to reverse message order in exports
```suggestion ```
d2c0e2169b0a8f37c59ed3c3eb8238741ae3f8dc
a9bf55c94af1d4160a1574cab8e283e75208360e
diff --git a/DiscordChatExporter.Core/Discord/DiscordClient.cs b/DiscordChatExporter.Core/Discord/DiscordClient.cs index 28d5e255a..67c5d80ad 100644 --- a/DiscordChatExporter.Core/Discord/DiscordClient.cs +++ b/DiscordChatExporter.Core/Discord/DiscordClient.cs @@ -564,6 +564,28 @@ var threadJson in response } ...
[ "DiscordChatExporter.Core/Discord/DiscordClient.cs" ]
[ { "comment": "```suggestion\n```", "path": "DiscordChatExporter.Core/Discord/DiscordClient.cs", "hunk": "@@ -670,6 +692,100 @@ public async IAsyncEnumerable<Message> GetMessagesAsync(\n }\n }\n \n+ public async IAsyncEnumerable<Message> GetMessagesInReverseAsync(\n+ Snowflake chann...
true
Tyrrrz/DiscordChatExporter
1,487
comment_to_fix
Add option to reverse message order in exports
```suggestion ```
d2c0e2169b0a8f37c59ed3c3eb8238741ae3f8dc
a9bf55c94af1d4160a1574cab8e283e75208360e
diff --git a/DiscordChatExporter.Core/Exporting/HtmlMessageWriter.cs b/DiscordChatExporter.Core/Exporting/HtmlMessageWriter.cs index 05b1bba29..e626c379d 100644 --- a/DiscordChatExporter.Core/Exporting/HtmlMessageWriter.cs +++ b/DiscordChatExporter.Core/Exporting/HtmlMessageWriter.cs @@ -17,6 +17,7 @@ internal class Ht...
[ "DiscordChatExporter.Core/Exporting/HtmlMessageWriter.cs" ]
[ { "comment": "```suggestion\n```", "path": "DiscordChatExporter.Core/Exporting/HtmlMessageWriter.cs", "hunk": "@@ -27,6 +27,12 @@ private bool CanJoinGroup(Message message)\n if (message.IsReplyLike)\n return false;\n \n+ // In reverse mode, non-reply messages cannot join a gr...
true
Tyrrrz/DiscordChatExporter
1,487
comment_to_fix
Add option to reverse message order in exports
```suggestion // Note: in reverse order, last message is earlier than first message private bool CanJoinGroup(Message message) ```
d2c0e2169b0a8f37c59ed3c3eb8238741ae3f8dc
a9bf55c94af1d4160a1574cab8e283e75208360e
diff --git a/DiscordChatExporter.Core/Exporting/HtmlMessageWriter.cs b/DiscordChatExporter.Core/Exporting/HtmlMessageWriter.cs index 05b1bba29..e626c379d 100644 --- a/DiscordChatExporter.Core/Exporting/HtmlMessageWriter.cs +++ b/DiscordChatExporter.Core/Exporting/HtmlMessageWriter.cs @@ -17,6 +17,7 @@ internal class Ht...
[ "DiscordChatExporter.Core/Exporting/HtmlMessageWriter.cs" ]
[ { "comment": "```suggestion\n // Note: in reverse order, last message is earlier than first message\n private bool CanJoinGroup(Message message)\n```", "path": "DiscordChatExporter.Core/Exporting/HtmlMessageWriter.cs", "hunk": "", "resolving_sha": "a9bf55c94af1d4160a1574cab8e283e75208360e", ...
true
Tyrrrz/DiscordChatExporter
1,487
comment_to_fix
Add option to reverse message order in exports
```suggestion ```
d2c0e2169b0a8f37c59ed3c3eb8238741ae3f8dc
a9bf55c94af1d4160a1574cab8e283e75208360e
diff --git a/DiscordChatExporter.Core/Discord/DiscordClient.cs b/DiscordChatExporter.Core/Discord/DiscordClient.cs index 28d5e255a..67c5d80ad 100644 --- a/DiscordChatExporter.Core/Discord/DiscordClient.cs +++ b/DiscordChatExporter.Core/Discord/DiscordClient.cs @@ -564,6 +564,28 @@ var threadJson in response } ...
[ "DiscordChatExporter.Core/Discord/DiscordClient.cs" ]
[ { "comment": "```suggestion\n```", "path": "DiscordChatExporter.Core/Discord/DiscordClient.cs", "hunk": "@@ -670,6 +692,92 @@ public async IAsyncEnumerable<Message> GetMessagesAsync(\n }\n }\n \n+ public async IAsyncEnumerable<Message> GetMessagesInReverseAsync(\n+ Snowflake channe...
true
Tyrrrz/DiscordChatExporter
1,487
comment_to_fix
Add option to reverse message order in exports
Missing boundary check for the snapshotted lower bound. Similar to GetMessagesAsync (line 669) which checks 'if (message.Timestamp > lastMessage.Timestamp)' to ensure messages don't exceed the upper snapshot boundary, GetMessagesInReverseAsync should check 'if (message.Timestamp < firstMessage.Timestamp)' before yieldi...
d2c0e2169b0a8f37c59ed3c3eb8238741ae3f8dc
a9bf55c94af1d4160a1574cab8e283e75208360e
diff --git a/DiscordChatExporter.Core/Discord/DiscordClient.cs b/DiscordChatExporter.Core/Discord/DiscordClient.cs index 28d5e255a..67c5d80ad 100644 --- a/DiscordChatExporter.Core/Discord/DiscordClient.cs +++ b/DiscordChatExporter.Core/Discord/DiscordClient.cs @@ -564,6 +564,28 @@ var threadJson in response } ...
[ "DiscordChatExporter.Core/Discord/DiscordClient.cs" ]
[ { "comment": "Missing boundary check for the snapshotted lower bound. Similar to GetMessagesAsync (line 669) which checks 'if (message.Timestamp > lastMessage.Timestamp)' to ensure messages don't exceed the upper snapshot boundary, GetMessagesInReverseAsync should check 'if (message.Timestamp < firstMessage.Tim...
true
Tyrrrz/DiscordChatExporter
1,487
comment_to_fix
Add option to reverse message order in exports
Progress calculation inconsistency. In the forward pagination (GetMessagesAsync, line 683), progress is calculated as 'exportedDuration / totalDuration' without a cap, while in reverse pagination (line 764), it uses 'Math.Min(1.0, exportedDuration / totalDuration)'. This inconsistency means the two methods report progr...
d2c0e2169b0a8f37c59ed3c3eb8238741ae3f8dc
a9bf55c94af1d4160a1574cab8e283e75208360e
diff --git a/DiscordChatExporter.Core/Discord/DiscordClient.cs b/DiscordChatExporter.Core/Discord/DiscordClient.cs index 28d5e255a..67c5d80ad 100644 --- a/DiscordChatExporter.Core/Discord/DiscordClient.cs +++ b/DiscordChatExporter.Core/Discord/DiscordClient.cs @@ -564,6 +564,28 @@ var threadJson in response } ...
[ "DiscordChatExporter.Core/Discord/DiscordClient.cs" ]
[ { "comment": "Progress calculation inconsistency. In the forward pagination (GetMessagesAsync, line 683), progress is calculated as 'exportedDuration / totalDuration' without a cap, while in reverse pagination (line 764), it uses 'Math.Min(1.0, exportedDuration / totalDuration)'. This inconsistency means the tw...
true
Tyrrrz/DiscordChatExporter
1,488
issue_to_patch
Some emoji are not rendered as images Some emojis aren't shown in their Discord style as they are in Discord but instead in the Windows style (I assume the style depends on the system you're on, but for me (in the Chromium Edge with Windows) it's displayed like that). Instead of: ![image](https://user-images.githubu...
Fix standard emoji not rendering as Discord-style images
- [x] Add `GetAllNames()` method to `EmojiIndex` to expose all emoji string keys - [x] Replace the hard-coded `StandardEmojiNodeMatcher` regex in `MarkdownParser.cs` with a regex dynamically built from `EmojiIndex.GetAllNames()`, sorted by length (longest first) for correct compound emoji matching - [x] Build verified ...
d2c0e2169b0a8f37c59ed3c3eb8238741ae3f8dc
9c0a5a0d22b09ddc7539c8ef2025dd18ea819a79
diff --git a/DiscordChatExporter.Core/Discord/Data/EmojiIndex.cs b/DiscordChatExporter.Core/Discord/Data/EmojiIndex.cs index 64be1efb2..9fa229d8c 100644 --- a/DiscordChatExporter.Core/Discord/Data/EmojiIndex.cs +++ b/DiscordChatExporter.Core/Discord/Data/EmojiIndex.cs @@ -8855,6 +8855,8 @@ internal static class EmojiIn...
[ "DiscordChatExporter.Core/Discord/Data/EmojiIndex.cs", "DiscordChatExporter.Core/Markdown/Parsing/MarkdownParser.cs" ]
[ { "comment": "```suggestion\n public static IReadOnlyCollection<string> GetAllNames() => _toCodes.Keys;\n```\n\nTo stay consistent @copilot", "path": "DiscordChatExporter.Core/Discord/Data/EmojiIndex.cs", "hunk": "@@ -8855,6 +8855,8 @@ internal static class EmojiIndex\n [\"united_nations\"] =...
true
Tyrrrz/DiscordChatExporter
1,488
comment_to_fix
Fix standard emoji not rendering as Discord-style images
```suggestion public static IReadOnlyCollection<string> GetAllNames() => _toCodes.Keys; ``` To stay consistent @copilot
d2c0e2169b0a8f37c59ed3c3eb8238741ae3f8dc
9c0a5a0d22b09ddc7539c8ef2025dd18ea819a79
diff --git a/DiscordChatExporter.Core/Discord/Data/EmojiIndex.cs b/DiscordChatExporter.Core/Discord/Data/EmojiIndex.cs index 64be1efb2..9fa229d8c 100644 --- a/DiscordChatExporter.Core/Discord/Data/EmojiIndex.cs +++ b/DiscordChatExporter.Core/Discord/Data/EmojiIndex.cs @@ -8855,6 +8855,8 @@ internal static class EmojiIn...
[ "DiscordChatExporter.Core/Discord/Data/EmojiIndex.cs" ]
[ { "comment": "```suggestion\n public static IReadOnlyCollection<string> GetAllNames() => _toCodes.Keys;\n```\n\nTo stay consistent @copilot", "path": "DiscordChatExporter.Core/Discord/Data/EmojiIndex.cs", "hunk": "@@ -8855,6 +8855,8 @@ internal static class EmojiIndex\n [\"united_nations\"] =...
true
Tyrrrz/DiscordChatExporter
1,486
issue_to_patch
Duplicate threads causing a crash when exporting in parallel ### Version v2.46.0 ### Flavor CLI (Command-Line Interface) ### Platform Docker / Ubuntu ### Export format JSON ### Steps to reproduce Try exporting with threads, with parallel 5 (also had the same with 10), and eventually it'll simply crash due to...
Fix duplicate threads causing a crash when exporting in parallel
Closes #1433 - [x] Deduplicate threads at source in `GetChannelThreadsAsync` using `HashSet<Snowflake>` — fixes both CLI crash and potential GUI duplicates - [x] Apply reviewer suggestions: `currentOffset++` unconditional; `seenThreadIds.Add` inside `filteredChannels.Contains` block <!-- START COPILOT ORIGINAL PROMPT...
d2c0e2169b0a8f37c59ed3c3eb8238741ae3f8dc
5ef48d4e3c2483f5096974ec943b7715c661164c
diff --git a/DiscordChatExporter.Core/Discord/DiscordClient.cs b/DiscordChatExporter.Core/Discord/DiscordClient.cs index 28d5e255a..e076a97eb 100644 --- a/DiscordChatExporter.Core/Discord/DiscordClient.cs +++ b/DiscordChatExporter.Core/Discord/DiscordClient.cs @@ -429,6 +429,11 @@ public async IAsyncEnumerable<Channel>...
[ "DiscordChatExporter.Core/Discord/DiscordClient.cs" ]
[ { "comment": "```suggestion\n\n currentOffset++;\n```", "path": "DiscordChatExporter.Core/Discord/DiscordClient.cs", "hunk": "@@ -472,7 +477,8 @@ var threadJson in response.Value.GetProperty(\"threads\").EnumerateArray()\n break;\n ...
true
Tyrrrz/DiscordChatExporter
1,486
comment_to_fix
Fix duplicate threads causing a crash when exporting in parallel
```suggestion currentOffset++; ```
d2c0e2169b0a8f37c59ed3c3eb8238741ae3f8dc
5ef48d4e3c2483f5096974ec943b7715c661164c
diff --git a/DiscordChatExporter.Core/Discord/DiscordClient.cs b/DiscordChatExporter.Core/Discord/DiscordClient.cs index 28d5e255a..e076a97eb 100644 --- a/DiscordChatExporter.Core/Discord/DiscordClient.cs +++ b/DiscordChatExporter.Core/Discord/DiscordClient.cs @@ -429,6 +429,11 @@ public async IAsyncEnumerable<Channel>...
[ "DiscordChatExporter.Core/Discord/DiscordClient.cs" ]
[ { "comment": "```suggestion\n\n currentOffset++;\n```", "path": "DiscordChatExporter.Core/Discord/DiscordClient.cs", "hunk": "@@ -472,7 +477,8 @@ var threadJson in response.Value.GetProperty(\"threads\").EnumerateArray()\n break;\n ...
true
Tyrrrz/DiscordChatExporter
1,486
comment_to_fix
Fix duplicate threads causing a crash when exporting in parallel
```suggestion if (seenThreadIds.Add(thread.Id)) ```
d2c0e2169b0a8f37c59ed3c3eb8238741ae3f8dc
5ef48d4e3c2483f5096974ec943b7715c661164c
diff --git a/DiscordChatExporter.Core/Discord/DiscordClient.cs b/DiscordChatExporter.Core/Discord/DiscordClient.cs index 28d5e255a..e076a97eb 100644 --- a/DiscordChatExporter.Core/Discord/DiscordClient.cs +++ b/DiscordChatExporter.Core/Discord/DiscordClient.cs @@ -429,6 +429,11 @@ public async IAsyncEnumerable<Channel>...
[ "DiscordChatExporter.Core/Discord/DiscordClient.cs" ]
[ { "comment": "```suggestion\n\n if (seenThreadIds.Add(thread.Id))\n```", "path": "DiscordChatExporter.Core/Discord/DiscordClient.cs", "hunk": "@@ -511,7 +517,11 @@ var threadJson in response.Value.GetProperty(\"threads\").EnumerateArray()\n .Pipe(parentsByI...
true
Tyrrrz/DiscordChatExporter
1,486
comment_to_fix
Fix duplicate threads causing a crash when exporting in parallel
The issue reference in this comment should be #1433 instead of #1205, to match the issue that this PR fixes as stated in the PR description. ```suggestion // https://github.com/Tyrrrz/DiscordChatExporter/issues/1433 ```
d2c0e2169b0a8f37c59ed3c3eb8238741ae3f8dc
5ef48d4e3c2483f5096974ec943b7715c661164c
diff --git a/DiscordChatExporter.Core/Discord/DiscordClient.cs b/DiscordChatExporter.Core/Discord/DiscordClient.cs index 28d5e255a..e076a97eb 100644 --- a/DiscordChatExporter.Core/Discord/DiscordClient.cs +++ b/DiscordChatExporter.Core/Discord/DiscordClient.cs @@ -429,6 +429,11 @@ public async IAsyncEnumerable<Channel>...
[ "DiscordChatExporter.Core/Discord/DiscordClient.cs" ]
[ { "comment": "The issue reference in this comment should be #1433 instead of #1205, to match the issue that this PR fixes as stated in the PR description.\n```suggestion\n // https://github.com/Tyrrrz/DiscordChatExporter/issues/1433\n```", "path": "DiscordChatExporter.Core/Discord/DiscordClient.cs", ...
true
Tyrrrz/DiscordChatExporter
1,485
issue_to_patch
`--reuse-media` creates an unacceptably high chance of a collision ### Version v2.42.8 ### Flavor GUI (Graphical User Interface), CLI (Command-Line Interface) ### Platform Linux ### Export format HTML, TXT, JSON, CSV ### Steps to reproduce Export servers where large numbers of videos, images and especially sc...
Increase media asset URL hash length to eliminate collision risk with --reuse-media
- [x] Increase URL hash length from 5 to 16 hex characters (64 bits) to reduce collision probability - [x] Add backwards compatibility: migrate legacy 5-char hash files to new 16-char hash on reuse - [x] Extract `NormalizeUrl` as a shared static method - [x] Move `GetFileNameFromUrl(url, urlHash)` (the implementation) ...
e6562de1f5d4d9c4bac693a27e7ec50e1239fcec
98d8ddd4751f54af46633a376a0b1fef08beb731
diff --git a/DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs b/DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs index b639c7ae1..84cf42231 100644 --- a/DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs +++ b/DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs @@ -37,6 +37,28 @@ ...
[ "DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs" ]
[ { "comment": "Move this above the other `GetFileNameFromUrl`", "path": "DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs", "hunk": "@@ -56,34 +68,45 @@ await Http.ResiliencePipeline.ExecuteAsync(\n \n internal partial class ExportAssetDownloader\n {\n- private static string GetUrlHash(stri...
true
Tyrrrz/DiscordChatExporter
1,485
comment_to_fix
Increase media asset URL hash length to eliminate collision risk with --reuse-media
Move this above the other `GetFileNameFromUrl`
e6562de1f5d4d9c4bac693a27e7ec50e1239fcec
98d8ddd4751f54af46633a376a0b1fef08beb731
diff --git a/DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs b/DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs index b639c7ae1..84cf42231 100644 --- a/DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs +++ b/DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs @@ -37,6 +37,28 @@ ...
[ "DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs" ]
[ { "comment": "Move this above the other `GetFileNameFromUrl`", "path": "DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs", "hunk": "@@ -56,34 +68,45 @@ await Http.ResiliencePipeline.ExecuteAsync(\n \n internal partial class ExportAssetDownloader\n {\n- private static string GetUrlHash(stri...
true
Tyrrrz/DiscordChatExporter
1,485
comment_to_fix
Increase media asset URL hash length to eliminate collision risk with --reuse-media
What if the destination file already exists?
e6562de1f5d4d9c4bac693a27e7ec50e1239fcec
98d8ddd4751f54af46633a376a0b1fef08beb731
diff --git a/DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs b/DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs index b639c7ae1..84cf42231 100644 --- a/DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs +++ b/DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs @@ -37,6 +37,28 @@ ...
[ "DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs" ]
[ { "comment": "What if the destination file already exists?", "path": "DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs", "hunk": "@@ -37,6 +37,18 @@ public async ValueTask<string> DownloadAsync(\n if (reuse && File.Exists(filePath))\n return _previousPathsByUrl[url] = file...
true
Tyrrrz/DiscordChatExporter
1,485
comment_to_fix
Increase media asset URL hash length to eliminate collision risk with --reuse-media
This can be inlined
e6562de1f5d4d9c4bac693a27e7ec50e1239fcec
98d8ddd4751f54af46633a376a0b1fef08beb731
diff --git a/DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs b/DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs index b639c7ae1..84cf42231 100644 --- a/DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs +++ b/DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs @@ -37,6 +37,28 @@ ...
[ "DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs" ]
[ { "comment": "This can be inlined", "path": "DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs", "hunk": "@@ -56,34 +70,32 @@ await Http.ResiliencePipeline.ExecuteAsync(\n \n internal partial class ExportAssetDownloader\n {\n- private static string GetUrlHash(string url)\n+ private stati...
true
Tyrrrz/DiscordChatExporter
1,485
comment_to_fix
Increase media asset URL hash length to eliminate collision risk with --reuse-media
The backwards compatibility logic for migrating legacy 5-char hash files to the new 16-char hash naming scheme lacks test coverage. Consider adding tests that verify: (1) legacy files are correctly migrated when --reuse-media is used, (2) the migration handles concurrent downloads gracefully, and (3) files with the new...
e6562de1f5d4d9c4bac693a27e7ec50e1239fcec
98d8ddd4751f54af46633a376a0b1fef08beb731
diff --git a/DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs b/DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs index b639c7ae1..84cf42231 100644 --- a/DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs +++ b/DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs @@ -37,6 +37,28 @@ ...
[ "DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs" ]
[ { "comment": "The backwards compatibility logic for migrating legacy 5-char hash files to the new 16-char hash naming scheme lacks test coverage. Consider adding tests that verify: (1) legacy files are correctly migrated when --reuse-media is used, (2) the migration handles concurrent downloads gracefully, and ...
true
Tyrrrz/DiscordChatExporter
1,485
comment_to_fix
Increase media asset URL hash length to eliminate collision risk with --reuse-media
There's a potential race condition when two URLs that have the same legacy 5-char hash (a collision in the old system) but different new 16-char hashes are downloaded concurrently. Both threads will lock on different file paths (based on their new hashes) and both will attempt to move the same legacy file. The first th...
e6562de1f5d4d9c4bac693a27e7ec50e1239fcec
98d8ddd4751f54af46633a376a0b1fef08beb731
diff --git a/DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs b/DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs index b639c7ae1..84cf42231 100644 --- a/DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs +++ b/DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs @@ -37,6 +37,28 @@ ...
[ "DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs" ]
[ { "comment": "There's a potential race condition when two URLs that have the same legacy 5-char hash (a collision in the old system) but different new 16-char hashes are downloaded concurrently. Both threads will lock on different file paths (based on their new hashes) and both will attempt to move the same leg...
true
Tyrrrz/DiscordChatExporter
1,485
comment_to_fix
Increase media asset URL hash length to eliminate collision risk with --reuse-media
```suggestion // 16 chars = 64 bits, reaches 1% collision probability at ~609 million files ```
e6562de1f5d4d9c4bac693a27e7ec50e1239fcec
98d8ddd4751f54af46633a376a0b1fef08beb731
diff --git a/DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs b/DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs index b639c7ae1..84cf42231 100644 --- a/DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs +++ b/DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs @@ -37,6 +37,28 @@ ...
[ "DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs" ]
[ { "comment": "```suggestion\n // 16 chars = 64 bits, reaches 1% collision probability at ~609 million files\n```", "path": "DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs", "hunk": "@@ -107,4 +110,24 @@ private static string GetFileNameFromUrl(string url)\n fileNameWi...
true
Tyrrrz/DiscordChatExporter
1,485
comment_to_fix
Increase media asset URL hash length to eliminate collision risk with --reuse-media
```suggestion // 5 chars = 20 bits, reaches 1% collision probability at ~145 files .Truncate(5) ```
e6562de1f5d4d9c4bac693a27e7ec50e1239fcec
98d8ddd4751f54af46633a376a0b1fef08beb731
diff --git a/DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs b/DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs index b639c7ae1..84cf42231 100644 --- a/DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs +++ b/DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs @@ -37,6 +37,28 @@ ...
[ "DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs" ]
[ { "comment": "```suggestion\r\n // 5 chars = 20 bits, reaches 1% collision probability at ~145 files\r\n .Truncate(5)\r\n```", "path": "DiscordChatExporter.Core/Exporting/ExportAssetDownloader.cs", "hunk": "@@ -107,4 +110,24 @@ private static string GetFileNameFromUrl(strin...
true
Tyrrrz/DiscordChatExporter
1,482
issue_to_patch
Add localization
- [x] Fix all Ukrainian translations - [x] Add MarkdownToInlinesConverter with hyperlink support - [x] Fold bot instructions + links into markdown strings - [x] Replace StackPanel.Styles with direct TextBlock properties - [x] Add nullable `Url` property to `HyperLink` control; if set and `Command` is null, open URL on ...
18086aa209f00a28262fc7287e96d0745c53da54
c559f9eaded0ea7be5f1553ab4e175497ed9606c
diff --git a/DiscordChatExporter.Gui/App.axaml.cs b/DiscordChatExporter.Gui/App.axaml.cs index 6fb013d28..0673e3f45 100644 --- a/DiscordChatExporter.Gui/App.axaml.cs +++ b/DiscordChatExporter.Gui/App.axaml.cs @@ -5,6 +5,7 @@ using Avalonia.Media; using Avalonia.Platform; using DiscordChatExporter.Gui.Framework; +usi...
[ "DiscordChatExporter.Gui/App.axaml.cs", "DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs", "DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj", "DiscordChatExporter.Gui/Localization/Language.cs", "DiscordChatExporter.Gui/Localization/LocalizationManager.English.cs", "DiscordChatExpor...
[ { "comment": "\"Threads\" are \"Гілки\" in Ukrainian. Please update all mentions. @copilot ", "path": "DiscordChatExporter.Gui/Localization/LocalizationManager.Ukrainian.cs", "hunk": "@@ -0,0 +1,98 @@\n+using System.Collections.Generic;\n+\n+namespace DiscordChatExporter.Gui.Localization;\n+\n+public pa...
true
Tyrrrz/DiscordChatExporter
1,482
comment_to_fix
Add localization
"Threads" are "Гілки" in Ukrainian. Please update all mentions. @copilot
18086aa209f00a28262fc7287e96d0745c53da54
c559f9eaded0ea7be5f1553ab4e175497ed9606c
diff --git a/DiscordChatExporter.Gui/Localization/LocalizationManager.Ukrainian.cs b/DiscordChatExporter.Gui/Localization/LocalizationManager.Ukrainian.cs new file mode 100644 index 000000000..068cf8f96 --- /dev/null +++ b/DiscordChatExporter.Gui/Localization/LocalizationManager.Ukrainian.cs @@ -0,0 +1,150 @@ +using Sy...
[ "DiscordChatExporter.Gui/Localization/LocalizationManager.Ukrainian.cs" ]
[ { "comment": "\"Threads\" are \"Гілки\" in Ukrainian. Please update all mentions. @copilot ", "path": "DiscordChatExporter.Gui/Localization/LocalizationManager.Ukrainian.cs", "hunk": "@@ -0,0 +1,98 @@\n+using System.Collections.Generic;\n+\n+namespace DiscordChatExporter.Gui.Localization;\n+\n+public pa...
true
Tyrrrz/DiscordChatExporter
1,482
comment_to_fix
Add localization
"Ліміт паралелізації"
18086aa209f00a28262fc7287e96d0745c53da54
c559f9eaded0ea7be5f1553ab4e175497ed9606c
diff --git a/DiscordChatExporter.Gui/Localization/LocalizationManager.Ukrainian.cs b/DiscordChatExporter.Gui/Localization/LocalizationManager.Ukrainian.cs new file mode 100644 index 000000000..068cf8f96 --- /dev/null +++ b/DiscordChatExporter.Gui/Localization/LocalizationManager.Ukrainian.cs @@ -0,0 +1,150 @@ +using Sy...
[ "DiscordChatExporter.Gui/Localization/LocalizationManager.Ukrainian.cs" ]
[ { "comment": "\"Ліміт паралелізації\"", "path": "DiscordChatExporter.Gui/Localization/LocalizationManager.Ukrainian.cs", "hunk": "@@ -0,0 +1,98 @@\n+using System.Collections.Generic;\n+\n+namespace DiscordChatExporter.Gui.Localization;\n+\n+public partial class LocalizationManager\n+{\n+ private stat...
true
Tyrrrz/DiscordChatExporter
1,482
comment_to_fix
Add localization
Шлях збереження
18086aa209f00a28262fc7287e96d0745c53da54
c559f9eaded0ea7be5f1553ab4e175497ed9606c
diff --git a/DiscordChatExporter.Gui/Localization/LocalizationManager.Ukrainian.cs b/DiscordChatExporter.Gui/Localization/LocalizationManager.Ukrainian.cs new file mode 100644 index 000000000..068cf8f96 --- /dev/null +++ b/DiscordChatExporter.Gui/Localization/LocalizationManager.Ukrainian.cs @@ -0,0 +1,150 @@ +using Sy...
[ "DiscordChatExporter.Gui/Localization/LocalizationManager.Ukrainian.cs" ]
[ { "comment": "Шлях збереження", "path": "DiscordChatExporter.Gui/Localization/LocalizationManager.Ukrainian.cs", "hunk": "@@ -0,0 +1,98 @@\n+using System.Collections.Generic;\n+\n+namespace DiscordChatExporter.Gui.Localization;\n+\n+public partial class LocalizationManager\n+{\n+ private static reado...
true
Tyrrrz/DiscordChatExporter
1,482
comment_to_fix
Add localization
Розділяти експорт
18086aa209f00a28262fc7287e96d0745c53da54
c559f9eaded0ea7be5f1553ab4e175497ed9606c
diff --git a/DiscordChatExporter.Gui/Localization/LocalizationManager.Ukrainian.cs b/DiscordChatExporter.Gui/Localization/LocalizationManager.Ukrainian.cs new file mode 100644 index 000000000..068cf8f96 --- /dev/null +++ b/DiscordChatExporter.Gui/Localization/LocalizationManager.Ukrainian.cs @@ -0,0 +1,150 @@ +using Sy...
[ "DiscordChatExporter.Gui/Localization/LocalizationManager.Ukrainian.cs" ]
[ { "comment": "Розділяти експорт", "path": "DiscordChatExporter.Gui/Localization/LocalizationManager.Ukrainian.cs", "hunk": "@@ -0,0 +1,98 @@\n+using System.Collections.Generic;\n+\n+namespace DiscordChatExporter.Gui.Localization;\n+\n+public partial class LocalizationManager\n+{\n+ private static rea...
true
Tyrrrz/DiscordChatExporter
1,482
comment_to_fix
Add localization
...з шляху збереження
18086aa209f00a28262fc7287e96d0745c53da54
c559f9eaded0ea7be5f1553ab4e175497ed9606c
diff --git a/DiscordChatExporter.Gui/Localization/LocalizationManager.Ukrainian.cs b/DiscordChatExporter.Gui/Localization/LocalizationManager.Ukrainian.cs new file mode 100644 index 000000000..068cf8f96 --- /dev/null +++ b/DiscordChatExporter.Gui/Localization/LocalizationManager.Ukrainian.cs @@ -0,0 +1,150 @@ +using Sy...
[ "DiscordChatExporter.Gui/Localization/LocalizationManager.Ukrainian.cs" ]
[ { "comment": "...з шляху збереження", "path": "DiscordChatExporter.Gui/Localization/LocalizationManager.Ukrainian.cs", "hunk": "@@ -0,0 +1,98 @@\n+using System.Collections.Generic;\n+\n+namespace DiscordChatExporter.Gui.Localization;\n+\n+public partial class LocalizationManager\n+{\n+ private static...
true
Tyrrrz/DiscordChatExporter
1,482
comment_to_fix
Add localization
Are these needed? @copilot
18086aa209f00a28262fc7287e96d0745c53da54
c559f9eaded0ea7be5f1553ab4e175497ed9606c
diff --git a/DiscordChatExporter.Gui/Localization/LocalizationManager.cs b/DiscordChatExporter.Gui/Localization/LocalizationManager.cs new file mode 100644 index 000000000..7ab62e9f8 --- /dev/null +++ b/DiscordChatExporter.Gui/Localization/LocalizationManager.cs @@ -0,0 +1,170 @@ +using System; +using System.Globalizat...
[ "DiscordChatExporter.Gui/Localization/LocalizationManager.cs" ]
[ { "comment": "Are these needed? @copilot ", "path": "DiscordChatExporter.Gui/Localization/LocalizationManager.cs", "hunk": "@@ -87,31 +87,16 @@ public partial class LocalizationManager\n // Token instructions (personal account)\n public string TokenPersonalHeader => Get();\n public string To...
true
Tyrrrz/DiscordChatExporter
1,482
comment_to_fix
Add localization
Is this needed? @copilot
18086aa209f00a28262fc7287e96d0745c53da54
c559f9eaded0ea7be5f1553ab4e175497ed9606c
diff --git a/DiscordChatExporter.Gui/Localization/LocalizationManager.cs b/DiscordChatExporter.Gui/Localization/LocalizationManager.cs new file mode 100644 index 000000000..7ab62e9f8 --- /dev/null +++ b/DiscordChatExporter.Gui/Localization/LocalizationManager.cs @@ -0,0 +1,170 @@ +using System; +using System.Globalizat...
[ "DiscordChatExporter.Gui/Localization/LocalizationManager.cs" ]
[ { "comment": "Is this needed? @copilot ", "path": "DiscordChatExporter.Gui/Localization/LocalizationManager.cs", "hunk": "@@ -87,31 +87,16 @@ public partial class LocalizationManager\n // Token instructions (personal account)\n public string TokenPersonalHeader => Get();\n public string Toke...
true
Tyrrrz/DiscordChatExporter
1,482
comment_to_fix
Add localization
Why not just set these on the text block itself? @copilot
18086aa209f00a28262fc7287e96d0745c53da54
c559f9eaded0ea7be5f1553ab4e175497ed9606c
diff --git a/DiscordChatExporter.Gui/Views/Components/DashboardView.axaml b/DiscordChatExporter.Gui/Views/Components/DashboardView.axaml index 350f6acf7..6582ad8a8 100644 --- a/DiscordChatExporter.Gui/Views/Components/DashboardView.axaml +++ b/DiscordChatExporter.Gui/Views/Components/DashboardView.axaml @@ -4,7 +4,6 @@...
[ "DiscordChatExporter.Gui/Views/Components/DashboardView.axaml" ]
[ { "comment": "Why not just set these on the text block itself? @copilot ", "path": "DiscordChatExporter.Gui/Views/Components/DashboardView.axaml", "hunk": "@@ -219,119 +219,74 @@\n <!-- Placeholder / usage instructions -->\n <Panel IsVisible=\"{Binding !AvailableGuilds.Count}\"...
true
Tyrrrz/DiscordChatExporter
1,482
comment_to_fix
Add localization
We can add hyperlink handling in the markdown (`[]()`) @copilot
18086aa209f00a28262fc7287e96d0745c53da54
c559f9eaded0ea7be5f1553ab4e175497ed9606c
diff --git a/DiscordChatExporter.Gui/Views/Components/DashboardView.axaml b/DiscordChatExporter.Gui/Views/Components/DashboardView.axaml index 350f6acf7..6582ad8a8 100644 --- a/DiscordChatExporter.Gui/Views/Components/DashboardView.axaml +++ b/DiscordChatExporter.Gui/Views/Components/DashboardView.axaml @@ -4,7 +4,6 @@...
[ "DiscordChatExporter.Gui/Views/Components/DashboardView.axaml" ]
[ { "comment": "We can add hyperlink handling in the markdown (`[]()`) @copilot ", "path": "DiscordChatExporter.Gui/Views/Components/DashboardView.axaml", "hunk": "@@ -219,119 +219,74 @@\n <!-- Placeholder / usage instructions -->\n <Panel IsVisible=\"{Binding !AvailableGuilds.Co...
true
Tyrrrz/DiscordChatExporter
1,482
comment_to_fix
Add localization
when `!string.IsNullOrWhiteSpace(link.Url)`
18086aa209f00a28262fc7287e96d0745c53da54
c559f9eaded0ea7be5f1553ab4e175497ed9606c
diff --git a/DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs b/DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs new file mode 100644 index 000000000..cb740fee6 --- /dev/null +++ b/DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs @@ -0,0 +1,176 @@ +using System; +using Sy...
[ "DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs" ]
[ { "comment": "when `!string.IsNullOrWhiteSpace(link.Url)`", "path": "DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs", "hunk": "@@ -78,6 +82,24 @@ private static void ProcessInline(\n break;\n }\n \n+ case LinkInline link when link.Url is not null:...
true
Tyrrrz/DiscordChatExporter
1,482
comment_to_fix
Add localization
What does this do?
18086aa209f00a28262fc7287e96d0745c53da54
c559f9eaded0ea7be5f1553ab4e175497ed9606c
diff --git a/DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs b/DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs new file mode 100644 index 000000000..cb740fee6 --- /dev/null +++ b/DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs @@ -0,0 +1,176 @@ +using System; +using Sy...
[ "DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs" ]
[ { "comment": "What does this do?", "path": "DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs", "hunk": "@@ -78,6 +82,24 @@ private static void ProcessInline(\n break;\n }\n \n+ case LinkInline link when link.Url is not null:\n+ {\n+ ...
true
Tyrrrz/DiscordChatExporter
1,482
comment_to_fix
Add localization
Let's update the `HyperLink` control by adding a nullable `Url` property. If set and `Command` isn't set, then by default it opens that URL. Explain that behavior in the comments.
18086aa209f00a28262fc7287e96d0745c53da54
c559f9eaded0ea7be5f1553ab4e175497ed9606c
diff --git a/DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs b/DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs new file mode 100644 index 000000000..cb740fee6 --- /dev/null +++ b/DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs @@ -0,0 +1,176 @@ +using System; +using Sy...
[ "DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs" ]
[ { "comment": "Let's update the `HyperLink` control by adding a nullable `Url` property. If set and `Command` isn't set, then by default it opens that URL. Explain that behavior in the comments.", "path": "DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs", "hunk": "@@ -78,6 +82,24 @@ priv...
true
Tyrrrz/DiscordChatExporter
1,482
comment_to_fix
Add localization
Can be inlined?
18086aa209f00a28262fc7287e96d0745c53da54
c559f9eaded0ea7be5f1553ab4e175497ed9606c
diff --git a/DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs b/DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs new file mode 100644 index 000000000..cb740fee6 --- /dev/null +++ b/DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs @@ -0,0 +1,176 @@ +using System; +using Sy...
[ "DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs" ]
[ { "comment": "Can be inlined?", "path": "DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs", "hunk": "@@ -78,6 +82,24 @@ private static void ProcessInline(\n break;\n }\n \n+ case LinkInline link when link.Url is not null:\n+ {\n+ ...
true
Tyrrrz/DiscordChatExporter
1,482
comment_to_fix
Add localization
Technically, when `Url` is empty/null, we can still render a Hyperlink, just without a command/URL. It will use custom styling, which is enough.
18086aa209f00a28262fc7287e96d0745c53da54
c559f9eaded0ea7be5f1553ab4e175497ed9606c
diff --git a/DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs b/DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs new file mode 100644 index 000000000..cb740fee6 --- /dev/null +++ b/DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs @@ -0,0 +1,176 @@ +using System; +using Sy...
[ "DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs" ]
[ { "comment": "Technically, when `Url` is empty/null, we can still render a Hyperlink, just without a command/URL. It will use custom styling, which is enough.", "path": "DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs", "hunk": "@@ -82,18 +79,16 @@ private static void ProcessInline(\n ...
true
Tyrrrz/DiscordChatExporter
1,482
comment_to_fix
Add localization
Other schemes should be fine too, no?
18086aa209f00a28262fc7287e96d0745c53da54
c559f9eaded0ea7be5f1553ab4e175497ed9606c
diff --git a/DiscordChatExporter.Gui/Views/Controls/HyperLink.axaml.cs b/DiscordChatExporter.Gui/Views/Controls/HyperLink.axaml.cs index 08452c12f..479303de5 100644 --- a/DiscordChatExporter.Gui/Views/Controls/HyperLink.axaml.cs +++ b/DiscordChatExporter.Gui/Views/Controls/HyperLink.axaml.cs @@ -1,7 +1,9 @@ -using Sys...
[ "DiscordChatExporter.Gui/Views/Controls/HyperLink.axaml.cs" ]
[ { "comment": "Other schemes should be fine too, no?", "path": "DiscordChatExporter.Gui/Views/Controls/HyperLink.axaml.cs", "hunk": "@@ -36,14 +45,26 @@ public object? CommandParameter\n set => SetValue(CommandParameterProperty, value);\n }\n \n- private void TextBlock_OnPointerReleased(ob...
true
Tyrrrz/DiscordChatExporter
1,482
comment_to_fix
Add localization
```suggestion break; ```
18086aa209f00a28262fc7287e96d0745c53da54
c559f9eaded0ea7be5f1553ab4e175497ed9606c
diff --git a/DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs b/DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs new file mode 100644 index 000000000..cb740fee6 --- /dev/null +++ b/DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs @@ -0,0 +1,176 @@ +using System; +using Sy...
[ "DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs" ]
[ { "comment": "```suggestion\n\n break;\n```", "path": "DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs", "hunk": "@@ -0,0 +1,177 @@\n+using System;\n+using System.Globalization;\n+using System.Linq;\n+using Avalonia.Controls.Documents;\n+using Avalonia.Data.Converters;\n+...
true
Tyrrrz/DiscordChatExporter
1,482
comment_to_fix
Add localization
Since these are only called once each, it's better to inline them
18086aa209f00a28262fc7287e96d0745c53da54
c559f9eaded0ea7be5f1553ab4e175497ed9606c
diff --git a/DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs b/DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs new file mode 100644 index 000000000..cb740fee6 --- /dev/null +++ b/DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs @@ -0,0 +1,176 @@ +using System; +using Sy...
[ "DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs" ]
[ { "comment": "Since these are only called once each, it's better to inline them", "path": "DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs", "hunk": "@@ -0,0 +1,178 @@\n+using System;\n+using System.Globalization;\n+using System.Linq;\n+using Avalonia.Controls.Documents;\n+using Avaloni...
true
Tyrrrz/DiscordChatExporter
1,482
comment_to_fix
Add localization
```suggestion else if (!string.IsNullOrWhiteSpace(Url)) Process.StartShellExecute(uri.AbsoluteUri); ```
18086aa209f00a28262fc7287e96d0745c53da54
c559f9eaded0ea7be5f1553ab4e175497ed9606c
diff --git a/DiscordChatExporter.Gui/Views/Controls/HyperLink.axaml.cs b/DiscordChatExporter.Gui/Views/Controls/HyperLink.axaml.cs index 08452c12f..479303de5 100644 --- a/DiscordChatExporter.Gui/Views/Controls/HyperLink.axaml.cs +++ b/DiscordChatExporter.Gui/Views/Controls/HyperLink.axaml.cs @@ -1,7 +1,9 @@ -using Sys...
[ "DiscordChatExporter.Gui/Views/Controls/HyperLink.axaml.cs" ]
[ { "comment": "```suggestion\n else if (!string.IsNullOrWhiteSpace(Url))\n Process.StartShellExecute(uri.AbsoluteUri);\n```", "path": "DiscordChatExporter.Gui/Views/Controls/HyperLink.axaml.cs", "hunk": "@@ -36,14 +45,24 @@ public object? CommandParameter\n set => SetValue(Comma...
true
Tyrrrz/DiscordChatExporter
1,482
comment_to_fix
Add localization
Please use dashes for markdown lists @copilot
18086aa209f00a28262fc7287e96d0745c53da54
c559f9eaded0ea7be5f1553ab4e175497ed9606c
diff --git a/DiscordChatExporter.Gui/Localization/LocalizationManager.English.cs b/DiscordChatExporter.Gui/Localization/LocalizationManager.English.cs new file mode 100644 index 000000000..9cb791624 --- /dev/null +++ b/DiscordChatExporter.Gui/Localization/LocalizationManager.English.cs @@ -0,0 +1,151 @@ +using System.C...
[ "DiscordChatExporter.Gui/Localization/LocalizationManager.English.cs" ]
[ { "comment": "Please use dashes for markdown lists @copilot ", "path": "DiscordChatExporter.Gui/Localization/LocalizationManager.English.cs", "hunk": "@@ -0,0 +1,151 @@\n+using System.Collections.Generic;\n+\n+namespace DiscordChatExporter.Gui.Localization;\n+\n+public partial class LocalizationManager\...
true