Skip to content

Add internal beta feedback automation#13

Merged
Ayobami-00 merged 14 commits into
mainfrom
feat/internal-beta-feedback-review-loop
May 20, 2026
Merged

Add internal beta feedback automation#13
Ayobami-00 merged 14 commits into
mainfrom
feat/internal-beta-feedback-review-loop

Conversation

@Ayobami-00
Copy link
Copy Markdown
Owner

@Ayobami-00 Ayobami-00 commented May 19, 2026

Summary

  • Adds the internal beta feedback surface with the Today debug/report icon for debug/internal beta builds.
  • Updates the beta intake flow so Supabase stores private reports and queues codex_tasks, while the local Codex runner creates sanitized GitHub issues with the local user identity.
  • Removes the custom PR Acceptance Gate path; Greptile/CI remain review signals, and demo proof stays in private Supabase Storage instead of PR comments.

Validation

  • flutter pub get
  • flutter analyze
  • flutter test
  • flutter build ios --simulator --debug
  • Live app e2e submits a private report and leaves the GitHub issue pending for the local runner
  • Local runner created a sanitized smoke issue as Ayobami-00, then the synthetic issue/report/task were cleaned up
  • Live backend e2e verifies private attachment storage and queued Codex task creation
  • Private Supabase demo proof uploaded for PR 13 attempt 12 at head 52a34b6

@Ayobami-00 Ayobami-00 mentioned this pull request May 19, 2026
11 tasks
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 19, 2026

Greptile Summary

This PR introduces the internal beta feedback surface — a full BLoC-backed form that collects bug reports from debug/beta users, stores private reports and attachments in Supabase, and queues a Codex task so a local runner can open a sanitized GitHub issue. It also removes the custom PR acceptance gate, replacing it with a Greptile-as-CI-signal workflow and private Supabase Storage for demo proofs.

  • Adds BetaFeedbackScreen, BetaFeedbackCubit, SupabaseBetaFeedbackDataSource, and related domain entities and use-cases to capture structured bug reports with an optional screenshot attachment.
  • Surfaces the beta feedback entry point on both TodayScreen (app-bar icon) and SettingsPlaceholderScreen (card with push navigation), correctly using context.push() to preserve back navigation.
  • Removes scripts/pr_acceptance_gate.mjs and simplifies configure_branch_protection.mjs to rely on CI checks and required conversation resolution rather than a custom gate script.

Confidence Score: 4/5

Safe to merge with one error-handling fix needed in the data source before beta users start filing reports.

The data source's jsonDecode call on a 2xx response body is not wrapped in a FormatException catch. If the Supabase Edge Function or any upstream proxy returns a non-JSON 200, the cubit receives a generic failure and tells the user to retry — but the report was already saved. Repeated retries produce duplicate entries in the private bug store. The navigation back-button issue that affected previous iterations has been corrected; both entry points now use context.push().

lib/features/beta_feedback/data/data_sources/supabase_beta_feedback_data_source.dart — the FormatException gap on lines 63-68.

Important Files Changed

Filename Overview
lib/features/beta_feedback/data/data_sources/supabase_beta_feedback_data_source.dart New Supabase HTTP data source for beta reports; timeouts are now correctly applied to both headers and body, but a FormatException from jsonDecode on a non-JSON 2xx response propagates uncaught and causes a false failure that can trigger duplicate submissions on retry.
lib/features/beta_feedback/presentation/logic/beta_feedback_cubit.dart Clean BLoC cubit for the beta feedback form; hardcodes currentSurface as 'settings/beta-feedback' regardless of entry point, making diagnostics inaccurate for reports filed from TodayScreen.
lib/features/today/presentation/screens/today_screen.dart Adds beta feedback icon to app bar; correctly uses context.push() to preserve the navigation stack and back button.
lib/core/navigation/presentation/settings_placeholder_screen.dart Adds a beta feedback card to the Settings placeholder; correctly uses context.push() for navigation.
lib/features/beta_feedback/domain/use_cases/submit_beta_feedback_report.dart Use case validates text, consent, attachment count, and file type before delegating to the repository; validation logic is sound.
lib/features/beta_feedback/presentation/screens/beta_feedback_screen.dart Full feedback form UI with attachment preview, diagnostics toggle, and consent checkbox; layout and form validation look correct.
scripts/configure_branch_protection.mjs Simplified branch protection script; removes required PR review approvals intentionally as part of the new Greptile-as-CI workflow.
scripts/demo_proof_manifest.mjs New script that uploads demo proofs to Supabase Storage; the upsertProofRow function uses a plain POST without the idempotency header, so a rerun for the same PR+attempt will conflict on a unique constraint.
lib/core/navigation/router.dart Registers betaFeedbackPath as a top-level GoRoute; navigation callers correctly use context.push() so the back button is preserved.

Reviews (20): Last reviewed commit: "Update beta feedback queued issue flow" | Re-trigger Greptile

Comment thread scripts/pr_acceptance_gate.mjs Outdated
Comment thread scripts/pr_acceptance_gate.mjs Outdated
Comment thread scripts/pr_acceptance_gate.mjs Outdated
Comment thread scripts/pr_acceptance_gate.mjs Outdated
Comment thread scripts/pr_acceptance_gate.mjs Outdated
Comment thread scripts/pr_acceptance_gate.mjs Outdated
Comment thread scripts/pr_acceptance_gate.mjs Outdated
Comment thread scripts/pr_acceptance_gate.mjs Outdated
@Ayobami-00
Copy link
Copy Markdown
Owner Author

@greptileai

Comment thread lib/core/navigation/presentation/settings_placeholder_screen.dart
Comment thread scripts/demo_proof_manifest.mjs Outdated
Comment thread scripts/pr_acceptance_gate.mjs Outdated
Comment thread scripts/pr_acceptance_gate.mjs Outdated
@tag-beta-feedback
Copy link
Copy Markdown

@greptileai review this

Comment thread lib/features/today/presentation/screens/today_screen.dart
Comment thread lib/features/today/presentation/screens/today_screen.dart Outdated
@tag-beta-feedback
Copy link
Copy Markdown

@greptileai review this

@tag-beta-feedback
Copy link
Copy Markdown

@greptileai review this

@Ayobami-00
Copy link
Copy Markdown
Owner Author

@greptileai review this

Comment thread scripts/demo_proof_manifest.mjs
@Ayobami-00 Ayobami-00 changed the title Add internal beta feedback and PR acceptance gate Add internal beta feedback automation May 20, 2026
@Ayobami-00
Copy link
Copy Markdown
Owner Author

@greptileai review this

@Ayobami-00
Copy link
Copy Markdown
Owner Author

@greptileai

Comment on lines +63 to +68
final decoded = jsonDecode(responseBody);
if (decoded is! Map<String, dynamic>) {
throw const BetaFeedbackException(
'The beta feedback service returned an unexpected response.',
);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 FormatException on non-JSON 2xx silently turns a saved report into a failure

jsonDecode(responseBody) throws FormatException when the server returns a 2xx with a non-JSON body (e.g. an HTML error page served by the Supabase CDN when the Edge Function throws, or any proxy in between). That exception is not caught here — only TimeoutException and SocketException are — so it propagates to the cubit's on Object handler, which tells the user "Please try again." The report was already persisted on the server; retrying produces a duplicate entry in the bug database. Catching FormatException separately and throwing a BetaFeedbackException with an explanatory message would prevent this.

@Ayobami-00 Ayobami-00 merged commit 22f267e into main May 20, 2026
1 check passed
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