Add sponsors and a one-time support prompt#122

draft3
main
agent/add-project-support
openedAug 9, 2026byDDara Adedeji
View on GitHubTwo-way sync enabledPR last imported 18h ago

Summary

  • credit Greptile's Open Source Program and OpenAI's Codex for Open Source program in the README and app settings
  • add a permanent, low-key Buy Me a Coffee entry to Settings
  • show a non-modal support toast only once, on the third app launch, after a six-second delay
  • persist the one-time flag before displaying the toast so navigation or an early exit cannot make it recur

Validation

  • flutter test --concurrency=4 — 398 tests passed, 1 skipped
  • flutter analyze --no-fatal-infos — no new findings; one existing deprecation info remains in lib/widgets/pages_bar.dart

Summary by CodeRabbit

  • New Features

    • Added a Sponsors and Support section in Settings with links to Buy Me a Coffee, Greptile, and OpenAI Codex for Open Source.
    • Added a one-time “Buy me a coffee” prompt after repeated app launches.
    • Added launch tracking to support the prompt experience.
    • Toast notifications can now use customized display durations.
  • Documentation

    • Updated the README with support and sponsor acknowledgments.

Checks

All checks passed

Added 1 commit

  • add sponsors and one-time support promptc80d651
Synced from GitHub

Review Change Stack

Warning

Review limit reached

@SunkenInTime, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 51 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 82bfd948-4724-4620-9682-0f0ad1a21b55

📥 Commits

Reviewing files that changed from the base of the PR and between a1b8838636f74d1e2a241ba90bb43348d7b88fd8 and 4a7e5e8b8ba0ec8296c3e08dbb70a68abbbb4f7b.

📒 Files selected for processing (1)
  • README.md
📝 Walkthrough

Walkthrough

The app now tracks launch counts in Hive, shows a one-time delayed support toast after three launches, and adds sponsor links to global settings and the README. Support links use shared URI settings and URL launching.

Changes

Support and sponsor features

Layer / File(s)Summary
Support settings and launch state
lib/const/hive_boxes.dart, lib/const/settings.dart, lib/main.dart
Adds Hive keys and support URIs. Startup increments the persisted launch count. Toast auto-close duration is configurable.
Launch-triggered support prompt
lib/widgets/folder_navigator.dart
Checks launch flags after initialization and shows a one-time delayed Buy Me a Coffee toast on supported platforms.
Sponsor links in settings and documentation
lib/widgets/settings_tab.dart, README.md
Adds an About & sponsors settings section with external-link actions and documents the sponsor links in the README.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

mermaid
1sequenceDiagram
2 participant App
3 participant Hive
4 participant FolderNavigator
5 participant Toast
6 participant URLLauncher
7
8 App->>Hive: Open app-flags box
9 App->>Hive: Increment launch count
10 FolderNavigator->>Hive: Check prompt state
11 FolderNavigator->>Toast: Show delayed support prompt
12 Toast->>URLLauncher: Open Buy Me a Coffee link
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedThe title clearly summarizes the main changes: adding sponsor acknowledgments and a one-time support prompt.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/add-project-support

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Synced from GitHub

Greptile Summary

This change adds sponsor and support links and introduces a one-time support invitation based on application launch count. The Windows support-prompt flow was verified to leave its persisted prompt state unclaimed when WebView2 is unavailable on the third launch, then show the invitation on a later launch after WebView2 becomes available. This should be corrected before merge so the invitation follows the intended third-launch policy.

Confidence Score: 4/5

The support invitation does not consistently follow its intended one-time third-launch behavior on Windows systems where WebView2 is initially unavailable.

An executable reproduction verified the persisted-state transition: the third launch leaves the invitation unclaimed, while a later launch with WebView2 initialized claims and schedules it. Native Flutter rendering was unavailable, but the relevant launch-state and prompt-claim behavior was exercised directly.

Files Needing Attention: lib/widgets/folder_navigator.dart needs the WebView2 availability check and persisted support-prompt eligibility handling to be separated.

T-Rex T-Rex Logs

What T-Rex did

  • Executed the support-prompt reproduction script to reproduce the P1 scenario and verified the reproduction syntax.
  • Observed the third launch with unavailable WebView2 leaving the prompt unclaimed.
  • Observed the later initialized launch claims and schedules the prompt.
  • Validated the contract-level flow by mapping the before/after WebView2 launch outcomes and the runtime blocker log, confirming the overall sequence.

View all artifacts

T-Rex Ran code and verified through T-Rex

Comments Outside Diff (1)

  1. General comment

    P1 Support prompt is deferred past the third launch when WebView2 is unavailable

    • Bug
      • On Windows, _maybeShowSupportPrompt returns at line 99 when isWebViewInitialized is false. That return occurs before the Hive box is read and before the one-time support prompt is claimed. Since main.dart increments the launch count before runApp, the third launch leaves support_prompt_shown at 0. On a later launch once WebView2 is initialized, the count is already greater than or equal to 3, so the prompt is claimed and displayed after its delay.
    • Cause
      • The WebView2 availability guard precedes both the Hive read and the launchCount < 3 eligibility check/claim.
    • Fix
      • Evaluate and claim the third-launch support-prompt eligibility independently of WebView2 availability (for example, move the Windows/WebView2 guard after the Hive claim logic, or record that the third-launch opportunity was consumed before returning).

    T-Rex Ran code and verified through T-Rex

