Skip to content

Add selectable taskbar limits and refine widget settings - #3

Merged
ognjeeen merged 4 commits into
masterfrom
feature/taskbar-limit-selection
Aug 27, 2026
Merged

Add selectable taskbar limits and refine widget settings#3
ognjeeen merged 4 commits into
masterfrom
feature/taskbar-limit-selection

Conversation

@ognjeeen

Copy link
Copy Markdown
Owner

Summary

  • add selectable 5h, weekly, and most-constrained taskbar limits with weekly fallback when the 5h window is unavailable
  • refine taskbar and widget settings menus, dismissal behavior, spacing, controls, and the GitHub update link
  • prevent the Activity dots setup window from crashing the application during repeated close events

Validation

  • dotnet build .\CodexUsageWidget.slnx -c Release --no-restore
  • dotnet test .\CodexUsageWidget.slnx -c Release --no-build --no-restore
  • 105 tests passed
  • manually verified menu placement, outside-click dismissal, update-page launch, and Activity dots window deactivation on Windows

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 385bcac386

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +226 to +229
if (resolvedPreference != _taskbarLimitPreference)
{
_taskbarLimitPreference = resolvedPreference;
_taskbarLimitPreferenceStore.Save(resolvedPreference);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve the 5h preference until a weekly fallback exists

When a refresh returns no general windows—such as before the user has signed in—ResolvePreference changes the default 5h preference to Weekly even though no weekly window exists, and this block permanently saves that change. A later successful refresh will therefore show the weekly limit instead of restoring the user's 5h default; only persist the fallback when a weekly window is actually available.

AGENTS.md reference: AGENTS.md:L59-L60

Useful? React with 👍 / 👎.

Comment on lines +13 to +16
preference == TaskbarLimitPreference.FiveHour &&
!IsAvailable(snapshot, TaskbarLimitPreference.FiveHour)
? TaskbarLimitPreference.Weekly
: preference;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Resolve an unavailable weekly preference

When an account returns only a 5h window, Select falls back from Weekly to that 5h window, but this method leaves the preference as Weekly. Consequently both menus remain checked on “Weekly limit” while the taskbar tooltip and percentage come from the 5h limit; resolve or disable unavailable weekly selections so the displayed selection matches the displayed data.

AGENTS.md reference: AGENTS.md:L59-L60

Useful? React with 👍 / 👎.

UseShellExecute = true
};

if (Process.Start(startInfo) is null)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Handle failures to launch the release page

On systems without a usable HTTP shell association, or where policy blocks launching the browser, Process.Start can throw Win32Exception rather than return null. Both new menu callbacks invoke this method on the dispatcher without catching that exception, and the global dispatcher handler only logs it without setting Handled, so selecting “Check for updates...” can terminate the widget instead of reporting the launch failure.

Useful? React with 👍 / 👎.

@ognjeeen
ognjeeen merged commit ca99be9 into master Aug 27, 2026
1 check passed
@ognjeeen
ognjeeen deleted the feature/taskbar-limit-selection branch August 27, 2026 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant