Skip to content

⋮ «Info» with the version; a new tab starts empty; browser check for the IDE - #31

Merged
cedricvogel-leo merged 2 commits into
mainfrom
feature/info-empty-start
Nov 1, 2026
Merged

cedricvogel-leo merged 2 commits into
mainfrom
feature/info-empty-start

Conversation

@cedricvogel-leo

Copy link
Copy Markdown
Collaborator

The next IDE package: ⋮ «Info», an empty start instead of the starter project, and an automated browser check for the IDE. Please don't merge before reading «Deploy and PT-3» below.

1. ⋮ «Info»

  • A new last group in ⋮: «Info» (en «About») opens a small window titled «glpython»:
    • Version: the short commit (e.g. e609bfc).
    • Erstellt: the build date and time («1. November 2026 um 15:31»).
    • «Nach Updates suchen»: runs the same check as the automatic notice and says «Diese Version ist aktuell.», or shows «Neue Version verfügbar.» with «Neu laden».
  • The values are the ones the build writes to version.json, which now also has "built".
  • No course links.

2. A new tab starts empty

  • A fresh tab has one empty main.py (the placeholder «Code hier eingeben» shows) instead of the editor's English starter project (main.py, greetings.py, notes.md). It's the same empty project as for a broken link and for ⋮ «Neues leeres Projekt», renamed from «Neues Projekt» to match your wording.
  • «Untouched» is decided by content (one empty file to run), not by name, so a language switch doesn't matter. An untouched empty project counts as saved and never appears in «Zuletzt geschlossen».
  • What relied on the old starter files:
    • Nothing in the IDE's code apart from the «untouched» rule.
    • Old tabs: tabs from before this deploy still hold the untouched old starter. Without care, it would show up in «Zuletzt geschlossen» for 14 days and as «Zuletzt bearbeitet: main.py» in fresh tabs. So the untouched former starter (recognised by its content) also counts as untouched. The browser check covers it: without this rule it fails with exactly that offer.
    • README: «Project persistence» updated. There are no screenshots, and no tests used the starter.
    • glpython-editor still exports initialProject (other hosts and its README example use it). The IDE no longer does.

3. Browser check for the IDE (npm run test:browser, in CI)

scripts/check-ide-browser.mjs:

  • playwright-core (new dev dependency) drives the runner's Chrome against vite preview of dist/, with Pyodide from its CDN.
  • It has its own fixtures (no course files) and serves its own library by URL, with CORS.
  • About 40 s locally.
Check Covers
fresh tab one empty main.py; an untouched former starter isn't offered
#41 a link with a read-only file: 6 tab switches, typing, undo, redo, typing into the read-only file, 3 more switches. Each file keeps its own content and the read-only file stays unchanged. Without the editor's #41 fix this check fails (main.py got bib.py's text; checked by removing the fix from the installed build).
per tab address is the bare start page; two tabs from one link stay independent; reload keeps the code; a closed tab's changed project is offered («Zuletzt bearbeitet: main.py») and reopens
library by URL read-only tab with lock, «Bibliotheken» «von localhost:4197», ▶ runs it
library 404 the notice «… (HTTP 404).»; ▶ ends in ModuleNotFoundError: No module named 'bib'
cut link 2,083 characters, with another project in the browser: the notice, only an empty main.py
long link «Teilen» shows the note with «Herunterladen»
▶ and «Tests» two files: output 84, «1 von 1 Beispielen bestanden»
⋮ «Info» the version matches dist/version.json; «Nach Updates suchen» says «Diese Version ist aktuell.»; with a different version.json (intercepted), «Neue Version verfügbar.» with «Neu laden»

Still manual: the browser's «leave the page» question (headless Chrome can't confirm a close or reload after it) and everything on the iPad.

CLAUDE.md now describes the check; it said «There are no tests».

New wording, please review

de en
⋮ Info About
⋮ (renamed) Neues leeres Projekt New empty project
window Version · Erstellt Version · Built
button Nach Updates suchen Check for updates
while checking Wird geprüft … Checking …
up to date Diese Version ist aktuell. This version is up to date.
check failed Die Prüfung auf eine neue Version ist fehlgeschlagen (keine Verbindung?). Could not check for a new version (no connection?).
new version (existing) Neue Version verfügbar. · «Neu laden» A new version is available. · «Reload»

Deploy and PT-3

Merging deploys the IDE. Your open tabs from before (Mac and iPad) should then:

  1. Show «Neue Version verfügbar.» when you return to them (checked whenever a tab comes back into view, and every 30 minutes).
  2. After «Neu laden», still have their code.
  3. Show the new version under ⋮ «Info»: the short commit of the merge commit on main.

The tabs still run the old IDE until that reload, so ⋮ «Info» appears only after it.

🤖 Generated with Claude Code

cedricvogel-leo and others added 2 commits November 1, 2026 15:32
…the IDE

- ⋮ «Info» shows the version - the short commit and the build date, as the
  build writes them to version.json (now with "built") - and «Nach Updates
  suchen» runs the same check as the «Neue Version verfügbar» notice:
  «Diese Version ist aktuell.» or the reload.
- A fresh tab starts with one empty main.py instead of the editor's English
  starter project (main.py, greetings.py, notes.md); the editor's
  placeholder says what to do. The same empty project as for a link that
  can't be read and ⋮ «Neues leeres Projekt» (was «Neues Projekt»). An
  untouched empty project is recognised by content (one empty file to run),
  not by name, so it counts as saved and never appears among «Zuletzt
  geschlossen».
- scripts/check-ide-browser.mjs (npm run test:browser, in CI): headless
  Chrome against vite preview of dist/, with Pyodide from its CDN and its
  own fixtures. Tab switches with a read-only file plus typing, undo and
  redo (glpython-editor #41), per-tab projects, share links (library by URL
  served by the check, 404, cut at 2,083 characters, long link), ▶ and
  Tests on two files, ⋮ «Info». Without the editor's #41 fix it fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tabs from before this change hold glpython-editor's starter project. Left
untouched, it would otherwise appear among «Zuletzt geschlossen» for 14
days and be offered in a fresh tab. The browser check covers it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cedricvogel-leo
cedricvogel-leo merged commit 2fe2c25 into main Nov 1, 2026
1 check passed
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.

1 participant