Skip to content

update dev#22

Merged
Ronaldo93 merged 37 commits into
devfrom
main
Jun 29, 2026
Merged

update dev#22
Ronaldo93 merged 37 commits into
devfrom
main

Conversation

@Ronaldo93

@Ronaldo93 Ronaldo93 commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features

    • Added a new admin experience for managing invitation codes and viewing dashboard stats.
    • Introduced lesson progress tracking in the student course area, including completed/in-progress indicators.
    • Added AI chat support and an “ask about this error” action from the code editor.
  • Bug Fixes

    • Improved authentication flows, session handling, and sign-in/sign-out tracking.
    • Updated deployment workflows to better support preview and production releases.
  • Documentation

    • Added setup and usage guidance for the admin app.

Ronaldo93 and others added 30 commits June 27, 2026 21:32
refactor admin component for cleaner code
Navigation bar for switching between admin sites. Added role as a field to prevent convex error while creating account.
This is not the final version as there are some rough edge i.e. clicking run wouldn't count as in progress
Fix backend route that were not executing student's code
chore: adds langgraph for package
Comment out build and deploy steps for production.
@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 77125fcd-40fd-415d-9eb6-c8544135c0e6

📥 Commits

Reviewing files that changed from the base of the PR and between d5dc015 and cc08451.

