Skip to content

[Link in FlowController] Consumes backend linkSettings and removes client flag #10891

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

carlosmuvi-stripe
Copy link
Collaborator

@carlosmuvi-stripe carlosmuvi-stripe commented May 30, 2025

Summary

  • Deletes LinkProminenceFeatureProvider and uses LinkGate to provide the RUX in FlowController enablement.
  • Deletes local feature flag.
  • Consumes backend feature flag.

Motivation

Testing

  • Added tests
  • Modified tests
  • Manually verified

Screenshots

Before After
before screenshot after screenshot

Changelog

@carlosmuvi-stripe carlosmuvi-stripe force-pushed the carlosmuvi/remove-client-flag branch from 2928d2a to 632c077 Compare May 30, 2025 22:39
Copy link
Contributor

github-actions bot commented May 30, 2025

Diffuse output:

OLD: paymentsheet-example-release-master.apk (signature: V1, V2)
NEW: paymentsheet-example-release-pr.apk (signature: V1, V2)

          │            compressed            │           uncompressed            
          ├───────────┬───────────┬──────────┼───────────┬───────────┬───────────
 APK      │ old       │ new       │ diff     │ old       │ new       │ diff      
──────────┼───────────┼───────────┼──────────┼───────────┼───────────┼───────────
      dex │   4.3 MiB │   4.4 MiB │ +7.1 KiB │   9.6 MiB │   9.6 MiB │ +19.6 KiB 
     arsc │   2.5 MiB │   2.5 MiB │      0 B │   2.5 MiB │   2.5 MiB │       0 B 
 manifest │   5.6 KiB │   5.6 KiB │      0 B │  28.7 KiB │  28.7 KiB │       0 B 
      res │ 912.3 KiB │ 912.3 KiB │      0 B │   1.4 MiB │   1.4 MiB │       0 B 
   native │   3.5 MiB │   3.5 MiB │      0 B │   8.5 MiB │   8.5 MiB │       0 B 
    asset │   1.6 MiB │   1.6 MiB │   +158 B │   1.6 MiB │   1.6 MiB │    +158 B 
    other │ 197.2 KiB │ 197.2 KiB │    +11 B │ 372.4 KiB │ 372.4 KiB │       0 B 
──────────┼───────────┼───────────┼──────────┼───────────┼───────────┼───────────
    total │    13 MiB │    13 MiB │ +7.3 KiB │    24 MiB │    24 MiB │ +19.8 KiB 

         │         raw          │               unique                
         ├───────┬───────┬──────┼───────┬───────┬─────────────────────
 DEX     │ old   │ new   │ diff │ old   │ new   │ diff                
─────────┼───────┼───────┼──────┼───────┼───────┼─────────────────────
   files │     2 │     2 │    0 │       │       │                     
 strings │ 46427 │ 46894 │ +467 │ 45723 │ 45692 │ -31 (+2912 -2943)   
   types │ 16331 │ 16642 │ +311 │ 16042 │ 16040 │  -2 (+2906 -2908)   
 classes │ 13547 │ 13545 │   -2 │ 13547 │ 13545 │  -2 (+2274 -2276)   
 methods │ 66682 │ 66997 │ +315 │ 66214 │ 66213 │  -1 (+20074 -20075) 
  fields │ 44315 │ 44472 │ +157 │ 44172 │ 44168 │  -4 (+15020 -15024) 

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  242 │  242 │  0   
 entries │ 6310 │ 6310 │  0
APK
      compressed      │     uncompressed      │                                           
──────────┬───────────┼───────────┬───────────┤                                           
 size     │ diff      │ size      │ diff      │ path                                      
