<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: MinSoo Kim</title>
    <description>The latest articles on DEV Community by MinSoo Kim (@danorie).</description>
    <link>https://dev.to/danorie</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4116712%2F925d8dc1-fd2b-4774-b495-dcbef4eb87e5.png</url>
      <title>DEV Community: MinSoo Kim</title>
      <link>https://dev.to/danorie</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/danorie"/>
    <language>en</language>
    <item>
      <title>An unfolded Galaxy Fold pushed my camera button off the screen. The fix was one function</title>
      <dc:creator>MinSoo Kim</dc:creator>
      <pubDate>Thu, 26 Nov 2026 12:03:30 +0000</pubDate>
      <link>https://dev.to/danorie/an-unfolded-galaxy-fold-pushed-my-camera-button-off-the-screen-the-fix-was-one-function-npd</link>
      <guid>https://dev.to/danorie/an-unfolded-galaxy-fold-pushed-my-camera-button-off-the-screen-the-fix-was-one-function-npd</guid>
      <description>&lt;p&gt;I opened a camera screen I'd built on an unfolded Galaxy Z Fold5. The take-photo button wasn't there.&lt;/p&gt;

&lt;p&gt;Neither was the "Photo 1 of 3" line above it. The preview had filled the screen and pushed both of them off the bottom.&lt;/p&gt;

&lt;p&gt;The screen is simple. A title, a line of instructions, a 3:4 front-camera preview with two guide boxes drawn on top, then the counter and the button. On the Fold, with the inner screen open, it didn't fit.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I got wrong
&lt;/h2&gt;

&lt;p&gt;A screenshot showed the button was gone but gave me no numbers, so I pulled the view tree with &lt;code&gt;uiautomator dump&lt;/code&gt;. The camera's &lt;code&gt;SurfaceView&lt;/code&gt; ran from y=412 to y=2176, and there was no node for the button at all.&lt;/p&gt;

&lt;p&gt;The mistake was mine. I wanted the preview to match a 3:4 photo, so I'd set its wrapper to &lt;code&gt;{ width: '100%', aspectRatio: 3 / 4 }&lt;/code&gt;. Width first, height follows. On the Fold that wrapper was 1686 pixels wide, so it asked for about 2248 pixels of height, which is more than the screen had left after the title and instructions. The &lt;code&gt;SurfaceView&lt;/code&gt; bottom at 2176 was just where the screen ended.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix
&lt;/h2&gt;

&lt;p&gt;A 3:4 box has two ways to be too big: too wide for the space, or too tall. Sizing it from the width only covers the first. On a narrow phone the width runs out first, and that case is fine. On an unfolded Fold the screen is wide and the height runs out first.&lt;/p&gt;

&lt;p&gt;So the box needs the space it actually has, and then the largest 3:4 rectangle that fits inside it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;fitAspect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;h&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ratio&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;number&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;w&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="n"&gt;h&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;width&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;h&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;ratio&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;width&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;width&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;ratio&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;h * ratio&lt;/code&gt; is how wide the box could be if it used the full height. Whichever is smaller, that or the real width, wins.&lt;/p&gt;

&lt;p&gt;The space comes from &lt;code&gt;onLayout&lt;/code&gt; on a wrapper that takes whatever is left after the text and the button:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;area&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;setArea&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;View&lt;/span&gt; &lt;span class="n"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;camArea&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="n"&gt;onLayout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;setArea&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;nativeEvent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;layout&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;View&lt;/span&gt; &lt;span class="n"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;camWrap&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;fitAspect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;area&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;width&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;area&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;height&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;CameraView&lt;/span&gt; &lt;span class="n"&gt;ref&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;cam&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="n"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nc"&gt;StyleSheet&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;absoluteFill&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="n"&gt;facing&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"front"&lt;/span&gt; &lt;span class="n"&gt;animateShutter&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Guide&lt;/span&gt; &lt;span class="n"&gt;box&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="no"&gt;SKIN_BOX&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Guide&lt;/span&gt; &lt;span class="n"&gt;box&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="no"&gt;PAPER_BOX&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;View&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;View&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="n"&gt;camArea&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;marginTop&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;alignItems&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'center'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;justifyContent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'center'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;camWrap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;borderRadius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;overflow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'hidden'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;backgroundColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'#000'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;camArea&lt;/code&gt; gets &lt;code&gt;flex: 1&lt;/code&gt;, so it's the part that shrinks. The preview inside it never asks for more than that. The guide boxes are positioned as fractions of the preview, so they keep their place in the frame at any size.&lt;/p&gt;

&lt;p&gt;Before the first layout pass the area is 0 by 0, and the function returns 0 by 0 instead of a box with a made-up size.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checking it
&lt;/h2&gt;

&lt;p&gt;Three unit tests: a narrow phone where width runs out (342 by 520 gives 342 by 456), a wide area where height runs out (the box stays inside the height and keeps 3:4), and the 0 case. The rest of the suite still passed, 23 tests in all.&lt;/p&gt;

&lt;p&gt;Then the same Fold, unfolded. The preview came out at 930 by 1241 pixels, and the button, the counter and the instructions were all on screen. That run was layout only.&lt;/p&gt;

&lt;p&gt;Later that day I took the three photos on the fixed build, and the result screen came up normally. I didn't note whether the phone was open for those.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;Size an aspect-ratio box from the space it's given, not from the width alone.&lt;/p&gt;

&lt;p&gt;My camera screen hasn't been on a narrow phone yet.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This post was drafted with AI help. The numbers and facts come from my own logs and repo.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>reactnative</category>
      <category>android</category>
      <category>expo</category>
      <category>mobile</category>
    </item>
    <item>
      <title>My app locked its parent area every time someone tapped Print</title>
      <dc:creator>MinSoo Kim</dc:creator>
      <pubDate>Wed, 25 Nov 2026 12:03:35 +0000</pubDate>
      <link>https://dev.to/danorie/my-app-locked-its-parent-area-every-time-someone-tapped-print-4gp5</link>
      <guid>https://dev.to/danorie/my-app-locked-its-parent-area-every-time-someone-tapped-print-4gp5</guid>
      <description>&lt;p&gt;I build a small chore app for families. Kids use the board. Grown-ups have a settings area behind a PIN.&lt;/p&gt;

&lt;p&gt;Before shipping an update, I ran a regression pass on the live Android build in an emulator. One step was: open the grown-up area, press Home, open the app again.&lt;/p&gt;

&lt;p&gt;The grown-up area was still open. No PIN.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it stayed open
&lt;/h2&gt;

&lt;p&gt;The app already listened to &lt;code&gt;AppState&lt;/code&gt;. It used the event to sync purchases with the store, and nothing else. The PIN was asked on the way in, and passing it opened a five-minute window. Leaving the app closed neither the grown-up area nor that window.&lt;/p&gt;

&lt;p&gt;The obvious fix is to lock on &lt;code&gt;background&lt;/code&gt;. That breaks the app's own features, though. The purchase sheet, restore, print, share, the backup file picker and the About links all leave the app for a moment, and a parent who taps Print in settings shouldn't come back to a PIN pad.&lt;/p&gt;

&lt;h2&gt;
  
  
  The first fix
&lt;/h2&gt;

&lt;p&gt;Every flow the app opens itself now goes through a wrapper that raises a flag while it's open. On &lt;code&gt;background&lt;/code&gt;, the app locks unless that flag is up. On return, it locks anyway if it was gone more than five minutes, for the case where someone opens the purchase sheet and hands the phone to a child.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="no"&gt;AWAY_LOCK_MS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;60_000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;lockOnLeave&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;expectingExternal&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;boolean&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;boolean&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;expectingExternal&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;lockOnReturn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;expectingExternal&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;boolean&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;awayMs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;number&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;boolean&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;expectingExternal&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="n"&gt;awayMs&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="no"&gt;AWAY_LOCK_MS&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;externalDepth&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// counted, so overlapping flows don't clear each other&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;viaExternal&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="no"&gt;T&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;open&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="no"&gt;T&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="no"&gt;T&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;externalDepth&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;finally&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;externalDepth&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;externalDepth&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Only &lt;code&gt;background&lt;/code&gt; is watched. On iOS the purchase sheet and Control Center send &lt;code&gt;inactive&lt;/code&gt;, so they never lock. Unit tests covered the four cells (flag on or off, inside or past five minutes) and the flag itself. All green.&lt;/p&gt;

&lt;h2&gt;
  
  
  Print still locked it
&lt;/h2&gt;

&lt;p&gt;A code review of that branch found the hole a few hours later. On Android, &lt;code&gt;expo-print&lt;/code&gt;'s &lt;code&gt;printAsync&lt;/code&gt; resolves as soon as the job is handed to the system print dialog. That happens before the app is paused.&lt;/p&gt;

&lt;p&gt;So the order was:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;printAsync&lt;/code&gt; resolves, and the wrapper lowers the flag.&lt;/li&gt;
&lt;li&gt;The print dialog comes up, and the app goes to &lt;code&gt;background&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The flag is already down, so the app locks.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Links behave the same way, since &lt;code&gt;Linking.openURL&lt;/code&gt; returns once the browser is launched.&lt;/p&gt;

