Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,8 @@ jobs:
# tsc -b && vite build
- run: npm run build
- run: npm run lint
# The IDE in Chrome (on the runner) with Pyodide from its CDN, against
# the build above: tab switches with a read-only file, per-tab projects,
# share links (libraries by URL, 404, cut and long links), ▶ and Tests,
# ⋮ «Info». The «leave the page» question and the iPad stay manual.
- run: npm run test:browser
3 changes: 2 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ Sibling repos: `../glpython-editor` (the component, runtime and LiaScript embed;
npm run dev # vite with COOP/COEP headers (input() needs SharedArrayBuffer)
npm run build # tsc -b && vite build (base /)
npm run lint # oxlint; 7 known warnings, all in the vendored public/coi-serviceworker.js
npm run test:browser # after a build: scripts/check-ide-browser.mjs, the IDE in headless Chrome
```

There are no tests. `.github/workflows/ci.yml` runs `npm ci`, the build (tsc catches type changes in a new editor tag) and lint on every pull request. Pushes to `main` deploy to GitHub Pages (`deploy-pages.yml`). To check a change in the browser, use `npm run dev`; `npm run build && npm run preview` serves the production layout. The embed is a separate project site under the same origin, https://glpython-edu.github.io/glpython-editor/. The IDE's `coi-serviceworker.js` registers for scope `/`, which includes it, so after a change to that worker check the embed too: its demo page opened directly, and a LiaScript course.
The one automated check is `test:browser` (`scripts/check-ide-browser.mjs`): `playwright-core` drives the installed Chrome (GitHub's runner has one) against `vite preview` of `dist/`, with Pyodide from its CDN and its own fixtures (it serves a library by URL itself). It covers tab switches with a read-only file, per-tab projects, share links (library by URL, 404, cut and long links), ▶ and Tests, and ⋮ «Info»; add regression cases there. The browser's «leave the page» question and the iPad stay manual. `.github/workflows/ci.yml` runs `npm ci`, the build (tsc catches type changes in a new editor tag), lint and `test:browser` on every pull request. Pushes to `main` deploy to GitHub Pages (`deploy-pages.yml`). To check a change in the browser, use `npm run dev`; `npm run build && npm run preview` serves the production layout. The embed is a separate project site under the same origin, https://glpython-edu.github.io/glpython-editor/. The IDE's `coi-serviceworker.js` registers for scope `/`, which includes it, so after a change to that worker check the embed too: its demo page opened directly, and a LiaScript course.

## Layout

Expand Down
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,27 @@ automatically in the browser:
**Teilen** or **Projekt herunterladen** brings the browser's own question
(desktop browsers; iPad Safari never asks).
- A closed tab's project is kept for 14 days: ⋮ **Zuletzt geschlossen** lists
them («Öffnen» in this tab if it holds only the untouched starter, else in a
them («Öffnen» in this tab if it holds only an untouched empty project, else in a
new tab; «Entfernen»). A new tab offers the last one changed within a day
right away («Zuletzt bearbeitet: auswerter.py (vor 2 Stunden).» · «Öffnen»),
since after quitting Safari or restarting the iPad a tab comes back empty.
- ⋮ **Neues Projekt** gives the tab the starter; opening a folder or a ZIP
gives it that project. The one before goes to «Zuletzt geschlossen».
- A new tab starts with **one empty `main.py`**; the editor's placeholder
(«Code hier eingeben») says what to do. Learners arrive by links, and the
IDE needs one file to run. An untouched empty project counts as saved and
never appears under «Zuletzt geschlossen».
- ⋮ **Neues leeres Projekt** gives the tab that empty project; opening a
folder or a ZIP gives it that project. The one before goes to «Zuletzt
geschlossen».
- The one project the IDE kept before per-tab projects becomes the first
tab's project, once.
- A tab that stays open notices a newer IDE version (`version.json`, written
by the build, checked when the tab comes back into view and every 30
minutes): «Neue Version verfügbar.» · «Neu laden». The code survives the
reload; Python's session doesn't.
- ⋮ **Info** shows the version - the short commit and the build date, as in
`version.json` - and **Nach Updates suchen** runs the same check: «Diese
Version ist aktuell.», or the notice with «Neu laden». When a learner reports
a problem, it tells whether their browser still runs an old version.

The ⋮ menu and the bar support:

Expand Down
14 changes: 14 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"dev": "vite",
"build": "tsc -b && vite build && cp LICENSE THIRD_PARTY_NOTICES.md dist/",
"lint": "oxlint",
"preview": "vite preview"
"preview": "vite preview",
"test:browser": "node scripts/check-ide-browser.mjs"
},
"dependencies": {
"@azure/msal-browser": "^5.22.0",
Expand All @@ -25,6 +26,7 @@
"@types/react-dom": "^19.2.7",
"@vitejs/plugin-react": "^6.1.1",
"oxlint": "^1.81.0",
"playwright-core": "^1.64.1",
"typescript": "~6.0.2",
"vite": "^8.3.0"
}
Expand Down
Loading
Loading