──────────┼───────────┼───────────┼───────────┼───────────────────────────────────────────
 76.1 KiB │ +26.6 KiB │ 166.8 KiB │ +50.4 KiB │ ∆ classes2.dex                            
  4.3 MiB │ -19.5 KiB │   9.4 MiB │ -30.7 KiB │ ∆ classes.dex                             
  8.4 KiB │    +162 B │   8.3 KiB │    +162 B │ ∆ assets/dexopt/baseline.prof             
    127 B │    +127 B │       5 B │      +5 B │ + META-INF/services/ca.x                  
    127 B │    +127 B │       5 B │      +5 B │ + META-INF/services/da.a                  
          │    -127 B │           │      -5 B │ - META-INF/services/da.x                  
          │    -127 B │           │      -5 B │ - META-INF/services/ea.a                  
 54.5 KiB │     +11 B │ 120.9 KiB │       0 B │ ∆ META-INF/CERT.SF                        
    1 KiB │      -4 B │     934 B │      -4 B │ ∆ assets/dexopt/baseline.profm            
    272 B │      +2 B │     120 B │       0 B │ ∆ META-INF/version-control-info.textproto 
   51 KiB │      -2 B │ 120.9 KiB │       0 B │ ∆ META-INF/MANIFEST.MF                    
──────────┼───────────┼───────────┼───────────┼───────────────────────────────────────────
  4.5 MiB │  +7.3 KiB │   9.9 MiB │ +19.8 KiB │ (total)
DEX
STRINGS:

   old   │ new   │ diff              
  ───────┼───────┼───────────────────
   45723 │ 45692 │ -31 (+2912 -2943) 
  
  + , disableLinkRuxInFlowController=
  + , disableRuxInFlowController=
  + LA7/j;
  + LA7/k;
  + LA7/l;
  + LA7/m;
  + LA7/n;
  + LA7/o;
  + LA7/p;
  + LA7/q;
  + LA7/r;
  + LA8/g;
  + LA9/w;
  + LB5/X;
  + LC9/A;
  + LC9/B;
  + LC9/C;
  + LC9/D;
  + LC9/E;
  + LC9/F;
  + LC9/G;
  + LC9/H;
  + LC9/I;
  + LC9/J;
  + LC9/K;
  + LC9/L;
  + LC9/M;
  + LC9/N;
  + LC9/O;
  + LC9/P;
  + LC9/Q;
  + LC9/S;
  + LC9/T;
  + LC9/U;
  + LC9/V;
  + LC9/W;
  + LC9/X;
  + LC9/Y;
  + LC9/Z;
  + LC9/a0;
  + LC9/a;
  + LC9/b0;
  + LC9/b;
  + LC9/c0;
  + LC9/c;
  + LC9/d0;
  + LC9/d;
  + LC9/e0;
  + LC9/e;
  + LC9/f0;
  + LC9/f;
  + LC9/g0;
  + LC9/g;
  + LC9/h0;
  + LC9/h;
  + LC9/i0;
  + LC9/i;
  + LC9/j0;
  + LC9/j;
  + LC9/k0;
  + LC9/k;
  + LC9/l0;
  + LC9/l;
  + LC9/m0;
  + LC9/m;
  + LC9/n0;
  + LC9/n;
  + LC9/o0;
  + LC9/o;
  + LC9/p0;
  + LC9/p;
  + LC9/q0;
  + LC9/q;
  + LC9/r0;
  + LC9/r;
  + LC9/s0;
  + LC9/s;
  + LC9/t0;
  + LC9/t;
  + LC9/u0;
  + LC9/u;
  + LC9/v0;
  + LC9/v;
  + LC9/w0;
  + LC9/w;
  + LC9/x0;
  + LC9/x;
  + LC9/y0;
  + LC9/y;
  + LC9/z0;
  + LC9/z;
  + LD7/g;
  + LD7/h;
  + LD7/i;
  + LD7/j;
  + LD7/k;
  + LD7/l;
  + LD7/m;
  + LD7/n;
  + LD7/o;
  + LD7/p;
  + LD7/q;
  + LD7/r;
  + LD8/a;
  + LD8/b;
  + LD8/c;
  + LD8/d;
  + LD8/e;
  + LD8/f;
  + LD8/g;
  + LD8/h;
  + LD8/i;
  + LD8/j;
  + LD8/k;
  + LD8/l;
  + LD8/m;
  + LD8/n;
  + LD8/o;
  + LD8/p;
  + LD8/q;
  + LD8/r;
  + LD8/s;
  + LD8/t;
  + LD8/u;
  + LD8/v;
  + LD8/w;
  + LD8/x;
  + LE7/s;
  + LE7/t;
  + LE7/u;
  + LE7/v;
  + LF9/b;
  + LF9/c;
  + LF9/d;
  + LF9/e;
  + LF9/f;
  + LF9/g;
  + LF9/h;
  + LF9/i;
  + LG8/h;
  + LH6/b;
  + LH6/c;
  + LH6/d;
  + LH6/e;
  + LH7/A;
  + LH7/B;
  + LH7/C;
  + LH7/D;
  + LH7/c;
  + LH7/d;
  + LH7/e;
  + LH7/f;
  + LH7/g;
  + LH7/h;
  + LH7/i;
  + LH7/j;
  + LH7/k;
  + LH7/l;
  + LH7/m;
  + LH7/n;
  + LH7/o;
  + LH7/p;
  + LH7/q;
  + LH7/r;
  + LH7/s;
  + LH7/t;
  + LH7/u;
  + LH7/v;
  + LH7/w;
  + LH7/x;
  + LH7/y;
  + LH7/z;
  + LH9/b;
  + LH9/c;
  + LH9/d;
  + LI7/A0;
  + LI7/A1;
  + LI7/B0;
  + LI7/B1;
  + LI7/C0;
  + LI7/C1;
  + LI7/D0;
  + LI7/D1;
  + LI7/E0;
  + LI7/E1;
  + LI7/F0;
  + LI7/F1;
  + LI7/F;
  + LI7/G0;
  + LI7/G1;
  + LI7/G;
  + LI7/H0;
  + LI7/H1;
  + LI7/H;
  + LI7/I0;
  + LI7/I1;
  + LI7/I;
  + LI7/J0;
  + LI7/J1;
  + LI7/J;
  + LI7/K0;
  + LI7/K1;
  + LI7/K;
  + LI7/L0;
  + LI7/L1;
  + LI7/L;
  + LI7/M0;
  + LI7/M1;
  + LI7/M;
  + LI7/N0;
  + LI7/N1;
  + LI7/N;
  + LI7/O0;
  + LI7/O1;
  + LI7/O;
  + LI7/P0;
  + LI7/P1;
  + LI7/P;
  + LI7/Q0;
  + LI7/Q1;
  + LI7/Q;
  + LI7/R0;
  + LI7/R1;
  + LI7/S0;
  + LI7/S1;
  + LI7/S;
  + LI7/T0;
  + LI7/T1;
  + LI7/T;
  + LI7/U0;
  + LI7/U1;
  + LI7/U;
  + LI7/V0;
  + LI7/V1;
  + LI7/V;
  + LI7/W0;
  + LI7/W1;
  + LI7/W;
  + LI7/X0;
  + LI7/X1;
  + LI7/X;
  + LI7/Y0;
  + LI7/Y1;
  + LI7/Y;
  + LI7/Z0;
  + LI7/Z1;
  + LI7/Z;
  + LI7/a0;
  + LI7/a1;
  + LI7/a2;
  + LI7/b0;
  + LI7/b1;
  + LI7/b2;
  + LI7/c0;
  + LI7/c1;
  + LI7/c2;
  + LI7/d0;
  + LI7/d1;
  + LI7/d2;
  + LI7/e0;
  + LI7/e1;
  + LI7/e2;
  + LI7/f0;
  + LI7/f1;
  + LI7/f2;
  + LI7/g0;
  + LI7/g1;
  + LI7/g2;
  + LI7/h0;
  + LI7/h1;
  + LI7/h2;
  + LI7/i0;
  + LI7/i1;
  + LI7/i2;
  + LI7/j0;
  + LI7/j1;
  + LI7/j2;
  + LI7/k0;
  + LI7/k1;
  + LI7/k2;
  + LI7/l0;
  + LI7/l1;
  + LI7/l2;
  + LI7/m0;
  + LI7/m1;
  + LI7/m2;
  + LI7/n0;
  + LI7/n1;
  + LI7/n2;
  + LI7/o0;
  + LI7/o1;
  + LI7/o2;
  + LI7/p0;
  + LI7/p1;
  + LI7/p2;
  + LI7/q0;
  + LI7/q1;
  + LI7/r0;
  + LI7/r1;
  + LI7/s0;
  + LI7/s1;
  + LI7/t0;
  + LI7/t1;
  + LI7/u0;
  + LI7/u1;
  + LI7/v0;
  + LI7/v1;
  + LI7/w0;
  + LI7/w1;
  + LI7/x0;
  + LI7/x1;
  + LI7/y0;
  + LI7/y1;
  + LI7/z0;
  + LI7/z1;
  + LI8/A;
  + LI8/B;
  + LI8/C;
  + LI8/D;
  + LI8/E;
  + LI8/F;
  + LI8/G;
  + LI8/H;
  + LI8/I;
  + LI8/J;
  + LI8/K;
  + LI8/L;
  + LI8/M;
  + LI8/N;
  + LI8/O;
  + LI8/P;
  + LI8/Q;
  + LI8/S;
  + LI8/T;
  + LI8/U;
  + LI8/V;
  + LI8/W;
  + LI8/X;
  + LI8/Y;
  + LI8/Z;
  + LI8/a0;
  + LI8/b0;
  + LI8/b;
  + LI8/c0;
  + LI8/c;
  + LI8/d;
  + LI8/e;
  + LI8/f;
  + LI8/g;
  + LI8/h;
  + LI8/i;
  + LI8/j;
  + LI8/k;
  + LI8/l;
  + LI8/m;
  + LI8/n;
  + LI8/o;
  + LI8/p;
  + LI8/q;
  + LI8/r;
  + LI8/s;
  + LI8/t;
  + LI8/u;
  + LI8/v;
  + LI8/w;
  + LI8/x;
  + LI8/y;
  + LI8/z;
  + LI9/e;
  + LI9/f;
  + LI9/g;
  + LI9/h;
  + LI9/i;
  + LI9/j;
  + LI9/k;
  + LI9/l;
  + LJ6/d;
  + LJ6/e;
  + LJ6/f;
  + L
