Files
orca/docs/audits/closed-editor-model-lifetime/loader-results.json
921882619e fix: retire closed editor models from the app shell (#21178)
* fix: retire closed editor models from the app shell

* test(editor): use checked Monaco attachment calls

* Preserve bounded editor view caches when retiring closed models

* docs(editor): describe batched model retirement

* fix(editor): preserve cleanup work across registry replacement

* fix(editor): build editor model URIs with the file scheme

Monaco keys its model registry by `uri.toString()`, and both
`@monaco-editor/react` (via the `path` prop) and the closed-tab disposal
path built that key with `Uri.parse`. On Windows a raw path such as
`C:\repo\a.ts` parses as scheme `c`, which fails the scheme gate in
`modelService._schemaShouldMaintainUndoRedoElements`, so closed-file undo
history was dropped for every file at any size — not only the large files
the tradeoff note covers.

Add `toEditorModelUri`, the one filesystem-path -> model-key function,
built on `Uri.file` so the result always carries the `file:` scheme and
re-parses to itself. Route model creation, disposal lookup and the
still-open ownership comparison through it so all three agree; a
divergence there would dispose a model an open editor is still editing.

---------

Co-authored-by: m4air <m4air@Mac.localdomain>
Co-authored-by: Neil <neil@stably.ai>
2026-09-19 17:51:55 -07:00

39 lines
1.1 KiB
JSON

{
"observations": [
{
"graph": "worktree",
"variant": "before",
"sources": 1019,
"canonicalLfMatches": true,
"simulatedMainCheckoutMatches": true,
"graphSha256": "135b131bc7a3023e0e88c572802c4b837eb968af74e49a71ea93a97ba3454bd9"
},
{
"graph": "worktree",
"variant": "fixed",
"sources": 1021,
"canonicalLfMatches": true,
"simulatedMainCheckoutMatches": true,
"graphSha256": "389b3a60b0ddc080a86e9569c371ac1d51db1e6845c8f6d65a1987d92e11cec9"
},
{
"graph": "main",
"variant": "before",
"sources": 1017,
"canonicalLfMatches": true,
"simulatedMainCheckoutMatches": true,
"graphSha256": "9b092ce86caf62164bc106a6ac8a382b9b487c5abbaadcfaedd371c3755a1a50"
},
{
"graph": "main",
"variant": "fixed",
"sources": 1019,
"canonicalLfMatches": true,
"simulatedMainCheckoutMatches": true,
"graphSha256": "efafe6f45ec73681fe43ff9df05200a041ccadfbb3ab39ced5f5ba096d829274"
}
],
"mainMarkdownAliasesPreserved": true,
"driftRejected": true
}