⛔ Files ignored due to path filters (12)
  • admin/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • server/uv.lock is excluded by !**/*.lock
  • web/convex/_generated/api.d.ts is excluded by !**/_generated/**
  • web/convex/_generated/api.js is excluded by !**/_generated/**
  • web/convex/_generated/dataModel.d.ts is excluded by !**/_generated/**
  • web/convex/_generated/server.d.ts is excluded by !**/_generated/**
  • web/convex/_generated/server.js is excluded by !**/_generated/**
  • web/convex/betterAuth/_generated/api.ts is excluded by !**/_generated/**
  • web/convex/betterAuth/_generated/component.ts is excluded by !**/_generated/**
  • web/convex/betterAuth/_generated/dataModel.ts is excluded by !**/_generated/**
  • web/convex/betterAuth/_generated/server.ts is excluded by !**/_generated/**
  • web/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (69)
  • .github/workflows/deploy-preview.yml
  • .github/workflows/deploy-production.yml
  • .github/workflows/release.yaml
  • .gitignore
  • CHANGELOG.md
  • admin/.env.example
  • admin/.gitignore
  • admin/README.md
  • admin/index.html
  • admin/package.json
  • admin/src/App.tsx
  • admin/src/api.ts
  • admin/src/components/Layout.tsx
  • admin/src/components/Loading.tsx
  • admin/src/components/Login.tsx
  • admin/src/components/invitation-codes/CreateCodeForm.tsx
  • admin/src/components/invitation-codes/InvitationCodesTable.tsx
  • admin/src/components/invitation-codes/columns.tsx
  • admin/src/components/invitation-codes/types.ts
  • admin/src/context/AuthContext.tsx
  • admin/src/index.css
  • admin/src/index.tsx
  • admin/src/lib/auth-client.ts
  • admin/src/lib/convex.ts
  • admin/src/lib/webConvexApi.ts
  • admin/src/pages/DashboardPage.tsx
  • admin/src/pages/InvitationCodesPage.tsx
  • admin/tsconfig.json
  • admin/vite.config.ts
  • server/.env.example
  • server/ai/graph.py
  • server/ai/llm/openai.py
  • server/main.py
  • server/model/chat.py
  • server/pyproject.toml
  • web/convex/auth.ts
  • web/convex/betterAuth/adapter.ts
  • web/convex/betterAuth/auth.ts
  • web/convex/betterAuth/convex.config.ts
  • web/convex/betterAuth/schema.ts
  • web/convex/convex.config.ts
  • web/convex/courses.ts
  • web/convex/http.ts
  • web/convex/init.ts
  • web/convex/invitationCodes.ts
  • web/convex/schema.ts
  • web/package.json
  • web/pnpm-workspace.yaml
  • web/src/components/auth/forms/MagicLinkForm.tsx
  • web/src/components/home/CourseList.tsx
  • web/src/components/ide/Terminal.tsx
  • web/src/components/nav/Navbar.tsx
  • web/src/components/nav/UserStatusButton.tsx
  • web/src/components/student/CodeEditor.tsx
  • web/src/components/student/SidePane.tsx
  • web/src/components/student/problem/ChatBox.tsx
  • web/src/integrations/better-auth/header-user.tsx
  • web/src/lib/api.ts
  • web/src/lib/auth-callback.ts
  • web/src/lib/auth-client.ts
  • web/src/lib/auth.functions.ts
  • web/src/routes/__root.tsx
  • web/src/routes/_authenticated.course.tsx
  • web/src/routes/_authenticated.tsx
  • web/src/routes/auth.tsx
  • web/src/styles.css
  • web/test/auth-callback.test.ts
  • web/vite.config.ts
  • web/wrangler.jsonc

📝 Walkthrough

Walkthrough

Adds a SolidJS admin app, a FastAPI chat endpoint backed by LangGraph/OpenAI, Convex schema and API changes for auth and lesson progress, new chat and auth flows in the web app, and Cloudflare deploy workflows.

Changes

Admin App

Layer / File(s) Summary
Project scaffolding and configuration
admin/.gitignore, admin/README.md, admin/package.json, admin/tsconfig.json, admin/vite.config.ts, admin/index.html, admin/src/index.css, admin/src/index.tsx, admin/.env.example
Adds the admin project setup, build tooling, HTML shell, global styles, startup entrypoint, ignore rules, README, and example env vars.
Auth context, Convex client, and API types
admin/src/context/AuthContext.tsx, admin/src/lib/auth-client.ts, admin/src/lib/convex.ts, admin/src/api.ts, admin/src/lib/webConvexApi.ts
Creates the Better Auth client, Convex client singleton, typed Convex API surfaces, and the SolidJS auth context.
App routing and login UI
admin/src/App.tsx, admin/src/components/Loading.tsx, admin/src/components/Login.tsx
Wires protected routes and the loading placeholder, and adds the login page with form validation and auth submission.
App shell and navigation layout
admin/src/components/Layout.tsx
Adds the responsive layout with navigation, sign-out controls, and signed-in user display.
Invitation codes feature
admin/src/components/invitation-codes/types.ts, admin/src/components/invitation-codes/columns.tsx, admin/src/components/invitation-codes/CreateCodeForm.tsx, admin/src/components/invitation-codes/InvitationCodesTable.tsx, admin/src/pages/InvitationCodesPage.tsx
Adds the invitation code type, table columns, create form, sortable table, and page that loads and refreshes code data.
Dashboard page
admin/src/pages/DashboardPage.tsx
Fetches invitation codes for dashboard stats and renders summary cards plus account information.

Server AI Chat

Layer / File(s) Summary
LLM, LangGraph, Chat model, and dependencies
server/ai/llm/openai.py, server/ai/graph.py, server/model/chat.py, server/.env.example, server/pyproject.toml
Initializes the OpenAI chat model, builds a single-node LangGraph, defines the chat request model, adds OPENAI_API_KEY, and extends runtime dependencies.
/chat endpoint and /execute updates
server/main.py
Adds POST /chat that maps conversation to LangGraph messages and returns 502 on error; updates /execute to async with request logging.

Web App

Layer / File(s) Summary
Convex schema, Better-Auth config, and adapter
web/convex/schema.ts, web/convex/auth.ts, web/convex/betterAuth/schema.ts, web/convex/betterAuth/convex.config.ts, web/convex/betterAuth/auth.ts, web/convex/betterAuth/adapter.ts, web/convex/convex.config.ts, web/convex/http.ts, web/convex/init.ts
Adds users.role and lessonProgress, refactors Better Auth setup, adds the local Better Auth Convex component and schema, enables CORS, and adds admin-user initialization.
Invitation codes Convex API extensions
web/convex/invitationCodes.ts
Extends add with optional quantity and adds admin-facing list, remove, delete, and update endpoints.
Lesson progress Convex endpoints
web/convex/courses.ts
Adds token-based lesson progress lookup, status mutation, and completion stats queries.
Auth client, callback utilities, and server analytics
web/src/lib/auth-client.ts, web/src/lib/auth-callback.ts, web/src/lib/auth.functions.ts, web/src/routes/__root.tsx, web/test/auth-callback.test.ts
Disables auth focus refetching, introduces callback helpers and tests, adds sign-in capture, and switches the root Convex provider.
Auth route flows and PostHog events
web/src/routes/_authenticated.tsx, web/src/routes/auth.tsx, web/src/components/auth/forms/MagicLinkForm.tsx
Handles magic-link completion tracking, invitation-code redirect callbacks, sign-out telemetry, and the updated session-loading condition.
AI chat integration in the student IDE
web/src/lib/api.ts, web/src/components/student/problem/ChatBox.tsx, web/src/components/student/SidePane.tsx, web/src/components/ide/Terminal.tsx, web/src/components/student/CodeEditor.tsx, web/src/routes/_authenticated.course.tsx
Adds backend chat sending, pending-message plumbing, error-to-chat propagation, lesson status updates, and the new ChatBox request/response flow.
Course list progress display and Navbar
web/src/components/home/CourseList.tsx, web/src/components/nav/Navbar.tsx, web/src/components/nav/UserStatusButton.tsx, web/src/styles.css
Loads per-user lesson progress, adds week progress UI, centralizes card status styles, introduces the navbar and user status button, and removes global link styles.
Cloudflare Workers deployment config
web/wrangler.jsonc, web/vite.config.ts, web/package.json, web/pnpm-workspace.yaml
Adds Wrangler config, Cloudflare Vite integration, web deployment scripts and dependencies, and build permissions for Cloudflare tooling.

CI/CD Workflows

Layer / File(s) Summary
Deploy workflows and release updates
.github/workflows/deploy-preview.yml, .github/workflows/deploy-production.yml, .github/workflows/release.yaml, .gitignore, CHANGELOG.md
Adds PR preview and production deploy workflows, updates release automation, adds uv.lock to .gitignore, and prepends changelog entries for v0.4.0–v0.6.3.

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Possibly related PRs

  • RMIT-BDSL/ExemplAI#2: Both PRs touch the student chat flow in web/src/components/student/problem/ChatBox.tsx and related IDE wiring.
  • RMIT-BDSL/ExemplAI#15: Both PRs work in the admin app and shared Convex/web auth surfaces.
  • RMIT-BDSL/ExemplAI#18: Both PRs modify the Cloudflare deploy workflows and web deployment configuration.

Suggested reviewers

  • millecodex

Poem

🐇 I hopped through routes and schemas bright,
With chat and code in springy flight.
New badges, graphs, and preview skies,
A bunny grins with widened eyes.
The build deploys, the sessions sing—
Hooray for every woven thing!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch main

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

@Ronaldo93 Ronaldo93 merged commit 2f12685 into dev Jun 29, 2026
1 check was pending
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Preview Deployment Successful!

Preview environment deployment has been built and verified:

  • Convex Backend: Deployed as preview environment for branch main.
  • Checks: Code compilation, lint/format check, and tests passed.

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Preview Deployed Successfully!

🔗 Deployment URL: https://7d88472a-exemplai.ltorez132.workers.dev

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.

3 participants