&lt;p&gt;The fix is a hold. Print and links keep the flag up for three more seconds after they resolve:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="no"&gt;EARLY_RESOLVE_HOLD_MS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;3000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;viaExternal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nc"&gt;Print&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;printAsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;html&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;holdMs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;EARLY_RESOLVE_HOLD_MS&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The in-app review sheet got wrapped too. On Android it's a separate activity, so it sends &lt;code&gt;background&lt;/code&gt; as well.&lt;/p&gt;

&lt;p&gt;The next emulator run passed all five checks: back from inside screens, the purchase sheet, back from the grown-up area, Home and reopen (locked), and print and return (not locked).&lt;/p&gt;

&lt;h2&gt;
  
  
  What's still open
&lt;/h2&gt;

&lt;p&gt;If &lt;code&gt;background&lt;/code&gt; ever arrives later than that after a link opens, the app locks on the way back. That's the safe side, so I left it.&lt;/p&gt;

&lt;p&gt;The review flagged two more. iOS can take the app switcher snapshot before the lock runs, so a grown-up screen could show in the switcher. A later commit in the same release draws a plain cover over grown-up screens on &lt;code&gt;inactive&lt;/code&gt; and &lt;code&gt;background&lt;/code&gt;, outside the app's own flows. That commit also dropped the five-minute PIN window, so the PIN is asked on every entry now.&lt;/p&gt;

&lt;p&gt;The other one I left: if someone presses Home while a purchase is still pending, the five-minute limit is what eventually locks it.&lt;/p&gt;

&lt;p&gt;The runs above were in an emulator.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;A lifecycle event says the app left. It doesn't say why. Any grace you add has to carry the reason in from somewhere else, and a promise that resolves early takes that reason with it.&lt;/p&gt;

&lt;p&gt;If you've built a lock like this, how did you let your own flows through: a time window after leaving, or a flag set by the code that opened the flow?&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This post was drafted with AI help. The numbers and facts come from my own logs and repo.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>android</category>
      <category>reactnative</category>
      <category>mobile</category>
      <category>discuss</category>
    </item>
    <item>
      <title>How to hide Cash on Delivery by country or product on Shopify</title>
      <dc:creator>MinSoo Kim</dc:creator>
      <pubDate>Tue, 24 Nov 2026 12:03:27 +0000</pubDate>
      <link>https://dev.to/danorie/how-to-hide-cash-on-delivery-by-country-or-product-on-shopify-l78</link>
      <guid>https://dev.to/danorie/how-to-hide-cash-on-delivery-by-country-or-product-on-shopify-l78</guid>
      <description>&lt;p&gt;A Shopify store that can only collect cash in one or two countries can still turn on Cash on Delivery.&lt;/p&gt;

&lt;p&gt;It's a manual payment method, and a customer in any other country can pick it at checkout too. The settings for a manual payment method have a name and instructions for the customer. They don't have a country list or a product list, and Shopify's help page on manual payments doesn't describe a way to limit one to certain countries or products.&lt;/p&gt;

&lt;p&gt;I've written before about hiding payment methods with a function and a rules engine. This post starts a step earlier, with what the settings alone can do.&lt;/p&gt;

&lt;h2&gt;
  
  
  What works without code
&lt;/h2&gt;

&lt;p&gt;Two things, and neither of them hides anything.&lt;/p&gt;

&lt;p&gt;The first is the name. Under Settings → Payments → Manual payment methods, a custom manual payment method has a &lt;strong&gt;Custom payment method name&lt;/strong&gt; field, so it can be called something like "Cash on Delivery (UAE only)". Every customer still sees it. They just see the limit too.&lt;/p&gt;

&lt;p&gt;The second is a line of theme text on the product page or the cart that says where cash on delivery is available. That's copy, not a setting. Checkout doesn't read it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What doesn't work
&lt;/h2&gt;

&lt;p&gt;Shipping zones. A zone under Settings → Shipping and delivery sets rates for a group of countries, and Shopify's help docs don't show any field there that ties a payment method to a zone. A separate zone for the cash-on-delivery countries doesn't change which payment methods show up.&lt;/p&gt;

&lt;p&gt;To hide a payment method, Shopify's checkout customization docs point one way: "install a payment customization app from the Shopify App Store." If you'd rather write it yourself, the same thing is available to developers as a payment customization function, which Shopify's docs say can "rename, reorder, hide the payment methods available to customers during checkout."&lt;/p&gt;

&lt;h2&gt;
  
  
  The function
&lt;/h2&gt;

&lt;p&gt;The function gets an input you define with a GraphQL query and returns a list of operations. This query asks for the payment methods, the delivery country, and whether any product in the cart has a &lt;code&gt;no-cod&lt;/code&gt; tag:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight graphql"&gt;&lt;code&gt;&lt;span class="n"&gt;query&lt;/span&gt; &lt;span class="nc"&gt;RunInput&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;paymentMethods&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="n"&gt;cart&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;deliveryGroups&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;deliveryAddress&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;countryCode&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="n"&gt;lines&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;merchandise&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;__typename&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="n"&gt;on&lt;/span&gt; &lt;span class="nc"&gt;ProductVariant&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;product&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nf"&gt;hasAnyTag&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tags&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"no-cod"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It hides cash on delivery when the address is outside the countries you list, or when any line has the tag:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nc"&gt;RunInput&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;CartPaymentMethodsTransformRunResult&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s2"&gt;"../generated/api"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="no"&gt;COD_COUNTRIES&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"AE"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"SA"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// where you can collect cash&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;RunInput&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;CartPaymentMethodsTransformRunResult&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;cod&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;paymentMethods&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toLowerCase&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;includes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"cash on delivery"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;cod&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;operations&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;outsideCodArea&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cart&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;deliveryGroups&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;deliveryAddress&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;countryCode&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;some&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="no"&gt;COD_COUNTRIES&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;includes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;hasNoCodProduct&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cart&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;lines&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;some&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;l&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;l&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;merchandise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;__typename&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s2"&gt;"ProductVariant"&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;l&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;merchandise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;product&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;hasAnyTag&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;outsideCodArea&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="n"&gt;hasNoCodProduct&lt;/span&gt;
    &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;operations&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;paymentMethodHide&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;paymentMethodId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;cod&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;operations&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The query was checked against the 2026-04 API schema, and the function compiles under &lt;code&gt;tsc --strict&lt;/code&gt; with types generated from it. It hasn't been built with Shopify CLI or run in a store.&lt;/p&gt;

&lt;p&gt;A few things worth knowing before it goes live:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The target is &lt;code&gt;cart.payment-methods.transform.run&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;It finds the method by name. "Cash on Delivery (UAE only)" still matches. Rename it to "COD" and it doesn't, so the name and the code change together.&lt;/li&gt;
&lt;li&gt;Before the customer enters an address there's no country code, so nothing is hidden yet.&lt;/li&gt;
&lt;li&gt;A store can have at most 25 payment customization functions active.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I'd keep the theme line even after the function is live. Until the address is in, the country check has nothing to go on, so cash on delivery still shows to anyone whose cart has no tagged product.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;The manual payment settings decide whether cash on delivery exists. They don't decide who sees it.&lt;/p&gt;

&lt;p&gt;If your store offers cash on delivery, could you try one checkout with an address outside the countries where you collect cash and tell me whether it still shows? I haven't run this function in a store yet.&lt;/p&gt;

&lt;p&gt;I build HideKit, which does this without code. HideKit is on the &lt;a href="https://apps.shopify.com/hidekit?utm_source=devto&amp;amp;utm_content=22" rel="noopener noreferrer"&gt;Shopify App Store&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This post was drafted with AI help. The facts come from Shopify's docs, my own logs and repo.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>shopify</category>
      <category>ecommerce</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Shopify stops loading script tags on March 1, 2027. How to check your store this week</title>
      <dc:creator>MinSoo Kim</dc:creator>
      <pubDate>Thu, 19 Nov 2026 12:03:15 +0000</pubDate>
      <link>https://dev.to/danorie/shopify-stops-loading-script-tags-on-march-1-2027-how-to-check-your-store-this-week-277</link>
      <guid>https://dev.to/danorie/shopify-stops-loading-script-tags-on-march-1-2027-how-to-check-your-store-this-week-277</guid>
      <description>&lt;p&gt;A Shopify store owner may get no warning before March 1, 2027, the day Shopify stops loading script tags on storefronts. A script tag is the older way an app puts its JavaScript on a store's pages, and anything that still arrives that way on that date stops running. Since October 1, 2026, apps haven't been able to create or update one on any API version, though existing tags keep running and apps can still read and delete them. Script tags on the order status page were on an earlier schedule and have already stopped.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the full list lives
&lt;/h2&gt;

