Repository navigation
Libraries by URL in share links; notes for broken and long links - #29
Merged
Merged
Conversation
Share links of version 2 name a library by its URL instead of carrying its
code ({path, url, readOnly: true}), so an Etappe 4 link with parser.py has
about 1,200 characters instead of 5,157. The IDE fetches a library once when
the link opens (https or http on localhost, at most 1 MB, without cookies)
and keeps its text with the tab's project, so reload and offline use the
copy. The file drawer lists it under «Bibliotheken» with its host and a
lock; a library that can't be loaded (HTTP status, network error,
timeout, too large) is named in the drawer and a notice with «Erneut
versuchen», and importing it raises Python's own ModuleNotFoundError, as
in the LiaScript macro. «Teilen» names it by URL again; the ZIP holds its
code and lists its URL in glpython.json. Links without libraries stay
version 1, and links of version 1 open as before.
A link that can't be read (cut off, e.g. by OneNote at 2,083 characters,
or damaged) opens an empty project with «Dieser Link ist unvollständig oder
beschädigt. …» - never another project.
«Teilen» still copies a link longer than 2,083 characters, with a note to
download the project for a hand-in and a «Herunterladen» button.
The unsaved-changes fingerprint ignores read-only files: a library
arriving after its fetch is no change of the learner's.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cedricvogel-leo
added a commit
that referenced
this pull request
Oct 30, 2026
Libraries by URL in share links; notes for broken and long links (#29, onto main)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
P25 decisions 3–5, IDE side. IDE PR 2 of 2. Stacked on #28 (per-tab projects): its base is that branch, so the diff shows only this PR. After #28 is merged, GitHub switches the base to
main.3. Libraries by URL
{"path": "parser.py", "url": "https://…/parser.py", "readOnly": true}, without its code. A link without libraries stays version 1, which every IDE reads. Old links with embedded content open as before.auswerter.pyplusparser.pyby URL) has 1,202 characters instead of 5,157.ModuleNotFoundError, as in the macro.glpython.jsonlists"libraries": {"parser.py": "https://…"}. An import keeps it as a library.4. Broken links
A link that can't be decompressed or parsed, or lacks the file to run, opens an empty project (one empty
main.py, «Leeres Projekt») with a notice. It never shows another project.5. Long links
«Teilen» still copies a link longer than 2,083 characters. A note stays until closed (✕), with «Herunterladen».
New wording, please review
Checked (Chrome against the production build;
parser.pyserved locally with CORS)auswerter.py,parser.py; drawer listsparser.pyunder «Bibliotheken» «von localhost:4188»; «Tests» 11 von 11ModuleNotFoundError: No module named 'parser'; once the file exists, «Erneut versuchen» loads it and the notice goesmain.pyparser.pyembedded)auswerter.zipparser.pyby URL, no noteglpython.jsonlists the library; after import, the drawer shows it and «Teilen» names it by URLBuild and lint pass.
Your tests
parser.pyhas a public URL. Until then: a link with a URL that gives 404 (notice, «Erneut versuchen»).ModuleNotFoundErroron «Ausführen»).Order: merge after #28. The macro PR (libraries by URL in «IDE-Link kopieren») only after this one has deployed: an IDE before this PR can't read v2 links.
🤖 Generated with Claude Code