From d405ebc6f9b5fed52290692c44c457ef21a7d6ef Mon Sep 17 00:00:00 2001 From: "russell@unturf.com" Date: Tue, 2 Jun 2026 09:19:11 -0400 Subject: [PATCH] ui: drop misleading homepage stats (active users, active rooms) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Active Users counted all-time distinct UserSession usernames, not anyone currently online. Active Rooms counted any room that ever received a single message, with no decay. Both read as live metrics but aren't. Keep Public Rooms and (when signed in) Private Rooms — those are real counts users can verify by browsing. --- app.py | 12 ------------ templates/index.html | 8 -------- 2 files changed, 20 deletions(-) diff --git a/app.py b/app.py index 2e9e319..30b990b 100644 --- a/app.py +++ b/app.py @@ -650,27 +650,15 @@ def favicon(): @app.route("/") def index(): - # Get statistics for homepage total_public_rooms = Room.query.filter_by(is_private=False, is_archived=False).count() total_private_rooms = 0 user = auth.get_current_user() if user: total_private_rooms = Room.query.filter_by(is_private=True, is_archived=False, owner_id=user.id).count() - # Active rooms - rooms with at least one message - active_public_rooms = db.session.query(Room.id).join(Message).filter( - Room.is_private == False, - Room.is_archived == False - ).distinct().count() - - # Total active users (from UserSession) - active_users = UserSession.query.distinct(UserSession.username).count() - stats = { 'total_public_rooms': total_public_rooms, 'total_private_rooms': total_private_rooms, - 'active_public_rooms': active_public_rooms, - 'active_users': active_users, } return render_template("index.html", stats=stats, user=user) diff --git a/templates/index.html b/templates/index.html index 3dc6fcf..ac09ae1 100644 --- a/templates/index.html +++ b/templates/index.html @@ -187,14 +187,6 @@
Private Rooms
{% endif %} -
-
{{ stats.active_public_rooms }}
-
Active Rooms
-
-
-
{{ stats.active_users }}
-
Active Users
-