Skip to content

fix(advanced-assessment): advanced assessment session timer#162

Merged
oduwoleeyinojuoluwa44 merged 6 commits into
devfrom
fix/advanced-assessment-session-timer
May 29, 2026
Merged

fix(advanced-assessment): advanced assessment session timer#162
oduwoleeyinojuoluwa44 merged 6 commits into
devfrom
fix/advanced-assessment-session-timer

Conversation

@igbonekwu-joy
Copy link
Copy Markdown
Collaborator

@igbonekwu-joy igbonekwu-joy commented May 29, 2026

Description

Fixed advanced assessment session timer data so remaining_seconds no longer stays at ~90 minutes after an attempt is used. The backend now returns 0 once submit is queued (submit_enqueued_at) or scoring completes (completed_at), via shared resolveSessionTimerState() on GET session/:id, start responses, and LT-2 max_seconds_remaining.

Related Issue (Link to Github issue)

N/A

Motivation and Context

Motivation

After a user submitted an advanced assessment (or while it was being scored), the backend could still return remaining_seconds near 5400 (90 minutes) on GET session/:id and related responses. Timer fields were computed only from the original expires_at (start + 90 min), ignoring whether the attempt had been submitted or completed.

That made the UI show a live countdown even though the session was already used, which was confusing and inconsistent with the actual state of the assessment.

Context

Advanced assessment sessions expose timer data on session payloads. This was separate from the processing-lock fix (blocking duplicate starts with ADVANCED_SUBMIT_PROCESSING). That fix stopped new attempts; this one fixes timer data returned for an existing session.

How Has This Been Tested?

Unit tests cover queued-submit and completed sessions.

Screenshots (if appropriate - Postman, etc):

Screenshot 2026-05-29 142118

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 29, 2026

Warning

Review limit reached

@igbonekwu-joy, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 27 minutes and 23 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4b3ec3a0-113c-4a53-86a1-29eddd8a805f

📥 Commits

Reviewing files that changed from the base of the PR and between 968bbb2 and a164534.

📒 Files selected for processing (6)
  • src/common/middleware/case-transform.middleware.ts
  • src/common/utils/case-transform.ts
  • src/modules/talent/assessment/advanced-assessment.service.spec.ts
  • src/modules/talent/assessment/advanced-assessment.service.ts
  • src/modules/verified-profile/verified-profile.service.spec.ts
  • src/shared/messages/error.messages.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/advanced-assessment-session-timer

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@oduwoleeyinojuoluwa44 oduwoleeyinojuoluwa44 merged commit 9cde2fc into dev May 29, 2026
6 checks passed
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.

2 participants