-
Notifications
You must be signed in to change notification settings - Fork 194
Versioning and history #3659
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
RichDom2185
merged 99 commits into
source-academy:master
from
Nocaxe:Versioning-and-History
May 6, 2026
Merged
Versioning and history #3659
Changes from 21 commits
Commits
Show all changes
99 commits
Select commit
Hold shift + click to select a range
998523d
Implement Versioning and History of Editor Code for Assessment Worksp…
Nocaxe ef29046
Create tests for versioning and history feature
Nocaxe fae8626
Prevent submit answer from displaying success message, as submit stat…
Nocaxe 9de2544
Fix updateVersionName API route and getVersionHistory return value
Nocaxe 30b0d51
Fix bug causing double saving, now only submits answer, and allows th…
Nocaxe de8311a
Change restored versions to be named "(name)-restored" instead of "(t…
Nocaxe d35c2fe
Prevent autosave in team assessments
Nocaxe 2fc355b
Implement UI for Versioning and History feature
Nocaxe bd20063
Implement version preview before restoring
Nocaxe de13c58
Fix bug causing duplicate versions to be saved
Nocaxe c9367d6
Prevent save status indicator from showing in team assessments
Nocaxe ed49c48
Update test to not check for success message upon autosave
Nocaxe 0635aae
Update snapshots to align with changes
Nocaxe bc361e3
Reformatted imports
Nocaxe 13849ea
Fix bug where save status is not correctly checked and updated, alway…
Nocaxe 784c395
Refactor restoreVersionSaga and prevent restoring from auto-submittin…
Nocaxe f504c5c
Fix bug where renaming updates the timestamp
Nocaxe cebe414
Fix bug where restoring was renaming the wrong version
Nocaxe 1714803
Merge branch 'master' into Versioning-and-History
martin-henz 78129b8
Merge branch 'master' into Versioning-and-History
Nocaxe 5db4086
Merge branch 'master' into Versioning-and-History
martin-henz c54384d
update snapshots to match changes
Nocaxe 458b649
Fix bug where new UI is not updated for mobile view
Nocaxe d8c44cd
Change return type of sagas for better type safety
Nocaxe a2732b5
Fix bug where restoring will rename an existing version if the code i…
Nocaxe 0c2a634
Memoize sorted array of versions to improve performance
Nocaxe f253c1a
Fix bug where save button appears incorrectly for individual assessme…
Nocaxe b9cf3db
Update snapshot to match bug fixes
Nocaxe 4a46a32
Fix formatting
Nocaxe 4b995b6
Fix bug where the restoreVersion action did not take into account the…
Nocaxe be610df
Fix bug where one auto-save can prematurely unblock another, causing …
Nocaxe 0990d2c
Fix bug where UI would show a stale name if the rename API fails
Nocaxe 9f61970
Change all early returns in performAutoSave to return false instead o…
Nocaxe 1a85f0d
Change onClick prop to match how other control-bar buttons are typed
Nocaxe 9df982f
Fix bug where backend saga mock never updates save status
Nocaxe 2c53280
Change saving status watcher to only work in assessment workspaces
Nocaxe a5adf24
Fix bug where restoring a version always shows saved even while in th…
Nocaxe c3023c1
Add check to ensure that timestamp is a naive datetime before appendi…
Nocaxe 1de1ec6
Add safeguard to prevent blanking the editor when restoring a malform…
Nocaxe 5225afb
Edited clickable versions in the panel to be keyboard-focusable and a…
Nocaxe 6deac9f
Add safeguard to prevent slicing the inserted_at when it is null/unde…
Nocaxe 9495078
Fix bug where save button for team assessments is enabled even when a…
Nocaxe 0dcacdf
Merge branch 'master' into Versioning-and-History
RichDom2185 435ec82
Edit autosaves to only fetch version history if the panel is open to …
Nocaxe 4f4aaed
Remove redundant code
Nocaxe 497a46d
Merge branch 'master' into Versioning-and-History
Nocaxe 231c8a6
Use .reverse() to sort the versions by timestamp instead of .sort() t…
Nocaxe dcf8bcf
Update field to match backend change
Nocaxe f8a38fa
Merge branch 'master' into Versioning-and-History
Nocaxe e5f3b4b
Fix bug where wrong version is renamed after restoring
Nocaxe 5ffbc2f
Add tests for coverage
Nocaxe 683e668
Implement diff viewer when previewing version to restore
Nocaxe f5491fb
Prevent race condition by making concurrent auto saves wait for the f…
Nocaxe da5bcbe
Merge branch 'master' into Versioning-and-History
Nocaxe f454a74
Merge branch 'master' into Versioning-and-History
Nocaxe 25258ca
Fix bug where performAutoSave returns true even if save failed
Nocaxe 5487eb2
Merge branch 'master' into Versioning-and-History
Nocaxe 08d4956
Fix bug where admin panel configuration switches were not animating
Nocaxe af3a711
Fix bug where hasUnsavedCode is not set to false when restoring ident…
Nocaxe 2d3e6b5
Make code save when history panel is opened
Nocaxe 9d09398
Update tests
Nocaxe 272689f
Implement configuration setting for enabling and disabling autosave p…
Nocaxe 7d711bc
Update tests for configuration of autosave
Nocaxe 2c0379b
Merge branch 'master' into Versioning-and-History
Nocaxe 3b1df73
Update snapshots
Nocaxe 81aff86
Fix bug causing duplicate versions when restoring
Nocaxe 4e95f05
Fix bug causing hasUnsavedChanges to be false even when save failed f…
Nocaxe dd809ff
Prevent autosaving from fetch and restore when disabled
Nocaxe 08c86da
Update tests
Nocaxe eb07ea4
Fix bug where autosave was enabled for MCQ
Nocaxe 1dfc2df
Change deduplication check for better performance
Nocaxe 2920ee0
Change restoreVersionSaga to return earlier if autosave is disabled
Nocaxe c9a7e79
Make auto save return earlier if it is a team assessment
Nocaxe a285cec
Update tests
Nocaxe 5141592
Improve performance of restoring version by removing redundant search
Nocaxe 496c2ac
Update tests
Nocaxe 96bf596
Improve performance of renaming versions when restoring
Nocaxe c3e1059
Merge branch 'master' into Versioning-and-History
Nocaxe 441fbad
Change default to enable autosave for assessments created before this…
Nocaxe 03c230c
Implement lazy loading of versions for previewing
Nocaxe ed44d17
Merge branch 'master' into Versioning-and-History
Nocaxe 01a958d
Implement collapsible grouping of versions in history panel
Nocaxe 03bad56
Remove redundant work following backend changes
Nocaxe 4551dbb
Edit reset confirmation message
Nocaxe 4a96213
Update tests
Nocaxe efbfc4c
Prevent race condition from hanging and blocking future autosaves
Nocaxe 272c1bf
Change direct calls to fetchVersionHistorySaga to action dispatches i…
Nocaxe 4cdc441
Merge branch 'master' into Versioning-and-History
Nocaxe bb8dfa9
Prevent possible indefinite hanging of saga
Nocaxe fdbf228
Add onSelectVersion to the useEffect dependency array
Nocaxe ef8ef1b
Fix bug where rapid selection of versions can cause incorrect code to…
Nocaxe 69e89c5
Merge branch 'master' of https://github.com/source-academy/frontend i…
RichDom2185 cc11a71
Update lockfile post-merge
RichDom2185 93d6d45
Remove duplicate dependency
RichDom2185 86dc7d2
Remove unnecessary type assertion
RichDom2185 acb334d
Refactor to use SCSS module for scoping
RichDom2185 cc57868
Fix global
RichDom2185 8302694
Update test snapshots
RichDom2185 b238120
Remove unnecessary type assertion
RichDom2185 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.