Repository navigation
Read-only files (ProjectFile.readOnly) - #41
Merged
Merged
Conversation
A file with readOnly: true is one to read, not to change, e.g. a course's library that learners use as a black box (the evaluator's parser.py). The editor shows it read-only (domReadOnly, so an iPad's keyboard doesn't open), its tab has a lock, typing into it shows «Schreibgeschützt: Diese Datei kann gelesen, aber nicht geändert werden.» (readOnlyFile, de/en), and updateProjectFile, renameProjectFile and deleteProjectFile leave it as it is. It runs, imports, tests and visualizes like any other file. updateCode now ignores Monaco's flush events (setValue): @monaco-editor/ react shows a read-only file with setValue before its onChange knows the new tab, which wrote parser.py's text into the previously open file. A learner's own edits (typing, paste, undo) are never flushes. check-embed-protocol.mjs checks the helpers against the build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Decision 2 from the Etappe 4 check:
parser.pyis a black box, so it should be read-only in the IDE. This is step 1 of 3: editor → tag → IDE + macro.Changes
ProjectFile.readOnly?: boolean: a file to read, not to change.domReadOnlykeeps an iPad's keyboard closed.readOnlyFile).updateProjectFile,renameProjectFileanddeleteProjectFileleave a read-only file unchanged. Every host is protected, including the IDE's file drawer, before its own UI change.updateCodenow ignores Monaco's flush events (setValue).@monaco-editor/reactreplaces the text with an unguardedsetValue, before itsonChangeknows the new tab.parser.pytherefore wrote parser.py's text intoauswerter.py: «Tests» then reported 38 instead of 11 examples.Checked
check-embed-protocol.mjs(intest:protocol) checks the helpers against the build:parser.pyhasreadOnly: true:parser.pyonly.parser.pyunchanged and shows the message.auswerter.pywas overwritten).auswerter.pyare saved.test:protocol.Next
After tag
v0.1.19:🤖 Generated with Claude Code