bito-code-review[bot] commented on code in PR #38490:
URL: https://github.com/apache/superset/pull/38490#discussion_r3523713461


##########
superset-frontend/src/features/databases/DatabaseModal/index.tsx:
##########
@@ -415,6 +416,15 @@ export function dbReducer(
           [action.payload.name]: action.payload.checked,
         };
       }
+      if (action.payload.name === 'cache_timeout') {
+        const val = Number(action.payload.value);
+        return {
+          ...trimmedState,
+          cache_timeout: Number.isNaN(val)
+            ? undefined
+            : String(Math.max(-1, val)),
+        };
+      }

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Missing tests for new cache_timeout InputChange 
branch</b></div>
   <div id="fix">
   
   The new `InputChange` branch for `cache_timeout` (lines 419-427) implements 
NaN→undefined and negative-value clamping, but no existing test covers this 
logic. This is the only reducer branch that writes to `cache_timeout`, so the 
entire behavior is untested.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #cd433e</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a 
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to