Polish Novya UI with brand colors, first-load skeletons, and session transition overlay.

Keep chat pinned to the latest message while AI thinks or streams, and align buttons/inputs with the logo teal/blue focus treatment.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
ar.badiei
2026-09-09 01:31:24 +03:30
co-authored by Cursor
parent 4ac0c16665
commit 8016b8f45e
56 changed files with 1874 additions and 529 deletions
@@ -5,6 +5,7 @@ import {
getOrCreateJourney,
deriveCurrentStep,
derivePermissions,
countCompletedSessions,
} from '../journey/journey.service.js';
import {
PCQ_QUESTION_IDS,
@@ -94,8 +95,11 @@ export function getPcq24Scale() {
}
export async function submitAttempt(userId: bigint, input: SubmitAttemptInput) {
const journey = await getOrCreateJourney(userId);
const permissions = derivePermissions(journey);
const [journey, completedSessionCount] = await Promise.all([
getOrCreateJourney(userId),
countCompletedSessions(userId),
]);
const permissions = derivePermissions(journey, { completedSessionCount });
if (input.phase === 'pre' && !permissions.canTakePreTest) {
throw new ConflictError('Pre-test already completed');
@@ -212,10 +216,11 @@ export async function getLatestAttempt(userId: bigint, phase: AttemptPhase) {
}
export async function getAssessmentSummary(userId: bigint) {
const [pre, post, journey] = await Promise.all([
const [pre, post, journey, completedSessionCount] = await Promise.all([
getLatestAttempt(userId, AttemptPhase.pre),
getLatestAttempt(userId, AttemptPhase.post),
getOrCreateJourney(userId),
countCompletedSessions(userId),
]);
return {
@@ -223,7 +228,7 @@ export async function getAssessmentSummary(userId: bigint) {
post,
journey: {
currentStep: deriveCurrentStep(journey),
permissions: derivePermissions(journey),
permissions: derivePermissions(journey, { completedSessionCount }),
},
};
}