-
-
Notifications
You must be signed in to change notification settings - Fork 0
Fix chrome menu disappearing after 5 seconds #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
49b80df
cc5c721
0e22b15
e599162
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -9,7 +9,53 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public const string AppName = "PortPane"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public const string SuiteName = "ShackDesk"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public const string FullName = "PortPane by ShackDesk"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public const string Version = "0.5.1-beta"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public const string Version = "0.5.2"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// <summary> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// ISO 8601 UTC build timestamp. Empty string in source — patched by CI at | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// publish time. Used by App.xaml.cs to enforce ChannelInfo.BuildExpiryDays. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// </summary> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public const string BuildDate = ""; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// <summary> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// Full version string for display, logging, and telemetry. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// Composed from Version + ChannelInfo.VersionSuffix at runtime. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// Alpha builds also show the BuildDate stamp when available. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// </summary> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public static string FullVersion | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| get | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (string.IsNullOrEmpty(ChannelInfo.VersionSuffix)) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Check warningCode scanning / CodeQL Constant condition Warning
Condition always evaluates to 'true'.
Copilot AutofixAI 18 days ago General approach: normalize Concrete fix in
No new imports or types are required; we use only
Suggested changeset
1
src/PortPane/BrandingInfo.cs
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return Version; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (ChannelInfo.Channel == ReleaseChannel.Alpha && !string.IsNullOrEmpty(BuildDate) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Check warningCode scanning / CodeQL Constant condition Warning
Condition always evaluates to 'true'.
Copilot AutofixAI 18 days ago In general, to fix a constant condition you either (1) remove the redundant constant subcondition if it doesn’t affect behavior, or (2) refactor so that the condition can truly vary at runtime (for example, by not using a const/readonly value that is always the same). Here, we must not assume or change the behavior outside this snippet, so we should preserve the runtime behavior while eliminating the constant part that CodeQL flags. Given that CodeQL believes
Suggested changeset
1
src/PortPane/BrandingInfo.cs
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
Check warningCode scanning / CodeQL Constant condition Warning
Condition always evaluates to 'true'.
Copilot AutofixAI 18 days ago In general, to fix this constant condition we must ensure The single best, minimal‑behavior‑change fix here is:
This preserves the public API surface (a static string field named No new methods or special imports are needed; we only adjust the field declaration for
Suggested changeset
1
src/PortPane/BrandingInfo.cs
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| && DateTimeOffset.TryParse(BuildDate, null, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| System.Globalization.DateTimeStyles.RoundtripKind, out var dt)) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return $"{Version}-alpha.{dt:yyyyMMdd}"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return $"{Version}-{ChannelInfo.VersionSuffix}"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// <summary> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// Whole days remaining before this build expires, or null if no expiry applies. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// Returns null when: channel is Stable, BuildExpiryDays is 0, or BuildDate was not stamped by CI. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// Returns 0 on the expiry day itself (not negative). | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// </summary> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public static int? DaysRemaining | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| get | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (ChannelInfo.BuildExpiryDays <= 0 || string.IsNullOrEmpty(BuildDate)) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Check warningCode scanning / CodeQL Constant condition Warning
Condition always evaluates to 'true'.
Copilot AutofixAI 18 days ago In general, the way to fix a “constant condition” is to either remove the redundant check if it is genuinely impossible, or to restructure the code so that the condition is expressed via a non-constant value (for example, a method or property) when the behavior is intended to remain configurable. Here we want to preserve the documented semantics: Concretely, in if (ChannelInfo.BuildExpiryDays <= 0 || string.IsNullOrEmpty(BuildDate))
return null;to: if (!IsExpiryEnabled || string.IsNullOrEmpty(BuildDate))
return null;This preserves the runtime behavior (still returns
Suggested changeset
1
src/PortPane/BrandingInfo.cs
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
Check warningCode scanning / CodeQL Constant condition Warning
Condition always evaluates to 'true'.
Copilot AutofixAI 18 days ago In general, to fix constant-condition issues caused by Here, the best targeted fix is to change Concretely, in
Suggested changeset
1
src/PortPane/BrandingInfo.cs
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return null; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (!DateTimeOffset.TryParse(BuildDate, null, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| System.Globalization.DateTimeStyles.RoundtripKind, out var buildDate)) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return null; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| int days = (int)Math.Ceiling((buildDate.AddDays(ChannelInfo.BuildExpiryDays) - DateTimeOffset.UtcNow).TotalDays); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return Math.Max(0, days); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public const string AuthorName = "Mark McDow"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public const string AuthorCallsign = "N4TEK"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public const string AuthorCompany = "My Computer Guru LLC"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Check warning
Code scanning / CodeQL
Constant condition Warning
Copilot Autofix
AI 18 days ago
In general, to fix a constant condition you either (1) remove the redundant constant part if it does not affect behavior, or (2) replace it with the correct, non-constant predicate that reflects the intended logic. Here, CodeQL indicates
ChannelInfo.BuildExpiryDays > 0is always true, so it does not influence whether theifblock runs. The actual gating factors are!string.IsNullOrEmpty(BrandingInfo.BuildDate)and the success ofDateTimeOffset.TryParse.The best behavior‑preserving change is to simplify the condition by removing the constant subcondition and leaving the truly variable checks. That keeps the build-expiry feature working exactly as before, but avoids the misleading constant comparison and satisfies the analyzer. Concretely, in
src/PortPane/App.xaml.cs, change theifat lines 34–37 to:No new methods, fields, or imports are required.