Blocking findings: 1. A Codex RPC error or early exit threw past LimitProbe and stopped the refresh loop, so Claude stopped updating too (D2). Every probe failure is now a failed probe result, the loop records an unexpected tick failure and keeps ticking, shutdown cancellation still propagates, the app reports failed operations, and the CLI exits 1 instead of crashing. Fake app-server modes in the GUI process host test errors, EOF and garbage. 2. Totals converted local midnight directly and threw where midnight does not exist (Cairo, Santiago, Beirut). Today and the week start through CalendarDays now. 3. Daily chart labels used UTC dates for local-day buckets; labels and tooltips now share the local date. Review notes fixed as well: Claude Code installed with npm on Windows is found through its native binary or cli.js; the plugin ends cleanly on a bad host frame; Linux autostart honours XDG_CONFIG_HOME; the unused stub installer and the worker names in docs are gone. Refs #1
This commit is contained in:
@@ -7,6 +7,14 @@ namespace FinalToken.StreamDeck.Tests;
|
||||
|
||||
public sealed class PluginTests
|
||||
{
|
||||
[Fact]
|
||||
public async Task InvalidHostFrameEndsConnectionWithoutLoggingFrameText()
|
||||
{
|
||||
var socket = new FakeSocket { ReceiveFailure = new InvalidDataException("synthetic private frame") };
|
||||
var session = new PluginSession(socket, _ => Task.FromResult(false));
|
||||
Assert.Null(await session.ReceiveAsync(TestContext.Current.CancellationToken));
|
||||
Assert.Equal("connection-ended", session.ConnectionEndCode);
|
||||
}
|
||||
[Theory]
|
||||
[InlineData("{}", "Claude", "SessionPercent", "")]
|
||||
[InlineData("{\"provider\":\"Codex\"}", "Codex", "SessionPercent", "")]
|
||||
@@ -146,9 +154,11 @@ public sealed class PluginTests
|
||||
}
|
||||
private sealed class FakeSocket : IPluginSocket
|
||||
{
|
||||
public Exception? ReceiveFailure { get; init; }
|
||||
public List<string> Sent { get; } = [];
|
||||
public Task SendAsync(string json, CancellationToken cancellationToken) { Sent.Add(json); return Task.CompletedTask; }
|
||||
public Task<string?> ReceiveAsync(CancellationToken cancellationToken) => Task.FromResult<string?>(null);
|
||||
public Task<string?> ReceiveAsync(CancellationToken cancellationToken) => ReceiveFailure is { } error
|
||||
? Task.FromException<string?>(error) : Task.FromResult<string?>(null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user