Skip to content

feat: vibe lens ai solver - #1202

Open
Khushidosi13 wants to merge 11 commits into
vicharanashala:mainfrom
Khushidosi13:main
Open

Khushidosi13 wants to merge 11 commits into
vicharanashala:mainfrom
Khushidosi13:main

Conversation

@Khushidosi13

Copy link
Copy Markdown

Description

This pull request integrates the ViBe Lens AI Solver, an AI-powered helper tool designed to enhance the student learning experience:

  • ViBe Lens Notebook: Allows students to capture snapshots of video frames (such as code snippets or diagram slides) directly from their lecture player, save them to their notebook, and crop specific areas of interest.
  • AI Code Solver: Explains the selected code or concepts in a clear, student-friendly layout with copyable code snippets.
  • Course-Wide Control: Provides instructors with a single settings toggle to enable or disable the ViBe Lens AI Solver feature for the entire course.

…nterfaces and MongoDB database repository queries
…ping, and audit trail handling in controllers and services
… frontend useEditProctoringSettings query mutation hook
…l on the instructor panel and student player settings pipeline integration
…er overrides, and custom MERN course quiz adjustments on feat/AiSolver
…els interface and class-transformer properties mapping
…gs query effect and force close handler to player lens UI when disabled
…octorsDisabled to true, and default showProctorDialog to false
…ratch scripts, and Firebase emulator wrapper
# Conflicts:
#	backend/src/shared/database/providers/mongo/MongoDatabase.ts
@github-actions github-actions Bot added frontend Changes to the frontend of the project dependencies Modifications to any frontend or backend external dependencies backend labels Aug 1, 2026
@JoelJosephPhilip
JoelJosephPhilip self-requested a review October 3, 2026 08:07
@JoelJosephPhilip

JoelJosephPhilip commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

Reviewed this. There are a few serious issues, and the PR currently has merge conflicts with main.

The "AI Code Solver" isn't actually AI : it's hardcoded demo content. frontend/src/components/vibe-lens-panel.tsx has no API call anywhere in it (no fetch, no backend route, nothing in backend/src for a lens/solver endpoint). The "explanation" is matched entirely off specific YouTube video IDs (zjkBMFhNj_g, pBBe1pk8yKw, 94BdnDVHrP0) or by checking crop pixel coordinates (e.g. if (cropY < 12) → a hardcoded "VS Code File Navigation Tab Menu" explanation). For any video that isn't one of those three demo IDs, it falls back to a generic made-up "ViBe Course Dashboard" explanation based only on crop position, not the actual frame content. This explains the backend/scratch/download_*.js scripts too : they exist to download those exact three videos. As it stands, this only "works" for the demo videos; on a real course it will confidently show students an explanation that has nothing to do with what they captured.

Breaks real login. In AuthController.ts:

const authHost = process.env.FIREBASE_AUTH_EMULATOR_HOST
  ? `http://${process.env.FIREBASE_AUTH_EMULATOR_HOST}`
  : 'https://identitytoolkit.googleapis.com';
const data = await fetch(
  `${authHost}/identitytoolkit.googleapis.com/v1/accounts:signInWithPassword?key=...`,

Outside the local emulator, authHost is already https://identitytoolkit.googleapis.com, so the final URL doubles the path to .../identitytoolkit.googleapis.com/identitytoolkit.googleapis.com/v1/.... That 404s against the real Firebase endpoint, so password sign-in would break anywhere this isn't running against the local Auth Emulator.

Validation regression: @IsUrl() was removed from the video URL field in ItemValidators.ts with no explanation, so that field now accepts any string.

Shouldn't be in this PR: 25 debug/scratch scripts under backend/scratch/ plus backend/start_emulator.js — hardcoded test credentials, hardcoded mongodb://localhost:27017 connections, and two new backend dependencies (@distube/ytdl-core, youtube-dl-exec) added only to download the three demo videos referenced above.

Unrelated changes bundled in, worth a second look: BaseService._withTransaction (the shared transaction helper used across the whole app) now silently falls back to no-session mode on a specific Mongo error string; versionStatus: "published" was added to several $or filters in CourseRepository/EnrollmentRepository that previously only matched "active", which changes what counts as visible/enrollable course-wide, not just for this feature.

Also: GitHub is showing this PR as conflicting with main (CONFLICTING/DIRTY) : could you rebase/merge and resolve those before this goes further?

@JoelJosephPhilip JoelJosephPhilip 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.

Requesting changes see the detailed comment above. Two blocking issues plus the open conflicts:

  • The "AI Code Solver" has no real AI/backend call anywhere : it's hardcoded demo content keyed to three specific YouTube video IDs, with a generic made-up fallback for everything else.
  • AuthController.ts's password sign-in builds a doubled, broken URL outside the local Firebase emulator, which breaks real login.
  • The PR is currently showing as conflicting with main and needs a rebase/merge.

Happy to re-review once these are addressed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend dependencies Modifications to any frontend or backend external dependencies frontend Changes to the frontend of the project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants