From ed4d27c6eeb403024fda9c826fd2cd234590b5e4 Mon Sep 17 00:00:00 2001 From: adrian adewunmi Date: Thu, 7 May 2026 12:42:41 +0100 Subject: [PATCH 1/5] feat(dashboard): enhance index view to include user roles for authenticated dashboard --- apps/dashboard/views.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/apps/dashboard/views.py b/apps/dashboard/views.py index 5853003..ef1749e 100644 --- a/apps/dashboard/views.py +++ b/apps/dashboard/views.py @@ -1,12 +1,21 @@ -"""Dashboard views.""" +"""Views for authenticated StudyBuddy dashboard pages.""" from __future__ import annotations from django.contrib.auth.decorators import login_required +from django.http import HttpRequest, HttpResponse from django.shortcuts import render @login_required -def index(request): - """Render the authenticated dashboard shell.""" - return render(request, "dashboard/index.html") +def index(request: HttpRequest) -> HttpResponse: + """Render the authenticated StudyBuddy dashboard shell.""" + roles = request.user.roles.order_by("display_name") + + return render( + request, + "dashboard/index.html", + { + "roles": roles, + }, + ) From 9db562fd711949bb7a7eb8f6b373148ad2011aad Mon Sep 17 00:00:00 2001 From: adrian adewunmi Date: Thu, 7 May 2026 13:13:38 +0100 Subject: [PATCH 2/5] fix(dashboard): update docstring for clarity on authenticated dashboard URL routes --- apps/dashboard/urls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/dashboard/urls.py b/apps/dashboard/urls.py index 18b3a85..c00082b 100644 --- a/apps/dashboard/urls.py +++ b/apps/dashboard/urls.py @@ -1,4 +1,4 @@ -"""Dashboard URL routes.""" +"""URL routes for the authenticated dashboard.""" from __future__ import annotations From 105c78f046fdbaaa45ecb0320f89283b3c6d0480 Mon Sep 17 00:00:00 2001 From: adrian adewunmi Date: Thu, 7 May 2026 13:14:32 +0100 Subject: [PATCH 3/5] fix(dashboard): update docstrings for consistency in application configuration --- apps/dashboard/apps.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/dashboard/apps.py b/apps/dashboard/apps.py index 7216329..9591f3a 100644 --- a/apps/dashboard/apps.py +++ b/apps/dashboard/apps.py @@ -1,4 +1,4 @@ -"""Dashboard application configuration.""" +"""Application configuration for the dashboard app.""" from __future__ import annotations @@ -6,7 +6,8 @@ class DashboardConfig(AppConfig): - """Configure the dashboard application.""" + """Configure the StudyBuddy dashboard app.""" default_auto_field = "django.db.models.BigAutoField" name = "apps.dashboard" + label = "dashboard" From 0f0f974678a7920851e247b439badf8c1e3279d9 Mon Sep 17 00:00:00 2001 From: adrian adewunmi Date: Thu, 7 May 2026 13:23:35 +0100 Subject: [PATCH 4/5] feat(dashboard): update index view and templates for authenticated user experience --- apps/dashboard/views.py | 2 +- static/css/theme.css | 11 ++++++ templates/base.html | 22 ++++++++--- templates/dashboard/index.html | 69 ++++++++++++++++++++++------------ 4 files changed, 73 insertions(+), 31 deletions(-) diff --git a/apps/dashboard/views.py b/apps/dashboard/views.py index ef1749e..24a6ccc 100644 --- a/apps/dashboard/views.py +++ b/apps/dashboard/views.py @@ -10,7 +10,7 @@ @login_required def index(request: HttpRequest) -> HttpResponse: """Render the authenticated StudyBuddy dashboard shell.""" - roles = request.user.roles.order_by("display_name") + roles = request.user.studybuddy_roles.order_by("display_name") return render( request, diff --git a/static/css/theme.css b/static/css/theme.css index 5d7b2fd..7d5e6fd 100644 --- a/static/css/theme.css +++ b/static/css/theme.css @@ -247,6 +247,17 @@ p { padding-left: var(--space-xl); } +.message-stack { + display: grid; + gap: var(--space-sm); + padding-top: var(--space-lg); +} + +.message-stack .alert { + margin: 0; + border-radius: var(--radius-md); +} + .hero { padding: var(--space-xxl) 0 var(--space-xxxl); text-align: center; diff --git a/templates/base.html b/templates/base.html index 3011ea3..c134b2f 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,10 +1,9 @@ {% load static %} - - - + + - - + + {% block title %}StudyBuddy{% endblock %} @@ -47,6 +46,18 @@
+ {% if messages %} +
+
+ {% for message in messages %} + + {% endfor %} +
+
+ {% endif %} + {% block content %}{% endblock %}
@@ -96,5 +107,6 @@ + diff --git a/templates/dashboard/index.html b/templates/dashboard/index.html index 3129180..5e57f9a 100644 --- a/templates/dashboard/index.html +++ b/templates/dashboard/index.html @@ -7,12 +7,15 @@
@@ -36,6 +39,43 @@

Dashboard

+
+
+
+ 01 +

No study sessions yet

+

+ Your dashboard is ready. Once the core study workflow is added, + this page will show recent sessions, notes, study totals, and + AI/NLP insight summaries. +

+ +
+ +
+ 02 +

Account access

+ {% if roles %} +
+ {% for role in roles %} + {{ role.display_name }} + {% endfor %} +
+ {% else %} +

+ No product roles have been assigned yet. Role-aware access is + available for future product surfaces. +

+ {% endif %} + +
+
+
+
@@ -82,27 +122,6 @@

Dashboard

- -
-
-
- 01 -

Build your first study plan

-

Add a subject, target study time, and the first session you want to complete.

- -
-
- 02 -

Review account settings

-

Confirm your StudyBuddy profile before personal planning preferences are added.

- -
-
-
{% endblock %} From 511065ab4e7a94fec402925f083c5c332b270de2 Mon Sep 17 00:00:00 2001 From: adrian adewunmi Date: Thu, 7 May 2026 13:26:55 +0100 Subject: [PATCH 5/5] feat(dashboard): update base template and remove unused button from dashboard --- templates/base.html | 3 +-- templates/dashboard/index.html | 3 --- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/templates/base.html b/templates/base.html index c134b2f..d35644d 100644 --- a/templates/base.html +++ b/templates/base.html @@ -7,8 +7,7 @@ {% block title %}StudyBuddy{% endblock %} - - +
diff --git a/templates/dashboard/index.html b/templates/dashboard/index.html index 5e57f9a..20cb598 100644 --- a/templates/dashboard/index.html +++ b/templates/dashboard/index.html @@ -49,9 +49,6 @@

No study sessions yet

this page will show recent sessions, notes, study totals, and AI/NLP insight summaries.

-