Skip to content

feat: add student tiles to dashboard - #1833

Merged
Japrolol merged 8 commits into
pz_feat_1717_add_dashboard_admin_tilesfrom
pz_feat_1718_add_dashboard_student_tiles
Aug 7, 2026
Merged

feat: add student tiles to dashboard#1833
Japrolol merged 8 commits into
pz_feat_1717_add_dashboard_admin_tilesfrom
pz_feat_1718_add_dashboard_student_tiles

Conversation

@Pieselak

@Pieselak Pieselak commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Issue(s)

Overview

Student Dashboard Tiles turn the Mentingo home page into a personalized learning action center. Learners can quickly continue active courses, review mandatory training, track completion, access certificates, and start daily AI Mentor practice.

Business Value

The feature reduces navigation, highlights urgent learning, and makes progress and achievements more visible. It supports higher engagement, better compliance follow-through, and a more consistent learner experience without additional administrative effort.

Screenshots / Video

image

@Pieselak Pieselak self-assigned this Jul 31, 2026
@Pieselak Pieselak added the review me 👀 PR is ready to be reviewed label Jul 31, 2026
@Pieselak
Pieselak changed the base branch from main to staging July 31, 2026 10:04
@Japrolol
Japrolol changed the base branch from staging to pz_feat_1714_add_dashboard August 4, 2026 14:04
@Japrolol
Japrolol changed the base branch from pz_feat_1714_add_dashboard to pz_feat_1717_add_dashboard_admin_tiles August 4, 2026 14:04

@Japrolol Japrolol left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generated api client is missing new methods, practice-session table is missing rls, getStudentDashboardSummary will crash the app in scenarios with more data. Practice retry/generation is not idempotent and separation of concerns is weak.

Let's fix all that

),
type: sql<AiMentorType>`${aiMentorLessons.type}`,
name: this.localizationService.getLocalizedSqlField(aiMentorLessons.name, language),
title: sql<string>`COALESCE(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why give these repository methods more to do? Since practice sessions work separately, can we use separate "entrypoints"

currentUser.userId,
practiceDate,
);
if (!existing) throw new ConflictException("AI Mentor practice already exists");

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

translation

currentUser: CurrentUserType,
): Promise<AiMentorPracticeSessionResponse> {
const session = await this.aiRepository.findPracticeSessionById(sessionId);
if (!session) throw new NotFoundException("AI Mentor practice not found");

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

translation

const session = await this.aiRepository.findPracticeSessionById(sessionId);
if (!session) throw new NotFoundException("AI Mentor practice not found");
if (session.userId !== currentUser.userId)
throw new ForbiddenException("You don't have access to this AI Mentor practice");

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

translations in entire file

});
const { generateObject, jsonSchema } = await loadAiSdk();
const openai = await this.aiRuntimeService.getAISdkOpenAI();
const { object } = await generateObject({

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add fallback to luma service

);
}

if (practice.status === "queued" || practice.status === "processing") {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use enum

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too much is happening in one file, extract

const containerRef = useRef<HTMLDivElement>(null);
const transport = useMemo(() => createAiMentorChatTransport(threadId), [threadId]);
const { messages, setMessages, sendMessage, status } = useChat({ transport });
const isProcessing = status === "submitted" || status === "streaming";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this status comes from ai-sdk, but can we use enum for it and use it in other places where we have ai chat too?

const { data, isLoading, isError, refetch } = useStudentDashboardSummary();
const metadata = DASHBOARD_WIDGET_REGISTRY[DASHBOARD_WIDGET_IDS.STUDENT_REQUIRED_COURSE];
const courses = data?.requiredCourses ?? [];
const overdueCount = courses.filter((course) => course.urgency === "overdue").length;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use enum

"border-error-100 bg-error-50 hover:border-error-300 focus-visible:ring-error-300":
course.urgency === "overdue",
"border-warning-100 bg-warning-50 hover:border-warning-300 focus-visible:ring-warning-300":
course.urgency === "dueSoon",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use enum

@Japrolol
Japrolol force-pushed the pz_feat_1718_add_dashboard_student_tiles branch from a17f718 to e1eb3c2 Compare August 6, 2026 06:59
@Japrolol
Japrolol force-pushed the pz_feat_1717_add_dashboard_admin_tiles branch from bc66d1f to 41dc8cf Compare August 7, 2026 09:41
@Japrolol
Japrolol force-pushed the pz_feat_1718_add_dashboard_student_tiles branch from f18483c to 192f1bc Compare August 7, 2026 10:45
@Japrolol
Japrolol self-requested a review August 7, 2026 12:43
@Japrolol
Japrolol merged commit 6958969 into pz_feat_1717_add_dashboard_admin_tiles Aug 7, 2026
7 checks passed
@Japrolol
Japrolol deleted the pz_feat_1718_add_dashboard_student_tiles branch August 7, 2026 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review me 👀 PR is ready to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants