Commit Graph
1616 Commits
Author SHA1 Message Date
Rotimi Best 9de0615e0f fix(ui): enforce must-watch seek lock after the seek settles
Resetting currentTime inside the seeking handler doesn't reliably stick
across sources (HLS re-buffering, emulated YouTube events, coalesced native
seeks), so the snackbar showed but playback continued ahead. The timeupdate
handler then ignored the large forward jump via its delta < 2 guard, making
the skip permanent.

Re-clamp in seeked once the position settles, and add a timeupdate backstop
that snaps back forward jumps (delta >= 2) landing past furthestSeconds.
2026-06-22 10:00:56 +01:00
Rotimi Best 75bd0f4b67 fix(db): add groupmember to GROUP BY in getEnrolledCourses
The query selected groupmember.certificate_earned_at as a non-aggregated
column but only grouped by course.id and course_completion_record.id,
causing Postgres error 42803. Add groupmember.id (its PK) to the GROUP BY
so the certificate column is functionally determined.
2026-06-22 07:12:26 +01:00
Rotimi Best 38775810f3 Merge branch 'main' of https://github.com/classroomio/classroomio 2026-06-22 06:54:33 +01:00
Rotimi Best 3e6d34e629 chore: add missing import 2026-06-22 06:53:12 +01:00
Rotimi Best adfedfee4c fix: user as student in one org forced to lms, hidden bottom in docs 2026-06-22 06:52:35 +01:00
Rotimi Best 7a30c49880 fix: add / to base path in vite 2026-06-22 05:46:45 +01:00
Rotimi Best 81294a47f9 feat: live class sessions, CE workflow, and docs (#683)
Adds live-class session scheduling on lessons (join link, date/time,
timezone) with automatic 24h and 1h reminder emails plus a calendar
invite (.ics), a time-change notification with an updated invite, a
teacher-authored welcome email and session invite on enrollment, and a
"Notify students" quiz nudge.

LMS gets an upcoming live-sessions card and Join buttons, plus a
reusable live-session card component (3 states) in @cio/ui with a
Storybook story. The sidebar content tree now reflects sequential
progression locking like the content list, and the course-completion
confetti regression is fixed.

Org-based emails no longer reference ClassroomIO by name. Docs add
live-class, welcome-email, and course-progression guides, expand the
certificates guide (design, signatures, corrected labels), move
plan-required callouts to the top, flatten how-to-guides to the docs
root with redirects, and add screenshots. Includes an add-docs-image
skill.
2026-06-22 05:43:48 +01:00
Rotimi BestandRotimi Best 3547901de6 fix(dashboard): redirect students on app domain to org LMS (#675)
* fix(dashboard): redirect students on app domain to org LMS

When a student logs in on app.classroomio.com, send them to their org
tenant domain with a full page reload instead of staying on /lms at the
app host. Org sites and self-hosted installs keep the existing behavior.

Students who explicitly open /onboarding while already belonging to an
org are no longer redirected away, so they can still create their own
academy with the same email.

Co-authored-by: Rotimi Best <[email protected]>

* refactor(dashboard): use getOrgPublicUrl instead of duplicate helper

Main added getOrgPublicOrigin for tenant URLs; extend it with
getOrgPublicUrl for path-based redirects and drop the parallel
getOrgSiteUrl helper from org utils.

Co-authored-by: Rotimi Best <[email protected]>

---------
2026-06-21 17:42:02 +01:00
5320f1eb44 fix(dashboard): use verified custom domain for view-as-student handoff (#677)
* fix(dashboard): use verified custom domain for view-as-student handoff

Prefer the org's verified custom domain over window.location.origin when
resolving the public tenant host. This prevents admin URLs like
app.example.com from being used for the student login-link handoff when
the org's public site is example.com.

Co-authored-by: Rotimi Best <[email protected]>

* fix(dashboard): keep self-hosted org origin on window.location

Self-hosted deployments serve admin and LMS from the same URL, so
getOrgPublicOrigin should always return window.location.origin there
rather than preferring a configured custom domain.

Co-authored-by: Rotimi Best <[email protected]>

---------

Co-authored-by: Cursor Agent <[email protected]>
Co-authored-by: Rotimi Best <[email protected]>
2026-06-19 14:50:37 +01:00
Rotimi BestandRotimi Best 0a6db37566 docs(prd): add Zapier integration PRD (#667)
* docs(prd): add Zapier integration PRD

Draft PRD for Zapier integration with locked decisions on private-first distribution, Early Adopter+ plan gating, zapier:read/zapier:write scopes, polling-only triggers for v1, and apps/zapier app location. Covers trigger/action/search catalog, public API surface gaps, dashboard tab, and rollout plan.

Co-authored-by: Rotimi Best <[email protected]>

* docs(prd): revise Zapier integration PRD with OAuth and binary plan gating

Update PRD per planning decisions:

- Auth: switch from API key paste to OAuth 2.0 (authorization_code + refresh_token) shipping in v1; drop type: 'zapier' from organization_api_key.type enum.
- Plan gating: binary feature (Early Adopter+); no monthly Zapier credits, only per-minute rate limits. Plan downgrade revokes all grants immediately.
- Invite link: single shared private invite URL (we want adoption).
- Revoke UX: per-grant revoke in dashboard for safety net only; no bulk Disconnect button.
- Triggers: drop program_completed from v1 (now 5 triggers); deferred to v2.
- Add OAuth schema (oauth_authorization_code, oauth_access_token, oauth_refresh_token), routes, consent screen, plan-guard hook into license.ts.

Co-authored-by: Rotimi Best <[email protected]>

---------
2026-06-18 09:56:45 +01:00
Rotimi Best ab91056a68 docs(prd): add reset student course progress plan (#670) 2026-06-17 20:23:00 +01:00
Rotimi Best f6bd0a5b1a fix(404): redirect Go Home button to classroomio.com 2026-06-16 23:51:07 +01:00
Rotimi Best 219ed2eb92 feat(course): crop cover image to 280x200 on upload
The course cover Upload tab stored the raw file and relied on CSS
object-cover to fake the 280x200 frame at display time. Route uploads
through the existing ImageCropper at a 280/200 aspect ratio so the saved
asset matches the frame. Also teach the cropper UploadTrigger to accept
drag-and-drop so the prior drop-to-upload UX is preserved.
2026-06-16 23:50:55 +01:00
Rotimi Best a3a3c5bf48 fix(landing): render footer grid content for all template variants
The footer grid (brand, socials, columns, CTAs) was only rendered for
the 'classic' variant. For 7 other variants (minimal, bold, saas, tech,
studio, corporate, terminal) the grid content was defined as a snippet
but never invoked, silently dropping social links and other footer
content.
2026-06-16 23:49:33 +01:00
Rotimi Best f35fba36f6 fix(landing): remove excess opacity from studio course card preview image 2026-06-16 23:47:19 +01:00
Rotimi Best 0225614356 fix(ui): keep hovered active underline tab text legible in dark mode
The active tab's data-[state=active]:text-foreground rule outranked the
plain text-primary hover class, so hovering the active tab left white
text on the white hover pill (invisible in dark mode). Mark the hover
text-primary as important so the hovered active tab matches the hover
color of inactive tabs.
2026-06-16 23:39:23 +01:00
Rotimi Best b0e7641082 fix(landing): raise select dropdown z-index above editor overlay
Select.Content portals to document.body at z-50 but the landing page
editor wrapper sits at z-250, causing the dropdown to render behind
the overlay.
2026-06-16 23:25:58 +01:00
Rotimi Best 3f4e00bde8 fix(landing): rename catalog 'Programs' labels to 'Courses'
The org landing templates used 'Program(s)' in catalog headings, the
'view all' link, and the studio/terminal hero counters. That collided
with the app's actual Programs feature and confused users into thinking
a landing-page Program meant an app Program. Default copy now says
'Courses'; renamed the programsCount var to coursesCount to match.
2026-06-16 23:25:11 +01:00
Rotimi Best 58aea2ab15 fix(org-site): 404 on subdomains that don't resolve to an org
A subdomain like xxazzz.myclassroomio.com set isOrgSite=true with a null
org, and the course page fell back to resolving the org from the course
itself — so courses rendered under subdomains that don't exist. Guard
the (org-site) layout so an unresolved org site 404s instead.
2026-06-16 22:57:54 +01:00
Rotimi Best 05a684caa5 fix(course): preserve cover image aspect ratio in settings preview
The preview forced images into a 280x200 box with default object-fit,
squeezing non-matching aspect ratios. Use object-cover so the image
fills the frame at its true aspect ratio and crops overflow instead.
2026-06-16 22:49:38 +01:00
Rotimi Best 7022537471 fix(course): stop capping public course slug length
Public course slugs carry a -<timestamp> uniqueness suffix that pushes
them past the 80-char ZSlug cap, so the org-site lookup returned a 400
and the page fell through to the landing page instead of redirecting to
the first lesson. The course.slug column is unbounded, so validate the
public-course route param with a no-max ZCourseSlug.
2026-06-16 22:44:26 +01:00
Rotimi BestandCursor bbf02df65b fix(core): sanitize optional reward description in course metadata
Use sanitizeOptionalHtml for reward.description now that the DB type
allows it to be omitted, fixing @cio/core build failures.

Co-authored-by: Cursor <[email protected]>
2026-06-16 20:56:42 +01:00
Rotimi BestandCursor ab735505e5 fix(db): align course metadata types with validation schema
Make reward.description and instructor.coursesNo optional in the course
metadata JSON type so API builds match Zod validation.

Co-authored-by: Cursor <[email protected]>
2026-06-16 20:36:01 +01:00
Rotimi Best e9c41fa595 Merge branch 'main' of https://github.com/classroomio/classroomio 2026-06-16 20:25:28 +01:00
Rotimi Best 2350315321 fix(course): make coursesNo and reward description optional; render landing HTML safely
- Allow coursesNo to be omitted in instructor metadata (not required)
- Allow reward description to be omitted when reward object is present
- Replace raw {@html} with SafeHtmlContent in course-pricing,
  course-info-blocks, and embed landing-page components
2026-06-16 02:57:23 +01:00
Abdulmuizz Hamzat 5e2dcf71f4 docs: add dev setup guide and make package scripts cross-platform (Windows) (#664)
* chore: update README with environment setup instructions and demo account credentials

fix: replace rm -rf with rimraf in build scripts for cross-platform compatibility

fix: add shell option to pnpm command in db-setup script for Windows compatibility

chore: update package.json files to use rimraf instead of rm -rf for consistency

chore: add rimraf dependency to pnpm-lock.yaml

feat: add postinstall script to install lefthook git hooks in a cross-platform manner

* docs(qa): add QA test plan, flow checklists, and bug-report workflow

Add a repo-native QA execution layer on top of FEATURE_AUDIT.md (the
feature map). Test cases live in the repo; bugs live in GitHub Issues, so
there is no duplicate tracker to keep in sync.

QA system:
- FEATURE_AUDIT.md: the feature map - every feature, its user flow, and
  edge cases with file:line citations.
- qa/README.md: the workflow, severity/difficulty rubrics, label setup,
  and a static feature -> flow coverage map proving all 42 audited
  features have a test plan.
- qa/flows/01..13: per-flow happy-path checklists covering signup &
  onboarding, course authoring, people/invites/roles, student ->
  certificate, AI assistant & tutor, programs/attendance, community,
  org public site, media & import, org settings, public API/MCP,
  enterprise SSO/licensing, and billing & AI credits.
- .github/ISSUE_TEMPLATE/qa-bug.yml: a QA Bug template requiring
  severity, difficulty, area, repro steps, and a screen recording.

Dev tooling:
- package.json: add db:studio and docker:build scripts.
- packages/db: add db:studio (drizzle-kit studio); fix db:reset on
  Windows by spawning the pnpm.cmd shim with shell:true (Node's
  CVE-2024-27980 fix blocks spawning .cmd/.bat without a shell).

* chore: update QA bug template and README for clarity and improved workflow

* docs: enhance DEV_SETUP_NOTES and README for clarity on prerequisites and email setup
chore: update package.json scripts for cross-platform compatibility
feat: add cross-platform Prettier check script for pre-commit hook

* Remove QA documentation and flow files for ClassroomIO

- Deleted the entire QA README.md file which contained the QA process, bug filing guidelines, and feature coverage map.
- Removed all flow files (01 to 13) that detailed the QA testing processes for various features including admin signup, course authoring, people management, student learning, AI assistant, programs, community, org public site, media management, org settings, public API, enterprise SSO, billing, and AI credits.

* fix: update postinstall script
2026-06-15 17:40:06 +01:00
Rotimi Best 38d912a0b1 docs: add early adopters blog post 2026-06-15 12:03:09 +01:00
Rotimi Best 3e9d8bf3f5 ui: email preview 2026-06-15 08:31:16 +01:00
Rotimi Best b67faada08 fix(storybook): make ResourceListRow course demo responsive
Mirror the course list-row fix in the demo story: make the group a
container query that stacks below 48rem, cap tags at 3 with a +N pill,
and render the Default story full-width (padded) so both the stacked and
column layouts are visible. Uses unprefixed utilities since Storybook
generates those from its own Tailwind scan (prefixed classes only ship
in the prebuilt @cio/ui output.css).
2026-06-15 08:30:05 +01:00
Rotimi Best 0b80440c9c fix(course): make course list-row responsive and cap visible tags
The rigid 7-track grid always rendered in one row, so when the list was
squeezed the tag track shrank below the badge widths and tags overflowed
into the lessons/exercises column. Make the ResourceListRow.Group a
container query and stack each row's grid into a single column below
48rem, passing the column template via a CSS variable so the responsive
override applies. Also cap the row at 3 tags with a +N pill.
2026-06-15 08:29:44 +01:00
Rotimi Best 8503e8595e fix(org-site): size section-cap icons in the landing-page editor
The moving-icons family sizes its SVG via a numeric `size` prop and only
forwards `class` to the wrapper div, so the cap's `size-3.5` class never
reached the SVG and icons rendered at the default 24px, overflowing the
cap. Pass size={14} to the cap icon.
2026-06-14 19:07:19 +01:00
Rotimi Best f74788ab45 fix(storybook): import email templates from isolated entry to avoid Vite bundling error 2026-06-14 18:35:03 +01:00
Rotimi Best 2a6275ea0f refactor(email): unify email template shell between production and Storybook 2026-06-14 18:21:26 +01:00
Rotimi Best e89023adf5 fix(org-site): redirect students away from the admin dashboard to the LMS
A student opening /org/[slug] on self-hosted stayed on the admin
dashboard. The existing routeUserToNextPage redirect is gated by
shouldRedirectOnAuth (login/signup/onboarding only) and runs once at app
init, so it never caught this route. Add a reactive guard in the admin
org layout that sends students to /lms, gated on
appInitApi.isInitializedAndReady so the role is actually known before
deciding (the student flag defaults to false while loading).
2026-06-14 10:31:29 +01:00
Rotimi Best 0c395e9f1b fix(org-site): stabilize landing-page nav auth button
The auth button derived from stores that hydrate in stages, so it
flashed through Login -> Dashboard -> Go to LMS as isLoggedIn and the
role/basePath settled at different times. Gate the label on
appInitApi.isInitializedAndReady so it only renders once the account
(and thus role) has loaded, and show a spinner in the button while a
logged-in user's experience resolves. Add separate loading and disabled
flags to authAction and wire them through all theme navs.
2026-06-14 10:10:14 +01:00
Rotimi Best a411c50526 fix(ui): correct underline tab hover text color
The hovered tab used text-primary-foreground for inactive tabs, which is
near-white — the same token as the hover pill background — so the label
disappeared. Drop the override and keep the hover label on text-primary.
2026-06-14 10:09:55 +01:00
Rotimi Best c97284f870 feat(domains): support apex domains and non-.com TLDs
Loosen the custom-domain regex to accept apex domains (1+ labels) in
addition to subdomains; the TLD already allowed any letters. Suppress
the CNAME record for apex hostnames since a CNAME is invalid at the zone
apex, and surface only the A record there. Drop the frontend apex
rejection and the misleading ".com" input suffix, and render the
domain-input prefix/suffix addons only when set.
2026-06-14 10:09:40 +01:00
Rotimi Best ee4d4922d6 fix: return clear error when social auth provider is not configured 2026-06-14 09:56:30 +01:00
Rotimi Best 64571dd5ec docs: add stage and commit skill, format 2026-06-14 09:24:15 +01:00
Rotimi Best 0975f82c8b fix(widget): powered toggle persistence, copy buttons, version dates, showLessonsCount, color pickers, and loading spinner 2026-06-13 11:24:20 +01:00
Rotimi Best 094683b551 fix: pull user from locals and theme picker default 2026-06-13 09:55:34 +01:00
Rotimi Best 977176dbe2 fix: remove dependency from tenant router 2026-06-12 10:06:06 +01:00
Rotimi Best cd3b252ea2 fix(tenant-router): build @cio/utils before wrangler bundle
Wrangler resolves @cio/utils/constants/* from dist/. Run utils build in
predeploy, predev, and pretypecheck so Cloudflare deploy does not fail with
a missing embeds module.
2026-06-12 02:27:49 +01:00
Rotimi Best ec6d97c482 chore: remove unused log 2026-06-12 02:25:02 +01:00
Rotimi Best 0b5fc27d1c refactor(tenant-router): import embed routes from @cio/utils
Replace the cross-package relative source import with the workspace
package subpath so embed routing uses the canonical constants module.
2026-06-12 02:23:48 +01:00
Rotimi Best 367ddcddd7 feat(embeds): add embed.classroomio.com public widget host
Serve widgets from short public URLs via tenant-router with R2-backed
assets and runtime API_URL injection, so copy-paste snippets hide infra
paths. Update widget payloads, CSP, upload purge URLs, and dev-only API
inject; document format/stage workflow in AGENTS.md and fix ui-prefix-check
YAML syntax.
2026-06-12 02:06:37 +01:00
Rotimi Best c868b2f23f perf: edge-cache static assets and shrink org-route bundle
The /org/[slug] routes loaded 250+ JS chunks and, after a deploy, every
chunk missed Cloudflare's edge cache and stampeded the single origin (up
to 48s to serve one static file) — the "keeps loading" lockout.

- tenant-router: opt /_app/immutable/* into the edge cache via
  cf.cacheEverything; setting Cache-Control alone never populated it
- course/api: mark the 14 API singletons /* @__PURE__ */ so the barrel
  tree-shakes instead of dragging every API into each importer
- courses page: import directly instead of via the feature barrels

Cuts the courses route from 257 to 225 static chunks and keeps static
assets off the origin after the first edge fill.
2026-06-12 01:51:05 +01:00
Rotimi Best 8fd80e9dc5 fix: ui prefix breaking sidebar 2026-06-12 01:03:17 +01:00
Rotimi Best 6c918329cb chore: update lock file 2026-06-11 23:21:38 +01:00
Rotimi Best 899a9f2b51 fix: apply ui: prefix to all packages/ui components and automate it 2026-06-11 23:18:40 +01:00