Switching programming languages clears editor undo history
Los mantenedores suelen responder en 1 día
@Chingyong0905 ya está trabajando en esto.
Desde el 19/10/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Observed behavior
Switching programming languages clears the code editor's undo history, even though the code itself is preserved.
As a result, users cannot undo previous edits or recover accidentally deleted code after switching back to the original language.
Expected behavior
Each programming language should retain its own undo/redo history when switching between languages during an interview.
Reproduction
- Start a coding interview, select Python (for example), and enter a few lines of code.
- Delete a line and press
Ctrl+Zto confirm that undo works. - Delete the line again.
- Switch to any other supported programming language, then switch back to Python.
- Press
Ctrl+Zagain. The deleted line can no longer be restored after switching back to Python.
This issue occurs regardless of which programming language is selected during the switch.
Proposed approach
Keep a separate in-page undo/redo history for each programming language. Switching languages selects that language's history without recording the switch as a text edit. After switching away and back in reproduction step 4, Ctrl+Z in step 5 should restore the deleted line in the original language without changing another language's code.
Record edits through the existing input handling and applyEditorEdit, including Tab, Shift+Tab, Ctrl+/, and the starter-code restore in #398. Preserve selection bounds and direction, including the behavior addressed by #390. Undo/redo must also update the saved code, editor display, and existing code synchronization.
This requires custom history management. Simply using insertText for language swaps would retain native history but make the swaps themselves undoable, so it would not meet the expected behavior.
CodeTrial version
codetrial 0.1.0 (5b4d8c7)
Environment
OS: Windows 11 Home Single Language, Version 25H2 (Build 26200.9711)
Browser: Google Chrome 155.0.8059.80 (64-bit)
Language: All supported programming languages (Python, JavaScript, C, C++, Java)
Interview loop: Coding interview
Problem: Sensor Calibration Index (LeetCode 108)
REACTO or STAR step: Code
Reconnect: None
Sanitized evidence
No response
Public data confirmation
- I removed credentials, session tokens, candidate recordings, and personal interview content from this public report.
- Lenguaje dominante
- Rust
- Estrellas
- 177
- Forks
- 100
- Merge medio
- 1 d 9 h
- PR fusionados (30 d)
- 151
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de sysprog21/codetrial
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
Los mantenedores suelen responder en 1 día
-
Allow deselecting a chosen problem card by clicking it againPosiblemente ocupada @woohsin la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
sysprog21/codetrial#392 · 4 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Audio output can be confirmed without playing a test soundPosiblemente ocupada @ChenYingHan1121 la tomó hace 3 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
sysprog21/codetrial#359 · 4 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Add a Copy code button to the final reportPosiblemente ocupada @yansawu la tomó hace 3 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
sysprog21/codetrial#318 · 5 comentarios · 2 reacciones · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Outline Snapshot Duplicator question accept a copied random list that loops back into itselfPosiblemente ocupada @papaya0112 la tomó hoy. Abierto
sysprog21/codetrial#417 · 3 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de sysprog21/codetrial
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
git-ai-project/git-ai#2434 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
peteonrails/voxtype#909 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
kucherenko/jscpd#1239 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 69/100
alchemyplatform/rundler#1358 ·
Los mantenedores suelen responder en 3 días