Enhancement for /tree-of-knowledge/domain(tools:javascript-playground) — the JavaScript playground (JavaScriptRunner) should track lesson completion per lesson, not merely a generic "run lesson" capture.
Problem
Progress appears non-specific to individual lessons — learners cannot rely on granular completion for each ToK lesson tied to this runner.
Goals
Store and display each lesson’s completion for the JS playground.
Match engineering approach adopted for C# and Python playground enhancements (shared types/services where possible).
Acceptance (draft)
Persist lesson id + completion for JS playground sessions.
Sidebar / lesson list shows accurate completion per lesson.
Replace or augment ambiguous generic run-only semantics; document analytics changes.
## Summary
**Enhancement** for **`/tree-of-knowledge/domain`(tools:javascript-playground)** — the **JavaScript playground** (`JavaScriptRunner`) should **track lesson completion per lesson**, not merely a **generic "run lesson"** capture.
## Problem
Progress appears **non-specific** to individual lessons — learners cannot rely on granular completion for each ToK lesson tied to this runner.
## Goals
- Store and display **each lesson’s** completion for the JS playground.
- Match **engineering approach** adopted for **C#** and **Python** playground enhancements (shared types/services where possible).
## Acceptance (draft)
- [ ] Persist **lesson id + completion** for JS playground sessions.
- [ ] Sidebar / lesson list shows **accurate completion** per lesson.
- [ ] Replace or augment ambiguous **generic run-only** semantics; document analytics changes.
- [ ] Coordinate API + UI with **[#43](https://git.spikersoft.com/spikerj/spikersoft-issues/issues/43)** and **[#44](https://git.spikersoft.com/spikerj/spikersoft-issues/issues/44)**.
## Area
`JavaScriptRunner` · app-language-runner · Tree of Knowledge domain tools route (`javascript-playground`).
## Sibling tickets (same enhancement pattern)
- **[#43 — C# playground](https://git.spikersoft.com/spikerj/spikersoft-issues/issues/43)**
- **[#44 — Python playground](https://git.spikersoft.com/spikerj/spikersoft-issues/issues/44)**
Closing as already implemented by the same shared infrastructure that resolved#43.
The JavaScript playground (JavascriptRunner at libraries/features/dev-tools-javascript-runner/src/lib/javascript-runner.ts) is built on the shared LanguageRunner with LANGUAGE_RUNTIME_ADAPTER = JavascriptRuntimeAdapter and the same PROGRESS_SYNC_PORT_PROVIDER. It picks up the full per-lesson completion stack by construction:
Durable backend record — one UserLessonProgress Mongo doc per (UserId, LessonNumber) with attempts, test results, timing.
Offline queue — ProgressSyncService IndexedDB queue with language: "javascript", server re-verifies on reconnect.
One caveat carried over from #43: the server-side ExecuteLessonCodeCommand is annotated [TrackableActivity("tools.csharp-playground", "run-lesson")], so generic analytics rows for JavaScript submissions land under csharp-playground instead of javascript-playground. Durable completion is correct — only the activity attribution is wrong. Filing a separate cross-cutting ticket for that.
Closing as **already implemented** by the same shared infrastructure that resolved #43.
The JavaScript playground (`JavascriptRunner` at `libraries/features/dev-tools-javascript-runner/src/lib/javascript-runner.ts`) is built on the shared `LanguageRunner` with `LANGUAGE_RUNTIME_ADAPTER = JavascriptRuntimeAdapter` and the same `PROGRESS_SYNC_PORT_PROVIDER`. It picks up the full per-lesson completion stack by construction:
- **Durable backend record** — one `UserLessonProgress` Mongo doc per `(UserId, LessonNumber)` with attempts, test results, timing.
- **Offline queue** — `ProgressSyncService` IndexedDB queue with `language: "javascript"`, server re-verifies on reconnect.
- **UI** — `LessonSidebar` consumes `completedLessonNumbers` and renders checkmarks / locks / progress counts.
- **Shared contract** — same `ProgressSyncPort` / `QueuedProgressInput` / `/Lessons/progress` endpoints used by C# (#43) and Python (#44).
Full architectural breakdown is in #43's [closing comment](https://git.spikersoft.com/spikerj/spikersoft-issues/issues/43#issuecomment-179).
One caveat carried over from #43: the server-side `ExecuteLessonCodeCommand` is annotated `[TrackableActivity("tools.csharp-playground", "run-lesson")]`, so generic *analytics* rows for JavaScript submissions land under `csharp-playground` instead of `javascript-playground`. Durable completion is correct — only the activity attribution is wrong. Filing a separate cross-cutting ticket for that.
Closing #45.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Enhancement for
/tree-of-knowledge/domain(tools:javascript-playground) — the JavaScript playground (JavaScriptRunner) should track lesson completion per lesson, not merely a generic "run lesson" capture.Problem
Progress appears non-specific to individual lessons — learners cannot rely on granular completion for each ToK lesson tied to this runner.
Goals
Acceptance (draft)
Area
JavaScriptRunner· app-language-runner · Tree of Knowledge domain tools route (javascript-playground).Sibling tickets (same enhancement pattern)
Closing as already implemented by the same shared infrastructure that resolved #43.
The JavaScript playground (
JavascriptRunneratlibraries/features/dev-tools-javascript-runner/src/lib/javascript-runner.ts) is built on the sharedLanguageRunnerwithLANGUAGE_RUNTIME_ADAPTER = JavascriptRuntimeAdapterand the samePROGRESS_SYNC_PORT_PROVIDER. It picks up the full per-lesson completion stack by construction:UserLessonProgressMongo doc per(UserId, LessonNumber)with attempts, test results, timing.ProgressSyncServiceIndexedDB queue withlanguage: "javascript", server re-verifies on reconnect.LessonSidebarconsumescompletedLessonNumbersand renders checkmarks / locks / progress counts.ProgressSyncPort/QueuedProgressInput//Lessons/progressendpoints used by C# (#43) and Python (#44).Full architectural breakdown is in #43's closing comment.
One caveat carried over from #43: the server-side
ExecuteLessonCodeCommandis annotated[TrackableActivity("tools.csharp-playground", "run-lesson")], so generic analytics rows for JavaScript submissions land undercsharp-playgroundinstead ofjavascript-playground. Durable completion is correct — only the activity attribution is wrong. Filing a separate cross-cutting ticket for that.Closing #45.
spikerj referenced this issue2026-07-14 03:21:36 +00:00