&lt;p&gt;I ran into the first problem in early November while working on a checker for this deadline. The API query for script tags returns only the tags of the app that's asking, so no one call shows every app's script tags on a store. The page customers load is the one place that shows all of them.&lt;/p&gt;

&lt;p&gt;So I read the homepage source of one large public Shopify store, once, after checking its robots.txt. Its script tags sat in a function called &lt;code&gt;asyncLoad&lt;/code&gt;, as a list of 7 URLs. Two of them began with &lt;code&gt;//cdn.shopify.com/proxy/&lt;/code&gt; and a hash, with the real address after that, and I had to strip the front to see whose script it was. For one of the 7, the address alone didn't tell me which app it came from.&lt;/p&gt;

&lt;p&gt;App embeds, the replacement, showed up as HTML comments of the form &lt;code&gt;&amp;lt;!-- BEGIN app block: shopify://apps/&amp;lt;app-handle&amp;gt;/blocks/... --&amp;gt;&lt;/code&gt;. There were 6, all from different apps than the script tags, so nothing was loading twice. That's one store, and others may look different.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to check a store
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Open the storefront homepage in a desktop browser and view the page source.&lt;/li&gt;
&lt;li&gt;Search for &lt;code&gt;asyncLoad&lt;/code&gt; and copy every URL in that list.&lt;/li&gt;
&lt;li&gt;For any URL that starts with &lt;code&gt;cdn.shopify.com/proxy/&lt;/code&gt;, read the part after the hash to find the real address.&lt;/li&gt;
&lt;li&gt;Search for &lt;code&gt;BEGIN app block&lt;/code&gt;. Each match is an app embed that's already on.&lt;/li&gt;
&lt;li&gt;Match the two lists by app, going by each script's host. My checker does this with a table from script host to app, and a host that isn't in the table stays unjudged instead of guessed.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A script tag with no embed from the same app is one that stops on March 1. One that does have an embed loads twice until then, which Shopify's docs say can double-count analytics or show the app's UI twice.&lt;/p&gt;

&lt;p&gt;The source only shows embeds that are switched on. An embed that's off, or one left behind by a removed app, shows up only in the theme's settings, so page source alone can't tell you that the fix is already installed and just needs turning on.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to do with each one
&lt;/h2&gt;

&lt;p&gt;Shopify's docs split it by where the script comes from. If it's an app built with Shopify's developer tools, the developer has to release an app embed, and the store owner then turns it on in the theme editor. An embed is on per theme, so it needs checking again after a different theme is published. A custom app created directly in the Shopify admin can't use app extensions at all, so someone has to move the script into the theme, and editing theme code takes the theme off its automatic upgrade path. And if a service had the store create an app and paste its access token into their dashboard, that service has to release a real app.&lt;/p&gt;

&lt;p&gt;I'd look at the admin-created custom apps first. No developer update is coming for those.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;If you've checked a store, what did you find: script tags from apps that are still maintained, or ones somebody added years ago?&lt;/p&gt;

&lt;p&gt;If you'd rather hand the check to someone, my profile says how to reach me.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This post was drafted with AI help. The numbers and facts come from my own logs and repo.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>shopify</category>
      <category>ecommerce</category>
      <category>webdev</category>
      <category>discuss</category>
    </item>
    <item>
      <title>I shipped one app to Shopify and one to Cafe24. Almost everything review flagged was copy and screens, not code.</title>
      <dc:creator>MinSoo Kim</dc:creator>
      <pubDate>Wed, 18 Nov 2026 12:03:33 +0000</pubDate>
      <link>https://dev.to/danorie/i-shipped-one-app-to-shopify-and-one-to-cafe24-almost-everything-review-flagged-was-copy-and-46nj</link>
      <guid>https://dev.to/danorie/i-shipped-one-app-to-shopify-and-one-to-cafe24-almost-everything-review-flagged-was-copy-and-46nj</guid>
      <description>&lt;p&gt;I run two small apps on two store platforms. One is a Shopify app that hides, renames and reorders payment and shipping methods at checkout. The other is a Cafe24 app. Cafe24 is a Korean hosted store builder, and that app previews and then writes search meta tags for a store's products in bulk, through the API, with an undo.&lt;/p&gt;

&lt;p&gt;In review, both stores mostly flagged what I'd written and how screens looked, not code.&lt;/p&gt;

&lt;h2&gt;
  
  
  What review actually flagged
&lt;/h2&gt;

&lt;p&gt;Cafe24 rejected my first submission for three things. A line of description in the header looked like a menu button and did nothing when clicked. There was no guide on first launch. And the listing's detail page wasn't good enough.&lt;/p&gt;

&lt;p&gt;The second round flagged the detail page again, plus a real bug: product import stopped at 50 items. The reviewer also asked for an admin screen that felt more familiar and suggested selling extra volume as a paid option. I sent the third version in as a free app with nothing paid on any screen, and it passed. In-app billing came later, as an update that went through review on its own.&lt;/p&gt;

&lt;p&gt;Shopify approved my app five days after I submitted it, with no rejection. Sixteen days after approval, a routine quality check flagged it. The app description used a plan name. A feature line said how many rules the free plan runs. A plan comparison image had no numbers on it at all. All three counted as pricing information outside the pricing section. The notice said the listing would be demoted and then removed if I didn't fix it. I fixed it the same day and it passed again about 19 hours later.&lt;/p&gt;

&lt;p&gt;So approval isn't permanent, and a plan name counts as pricing.&lt;/p&gt;

&lt;p&gt;Across both stores, one flag was a code bug. The rest were about what I'd written or how a screen looked.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tokens break at the edges
&lt;/h2&gt;

&lt;p&gt;On Shopify, auth broke after uninstall. Shopify's webhook auth helper refreshed the offline token first. Once the app is gone, that refresh always fails, and the webhook returned 500. On the first day of review, the reviewer's store sent an uninstall webhook and a shop-redact webhook, and Shopify retried each one nine times with exponential backoff over about four hours. Now the handler verifies the signature itself and carries on even when the token can't be refreshed.&lt;/p&gt;

&lt;p&gt;On Cafe24, it broke under parallel load. The app runs as serverless functions, so several instances can get a 401 at the same moment. If two of them refresh with the same old refresh token, Cafe24 rejects the loser. The fix re-reads the token from the database before refreshing and uses the new one if another instance already won:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;_refresh&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;stale_access&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;_lock&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="c1"&gt;# one refresh per process&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tok&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"access_token"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="n"&gt;stale_access&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt;
        &lt;span class="n"&gt;fresh&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;load_token&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;mall_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# another instance may have refreshed&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;fresh&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="c1"&gt;# app was uninstalled: don't revive it&lt;/span&gt;
            &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;AuthExpired&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;fresh&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"access_token"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="n"&gt;stale_access&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tok&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;fresh&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt;
        &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tok&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;_token_request&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# we're first, so refresh&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;if not fresh&lt;/code&gt; check came later, from a security pass. Without it, a refresh still in memory could bring back a token that uninstall had just deleted.&lt;/p&gt;

&lt;p&gt;One more Cafe24 detail I only found by measuring it. Refresh tokens last 14 days, and the expiry time comes back in Korean time, so I subtract nine hours before comparing it with UTC.&lt;/p&gt;

&lt;h2&gt;
  
  
  Limits and sleep
&lt;/h2&gt;

&lt;p&gt;Cafe24 has two rate limits stacked. There's a short bucket of 40 calls that drains at two per second, reported in a header. Then there's a total over ten minutes. Cross that and you get a 429 and at least ten minutes blocked. My client gives up instead of waiting when the 429 asks for more than five seconds, so a request is meant to finish within a minute.&lt;/p&gt;

&lt;p&gt;On Shopify, the limit that hurt was my own database. The app runs serverless with a free database that sleeps. The first query after a nap took longer than Prisma's default connect and pool timeouts, a webhook answered late and was retried, and two installs failed to get through auth. I raised the timeouts to 15 and 20 seconds. Then I found the Prisma session storage marks itself "not ready" for the life of the instance if its first check fails, so I wrapped it to check once more and retry.&lt;/p&gt;

&lt;h2&gt;
  
  
  Uninstall and data
&lt;/h2&gt;

&lt;p&gt;Shopify requires three privacy webhooks, registered with one &lt;code&gt;compliance_topics&lt;/code&gt; line in the app config. Unsigned requests get a 401. I don't store customer data, so two of the three have nothing to do. Shop redact deletes the sessions and the install record and keeps an anonymous history.&lt;/p&gt;

&lt;p&gt;It helped that the rules never live in my database. They sit in app-owned metafields on Shopify's own object, and the checkout function reads the same metafields in its input query. There's no second copy to drift. My database holds three models: sessions, installs and install history.&lt;/p&gt;

&lt;p&gt;Cafe24 sends me one webhook, for uninstall. The app first asks Cafe24 to revoke the token, then deletes it right away. If the revoke call fails or takes more than five seconds, the deletion goes ahead anyway. A scheduled job removes the data 30 days later. For new products I picked a daily fetch over the product webhook.&lt;/p&gt;

