faisal2901 opened a new pull request, #40281:
URL: https://github.com/apache/superset/pull/40281

   ### SUMMARY
   
   The "Login count" and "Fail login count" columns in the Users list page 
rendered as empty cells for users who had never logged in (or never had a 
failed login). Both fields are nullable in Flask-AppBuilder's `User` model 
(`login_count: Mapped[Optional[int]] = mapped_column(Integer, nullable=True)`) 
and remain `NULL` until the corresponding event happens, so newly created users 
always showed empty cells.
   
   This change coalesces `null` / `undefined` to `0` in the two cell renderers 
in `superset-frontend/src/pages/UsersList/index.tsx`, matching the semantic of 
a counter column and the `number` type already declared in `UserObject` 
(`types.ts`).
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Before: "Login count" column blank for users who haven't logged in (see 
screenshot in #40243).
   
   After: column shows `0` for those users.
   
   ### TESTING INSTRUCTIONS
   
   1. Go to `Settings > List Users` (`/users/list/`).
   2. Add a new user via the "+ User" modal (or use any existing user who has 
never logged in).
   3. Toggle the "Login count" and "Fail login count" columns to visible in the 
column picker.
   4. Expected: both columns display `0` for new / never-logged-in users 
(previously: empty).
   5. For users who have logged in, the columns continue to display the actual 
integer count from the API.
   
   The existing test fixture in `UsersList.test.tsx` already covers the `null` 
case (`login_count: null`, `fail_login_count: null`), so the rendering layer is 
now consistent with the fixtures.
   
   ### ADDITIONAL INFORMATION
   
   - [x] Has associated issue: Fixes #40243
   - [ ] Required feature flags:
   - [x] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API


-- 
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