Compare commits
10
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6cc4c1dc2f | ||
|
|
e2fff371ee | ||
|
|
872cdbc684 | ||
|
|
0f78931599 | ||
|
|
a84b2645fc | ||
|
|
6152371b16 | ||
|
|
60acaf3eea | ||
|
|
e064e14425 | ||
|
|
33e35243c4 | ||
|
|
e16bfa59d0 |
@@ -75,3 +75,28 @@ jobs:
|
|||||||
--field "content=$content" \
|
--field "content=$content" \
|
||||||
--field "branch=main"
|
--field "branch=main"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- name: Update Windows beta badge in README on main
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
version="${{ steps.version.outputs.version }}"
|
||||||
|
tag="${{ github.ref_name }}"
|
||||||
|
shields_version=$(echo "$version" | sed 's/-/--/g')
|
||||||
|
export WIN_BADGE="[](https://github.com/${{ github.repository }}/releases/tag/${tag}) <!-- WIN_BETA_BADGE -->"
|
||||||
|
sha=$(gh api "repos/${{ github.repository }}/contents/README.md?ref=main" --jq .sha)
|
||||||
|
content=$(gh api "repos/${{ github.repository }}/contents/README.md?ref=main" --jq .content | python3 -c "
|
||||||
|
import sys, base64, os
|
||||||
|
raw = sys.stdin.read().strip()
|
||||||
|
text = base64.b64decode(raw).decode()
|
||||||
|
badge = os.environ['WIN_BADGE']
|
||||||
|
lines = text.splitlines(keepends=True)
|
||||||
|
out = [badge + chr(10) if '<!-- WIN_BETA_BADGE -->' in line else line for line in lines]
|
||||||
|
print(base64.b64encode(''.join(out).encode()).decode(), end='')
|
||||||
|
")
|
||||||
|
gh api --method PUT "repos/${{ github.repository }}/contents/README.md" \
|
||||||
|
--field "message=Windows beta badge $tag" \
|
||||||
|
--field "content=$content" \
|
||||||
|
--field "branch=main" \
|
||||||
|
--field "sha=$sha"
|
||||||
|
|||||||
@@ -75,3 +75,40 @@ jobs:
|
|||||||
--field "content=$content" \
|
--field "content=$content" \
|
||||||
--field "branch=main"
|
--field "branch=main"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- name: Update Windows stable badge in README on main
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
version="${{ steps.version.outputs.version }}"
|
||||||
|
tag="${{ github.ref_name }}"
|
||||||
|
shields_version=$(echo "$version" | sed 's/-/--/g')
|
||||||
|
export WIN_STABLE_BADGE="[](https://github.com/${{ github.repository }}/releases/tag/${tag}) <!-- WIN_STABLE_BADGE -->"
|
||||||
|
sha=$(gh api "repos/${{ github.repository }}/contents/README.md?ref=main" --jq .sha)
|
||||||
|
content=$(gh api "repos/${{ github.repository }}/contents/README.md?ref=main" --jq .content | python3 -c "
|
||||||
|
import sys, base64, os
|
||||||
|
raw = sys.stdin.read().strip()
|
||||||
|
text = base64.b64decode(raw).decode()
|
||||||
|
stable_badge = os.environ['WIN_STABLE_BADGE']
|
||||||
|
lines = text.splitlines(keepends=True)
|
||||||
|
out = []
|
||||||
|
for line in lines:
|
||||||
|
if '<!-- WIN_STABLE_BADGE -->' in line:
|
||||||
|
out.append(stable_badge + chr(10))
|
||||||
|
rest = line.replace(' <!-- WIN_STABLE_BADGE -->', '').replace('<!-- WIN_STABLE_BADGE -->', '')
|
||||||
|
if rest.strip() and '<!-- WIN_BETA_BADGE -->' in rest:
|
||||||
|
out.append('<!-- WIN_BETA_BADGE -->' + chr(10))
|
||||||
|
elif rest.strip():
|
||||||
|
out.append(rest)
|
||||||
|
elif '<!-- WIN_BETA_BADGE -->' in line:
|
||||||
|
out.append('<!-- WIN_BETA_BADGE -->' + chr(10))
|
||||||
|
else:
|
||||||
|
out.append(line)
|
||||||
|
print(base64.b64encode(''.join(out).encode()).decode(), end='')
|
||||||
|
")
|
||||||
|
gh api --method PUT "repos/${{ github.repository }}/contents/README.md" \
|
||||||
|
--field "message=Windows stable badge $tag" \
|
||||||
|
--field "content=$content" \
|
||||||
|
--field "branch=main" \
|
||||||
|
--field "sha=$sha"
|
||||||
|
|||||||
@@ -282,6 +282,9 @@
|
|||||||
Style="{StaticResource SmallButton}" Click="CopyDiag_Click"/>
|
Style="{StaticResource SmallButton}" Click="CopyDiag_Click"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
<TextBlock DockPanel.Dock="Top" Text="Org IDs are redacted when copied."
|
||||||
|
FontSize="10" Foreground="{DynamicResource SecondaryBrush}"
|
||||||
|
Margin="14,6,14,6"/>
|
||||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||||
<StackPanel x:Name="DiagContentPanel" Margin="16,4,16,16"/>
|
<StackPanel x:Name="DiagContentPanel" Margin="16,4,16,16"/>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
@@ -495,7 +496,7 @@ public partial class PopupWindow : Window
|
|||||||
private void CopyDiag_Click(object s, RoutedEventArgs e)
|
private void CopyDiag_Click(object s, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
Clipboard.SetText(BuildDiagText());
|
Clipboard.SetText(BuildDiagText());
|
||||||
CopyDiagButton.Content = "Copied!";
|
CopyDiagButton.Content = "Copied! (IDs redacted)";
|
||||||
var t = new DispatcherTimer { Interval = TimeSpan.FromSeconds(1.5) };
|
var t = new DispatcherTimer { Interval = TimeSpan.FromSeconds(1.5) };
|
||||||
t.Tick += (_, _) => { CopyDiagButton.Content = "Copy All"; t.Stop(); };
|
t.Tick += (_, _) => { CopyDiagButton.Content = "Copy All"; t.Stop(); };
|
||||||
t.Start();
|
t.Start();
|
||||||
@@ -553,7 +554,6 @@ public partial class PopupWindow : Window
|
|||||||
[
|
[
|
||||||
MakeRow("Version", Updater.CurrentVersion),
|
MakeRow("Version", Updater.CurrentVersion),
|
||||||
MakeRow("Signed in", VM.IsSignedIn ? "Yes" : "No"),
|
MakeRow("Signed in", VM.IsSignedIn ? "Yes" : "No"),
|
||||||
MakeRow("Email", string.IsNullOrEmpty(VM.UserEmail) ? "(none)" : VM.UserEmail),
|
|
||||||
MakeRow("Org ID", string.IsNullOrEmpty(VM.DiagOrgId) ? "(none)" : VM.DiagOrgId),
|
MakeRow("Org ID", string.IsNullOrEmpty(VM.DiagOrgId) ? "(none)" : VM.DiagOrgId),
|
||||||
MakeRow("lastActiveOrg", string.IsNullOrEmpty(VM.DiagLastActiveOrg) ? "(not read)" : VM.DiagLastActiveOrg),
|
MakeRow("lastActiveOrg", string.IsNullOrEmpty(VM.DiagLastActiveOrg) ? "(not read)" : VM.DiagLastActiveOrg),
|
||||||
MakeRow("Error", VM.ErrorMessage ?? "(none)"),
|
MakeRow("Error", VM.ErrorMessage ?? "(none)"),
|
||||||
@@ -570,15 +570,6 @@ public partial class PopupWindow : Window
|
|||||||
reqRows.Add(MakeRow("Time", VM.DiagLastFetch.Value.ToString("HH:mm:ss")));
|
reqRows.Add(MakeRow("Time", VM.DiagLastFetch.Value.ToString("HH:mm:ss")));
|
||||||
AddSection("LAST REQUEST", reqRows);
|
AddSection("LAST REQUEST", reqRows);
|
||||||
|
|
||||||
// COOKIE STORE
|
|
||||||
AddSection("COOKIE STORE",
|
|
||||||
[
|
|
||||||
MakeRow("Total cookies", VM.DiagCookieCount.ToString()),
|
|
||||||
MakeRow("Claude cookies", VM.DiagClaudeCookieCount.ToString()),
|
|
||||||
MakeRow("All domains", VM.DiagCookieDomains.Count == 0
|
|
||||||
? "(none)" : string.Join(", ", VM.DiagCookieDomains)),
|
|
||||||
]);
|
|
||||||
|
|
||||||
// STORED COOKIE NAMES
|
// STORED COOKIE NAMES
|
||||||
var storedNames = GetStoredCookieNames();
|
var storedNames = GetStoredCookieNames();
|
||||||
var nameRows = new List<FrameworkElement>();
|
var nameRows = new List<FrameworkElement>();
|
||||||
@@ -627,27 +618,26 @@ public partial class PopupWindow : Window
|
|||||||
sb.AppendLine("=== ClaudeChecker Diagnostics (Windows) ===");
|
sb.AppendLine("=== ClaudeChecker Diagnostics (Windows) ===");
|
||||||
sb.AppendLine($"Version: {Updater.CurrentVersion}");
|
sb.AppendLine($"Version: {Updater.CurrentVersion}");
|
||||||
sb.AppendLine($"Signed in: {(VM.IsSignedIn ? "Yes" : "No")}");
|
sb.AppendLine($"Signed in: {(VM.IsSignedIn ? "Yes" : "No")}");
|
||||||
sb.AppendLine($"Email: {(string.IsNullOrEmpty(VM.UserEmail) ? "(none)" : VM.UserEmail)}");
|
|
||||||
sb.AppendLine($"Org ID: {(string.IsNullOrEmpty(VM.DiagOrgId) ? "(none)" : VM.DiagOrgId)}");
|
sb.AppendLine($"Org ID: {(string.IsNullOrEmpty(VM.DiagOrgId) ? "(none)" : VM.DiagOrgId)}");
|
||||||
sb.AppendLine($"lastActiveOrg: {(string.IsNullOrEmpty(VM.DiagLastActiveOrg) ? "(not read)" : VM.DiagLastActiveOrg)}");
|
sb.AppendLine($"lastActiveOrg: {(string.IsNullOrEmpty(VM.DiagLastActiveOrg) ? "(not read)" : VM.DiagLastActiveOrg)}");
|
||||||
sb.AppendLine($"Error: {VM.ErrorMessage ?? "(none)"}");
|
sb.AppendLine($"Error: {VM.ErrorMessage ?? "(none)"}");
|
||||||
sb.AppendLine();
|
sb.AppendLine();
|
||||||
sb.AppendLine($"Last path: {VM.DiagLastPath}");
|
sb.AppendLine($"Last path: {VM.DiagLastPath}");
|
||||||
sb.AppendLine($"Last status: {VM.DiagLastStatus}");
|
sb.AppendLine($"Last status: {VM.DiagLastStatus}");
|
||||||
sb.AppendLine($"Last error: {VM.DiagLastError}");
|
sb.AppendLine($"Last error: {(string.IsNullOrEmpty(VM.DiagLastError) ? "(none)" : VM.DiagLastError)}");
|
||||||
if (VM.DiagLastFetch.HasValue)
|
if (VM.DiagLastFetch.HasValue)
|
||||||
sb.AppendLine($"Last fetch: {VM.DiagLastFetch.Value:HH:mm:ss}");
|
sb.AppendLine($"Last fetch: {VM.DiagLastFetch.Value:HH:mm:ss}");
|
||||||
sb.AppendLine();
|
sb.AppendLine();
|
||||||
sb.AppendLine($"Total cookies: {VM.DiagCookieCount}");
|
|
||||||
sb.AppendLine($"Claude cookies: {VM.DiagClaudeCookieCount}");
|
|
||||||
sb.AppendLine($"Domains: {string.Join(", ", VM.DiagCookieDomains)}");
|
|
||||||
sb.AppendLine();
|
sb.AppendLine();
|
||||||
sb.AppendLine("Stored cookies:");
|
sb.AppendLine("Stored cookies:");
|
||||||
foreach (var c in storedNames)
|
foreach (var c in storedNames)
|
||||||
sb.AppendLine($" {c.Domain} {c.Name}");
|
sb.AppendLine($" {c.Domain} {c.Name}");
|
||||||
return sb.ToString();
|
return RedactUUIDs(sb.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static string RedactUUIDs(string text) =>
|
||||||
|
Regex.Replace(text, @"[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}", "****");
|
||||||
|
|
||||||
// ── Event handlers ───────────────────────────────────────────────
|
// ── Event handlers ───────────────────────────────────────────────
|
||||||
|
|
||||||
private void Settings_Click(object s, RoutedEventArgs e)
|
private void Settings_Click(object s, RoutedEventArgs e)
|
||||||
|
|||||||
Reference in New Issue
Block a user