&lt;h2&gt;
  
  
  Moving a store between them
&lt;/h2&gt;

&lt;p&gt;I also wrote down what moving a store from Cafe24 to Shopify would break. Shopify products take three options and up to 2,048 variants, so a Cafe24 product with four or more options, or a text-input option, needs reworking by hand. Images inside product descriptions have no import path, so they break when the old store closes. Past orders have no CSV route, only migration apps or the Order and Transaction APIs. Customer passwords can't move at all.&lt;/p&gt;

&lt;p&gt;The same note keeps one line: the token a store gave my app is used only for what the store agreed to, and a migration isn't that.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;Most of my fixes on both platforms sat at the edges: after uninstall, under parallel load, after the database woke up, and in the listing copy.&lt;/p&gt;

&lt;p&gt;If you need payment or shipping methods hidden, renamed or reordered at a Shopify checkout, I take that work on here: &lt;a href="https://www.upwork.com/services/product/development-it-shopify-checkout-payment-shipping-methods-hidden-renamed-or-reordered-2120151037133890296" rel="noopener noreferrer"&gt;https://www.upwork.com/services/product/development-it-shopify-checkout-payment-shipping-methods-hidden-renamed-or-reordered-2120151037133890296&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you've shipped an app to a platform store, what got flagged first in review: your code, or something you wrote about it?&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This post was drafted with AI help. The numbers and facts come from my own logs and repo.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>shopify</category>
      <category>api</category>
      <category>webdev</category>
      <category>discuss</category>
    </item>
    <item>
      <title>The first outside store to use my app's B2B rules uninstalled the same day. The rule engine was right.</title>
      <dc:creator>MinSoo Kim</dc:creator>
      <pubDate>Fri, 13 Nov 2026 12:03:30 +0000</pubDate>
      <link>https://dev.to/danorie/the-first-outside-store-to-use-my-apps-b2b-rules-uninstalled-the-same-day-the-rule-engine-was-4g55</link>
      <guid>https://dev.to/danorie/the-first-outside-store-to-use-my-apps-b2b-rules-uninstalled-the-same-day-the-rule-engine-was-4g55</guid>
      <description>&lt;p&gt;My Shopify app hides, renames and reorders payment and shipping methods at checkout. One screen in it sets up B2B: you say who counts as a business buyer, and it writes the rules for you.&lt;/p&gt;

&lt;p&gt;This week the first store from outside my own test shops used that screen for real. It picked customer tags, created two payment rules, deleted both, and uninstalled the app 1 hour and 51 minutes after installing it. The uninstall reason said it wasn't working properly with the store.&lt;/p&gt;

&lt;p&gt;The rule engine had no bug.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the event log showed
&lt;/h2&gt;

&lt;p&gt;The app writes one line per action, so the store's path was easy to read back:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The setup screen created two rules from a customer tag.&lt;/li&gt;
&lt;li&gt;Both rules were created switched off. That's the default for anything the setup writes.&lt;/li&gt;
&lt;li&gt;The store was on the free plan, which runs one rule at a time.&lt;/li&gt;
&lt;li&gt;Nothing in the log shows a rule being switched on from the rules list.&lt;/li&gt;
&lt;li&gt;The only other save was one rule-editor save, ten seconds before both rules were deleted. At the time, that line didn't record on or off.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So whatever the store tested at checkout, it most likely tested with no rule running.&lt;/p&gt;

&lt;h2&gt;
  
  
  Replaying the rule
&lt;/h2&gt;

&lt;p&gt;I still wanted to know whether the rule would have worked once it was on. The setup's tag rule hides a business-only payment method from anyone without the wholesale tag. I ran it through the engine with a few buyers.&lt;/p&gt;

&lt;p&gt;A logged-in customer with the tag saw the method. A logged-in customer without it didn't. A guest didn't either. Tag case and a trailing space made no difference, and there's a test for the case part.&lt;/p&gt;

&lt;p&gt;The engine did what it was told.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where tags come from
&lt;/h2&gt;

&lt;p&gt;My function asks checkout for the buyer's tags like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight graphql"&gt;&lt;code&gt;&lt;span class="n"&gt;buyerIdentity&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;customer&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;hasTags&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tags&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; $&lt;span class="n"&gt;customerTags&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;tag&lt;/span&gt;
      &lt;span class="n"&gt;hasTag&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The tags hang off &lt;code&gt;customer&lt;/code&gt;, and Shopify's schema describes that field as the customer interacting with the cart. The buyer's email is a separate field. A guest who types a wholesale buyer's email address is still a guest. There's no customer object, so there are no tags, and the rule treats them as retail.&lt;/p&gt;

&lt;p&gt;My setup screen didn't say that. The option for Shopify B2B companies started with "Logged in". The tag option said "Customers with a tag".&lt;/p&gt;

&lt;p&gt;I can't say whether this store would have hit the guest problem next. The log points to the first one: the setup left both rules off, and nothing shows them turned on.&lt;/p&gt;

&lt;p&gt;I also checked whether functions needed a bigger Shopify plan. They don't for apps distributed through the App Store, so that wasn't it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What changed the same day
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;The end of B2B setup now has a &lt;strong&gt;Turn them on now&lt;/strong&gt; button. It switches on the new rules in order while the plan allows, and names the ones that stay off.&lt;/li&gt;
&lt;li&gt;The setup states the free plan's limit and how many rules are running, even when the new ones fit.&lt;/li&gt;
&lt;li&gt;The tag option now reads "Logged-in customers with a tag", with this note under the tag field (the rule tester got a shorter one):
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Tags count only for customers logged in at checkout. A guest who types a business buyer's email is treated as retail, so test with a logged-in account.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Results show right under the button. Pressing create again on rules that are already saved but off offers the same turn-on button.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Then I reproduced it in the rule engine: with no customer attached, cash on delivery was hidden, and with a customer tagged wholesale, it showed. That was the engine, not a real checkout.&lt;/p&gt;

&lt;p&gt;Later that day the same store installed the app again, and it now has one rule switched on. It didn't go through the B2B setup this time, and the log doesn't say why it came back.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;A rule that's saved but off and a rule that reads a field checkout never fills look the same from the merchant's side. Nothing happens.&lt;/p&gt;

&lt;p&gt;If I could only ship one of those fixes, I'd ship the turn-on button. It's the one the log points to.&lt;/p&gt;

&lt;p&gt;If you've built anything on customer tags at checkout, which one bit you first: a setting that was saved but never active, or a guest checkout with no customer attached?&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Edited Nov 18: an earlier version said I ran a real checkout on a test store. The check was in the rule engine.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This post was drafted with AI help. The numbers and facts come from my own logs and repo.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>shopify</category>
      <category>graphql</category>
      <category>webdev</category>
      <category>discuss</category>
    </item>
    <item>
      <title>My extension showed its price as .99 for over two months. No test ever read it.</title>
      <dc:creator>MinSoo Kim</dc:creator>
      <pubDate>Wed, 11 Nov 2026 12:03:40 +0000</pubDate>
      <link>https://dev.to/danorie/my-extension-showed-its-price-as-99-for-over-two-months-no-test-ever-read-it-4kpg</link>
      <guid>https://dev.to/danorie/my-extension-showed-its-price-as-99-for-over-two-months-no-test-ever-read-it-4kpg</guid>
      <description>&lt;p&gt;My Chrome extension has an options page with a short paragraph about the paid tier and its price. From the release that added the paid tier in August until late October, the code rendered that price as &lt;code&gt;.99&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;No dollar sign, no leading digit. Just the cents.&lt;/p&gt;

&lt;p&gt;The HTML had the right text in it the whole time. No test looked at it. Someone on our side finally saw it on October 26, checking the real options page before a launch. It's the only time we have a record of it on screen.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the page actually rendered
&lt;/h2&gt;

&lt;p&gt;The options page ships with English text hard-coded in the markup, and then a small function swaps in the translated string for every element that has a &lt;code&gt;data-i18n&lt;/code&gt; key:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;applyI18n&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelectorAll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'[data-i18n]'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;el&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;chrome&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;i18n&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getMessage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;el&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dataset&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;i18n&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;el&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;textContent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The fallback is there for a missing key. If &lt;code&gt;getMessage&lt;/code&gt; returns an empty string, the markup stays. It returned &lt;code&gt;.99&lt;/code&gt;, which is not empty, so the correct markup got replaced with the broken string.&lt;/p&gt;

