From b8bf70607ad0430dfd0b05e6b34b077a19cde4ba Mon Sep 17 00:00:00 2001 From: shaitrish37 <244331886+shaitrish37@users.noreply.github.com> Date: Sat, 5 Dec 2026 17:07:05 +0600 Subject: [PATCH 01/15] Rupok v0.2.9: the Course37 panel loads from course37.com (not admin.course37.com) --- CHANGELOG.md | 8 ++++ Cargo.lock | 18 +++---- Cargo.toml | 2 +- README.md | 2 +- apps/board/bn/download/index.html | 2 +- apps/board/download/index.html | 2 +- apps/board/package.json | 2 +- apps/board/site/pages/download.mjs | 2 +- apps/board/src/components/settings/About.tsx | 2 +- apps/board/src/partner/registry.ts | 2 +- apps/board/test/partner.test.ts | 20 ++++---- apps/desktop/package.json | 2 +- apps/desktop/src/partner.rs | 50 ++++++++++---------- apps/desktop/tauri.conf.json | 2 +- 14 files changed, 62 insertions(+), 54 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f103763..dcc5f8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ notes come after each list. Downloads are on [rupok.app/download](https://rupok.app/download/) and on [GitHub Releases](https://github.com/Shaitrish/rupok/releases). +## v0.2.9 (5 December 2026) + +### For teachers + +- **The Course37 class panel opens:** it now loads from course37.com, where + Course37 serves it (v0.2.8 pointed at admin.course37.com, which is not + the class panel, so the panel said "refused to connect"). + ## v0.2.8 (5 December 2026) ### For teachers diff --git a/Cargo.lock b/Cargo.lock index 381211c..d61a25b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4885,7 +4885,7 @@ dependencies = [ [[package]] name = "rupok-bench" -version = "0.2.8" +version = "0.2.9" dependencies = [ "pollster", "rupok-core", @@ -4898,7 +4898,7 @@ dependencies = [ [[package]] name = "rupok-cli" -version = "0.2.8" +version = "0.2.9" dependencies = [ "agent-client-protocol", "anyhow", @@ -4928,7 +4928,7 @@ dependencies = [ [[package]] name = "rupok-core" -version = "0.2.8" +version = "0.2.9" dependencies = [ "loro", "rstar", @@ -4940,7 +4940,7 @@ dependencies = [ [[package]] name = "rupok-desktop" -version = "0.2.8" +version = "0.2.9" dependencies = [ "gtk", "notify", @@ -4973,7 +4973,7 @@ dependencies = [ [[package]] name = "rupok-format" -version = "0.2.8" +version = "0.2.9" dependencies = [ "blake3", "loro", @@ -4987,14 +4987,14 @@ dependencies = [ [[package]] name = "rupok-ink" -version = "0.2.8" +version = "0.2.9" dependencies = [ "thiserror 2.0.21", ] [[package]] name = "rupok-live" -version = "0.2.8" +version = "0.2.9" dependencies = [ "base64 0.23.1", "loro", @@ -5008,7 +5008,7 @@ dependencies = [ [[package]] name = "rupok-render" -version = "0.2.8" +version = "0.2.9" dependencies = [ "bytemuck", "pollster", @@ -5019,7 +5019,7 @@ dependencies = [ [[package]] name = "rupok-wasm" -version = "0.2.8" +version = "0.2.9" dependencies = [ "console_error_panic_hook", "js-sys", diff --git a/Cargo.toml b/Cargo.toml index 368e5a6..8c6744c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ resolver = "3" members = ["crates/rupok-ink", "crates/rupok-core", "crates/rupok-format", "crates/rupok-live", "crates/rupok-render", "crates/rupok-cli", "crates/rupok-wasm", "bench", "apps/desktop"] [workspace.package] -version = "0.2.8" +version = "0.2.9" edition = "2024" rust-version = "1.100" license = "AGPL-3.0-or-later" diff --git a/README.md b/README.md index 543ec7c..c4fc981 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Write on slides with a pen. Drop in live, interactive lessons your AI made. Repl
rupok.app · works in Chrome, Edge and Safari, installable as an app · desktop app for Windows, macOS and Linux
-> **Status: early alpha (v0.2.8).** The board works in the browser today at +> **Status: early alpha (v0.2.9).** The board works in the browser today at > [rupok.app](https://rupok.app): pen and highlighter, slides and PDFs, > Smart Ink and maths, Smart Objects with presets, the Library, Teach mode, > replay, PDF export and `.rpk` lesson files, plus AI chat with your own diff --git a/apps/board/bn/download/index.html b/apps/board/bn/download/index.html index 24eb3cd..03bcdfc 100644 --- a/apps/board/bn/download/index.html +++ b/apps/board/bn/download/index.html @@ -30,7 +30,7 @@ - +x
", "javascript:alert(1)", - "blob:https://admin.course37.com/1234", + "blob:https://course37.com/1234", "about:config", - "https://user:pw@admin.course37.com/", + "https://user:pw@course37.com/", "mailto:a@b.c", "garbage", ] { @@ -517,7 +517,7 @@ mod tests { let s = init_script(&p.panel_origins(false), p.path); // Only on the panel's own origin(s) and path, only in the top frame. assert!(s.contains( - r#"var ORIGINS = ["https://admin.course37.com"], PATH = "/rupok-panel", MAX = 262144"# + r#"var ORIGINS = ["https://course37.com"], PATH = "/rupok-panel", MAX = 262144"# )); assert!(s.contains("if (window.top !== window) return;")); assert!(s.contains("ORIGINS.indexOf(location.origin) < 0) return;")); @@ -534,6 +534,6 @@ mod tests { assert!(!s.contains("__ORIGINS__") && !s.contains("__PATH__") && !s.contains("__MAX__")); assert_eq!(js_string("a\"b\\c"), r#""a\"b\\c\u003c/""#); let dev = init_script(&p.panel_origins(true), p.path); - assert!(dev.contains(r#"["https://admin.course37.com","http://localhost:3132"]"#)); + assert!(dev.contains(r#"["https://course37.com","http://localhost:3132"]"#)); } } diff --git a/apps/desktop/tauri.conf.json b/apps/desktop/tauri.conf.json index abdde5f..a6ac7e8 100644 --- a/apps/desktop/tauri.conf.json +++ b/apps/desktop/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "./node_modules/@tauri-apps/cli/config.schema.json", "productName": "Rupok", - "version": "0.2.8", + "version": "0.2.9", "identifier": "app.rupok.desktop", "build": { "frontendDist": "../board/dist", From 31986ae73937e16486bfd15bd63062be5e2fb2a8 Mon Sep 17 00:00:00 2001 From: shaitrish37 <244331886+shaitrish37@users.noreply.github.com> Date: Sat, 5 Dec 2026 17:08:46 +0600 Subject: [PATCH 02/15] Icons: a deeper mint for the icon accent on light surfaces (3.9:1 on white instead of 2.1:1) --- CHANGELOG.md | 2 ++ apps/board/src/styles.css | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dcc5f8e..99cf321 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ notes come after each list. Downloads are on - **The Course37 class panel opens:** it now loads from course37.com, where Course37 serves it (v0.2.8 pointed at admin.course37.com, which is not the class panel, so the panel said "refused to connect"). +- **Clearer mint in the icons on light backgrounds:** the mint part of each + icon is a deeper green in the light theme, so it no longer fades on white. ## v0.2.8 (5 December 2026) diff --git a/apps/board/src/styles.css b/apps/board/src/styles.css index c8aaf51..6068ab8 100644 --- a/apps/board/src/styles.css +++ b/apps/board/src/styles.css @@ -128,6 +128,11 @@ svg.icon { display: block; flex: none; } /* Rupok icons (components/Icon.tsx, icons/rupok/*.svg): the body is * currentColor, the one mint part (.a fill, .as stroke) is --icon-accent. */ .icon.rp { --icon-accent: var(--accent-9); } +/* On a light surface the bright accent is too faint for a small shape (mint + * #20c997 is 2.1:1 on white): a deeper shade of it, 3:1 or more. */ +:root:not([data-theme="dark"]) .icon.rp { --icon-accent: var(--accent-10); } +:root:not([data-theme="dark"]):not([data-accent]) .icon.rp, +:root:not([data-theme="dark"])[data-accent="mint"] .icon.rp { --icon-accent: #099268; } :root[data-accent="graphite"] .icon.rp { --icon-accent: var(--gray-9); } .icon.rp .a { fill: var(--icon-accent); } .icon.rp .a[stroke], .icon.rp .as { stroke: var(--icon-accent); } From c3314c17c1bf6ceb97b22affb7052341bbb3e25c Mon Sep 17 00:00:00 2001 From: shaitrish37 <244331886+shaitrish37@users.noreply.github.com> Date: Sat, 5 Dec 2026 17:08:58 +0600 Subject: [PATCH 03/15] Icons: keep the light-surface accent rules weak (:where) so graphite, disabled, solid and danger still win --- apps/board/src/styles.css | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/board/src/styles.css b/apps/board/src/styles.css index 6068ab8..c48928c 100644 --- a/apps/board/src/styles.css +++ b/apps/board/src/styles.css @@ -130,9 +130,10 @@ svg.icon { display: block; flex: none; } .icon.rp { --icon-accent: var(--accent-9); } /* On a light surface the bright accent is too faint for a small shape (mint * #20c997 is 2.1:1 on white): a deeper shade of it, 3:1 or more. */ -:root:not([data-theme="dark"]) .icon.rp { --icon-accent: var(--accent-10); } -:root:not([data-theme="dark"]):not([data-accent]) .icon.rp, -:root:not([data-theme="dark"])[data-accent="mint"] .icon.rp { --icon-accent: #099268; } +/* :where() keeps these as weak as the base rule, so the graphite, disabled, + * solid and danger rules below still win. */ +:where(:root:not([data-theme="dark"])) .icon.rp { --icon-accent: var(--accent-10); } +:where(:root:not([data-theme="dark"]):not([data-accent]), :root:not([data-theme="dark"])[data-accent="mint"]) .icon.rp { --icon-accent: #099268; } :root[data-accent="graphite"] .icon.rp { --icon-accent: var(--gray-9); } .icon.rp .a { fill: var(--icon-accent); } .icon.rp .a[stroke], .icon.rp .as { stroke: var(--icon-accent); } From e839ad556a2ca91325cf67513e0b94ca973ab100 Mon Sep 17 00:00:00 2001 From: shaitrish37 <244331886+shaitrish37@users.noreply.github.com> Date: Sat, 5 Dec 2026 17:26:50 +0600 Subject: [PATCH 04/15] Partner tests: course37.com is the panel origin; tenant sites and admin.course37.com go to the browser Site shots: phone, phone landscape and tablet views of the board and home page, for reviewing the mobile layout from CI; upload the shots even when one fails. --- .github/workflows/web.yml | 2 +- apps/board/e2e/shots.spec.ts | 45 ++++++++++++++++++++++++++++++++++++ apps/desktop/src/partner.rs | 5 ++-- 3 files changed, 49 insertions(+), 3 deletions(-) diff --git a/.github/workflows/web.yml b/.github/workflows/web.yml index 7038eac..156bcde 100644 --- a/.github/workflows/web.yml +++ b/.github/workflows/web.yml @@ -67,7 +67,7 @@ jobs: sudo apt-get install -y webp for f in "$SHOTS_DIR"/*.png; do cwebp -quiet -q 86 "$f" -o "${f%.png}.webp"; done - uses: actions/upload-artifact@v7 - if: ${{ inputs.shots }} + if: ${{ always() && inputs.shots }} with: name: rupok-site-shots path: shots diff --git a/apps/board/e2e/shots.spec.ts b/apps/board/e2e/shots.spec.ts index af296a1..55e2e67 100644 --- a/apps/board/e2e/shots.spec.ts +++ b/apps/board/e2e/shots.spec.ts @@ -32,3 +32,48 @@ test.describe("site screenshots", () => { }); } }); + +// Phone and tablet views, to review the mobile layout from CI (not shown on +// the site). Touch, a small screen and a phone's pixel ratio, like a real phone. +test.describe("mobile screenshots", () => { + test.skip(!process.env.SHOTS, "set SHOTS=1 to take the site screenshots"); + test.use({ isMobile: true, hasTouch: true, deviceScaleFactor: 2 }); + + const sizes = [ + { name: "phone", width: 393, height: 851 }, + { name: "phone-landscape", width: 851, height: 393 }, + { name: "tablet", width: 820, height: 1180 }, + ]; + + for (const s of sizes) { + test(`board, ${s.name}`, async ({ page }) => { + await page.setViewportSize({ width: s.width, height: s.height }); + await page.emulateMedia({ colorScheme: "light", reducedMotion: "reduce" }); + await page.goto("/board/"); + await expect(page.locator(".loading")).toHaveCount(0, { timeout: 30_000 }); + await expect(page.locator("canvas.ink")).toBeVisible(); + await page.waitForTimeout(800); + // First visit, as a new teacher sees it (the tour, if any). + await page.screenshot({ path: `${OUT}/m-${s.name}-first.png` }); + await page.evaluate(() => { try { localStorage.setItem("rupok.tour", "1"); } catch { /* blocked */ } }); + await page.reload(); + await expect(page.locator(".loading")).toHaveCount(0, { timeout: 30_000 }); + await page.waitForTimeout(800); + await page.screenshot({ path: `${OUT}/m-${s.name}-board.png` }); + const layout = await page.evaluate(() => (window as any).rupokLayout?.get?.()); + for (const l of ["classic", "modern"]) { + if (l === layout) continue; + await page.evaluate((x) => (window as any).rupokLayout?.set?.(x), l); + await page.waitForTimeout(800); + await page.screenshot({ path: `${OUT}/m-${s.name}-${l}.png` }); + } + }); + } + + test("home page, phone", async ({ page }) => { + await page.setViewportSize({ width: 393, height: 851 }); + await page.goto("/"); + await page.waitForTimeout(800); + await page.screenshot({ path: `${OUT}/m-home.png`, fullPage: true }); + }); +}); diff --git a/apps/desktop/src/partner.rs b/apps/desktop/src/partner.rs index 3d62ce4..e9b08ed 100644 --- a/apps/desktop/src/partner.rs +++ b/apps/desktop/src/partner.rs @@ -371,7 +371,7 @@ mod tests { "https://course37.com/rupok-panel#q", "https://course37.com/rupok-panel/", "https://course37.com/rupok-panel/class/42", - "https://ADMIN.course37.com:443/rupok-panel", + "https://COURSE37.com:443/rupok-panel", ] { assert!(panel_url_ok_in("course37", ok, false), "{ok}"); } @@ -438,7 +438,8 @@ mod tests { assert_eq!(a("about:blank"), Nav::Allow); assert_eq!(a("about:srcdoc"), Nav::Allow); // Other sites go to the browser. - assert_eq!(a("https://course37.com/pricing"), Nav::External); + assert_eq!(a("https://school.course37.com/"), Nav::External); + assert_eq!(a("https://admin.course37.com/rupok-panel"), Nav::External); assert_eq!(a("https://www.youtube.com/watch?v=x"), Nav::External); assert_eq!(a("http://course37.com/rupok-panel"), Nav::External); assert_eq!(a("https://course37.com.evil.com/"), Nav::External); From 00adebfdc28bf49d02ae39d5e28d8b85a4a21ee2 Mon Sep 17 00:00:00 2001 From: shaitrish37 <244331886+shaitrish37@users.noreply.github.com> Date: Sat, 5 Dec 2026 17:32:03 +0600 Subject: [PATCH 05/15] Classic on phones: islands never overlap, and the page keeps clear of them On a phone held upright the two side islands do not fit beside each other, so they overlapped. Each island now takes its own line when they do not fit, islands are 44px on phones, and the page's insets use the islands' full stacked height (the page sat under the tools island on a phone held sideways). --- apps/board/src/components/Dock.tsx | 19 +++++++++++++------ apps/board/src/components/classic/classic.css | 10 ++++++++++ apps/board/src/controller.ts | 9 ++++++--- 3 files changed, 29 insertions(+), 9 deletions(-) diff --git a/apps/board/src/components/Dock.tsx b/apps/board/src/components/Dock.tsx index 3d23be9..0704a35 100644 --- a/apps/board/src/components/Dock.tsx +++ b/apps/board/src/components/Dock.tsx @@ -1316,16 +1316,23 @@ export default function Dock(props: { onSettings?: (section?: string) => void }) // The page fits between the islands once they have their real height. onMount(() => requestAnimationFrame(() => controller.board && controller.updateInsets(true))); /** One edge's islands. When the three thirds do not fit side by side, - * the middle island takes its own line (measured, so they never overlap). */ + * the middle island takes its own line; when the two side islands still + * do not fit beside each other (a phone held upright), every island takes + * its own line. Measured, so they never overlap. */ const Row = (p: { edge: Edge }) => { - const [stacked, setStacked] = createSignal(false); + const [fitAs, setFitAs] = createSignal<"" | "stacked" | "narrow">(""); + const stacked = () => fitAs() !== ""; let row!: HTMLDivElement; const fit = () => { if (!row) return; - const slots = Array.from(row.children) as HTMLElement[]; - const need = slots.reduce((n, sl) => n + Array.from(sl.children).reduce((m, c) => m + (c as HTMLElement).offsetWidth, 0), 0) + 2 * 16; - setStacked(need > row.clientWidth); + const width = (sl: Element | undefined) => + sl ? Array.from(sl.children).reduce((m, c) => m + (c as HTMLElement).offsetWidth, 0) : 0; + const [l, c, r] = (Array.from(row.children) as HTMLElement[]).map(width); + const room = row.clientWidth; + setFitAs(l + c + r + 2 * 16 <= room ? "" : l + r + 16 <= room ? "stacked" : "narrow"); }; + // The page keeps clear of the islands' new height. + createEffect(on(fitAs, () => requestAnimationFrame(() => controller.board && controller.updateInsets(true)), { defer: true })); onMount(() => { const ro = new ResizeObserver(() => requestAnimationFrame(fit)); ro.observe(row); @@ -1336,7 +1343,7 @@ export default function Dock(props: { onSettings?: (section?: string) => void }) fit(); }); return ( -no island
").is_none()); + } + #[test] fn bad_questions_are_refused() { let one = diff --git a/crates/rupok-cli/src/spec.rs b/crates/rupok-cli/src/spec.rs index 9ebc375..204357f 100644 --- a/crates/rupok-cli/src/spec.rs +++ b/crates/rupok-cli/src/spec.rs @@ -51,6 +51,15 @@ touch boards, often with no internet connection. - High contrast, large touch targets (at least 48px), no hover-only controls: the board is driven by fingers and pens. - No tiny detail that only works on a laptop screen. One idea per object. +- No emoji as icons or decoration: they look like clip art on a projector. + Use Lucide (`rupoklib://lucide/lucide.min.js`, `` then + `lucide.createIcons()`) or a small inline SVG with `stroke="currentColor"`. +- Fonts: only `var(--rupok-font-heading)` / `var(--rupok-font-body)` (they + carry Bangla), two weights at most. Colours: the `--rupok-color-*` theme + variables, one accent, no gradients, neon or glow. +- Quizzes, MCQs, polls and live exams: call `add_quiz_card`, never a + hand-made object; only that card runs in the class panel's live quiz and + shows the countdown, answers and leaderboard on the board. ## Offline by default - Network access is denied. Any remote resource — `