Skip to content

Instantly share code, notes, and snippets.

View SudoPlz's full-sized avatar
💥
shipit

Ioannis Kokkinidis SudoPlz

💥
shipit
View GitHub Profile
@SudoPlz
SudoPlz / commitment.txt
Created October 4, 2026 12:26
Ethos public-audit preregistration A2
Ethos public-audit preregistration A2 — 2026-10-04
No real-data outcome analysis or full selection grid has run. Published results, synthetic tests, timing benchmarks and covariance calibration results were known at publication. Covariance calibration started before Addendum 2 and passed its prespecified gates; its calibration code is unchanged. Addendum 2 changes the separate selection model. This audit is computational reproduction plus sensitivity analysis; missing provenance remains ambiguous.
SHA-256 digests:
b35ebbcb4b8a29e854b4cd3ee08e0f47109195b744e5d7a2845f6770cc1015bd PREREGISTRATION.md
74015e4376c1f0537630af581d642d36a78f044a286ff0c4b39d9e1c52905a60 PREREGISTRATION_CLARIFICATION_01.md
8eee1b71e661827aadc9efac22c0e8764a6df87e6947dcdfc934c275d9abe4fd PREREGISTRATION_ADDENDUM_1.md
0a3d84414166c67cbe6e1946d71b224f90886c5c968ebcef5606df526d23f95c PREREGISTRATION_ADDENDUM_2.md
9bf9167040adb949c46de1dd3f7896714933d75a8f310d3f3c4721d2c31f469f ANALYSIS_CODE.sha256

Network events

Category Subcategory Event Description & Trigger Implementation File Example Payload Confirmed
❗ Network events network_usage app_network_usage Snapshot of how many bytes we sent/received when the NetStats poller runs. modules/network/NetStats.android.tsx
View
{
  "event": "app_network_usage",
  "total_receive_bytes": 312345678,
  "total_send_bytes": 182345123
}
❌

Gestures

Category Subcategory Event Description & Trigger Implementation File Example Payload Confirmed

Full Table With AppComponentFactory Mapping

Category Entry Point What Happens AppComponentFactory Method
Activities Normal launcher activity User taps app icon instantiateActivity
Deep link URL launches your Activity instantiateActivity
App shortcut Long-press → quick action → Activity instantiateActivity
Share sheet target Share to Discord → ShareActivity instantiateActivity
Notification tap Tapping a push notification instantiateActivity
Task restore OS recreates Activity after kill instantiateActivity
API 25 Pixel 1
Scenario 1: COLD START
TTI: 1232ms
Type: COLD
Main Application to Activity time: 50ms
Scenario 2: App backgrounded, Activity killed, application on
@SudoPlz
SudoPlz / android_scenarios.md
Last active May 6, 2026 23:04
tti calculation scenarios

ANDROID TTI Launch Scenarios

Implementation Note

appOpenedTime always uses mainActivityStartTime: The difference between appStartedTimestamp (process creation) and mainActivityStartTime (MainActivity creation) is negligible (20-40ms). Using mainActivityStartTime consistently simplifies the code and fixes edge cases where the conditional logic couldn't distinguish between different launch scenarios (9c, 9f).


Scenarios Analysis

Reduced Motion + React-Freeze Bug Analysis

Problem Summary

Issue: Gray screen appears on Android when users enable "Reduce Motion" accessibility setting and quickly swipe between channels.

Root Cause: Animation updates (translateX) arrive while components are frozen/unregistered, causing updates to be lost and components to render with stale values.

Context: I've been working on this issue and there are currently three different solutions in play. I want to present the situation to the team and get alignment on the best approach.

React Freeze Performance Analysis Report

Executive Summary

This comprehensive performance analysis compares react-freeze against custom freeze implementations and a no-optimization baseline. The results demonstrate that react-freeze provides superior performance across all metrics, with 8x faster frozen rendering and 3.6x fewer total renders compared to no optimization.

Test Methodology

package com.imagepicker;
import android.app.Activity;
import android.content.ActivityNotFoundException;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.provider.MediaStore;
import androidx.activity.result.ActivityResultLauncher;
@SudoPlz
SudoPlz / Readme.md
Last active November 27, 2025 11:30
React Native Reanimated Microtask Bug

Reanimated Animations Stalling?

How Szymon and I traced it to an Infinite Loop & Fixed It

tl;dr – A tiny helper (infiniteThenable) inside react-freeze made React’s Fabric scheduler loop forever, so the JS → UI microtask bridge never got a chance to flush. We patched the scheduler to flush manually and replaced the culprit with React 19’s Offscreen – animations are smooth again.


1. The Symptoms

  • Animations powered by Reanimated randomly froze.
/**
* @param string $parentAccountName - the account id you want to fetch locations for (i.e. accounts/105837778216009211413)
* @param array|string|null $readMask - the fields you want to include in the response, available fields here https://developers.google.com/my-business/reference/businessinformation/rest/v1/locations#resource:-location
* @return array
* @throws Exception
*/
public function getAllLocationsForAccount(string $parentAccountName, array|string|null $readMask = "name,title,storecode,labels"): array
{
$businessInformationService = new MyBusinessBusinessInformation($this->client);
try {