...✂

@carlosmuvi-stripe carlosmuvi-stripe force-pushed the carlosmuvi/remove-client-flag branch from 4873545 to ef1f31a Compare May 30, 2025 23:07
Comment on lines +5 to +9
/**
* Provider interface for Link feature settings and behaviors, handling
* the logic for determining when to show special Link UI elements or trigger automatic
* behaviors to enhance the Link payment experience.
*/
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Initially missed this class and then created LinkProminenceFeatureProvider. Deleted the latter and added docs to LinkGate so this doesn't happen to others in the future.

@carlosmuvi-stripe carlosmuvi-stripe marked this pull request as ready for review May 30, 2025 23:10
@carlosmuvi-stripe carlosmuvi-stripe requested review from a team as code owners May 30, 2025 23:10
@carlosmuvi-stripe carlosmuvi-stripe enabled auto-merge (squash) June 4, 2025 19:52
Comment on lines +299 to +319
@Test
fun `showRuxInFlowController - true when useNativeLink is true and backend flag is false`() {
val gate = gate(
isLiveMode = true,
useAttestationEndpoints = true,
disableRuxInFlowController = false
)

assertThat(gate.showRuxInFlowController).isTrue()
}

@Test
fun `showRuxInFlowController - false when livemode and useNativeLink and but backend flag is true`() {
val gate = gate(
isLiveMode = true,
useAttestationEndpoints = true,
disableRuxInFlowController = true
)

assertThat(gate.showRuxInFlowController).isFalse()
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

These are identical to the first two, no?

}

@Test
fun `showRuxInFlowController - returns false when useNativeLink is true but backend flag is true`() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
fun `showRuxInFlowController - returns false when useNativeLink is true but backend flag is true`() {
fun `showRuxInFlowController - returns false when useNativeLink is true but disableRuxInFlowController is true`() {

}

@Test
fun `showRuxInFlowController - false when useNativeLink is false regardless of backend flag`() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
fun `showRuxInFlowController - false when useNativeLink is false regardless of backend flag`() {
fun `showRuxInFlowController - false when useNativeLink is false regardless of disableRuxInFlowController`() {

@carlosmuvi-stripe carlosmuvi-stripe changed the title [Link in FlowController] Consumes backend linkSettings and removes client flag POC - Inline 2FA Jun 4, 2025
@carlosmuvi-stripe carlosmuvi-stripe changed the title POC - Inline 2FA [Link in FlowController] Consumes backend linkSettings and removes client flag Jun 4, 2025
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.

2 participants