&lt;p&gt;The message file looked fine to the eye. The price line was a dollar sign, a digit, a dot and two more digits (I've trimmed the digits here):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"proPrice"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"$N.99"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Why &lt;code&gt;$9&lt;/code&gt; isn't a dollar sign
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;chrome.i18n&lt;/code&gt; treats a dollar sign followed by a digit as a positional substitution. &lt;code&gt;$1&lt;/code&gt; is the first value you pass to &lt;code&gt;getMessage&lt;/code&gt;, &lt;code&gt;$2&lt;/code&gt; the second, and so on. Our price started with a 9, so the API read the first two characters as the ninth substitution. We passed none. It dropped the placeholder and kept the rest.&lt;/p&gt;

&lt;p&gt;The same file has 7 other lines that use &lt;code&gt;$1&lt;/code&gt; and &lt;code&gt;$2&lt;/code&gt; on purpose: cookie counts, a delay in seconds, the number of rules imported. To the API, the price line looked exactly like those. There was nothing malformed to warn about.&lt;/p&gt;

&lt;p&gt;Both locale files had the same line, so English and Korean were broken the same way.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why nothing caught it
&lt;/h2&gt;

&lt;p&gt;Before the fix, no test in the extension read the price text back. Not one file in &lt;code&gt;tests/&lt;/code&gt; mentioned it.&lt;/p&gt;

&lt;p&gt;The markup also made it harder to spot. Anyone reading &lt;code&gt;options.html&lt;/code&gt; saw the right price on line 144. You had to load the page in a browser, with the extension's locale files active, to see what a user saw.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Escape the dollar sign as &lt;code&gt;$$&lt;/code&gt; in both locale files, so the API emits a literal &lt;code&gt;$&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Add a UI test that opens the options page and checks the rendered price text, not the message file.&lt;/li&gt;
&lt;li&gt;Commit a script that captures screenshots of the real UI, in the same commit.&lt;/li&gt;
&lt;li&gt;Ship it as a patch release. It went live on October 27.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The fix itself is one added character per file. The test is five lines.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;A translation layer sits between the text you wrote and the text a user reads, and it has its own syntax. Most of the time that syntax is invisible, because most strings don't contain it. A price or a shell command in a help string can.&lt;/p&gt;

&lt;p&gt;The check that would have caught this is boring: load the page, read the text back, compare it to what you meant. Reading the source file only tells you what the API was given.&lt;/p&gt;

&lt;p&gt;If I could only keep one of those, I'd keep the rendered-text test. A lint rule for &lt;code&gt;$&lt;/code&gt; plus digit would have flagged all 7 of those lines too, and someone would have learned to ignore it.&lt;/p&gt;

&lt;p&gt;If this had happened in your project, which would have caught it first: a lint pass over the message files for stray &lt;code&gt;$&lt;/code&gt; plus digit, a UI test that reads rendered text, or a screenshot someone actually looks at?&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This post was drafted with AI help. The numbers and facts come from my own logs and repo.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>testing</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Our monitor said 0 reviews for three days. The review was in the HTML.</title>
      <dc:creator>MinSoo Kim</dc:creator>
      <pubDate>Wed, 04 Nov 2026 12:03:42 +0000</pubDate>
      <link>https://dev.to/danorie/our-monitor-said-0-reviews-for-three-days-the-review-was-in-the-html-51mh</link>
      <guid>https://dev.to/danorie/our-monitor-said-0-reviews-for-three-days-the-review-was-in-the-html-51mh</guid>
      <description>&lt;p&gt;Last week two of our scripts reported numbers that looked clean. One said an app had 0 reviews, three days running. The other said it had received 40 photos with 0 failures. Neither told the whole story. Both numbers meant the script couldn't read something, and neither one said so.&lt;/p&gt;

&lt;p&gt;This follows my posts on failures hidden behind exit code 0 and on checks that borrowed from the code they checked. These zeros came from the readers.&lt;/p&gt;

&lt;p&gt;At the end I'll ask which warning sign you trust most, because we ran into three in one week.&lt;/p&gt;

&lt;h2&gt;
  
  
  Zero reviews, three days running
&lt;/h2&gt;

&lt;p&gt;One of our Android apps launched on October 28, and a script checked it six times over 72 hours: search rank, installs, rating and reviews. At 24 hours it wrote "reviews: 0". At 48 hours, the same. A separate morning check on the 31st agreed.&lt;/p&gt;

&lt;p&gt;The app had a review, posted on launch day. We found it when someone opened the review page in the developer console.&lt;/p&gt;

&lt;p&gt;The two readers failed in different ways. The rank script counted reviews from the "N reviews" label, and the store page only shows that label once an app has a public rating. With one review, the page still showed no rating, so there was no label, so 0. The morning check looked for review IDs that start with &lt;code&gt;gp:&lt;/code&gt;. This review's ID was a UUID.&lt;/p&gt;

&lt;p&gt;The part that stung: from the third reading on, we kept the raw HTML. The review is in the October 29 and October 30 files. It sat on disk for two days, and the rank script read both files as nothing.&lt;/p&gt;

&lt;p&gt;The reader now finds reviews by shape instead of by label or ID format: a star value from 1 to 5, a body, a timestamp and an app version, inside the page's embedded data block. We also treat the console as the source for review and install counts. The public page is a second reading.&lt;/p&gt;

&lt;h2&gt;
  
  
  40 received, 0 failed
&lt;/h2&gt;

&lt;p&gt;Another script collects the day's photos from a web list of notes, for our blog drafts. On October 29 it printed "received 40, failed 0" (translated). Forty photos came in, 20 from each of two notes. The third note's 22 photos were missing entirely, and so were 4 more from the second note: 26 photos, every one below row 40.&lt;/p&gt;

&lt;p&gt;The list's first screen holds 40 rows, and the script read what was rendered and stopped there, so nothing failed and the failure count was honest, but the received count was just the screen size. The run the day before had also received exactly 40. We never checked whether anything was missing that day.&lt;/p&gt;

&lt;p&gt;The fix calls &lt;code&gt;scrollIntoView({block: 'end'})&lt;/code&gt; on the last row and reads again while the list keeps growing. It stops when the last row's upload date is before that day, after 3 scrolls with no new rows, or after 20 scrolls. It counts rows as it goes, in case the list drops rows that scroll out of view. And it prints how many rows it read and why it stopped. The rerun that evening printed "first screen 40 rows → 80 rows, 2 scrolls, stopped at a row from the day before" (translated), then 26 new photos and 0 failures. I'd take that line over a clean 40 every time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two numbers that can't both be true
&lt;/h2&gt;

&lt;p&gt;The same launch log had a third number worth doubting. The store page showed "0+" installs for all 72 hours. One review means at least one install, so "0+ installs" and "1 review" can't both describe the same app at the same time.&lt;/p&gt;

&lt;p&gt;This time the parser was right. The page's data block and the visible label both said "0+". The public figure updates late. But the contradiction is what made us look, and looking took two places and a minute.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three signs, in the order they'd have helped
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A count that equals a page size.&lt;/strong&gt; 40 of 40 should have been a question, not a pass.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A zero that lasts.&lt;/strong&gt; Three readings of 0 in a row is a reason to check a second source once.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Two numbers that contradict.&lt;/strong&gt; A review without an install means one figure is stale or misread.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of these needs a new tool. Each is a line in the output: how many rows the reader saw and why it stopped, which source a zero came from, and a flag when two figures disagree.&lt;/p&gt;

&lt;h2&gt;
  
  
  A question
&lt;/h2&gt;

&lt;p&gt;When a script hands you a suspiciously clean number, what tips you off: a count that matches a page or batch size, a zero that has lasted too long, or two numbers that can't both be true? Which one has actually caught something for you?&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;MDN, Element.scrollIntoView() (the &lt;code&gt;block&lt;/code&gt; option sets vertical alignment in the scrolling container): &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView&lt;/a&gt;, accessed 2026-11-02&lt;/li&gt;
&lt;li&gt;Everything else: our launch log, commit history and lessons log, October 28 to 31.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;This post was drafted with AI help. The numbers and facts come from my own logs and repo.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>testing</category>
      <category>monitoring</category>
      <category>python</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Three checks said zero. Each one borrowed from the code it checked.</title>
      <dc:creator>MinSoo Kim</dc:creator>
      <pubDate>Wed, 28 Oct 2026 12:03:29 +0000</pubDate>
      <link>https://dev.to/danorie/three-checks-said-zero-each-one-borrowed-from-the-code-it-checked-5dd8</link>
      <guid>https://dev.to/danorie/three-checks-said-zero-each-one-borrowed-from-the-code-it-checked-5dd8</guid>
      <description>&lt;p&gt;Last week three checks in our repos reported zero problems, and all three were wrong. Each one had borrowed something from the code it was supposed to check: a default scope, a layout function, a definition. When the code was wrong, the check agreed with it.&lt;/p&gt;

&lt;p&gt;This follows my post about failures the shell hid behind exit code 0. These are failures the checks themselves couldn't see.&lt;/p&gt;

&lt;p&gt;At the end I'll ask where the expected values in your tests come from, because that's where all three of ours went wrong.&lt;/p&gt;

&lt;h2&gt;
  
  
  A flag nobody read
&lt;/h2&gt;

&lt;p&gt;One of our sites has a checker that flags numbers in product descriptions that can't be traced to six verified fields in our data. Its &lt;code&gt;--build&lt;/code&gt; flag was meant to scan every built page. Nothing in &lt;code&gt;main&lt;/code&gt; ever read it.&lt;/p&gt;

&lt;p&gt;With or without the flag, the checker scanned the same file: the product data, 856 records. It printed &lt;code&gt;items=856 bad_pages=0&lt;/code&gt;, and we read that as "build: 0". The label said pages, but the variable behind it was &lt;code&gt;bad_items&lt;/code&gt;. Category and guide pages had never been in scope.&lt;/p&gt;

&lt;p&gt;On October 23 we went through that category and guide text and took out the figures we couldn't source: nine places across four files, plus a generator that would have put one sentence back. Three days later, work on one guide page turned up more: a hard-coded price table, and two organizations credited with test findings neither had published.&lt;/p&gt;

&lt;p&gt;On the 23rd we also blocked the flag instead of implementing it (comments translated, message shortened):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;build&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="c1"&gt;# Declared but never implemented. Left alone, the data-scan count reads as "build: 0".&lt;/span&gt;
    &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;stdout&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"--build doesn't exist yet. Don't produce a 0 with this flag.\n"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I'd rather have a flag that refuses to run than one that hands back a zero it never earned.&lt;/p&gt;

&lt;h2&gt;
  
  
  A check that used the app's layout
&lt;/h2&gt;

&lt;p&gt;One of our apps writes month-by-month readings and shows them as a calendar card, one row per month. A change on October 23 moved a paragraph meant for a quiet month out of its row and up to the top of the list. QA drew 300 random birth charts, read each one on 2 dates through 3 answer paths, and in the year-ahead reading found the paragraph out of place in all 1,800 readings. Not most. All. The other two calendar readings had 0, and so did the build before the change.&lt;/p&gt;

&lt;p&gt;Two checks missed it anyway. The UI test runner saved a screenshot that showed the paragraph in the wrong place. Its check, named for the twelve-month section, only looked for the section's heading, so it passed. The independent sweep put text into months by calling the app's own &lt;code&gt;monthsLayout&lt;/code&gt; function. Wherever the app put the paragraph, the sweep put it too.&lt;/p&gt;

&lt;p&gt;The sweep's "independent" table of advice directions had the same problem. Of the 318 app advice templates QA could match to it, 317 pointed the same way as the app's own table. That's 99.7%, or in the QA report's words, the app's judgment written down twice.&lt;/p&gt;

&lt;h2&gt;
  
  
  A test with the code's definition
&lt;/h2&gt;

&lt;p&gt;Another app suggests Korean names and scores them with a traditional rule. You add up the brush strokes of the characters and check four sums against a list of numbers considered unlucky. In our data, 128 characters have two accepted stroke counts, depending on the source.&lt;/p&gt;

&lt;p&gt;The rule we shipped: a name is recommended only if it's clean under both counts. The code checked two cases, all characters on their main count or all on their alternate count, and the test, written from the same idea of "both counts", checked exactly those two. All 463 tests passed.&lt;/p&gt;

&lt;p&gt;A full name with two such characters has four combinations, not two. For one surname, 6 of the 30 recommended names came out unlucky under at least one of our three sources. The test meant to guard the rule used the code's own definition, and it covered only three surnames.&lt;/p&gt;

&lt;p&gt;The fix checks every combination of every character's values. The new test doesn't borrow the code's definition: it reads the source table directly and checks every combination for all 135 single-character surnames.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the three had in common
&lt;/h2&gt;

&lt;p&gt;Each check took something from the code under test, so it couldn't disagree with the code.&lt;/p&gt;

&lt;p&gt;We wrote down three rules after this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An independent check may call the app to draw the screen, but it judges with its own code and borrows no layout or judgment function. Screen order comes from the rendered text. A judgment table should be written by a person and compared against the app, not derived from it. We haven't fully met that last part yet.&lt;/li&gt;
&lt;li&gt;A check prints what it actually looked at, so a zero comes with its denominator.&lt;/li&gt;
&lt;li&gt;A new check runs first against a build we know is broken, and we write down how many reds it finds. In the calendar app, the last two new test files went 6 of 6 and 3 of 4 red on the build before their fix. If a check finds none there, it isn't a check yet.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  A question
&lt;/h2&gt;

&lt;p&gt;When you write the expected value for a test, where does it come from? A table someone worked out by hand, a second implementation, or the same helper the code uses? And which of those has let a bug through for you?&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Python docs, argparse actions (&lt;code&gt;store_true&lt;/code&gt; stores True when the flag is given, False otherwise): &lt;a href="https://docs.python.org/3/library/argparse.html#action" rel="noopener noreferrer"&gt;https://docs.python.org/3/library/argparse.html#action&lt;/a&gt;, accessed 2026-10-26&lt;/li&gt;
&lt;li&gt;Everything else: our QA reports, lessons log and commit history from October 22 and 23.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;This post was drafted with AI help. The numbers and facts come from my own logs and repo.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>testing</category>
      <category>qa</category>
      <category>python</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Three failures in five days, and the next step ran anyway</title>
      <dc:creator>MinSoo Kim</dc:creator>
      <pubDate>Wed, 21 Oct 2026 12:03:20 +0000</pubDate>
      <link>https://dev.to/danorie/three-failures-in-five-days-and-the-next-step-ran-anyway-50he</link>
      <guid>https://dev.to/danorie/three-failures-in-five-days-and-the-next-step-ran-anyway-50he</guid>
      <description>&lt;p&gt;Between October 14 and October 18, three failures on my machine didn't stop the step that came after them. A stats collector died with exit code 2, and the scheduler logged 0. A check script crashed on an encoding error, and the shell said 0. A test run failed and even printed &lt;code&gt;rc=1&lt;/code&gt;, and the commit and the push ran anyway.&lt;/p&gt;

&lt;p&gt;The failures themselves were ordinary. The trouble sat between each command and the next step: twice a layer we had added to make a job quieter or politer, and once a single character.&lt;/p&gt;

&lt;p&gt;I'll go through all three, and at the end I'd like to hear where that gap sits in your own setup.&lt;/p&gt;

&lt;p&gt;Some context first. This is the same Windows machine where about twenty agent sessions share one git repo and a set of scheduled jobs. Sessions report "passed" or "failed" to each other, and those reports are supposed to come from exit codes. A fake 0 doesn't stay local.&lt;/p&gt;

&lt;h2&gt;
  
  
  The wrapper our own rules recommended
&lt;/h2&gt;

&lt;p&gt;Since September 30 our shared rules had said that long-running Python jobs should run at below-normal priority, and they listed &lt;code&gt;start /belownormal&lt;/code&gt; as one way to do it. The collector's scheduled slot did exactly that from Git Bash (the doubled slashes stop Git Bash from turning &lt;code&gt;/c&lt;/code&gt; into a path):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cmd //c start //belownormal //wait //b python collector.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On October 14 a stats collector hit a 403 on an item it wasn't allowed to read. It stopped after 2 of 42 items and exited with code 2. The scheduled slot recorded 0.&lt;/p&gt;

&lt;p&gt;That suggestion had been in the rules for fourteen days. I haven't dug into why &lt;code&gt;start&lt;/code&gt; drops the child's code. The observed result was enough to change the rule. The default is now to lower the priority inside the script:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;psutil&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Process&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;nice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;psutil&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;BELOW_NORMAL_PRIORITY_CLASS&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If a job has to be wrapped, the wrapper hands the code back explicitly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cmd //v:on //c &lt;span class="s2"&gt;"start /belownormal /wait /b python collector.py &amp;amp; exit !errorlevel!"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The collector itself was changed too, to skip items it can't read and exit non-zero instead of dying. The next morning it ran through the new wrapper. It skipped six items, and the slot recorded 4. That's a non-zero code, and for once a true one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two tails on the same day
&lt;/h2&gt;

&lt;p&gt;On October 15 &lt;code&gt;| tail&lt;/code&gt; fooled us twice.&lt;/p&gt;

&lt;p&gt;A long background job was launched as &lt;code&gt;job | tail -60&lt;/code&gt; with the result going to a file. The file sat at 0 bytes, because &lt;code&gt;tail&lt;/code&gt; prints nothing until its input ends. The job looked dead. It wasn't, and it nearly got restarted mid-run.&lt;/p&gt;

&lt;p&gt;The same day, the coordinating session ran a check script through &lt;code&gt;| tail&lt;/code&gt;. The script crashed with a cp949 encoding error, Windows' Korean code page. The pipeline exited 0, because a pipeline reports the status of its last command, and &lt;code&gt;tail&lt;/code&gt; had done its job fine.&lt;/p&gt;

&lt;p&gt;That day the lesson went into our lessons file: write long output straight to a file, and use &lt;code&gt;tail&lt;/code&gt; only to read that file afterwards. It went in as a candidate. It did not go into the rules every session reads first.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three days later, a semicolon
&lt;/h2&gt;

&lt;p&gt;On October 18 a session working on one of our apps did what the lesson said. It sent the test output to a file and printed the exit code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx vitest run &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; vt.log 2&lt;span class="o"&gt;&amp;gt;&amp;amp;&lt;/span&gt;1&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;rc&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$?&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; grep &lt;span class="s2"&gt;"Tests "&lt;/span&gt; vt.log&lt;span class="o"&gt;;&lt;/span&gt; git add ... &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; git commit ...&lt;span class="o"&gt;;&lt;/span&gt; git push
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The screen said &lt;code&gt;rc=1&lt;/code&gt;. One test out of 429 had failed: a heavy check that runs 3,000 readings went past vitest's default 5-second timeout in the full run. The commit was joined to the test with &lt;code&gt;;&lt;/code&gt;, not &lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt;, so it ran anyway, and so did the push. The exit code was asked for and printed. Nothing was gated on it.&lt;/p&gt;

&lt;p&gt;A minute later the next commit gave the heavy checks a 60-second limit, and that one went out through &lt;code&gt;vitest &amp;gt; file &amp;amp;&amp;amp; typecheck &amp;amp;&amp;amp; commit&lt;/code&gt;. The October 15 lesson was about where output goes. It said nothing about what has to be true before the next command runs.&lt;/p&gt;

&lt;p&gt;The same afternoon a session on a different app committed with three type errors. That one is simpler: no check ran at all, so nobody asked for an exit code.&lt;/p&gt;

&lt;p&gt;Since October 19 this is in the shared rulebook every session reads:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;test&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; test.log 2&lt;span class="o"&gt;&amp;gt;&amp;amp;&lt;/span&gt;1 &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; git commit -m &lt;span class="s2"&gt;"..."&lt;/span&gt; -- &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;paths&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output goes to a file, and the commit hangs off &lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt;. A report can say "passed" only when the exit code was 0.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the three have in common
&lt;/h2&gt;

&lt;p&gt;The failing commands never lied. The collector, the check script and the tests all exited non-zero. What went wrong sat between that code and the next step: a priority wrapper, a &lt;code&gt;| tail&lt;/code&gt;, a &lt;code&gt;;&lt;/code&gt;. The first two were added to make something nicer. The third is one character. Each let the next step run as if nothing had happened.&lt;/p&gt;

&lt;p&gt;Bash has &lt;code&gt;set -o pipefail&lt;/code&gt; for the pipe case, and &lt;code&gt;set -e&lt;/code&gt; stops a script at the first failing command. Neither is in our rules. A line that ends in &lt;code&gt;&amp;amp;&amp;amp; git commit&lt;/code&gt; is easier to check by reading it once, though I'm not sure that holds up as scripts get longer.&lt;/p&gt;

&lt;h2&gt;
  
  
  A question
&lt;/h2&gt;

&lt;p&gt;Where in your setup does a failure still come back as 0, or get printed and ignored? A wrapper, a pipe, a &lt;code&gt;;&lt;/code&gt; where &lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt; should be, an &lt;code&gt;|| true&lt;/code&gt; in CI, a retry script that swallows the last error? I'm collecting the places I haven't looked yet.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Bash manual, Pipelines (a pipeline's exit status is the last command's unless &lt;code&gt;pipefail&lt;/code&gt; is set): &lt;a href="https://www.gnu.org/software/bash/manual/html_node/Pipelines.html" rel="noopener noreferrer"&gt;https://www.gnu.org/software/bash/manual/html_node/Pipelines.html&lt;/a&gt;, accessed 2026-10-19&lt;/li&gt;
&lt;li&gt;Bash manual, The Set Builtin (&lt;code&gt;-e&lt;/code&gt; and &lt;code&gt;-o pipefail&lt;/code&gt;): &lt;a href="https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html" rel="noopener noreferrer"&gt;https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html&lt;/a&gt;, accessed 2026-10-19&lt;/li&gt;
&lt;li&gt;Vitest config, &lt;code&gt;testTimeout&lt;/code&gt; (default 5,000 ms in Node.js): &lt;a href="https://vitest.dev/config/testtimeout" rel="noopener noreferrer"&gt;https://vitest.dev/config/testtimeout&lt;/a&gt;, accessed 2026-10-19&lt;/li&gt;
&lt;li&gt;Everything else: my own lessons log, job logs and commit history from October 14 to 18.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;This post was drafted with AI help. The numbers and facts come from my own logs and repo.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>bash</category>
      <category>testing</category>
      <category>discuss</category>
    </item>
    <item>
      <title>My extension sends nothing, and the Web Store FAQ says I still have to tick two data boxes</title>
      <dc:creator>MinSoo Kim</dc:creator>
      <pubDate>Sat, 17 Oct 2026 12:03:27 +0000</pubDate>
      <link>https://dev.to/danorie/my-extension-sends-nothing-and-the-web-store-faq-says-i-still-have-to-tick-two-data-boxes-34ef</link>
      <guid>https://dev.to/danorie/my-extension-sends-nothing-and-the-web-store-faq-says-i-still-have-to-tick-two-data-boxes-34ef</guid>
      <description>&lt;p&gt;Over two weeks I passed on five Upwork jobs that looked fine in the search results. Decent client spend, plenty of reviews, not many proposals, posted recently. Every reason to skip them was on the job page itself. One client had spent $27K and had over 300 reviews, and their average hourly rate paid was $15.34. Their recent history showed $5 and $10 fixed-price contracts, again and again.&lt;/p&gt;

&lt;p&gt;So I built jobsignal, a small Chrome extension that reads the Upwork job page you open and labels those things. It doesn't give the job a score. It quotes the sentence from the page, so the call stays yours.&lt;/p&gt;

&lt;p&gt;The code turned out to be the easy part. The Web Store forms were not. More on that below, and I'd like to hear how you handled them.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it flags
&lt;/h2&gt;

&lt;p&gt;Thirteen signals. Five come from the job cards in search: payment not verified, number of proposals, when it was posted, the budget, and 30+ hrs/week. Eight only show up on the job page: a low average hourly rate paid, repeated tiny fixed-price contracts, a request for proof of past work, a required video call or time zone overlap, how many screening questions there are, a high Connects cost, a suspicious scope, and a low hire rate.&lt;/p&gt;

&lt;p&gt;Four of the cutoffs can be changed in settings, like the average-rate one ($20/hr by default). The hire-rate (30%) and Connects (20) cutoffs are fixed in code for now.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkso5csm4e468148bz6b4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkso5csm4e468148bz6b4.png" alt="The jobsignal panel on a job page. The job text is blurred; the panel quotes the lines it flagged." width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  One permission
&lt;/h2&gt;

&lt;p&gt;The manifest asks for &lt;code&gt;storage&lt;/code&gt; and nothing else. No host permissions, no background service worker, no tabs, no scripting. Content scripts run on three Upwork paths and nowhere else.&lt;/p&gt;

&lt;p&gt;I didn't want "sends nothing" to be a line in a README, so the build script checks it. If a rule breaks, there's no zip:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;permissions&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="s1"&gt;'["storage"]'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nf"&gt;fail&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'permissions must be exactly ["storage"]'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;host_permissions&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;background&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;optional_permissions&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nf"&gt;fail&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'no host_permissions/background/optional_permissions'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;bad&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;\&lt;span class="nf"&gt;b&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;fetch&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nc"&gt;XMLHttpRequest&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;sendBeacon&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nc"&gt;WebSocket&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;importScripts&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;eval&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;\&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;\&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;\&lt;span class="n"&gt;bnew&lt;/span&gt; &lt;span class="nb"&gt;Function&lt;/span&gt;\&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;https&lt;/span&gt;&lt;span class="o"&gt;?:&lt;/span&gt;\&lt;span class="o"&gt;/&lt;/span&gt;\&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;?!&lt;/span&gt;&lt;span class="n"&gt;www&lt;/span&gt;\&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;upwork&lt;/span&gt;\&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;danorie&lt;/span&gt;\&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;^&lt;/span&gt;&lt;span class="s1"&gt;'"\s)]+/;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every file in &lt;code&gt;src/&lt;/code&gt; is run against that pattern, so a URL outside the allow list fails the build as well.&lt;/p&gt;

&lt;p&gt;What it keeps lives in &lt;code&gt;chrome.storage.local&lt;/code&gt;. That's your settings and a daily counter, plus the jobs you've opened (with a note if you pressed Skip on one). Those are removed 30 days after you last opened them. Opening the same job again doesn't count twice. There's no service worker, so the 30-day cleanup only happens the next time the extension runs. If you never open Upwork again, that list stays put until you do.&lt;/p&gt;

&lt;h2&gt;
  
  
  Parsing a page I don't control
&lt;/h2&gt;

&lt;p&gt;The tests run against eight pages I opened and saved myself, most of them job pages. The rule I kept relearning: don't widen a regex because a phrasing might exist somewhere. Add it when a saved page actually shows it.&lt;/p&gt;

&lt;p&gt;The bug I didn't see coming was sentence cutting. A quote like "overlap with U.S. Central Time" kept getting chopped at "U.S." Now there's a short list of abbreviations (e.g., i.e., approx.) plus a rule for dotted initials like U.S., so none of them end a sentence.&lt;/p&gt;

&lt;p&gt;There are 55 tests. Besides the saved pages, they cover card parsing and edge values, plus small DOM changes and broken storage entries.&lt;/p&gt;

&lt;h2&gt;
  
  
  The hard part wasn't the code
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The privacy form.&lt;/strong&gt; My first instinct was "collects no data." Then I read the Chrome Web Store FAQ: data you only handle on the user's device still has to be disclosed. So the honest answer is two ticks: web history (the jobs you opened, kept locally for 30 days) and website content (the page text it reads). The first line of the privacy policy went from "does not collect" to "does not transmit, sell, or share any data; everything it handles stays on your device." The public listing doesn't say that yet. As I write this, its privacy section still says the extension won't collect or use your data. Fixing that is a dashboard change, and it isn't live yet. &lt;em&gt;Update, October 28: that change is live now. The listing's privacy section shows web history and website content, and the line saying the extension won't collect or use your data is gone.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The publish limit.&lt;/strong&gt; When I hit submit, the dashboard said I already had the maximum of four published extensions. I asked for a higher limit and got turned down right away: my published extensions needed more engagement first. I unpublished one of my older ones to make room.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Review.&lt;/strong&gt; I submitted in the morning and it was live that evening. One line in the reviewer notes mattered: if the reviewer isn't logged in to Upwork, client details are hidden and no labels show up.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;After launch.&lt;/strong&gt; Once it was live, I compared the public listing with what I'd submitted, field by field. The summary at the top isn't the short description field from the dashboard. It comes from &lt;code&gt;description&lt;/code&gt; in the manifest, and mine still had older wording that didn't match the privacy policy. The fix is a new version, which is now live.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I can't promise
&lt;/h2&gt;

&lt;p&gt;It's a set of regexes looking for known phrasings. If Upwork rewords a field, it will miss it until I update it.&lt;/p&gt;

&lt;p&gt;It isn't affiliated with Upwork, and you should know what Upwork's help center says: "If an extension reads or changes Upwork pages or automates actions, it could trigger a warning, restriction, or block." jobsignal sends no requests and takes no actions, but it does read the page and add labels to it. Decide with that in mind.&lt;/p&gt;

&lt;p&gt;You also need to be logged in. Logged out, Upwork hides the client details, so there's nothing to flag.&lt;/p&gt;

&lt;h2&gt;
  
  
  A question
&lt;/h2&gt;

&lt;p&gt;If you've shipped an extension that never touches the network, what did you tick on the privacy form? I went back and forth on it, and I'm curious whether you drew the line in the same place.&lt;/p&gt;




&lt;p&gt;jobsignal on the Chrome Web Store: &lt;a href="https://chromewebstore.google.com/detail/cnbafbiajaacmpkedboekbfkkoiicmjg" rel="noopener noreferrer"&gt;https://chromewebstore.google.com/detail/cnbafbiajaacmpkedboekbfkkoiicmjg&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Upwork Help, "Use bots and other automation properly": &lt;a href="https://support.upwork.com/hc/en-us/articles/43342677368467-Use-bots-and-other-automation-properly" rel="noopener noreferrer"&gt;https://support.upwork.com/hc/en-us/articles/43342677368467-Use-bots-and-other-automation-properly&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;This post was drafted with AI help. The numbers and facts come from my own logs and repo.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>privacy</category>
      <category>discuss</category>
    </item>
    <item>
      <title>4 of 26 'Active' rules weren't doing what their titles said</title>
      <dc:creator>MinSoo Kim</dc:creator>
      <pubDate>Wed, 14 Oct 2026 12:33:24 +0000</pubDate>
      <link>https://dev.to/danorie/4-of-26-active-rules-werent-doing-what-their-titles-said-23og</link>
      <guid>https://dev.to/danorie/4-of-26-active-rules-werent-doing-what-their-titles-said-23og</guid>
      <description>&lt;p&gt;Our checkout app showed 26 rules as "Active" across the stores that use it. On October 2 I read every one of them: four were not doing what their titles said. About 15 percent. Two were dead because of bugs in our code. Two had titles that disagreed with their own settings.&lt;/p&gt;

&lt;p&gt;None of the four had produced an error. Every one of them saved cleanly and showed the Active badge.&lt;/p&gt;

&lt;h2&gt;
  
  
  The comma that the field next door accepted
&lt;/h2&gt;

&lt;p&gt;It started the night before, while I was reading saved rule settings for an unrelated idea. One rule targeted a payment method, and its target was two method names joined by a comma. The merchant wanted one rule to hide two methods.&lt;/p&gt;

&lt;p&gt;Our matcher didn't know about comma lists. It compared the whole string, comma included, against each method name, found nothing, and hid nothing. The rule saved. The badge said Active.&lt;/p&gt;

&lt;p&gt;Why would anyone type a comma there? Because the field right next to it, the condition value, does accept comma lists, and its hint text says so. The merchant read the screen exactly the way it was written.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix that wasn't
&lt;/h2&gt;

&lt;p&gt;The first fix went in early on October 2: split on commas and compare each name. Then I replayed that store's saved settings through the new engine before telling anyone it was fixed.&lt;/p&gt;

&lt;p&gt;It still didn't match.&lt;/p&gt;

&lt;p&gt;The rule had three problems stacked on each other:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;the comma, now handled;&lt;/li&gt;
&lt;li&gt;a product condition using "equals", an operator our product conditions didn't evaluate at all, so it was always false;&lt;/li&gt;
&lt;li&gt;a product value that was the product's title, not its ID.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A second fix five minutes later made product conditions match on the full title (case-insensitive) and read "equals" as "is one of". The checkout function was redeployed. Another store had a live rule that was dead for reason 3. The same release fixed it in our engine. Less than an hour later I found out that store's checkout wasn't running our rules at all.&lt;/p&gt;

&lt;p&gt;If I had stopped after the first fix, any "we fixed it" message would have been false.&lt;/p&gt;

&lt;h2&gt;
  
  
  The email I almost sent
&lt;/h2&gt;

&lt;p&gt;I wrote to three stores: the other one hit by our bug, and the two whose rule titles disagreed with their settings. The brief for those emails was simple: open with what a shopper sees at checkout, say in the first paragraph when the bug was ours, give one line on how to undo the change, and invite a reply with the behaviour they actually want. No prices, no upgrade pitch. The first went out 43 minutes after the first fix commit, and all three within 3 minutes of each other.&lt;/p&gt;

&lt;p&gt;Right before sending, I re-read the settings of the store hit by our bug and found that our payment customization was switched off in Shopify's own settings. Fixing our bug would change nothing for their shoppers, so the approved email ("from today, this method will be hidden") had become untrue. I stopped, rewrote it to say what shoppers actually see now and where the switch lives, and sent that version instead. Our app had been showing that rule as Active the whole time. It got an "off" banner the same day.&lt;/p&gt;

&lt;h2&gt;
  
  
  Warnings at save time
&lt;/h2&gt;

&lt;p&gt;Later that morning a fourth email went to a store installed the night before. In 23 minutes it had saved the same rule 9 times and never opened our Rule Tester. The likely cause was an exact-match method name that differed from what checkout displays, so the email's one instruction was to copy the name from checkout and paste it. Writing it, I realised the Rule Tester couldn't have caught this anyway: the merchant types the method names into the tester too, so a wrong name passes both places.&lt;/p&gt;

&lt;p&gt;The real fix is upstream of all of this. That afternoon I shipped a warning that appears when a rule probably can't match anything: names split with &lt;code&gt;;&lt;/code&gt; or &lt;code&gt;|&lt;/code&gt; instead of commas, an empty entry, or a shipping option's name inside a payment rule. It can't tell you that a rule named "hide PayPal" is pointed at credit cards. That one still needs a person reading the title and the settings side by side.&lt;/p&gt;

&lt;h2&gt;
  
  
  And then the upgrade button broke
&lt;/h2&gt;

&lt;p&gt;Same day, right after that deploy, I clicked our upgrade button to check it. It stopped at "401 Unauthorized". A route I'd changed to count clicks couldn't follow a server redirect inside the embedded app. It was live for about an hour, nobody else clicked it in that window, and I fixed it by sending the browser to the outside page directly. "Click every button that involves money after a deploy" is now on the release checklist.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd ask you
&lt;/h2&gt;

&lt;p&gt;If I keep one habit from that day, it's this: replay the stored settings through the new engine before saying "fixed". That replay found the two problems hiding under the comma.&lt;/p&gt;

&lt;p&gt;Every app has a field like this: it saves, it shows an active state, and it quietly does nothing. Which one is it in yours, and how did you find out?&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;HideKit, the app in this post: &lt;a href="https://apps.shopify.com/hidekit" rel="noopener noreferrer"&gt;https://apps.shopify.com/hidekit&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Our own audit of 26 active rules and the two fix commits, October 2, 2026 (private repo)&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;This post was drafted with AI help. The numbers and facts come from my own logs and repo.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>shopify</category>
      <category>webdev</category>
      <category>debugging</category>
      <category>discuss</category>
    </item>
  </channel>
</rss>
