app: redesign the panel and add limit forecasts and daily week use (#6)
Redesign the stats panel after the developer's feedback on v1 and add limit forecasts, daily week use and token-based estimates (D7, D8). - Panel: a fixed header with range and provider controls, limit tiles with pace chips, meters and forecasts, week use per day, token KPIs and charts, one burn-up chart per limit window with past instances, and a sortable breakdown whose "Other" row expands. One tooltip component for every chart, tile and table. - Core (D7): average and recent-rate forecasts, the reach date whenever use is over pace, days of a long window with even pace and daily budget, window instances derived from resets with a 15-minute tolerance, and estimates from price-weighted tokens where samples are missing. Forecasts start at 10 % of a window, or as soon as it is ahead, so a Codex week far ahead right after its reset warns too. - Settings, popups and the version (1.1.0) follow the new design. Closes #5 Closes #7
This commit was merged in pull request #6.
This commit is contained in:
@@ -29,6 +29,15 @@ public class PaceTests
|
||||
[Fact] public void ProjectionAfterResetIsHidden() => Assert.Null(Pace.Calculate(Window(10), Now).Projection);
|
||||
[Fact] public void ZeroElapsedDoesNotProject() => Assert.Null(Pace.Calculate(Window(50, 0), Now).Projection);
|
||||
[Fact] public void ZeroUsageDoesNotProject() => Assert.Null(Pace.Calculate(Window(0), Now).Projection);
|
||||
[Fact] public void BelowAlertThresholdStillProjectsWithoutPopup()
|
||||
{
|
||||
var window = Window(55);
|
||||
var pace = Pace.Calculate(window, Now);
|
||||
Assert.Equal(PaceState.OnTrack, pace.State);
|
||||
Assert.NotNull(pace.Projection);
|
||||
Assert.True(pace.Projection < window.ResetsAt);
|
||||
Assert.Null(new PopupDecider().Observe(window, pace, new Settings()));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void PopupHysteresisPreventsFlappingAndRearmsAfterClear()
|
||||
|
||||
Reference in New Issue
Block a user