Skip to content

fix(user-directory): #501 follow-ups — activity feed at startup, empty labels, fewer stats queries - #569

Merged
antosubash merged 3 commits into
mainfrom
fix/user-directory-followups
Oct 21, 2026
Merged

antosubash merged 3 commits into
mainfrom
fix/user-directory-followups

Conversation

@antosubash

Copy link
Copy Markdown
Owner

Summary

Follow-ups to #501 (#566), found while reviewing another branch.

  • audit_log activity feed: audit_log now installs its ActivityFeed in on_startup and clears it in on_shutdown, instead of in register_settings. Overriding register_settings without setting app.state.audit_log triggered SM012. Only per-request code reads the feed, after the lifespan has started.
  • Empty labels: resolve_user_labels drops users whose label is empty, for example a Keycloak cache row with no name or email. Callers already fall back to the raw id.
  • Fewer stats queries: the users and Keycloak directories compute their stats in fewer queries. The users count keeps select_from(User), so soft-delete and tenant filters still apply. The numbers and the None semantics are unchanged.
  • Tests for each change, and a CHANGELOG Fixed entry.

Verification

  • Local CI: make lint passes; make test-py: 5114 passed, 22 skipped.
  • Review: clean after 2 passes. The first pass fixed a lost select_from and added the missing tests.
  • No browser QA: nothing user-facing changes, and the existing tests cover the activity card and the dashboard tiles.

Test plan

  • CI is green

https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-10-21T15:52:23.936372Z e70c7fc PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Deploying simple-module-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: e70c7fc
Status: ✅  Deploy successful!
Preview URL: https://b955fb5a.simple-module-python.pages.dev
Branch Preview URL: https://fix-user-directory-followups.simple-module-python.pages.dev

View logs

@antosubash
antosubash merged commit 7f09303 into main Oct 21, 2026
15 checks passed
@antosubash
antosubash deleted the fix/user-directory-followups branch October 21, 2026 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant