Skip to content

ALT-10998 [IDE Plugin] Code files are not transferred to the next stage#37

Merged
Tsyklop merged 1 commit into
mainfrom
bug/ALT-10998
Apr 29, 2026
Merged

ALT-10998 [IDE Plugin] Code files are not transferred to the next stage#37
Tsyklop merged 1 commit into
mainfrom
bug/ALT-10998

Conversation

@Tsyklop
Copy link
Copy Markdown
Collaborator

@Tsyklop Tsyklop commented Apr 28, 2026

This update addresses issues where code files (both user-created and template additions) were not correctly transferred between stages in Framework Lessons. It also improves the reliability of the auto-save mechanism and ensures that generated or excluded files do not pollute the task snapshots.

Key Improvements

  • Fixed Stage-to-Stage File Propagation:
    • Corrected the "first-visit" logic to ensure that files created by the learner in previous stages are properly propagated and registered in the next stage's task files.
    • Ensured that new template files introduced in later stages are correctly added to the project state without being overwritten or ignored.
  • Enhanced Snapshot Accuracy:
    • Persistence of Deletions: Fixed a bug where deleting all editable files would cause the auto-save to bail out, resulting in "resurrection" of deleted files upon returning to the stage. Deletions are now correctly persisted to the snapshot.
    • Configurable Exclusions: Integrated the course configurator's exclusion rules (e.g., ignoring .build/ or .gradle/ folders) into the snapshot process to prevent internal or generated files from being tracked.
  • Added Regression Tests:
    • Introduced FrameworkLessonUserFilesPropagationTest.kt to verify:
      • Learner-created files are correctly marked as isLearnerCreated and carried forward.
      • Excluded files/directories are omitted from the storage snapshot.
      • Auto-save correctly handles the state where all propagatable files are removed.

Technical Details

  • FrameworkLessonManagerImpl.kt:
    • Updated calculateFirstVisitChanges to separate propagation of user-created files from the addition of new template files.
    • Refactored saveCurrentTaskSnapshot to use getAllFilesFromTaskDir and apply configurator-based filtering.
    • Modified the change detection logic to ensure snapshots are updated even when the resulting set of propagatable files is empty.

@Tsyklop Tsyklop merged commit 1722176 into main Apr 29, 2026
0 of 3 checks passed
@Tsyklop Tsyklop deleted the bug/ALT-10998 branch April 29, 2026 08:23
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.

3 participants