Reviews (1): Last reviewed commit: "add sponsors and one-time support prompt" | Re-trigger Greptile

lib/widgets/folder_navigator.dartline 99Outdated · c80d651Open thread
……@@ -85,10 +88,42 @@ class _FolderNavigatorState extends ConsumerState<FolderNavigator> {
9196
97+ Future<void> _maybeShowSupportPrompt() async {
98+ if (kIsWeb) return;
99+ if (Platform.isWindows && !isWebViewInitialized) return;
Ggreptile-appsBoton line 99Aug 9, 2026

P1 WebView gate defers the third-launch prompt

On Windows without WebView2, this return occurs before the persisted prompt state is read or claimed. The application has already recorded the third launch, but support_prompt_shown remains unset; when WebView2 becomes available on a later launch, the launchCount >= 3 condition causes the support toast to appear then instead of consuming the intended third-launch opportunity. Record or consume the third-launch eligibility independently of WebView2 availability.

Artifacts

Executable support-prompt state reproduction source

  • Node source used to assert the checked-out guard ordering and execute the two launch-state transitions, with the takeaway that it models the exact early-return and claim sequence.

Third launch with unavailable WebView2 leaves prompt unclaimed

  • Executed third-launch reproduction with Windows WebView2 unavailable; it records launch count 3, no Hive read, no claim, and persisted `support_prompt_shown: 0`, with the takeaway that the third-launch invitation was not consumed.

Later initialized launch claims and schedules prompt

  • Executed subsequent Windows launch reproduction with WebView2 initialized; it records launch count 4, a Hive read, a claim, and a scheduled toast, with the takeaway that the prompt appears later than the intended third launch.

Flutter and Chromium runtime availability check

  • Runtime availability command output shows `flutter` is not found and Chromium is absent, with the takeaway that rendered Flutter UI/video validation could not run in this environment.

Executable reproduction syntax check

  • Node syntax validation for the authored reproduction completed with exit code 0, with the takeaway that the executed test harness was syntactically valid.

View artifacts

T-Rex Ran code and verified through T-Rex

Added 1 commit

  • fix support prompt and sponsor badgea1b8838
CcoderabbitaiBotreviewed · 2 inline threadsAug 9, 2026
Synced from GitHub

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
1Verify each finding against current code. Fix only still-valid issues, skip the
2rest with a brief reason, keep changes minimal, and validate.
3
4Inline comments:
5In `@lib/widgets/folder_navigator.dart`:
6- Around line 108-111: In the prompt flow around the readiness check and
7Settings.showToast, move the Platform.isWindows && !isWebViewInitialized early
8return before writing flags.put(HiveBoxNames.supportPromptShownKey, 1). Keep the
9persisted write immediately before the existing six-second delay so the flag is
10saved only when the prompt can proceed.
11
12In `@lib/widgets/settings_tab.dart`:
13- Around line 581-610: Replace the direct launchUrl calls in the three
14_SupportLinkTile onPressed callbacks with a shared async helper that accepts the
15target URL, checks for a false launch result, catches platform exceptions, and
16reports failures through the existing toast/error UI. Keep each tile’s URL
17unchanged and ensure the callbacks await or return the helper’s Future.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 504a6b92-1147-4dd4-a34c-218215c77ea1

📥 Commits

Reviewing files that changed from the base of the PR and between aeefc69f889d43416cce3f055c93f2b6d3b65d4d and a1b8838636f74d1e2a241ba90bb43348d7b88fd8.

📒 Files selected for processing (6)
  • README.md
  • lib/const/hive_boxes.dart
  • lib/const/settings.dart
  • lib/main.dart
  • lib/widgets/folder_navigator.dart
  • lib/widgets/settings_tab.dart
lib/widgets/settings_tab.dartlines 581–610Outdated · a1b8838Open thread
……@@ -562,6 +568,51 @@ class _GlobalSettingsSections extends ConsumerWidget {
607+ "If Icarus helps your team, you can help keep development going.",
608+ actionLabel: "Buy me a coffee",
609+ onPressed: () {
610+ launchUrl(Settings.buyMeACoffeeLink);
CcoderabbitaiBoton lines 581–610Aug 9, 2026

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

shell
1#!/bin/bash
2set -euo pipefail
3
4# Expect every launchUrl call to use result-aware handling.
5if rg -nP '^\s*launchUrl\s*\(' lib/widgets/settings_tab.dart; then
6 echo "Found a fire-and-forget launchUrl call"
7 exit 1
8fi
9
10rg -n -C 5 'launchUrl\(' lib/widgets/settings_tab.dart

Repository: SunkenInTime/icarus

Length of output: 387


🏁 Script executed:

shell
1#!/bin/bash
2set -euo pipefail
3
4echo "Relevant settings_tab.dart section:"
5sed -n '560,625p' lib/widgets/settings_tab.dart
6
7echo
8echo "Import/dependency declarations:"
9rg -n "url_launcher|launchUrl|Toast|showDialog|ErrorMessage|error" pubspec.yaml pubspec.lock

Repository: SunkenInTime/icarus

Length of output: 3225


🌐 Web query:

url_launcher package 6.3.1 launchUrl returns Future<bool> behavior if platform handler not found

💡 Result:

In the url_launcher package version 6.3.1, the launchUrl method returns a Future<bool> that indicates whether the URL was launched successfully [1][2]. When a platform handler for the requested URL cannot be found, the standard behavior is for launchUrl to return false [1][2]. Depending on the specific platform and the nature of the failure, it may alternatively throw a PlatformException [1][2]. It is important to note the following regarding this behavior: 1. Handling Failures: Because launchUrl can return false when an operation fails to launch, the package documentation explicitly recommends checking the boolean return value to handle such scenarios [3][1]. For example: if (!await launchUrl(url)) { // Handle failure (e.g., show an error message or try a fallback) } 2. Limitations of canLaunchUrl: You should not rely solely on canLaunchUrl to predict the outcome of launchUrl [3][4]. On many platforms (especially mobile and web), canLaunchUrl may return false even if launchUrl would succeed, often due to platform-specific security configurations like LSApplicationQueriesSchemes on iOS or <queries> elements in the Android manifest [5][6][2]. 3. Web Considerations: On web platforms, launchUrl behavior can sometimes lead to false negatives (returning false despite the operation potentially succeeding in the browser) depending on how the window or tab is opened (e.g., usage of webOnlyWindowName) [7]. For mission-critical operations, it is best to attempt the launchUrl call directly and implement fallback logic within the else or if (!result) block rather than disabling functionality based on a canLaunchUrl check [3][6].

Citations:


Handle external-link failures before shipping.

launchUrl(...) returns a Future<bool> at all three support-link call sites, and these callbacks discard the result. If the platform cannot launch the URL, the action fails silently. Route these callbacks through one async helper that checks false results and catches platform errors, then reports the failure with the existing toast/error UI.

🤖 Prompt for AI Agents
1Verify each finding against current code. Fix only still-valid issues, skip the
2rest with a brief reason, keep changes minimal, and validate.
3
4In `@lib/widgets/settings_tab.dart` around lines 581 - 610, Replace the direct
5launchUrl calls in the three _SupportLinkTile onPressed callbacks with a shared
6async helper that accepts the target URL, checks for a false launch result,
7catches platform exceptions, and reports failures through the existing
8toast/error UI. Keep each tile’s URL unchanged and ensure the callbacks await or
9return the helper’s Future.

Source: Coding guidelines

lib/widgets/folder_navigator.dartlines 108–111Outdated · a1b8838Open thread
……@@ -85,10 +88,43 @@ class _FolderNavigatorState extends ConsumerState<FolderNavigator> {
108+ // Claim the prompt before the delay so a route change or quick exit never
109+ // turns a one-time invitation into a recurring interruption.
110+ await flags.put(HiveBoxNames.supportPromptShownKey, 1);
111+ if (Platform.isWindows && !isWebViewInitialized) return;
CcoderabbitaiBoton lines 108–111Aug 9, 2026

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Move the persisted “shown” flag after the readiness check.

Line 110 writes supportPromptShownKey = 1. Line 111 can then return before Settings.showToast runs. On a Windows launch with an uninitialized WebView, the prompt is not shown, but later launches return at Line 106 because the flag is already set.

Move the readiness check before the write. Keep the write before the six-second delay.

Proposed fix
diff
1- // Claim the prompt before the delay so a route change or quick exit never
2- // turns a one-time invitation into a recurring interruption.
3- await flags.put(HiveBoxNames.supportPromptShownKey, 1);
4 if (Platform.isWindows && !isWebViewInitialized) return;
5+ // Claim the prompt before the delay so a route change or quick exit never
6+ // turns a one-time invitation into a recurring interruption.
7+ await flags.put(HiveBoxNames.supportPromptShownKey, 1);

As per coding guidelines, “If a library write path is uncertain, fail loudly without saving rather than persisting potentially incorrect data.”

📝 Committable suggestion

‼️ IMPORTANT Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

suggestion
1 if (Platform.isWindows && !isWebViewInitialized) return;
2 // Claim the prompt before the delay so a route change or quick exit never
3 // turns a one-time invitation into a recurring interruption.
4 await flags.put(HiveBoxNames.supportPromptShownKey, 1);
🤖 Prompt for AI Agents
1Verify each finding against current code. Fix only still-valid issues, skip the
2rest with a brief reason, keep changes minimal, and validate.
3
4In `@lib/widgets/folder_navigator.dart` around lines 108 - 111, In the prompt flow
5around the readiness check and Settings.showToast, move the Platform.isWindows
6&& !isWebViewInitialized early return before writing
7flags.put(HiveBoxNames.supportPromptShownKey, 1). Keep the persisted write
8immediately before the existing six-second delay so the flag is saved only when
9the prompt can proceed.

Source: Coding guidelines

Added 1 commit

  • show full Greptile animation4a7e5e8