This plan covers installing GA4 tracking and instrumenting custom events in both bzzr-web (Next.js) and bzzr-flutter. Both apps feed into the same GA4 property per environment via their respective data streams.
These are non-API-related instances of firstWhere (without orElse) and unsafe .first/.last access that could crash if lists are empty or don't contain a matching element. These are lower priority than the API-related ones (which have been fixed) but should still be addressed.
File: apps/bzzr_flutter/lib/features/Home/presentation/screens/hypes/hypes_screen_notifier.dart:137
final activity = state.valueOrNull?.activities.firstWhere(The current VerifyEmail.tsx catch block is generic — it shows a toast and redirects to /signin regardless of the error type or user state. This creates a poor experience in several scenarios.
- User clicks a verification link after already being verified — e.g., they verified via one link but later click an older one from their inbox. Instead of showing a confusing error, the system detects they're already verified and sends them home.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class FizzBuzz | |
| def self.play(array) | |
| array.collect do | num | | |
| self.fizzbuzz(num) || self.buzz(num) || self.fizz(num) || num | |
| end | |
| end | |
| def self.fizz(n) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Player | |
| def play_turn(warrior) | |
| @warrior = warrior | |
| @direction ||= :backward | |
| @health ||= warrior.health | |
| @hurt ||= false | |
| @step ||= true | |
| explore(@direction) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Canoe | |
| class CommitValue < Struct.new(:email, :committed_date); end | |
| def self.weight(commit_values) | |
| sorted_by_email_list = commit_values.group_by(&:email) | |
| scored_by = sorted_by_email_list.each_with_object({}) do |(email, commit), hsh| | |
| hsh[email] = sorted_by_email_list[email].count | |
| hsh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Bill < ActiveRecord::Base | |
| attr_accessible :invoice, :amount, :initiated_by_id, :payer_id, :origin_id, :destination_id ,:accepted, :paid, :auto, :frequency, :payments_left | |
| belongs_to :initiated_by, class_name: 'Member', foreign_key: :initiated_by_id | |
| belongs_to :payer, class_name: 'Member', foreign_key: :payer_id | |
| belongs_to :origin, class_name: 'Account', foreign_key: 'origin_id' | |
| belongs_to :destination, class_name: 'Account', foreign_key: 'destination_id' | |
| validates_numericality_of :amount, greater_than_or_equal_to: 0.01 | |
| validates :amount, :presence => {message: "cannot be blank"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Perpetrator < ActiveRecord::Base | |
| attr_accessible :name | |
| has_many :reports | |
| scope :sort_by_highest_bounty, order("max_bounty DESC") | |
| scope :sort_by_most_reported, order("record_count DESC") | |
| scope :sort_by_most_evidence, order("evidence_count DESC") | |
| scope :filter_by_civ, lambda {|civ| where(["reports.civilization_id = ?", civ])} | |
| scope :sort_by_most_wanted, order(" ( (SUM(CASE when reports.active = 't' THEN reports.bounty ELSE 0 END) - MAX(reports.bounty))*(COUNT(DISTINCT reports.id) + (SUM(COALESCE(evidence_links.evidence_count,0)) * 3 ) ) ) / (MIN(extract(epoch FROM now() - reports.created_at)) / 86400 + 1.3) DESC") |
NewerOlder