You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Commenting] - adding new comment causes editor to go display blank content #52
Have noticed issue, when adding new comment, the editor pane displays empty text content and markers on all lines.
To reproduce:
open document
select a portion of text
click on "Add comment" in comment pane - add comment and submit
The editor pane now shows a blank view with comment markers on each line
It doesn't look like content is lost.
In some cases, a force-reload brings the content back to a normal view. In other cases, the content can't be seen with a force-reload in the editor pane. The preview pane shows correct content.
No console error messages, looks like a rendering issue.
Also noticed in a document which I could reveal by reload, that a line break has been inserted in the editor before the comment anchor, even though there is no line break in text there.
The editor-side comment marker rendering no longer uses Monaco glyph-margin decorations for core comments. Those decorations were the likely source of the blank editor / marker-on-every-line rendering failure. Core comment markers are now rendered as one Monaco content widget per commented line, with grouped same-line comments handled by a single grouped marker.
I also changed the hidden markdown comment anchor rendering so the <!--comment:...--> anchor remains in the document model but has zero visual width in the editor. This avoids the extra visual spacing / apparent line break around anchors while still keeping the anchor in markdown.
I verified this with a browser E2E flow on the local app: create a document, select text, add a comment, confirm exactly one editor marker, confirm preview marker rendering, confirm the comment panel entry, and confirm the hidden anchor contributes zero layout width.
I have tried the latest changes. The extra markers in the editor are gone.
However, now I don't see any markers at all in the editor pane and the line breaks around the comment anchor are still occurring for me.
Screenshot from Chromium:
Also noticed that if I edit the document, the text disappears at the end of the typing (I guess when comment markers should be re-rendering). The editor is also flickering, maybe re-rendering is breaking here?
I found that my previous follow-up was still too fragile. The editor-side marker rendering has now been reworked again:
core comment markers are rendered through Monaco glyph-margin decorations, so they stay tied to editor lines instead of floating content widgets
the hidden <!--comment:...--> anchor is handled as a separate inline decoration with explicit stickiness/letter-spacing handling
comment decorations are rebuilt from the current Monaco model content after edits, so typing should no longer leave the raw anchor visible or cause the editor pane to blank/flicker
newly created comments now use a compact marker id instead of a full UUID, which reduces line-wrap disruption around anchors
I verified this locally with browser E2E flows for both cases:
an existing long UUID-style comment anchor, then typing after it
creating a new comment through the UI and confirming the compact anchor, one editor marker, preview marker, and comment panel entry
I have this committed locally on the core-comments branch and will push it with the branch update once the remaining issue-level fixes are ready.
Tried the latest commits and getting some unusual behaviour in the editor.
When an existing comment line is selected or a new edit made, the renderer starts flickering - in the video below, you can see the comment markers appearing/disappearing quickly.
When that is happening, it's no longer possible to edit (reloading page works to stop the flickering, but only temporarily)
I think there may be an issue with the hiding of the comments which is causing the flicker. It also looks to be related to line breaks where there shouldn't be any. Happy to test.
Activity
zeigerpuppy commentedon Jun 26, 2026
Interestingly, another way to recover the rendering failed condition is to reload the document in another account (shared workspace).
fix: stabilize editor comment markers (#52)
MuNeNiCK commentedon Jun 28, 2026
I've addressed this in the core comments work.
The editor-side comment marker rendering no longer uses Monaco glyph-margin decorations for core comments. Those decorations were the likely source of the blank editor / marker-on-every-line rendering failure. Core comment markers are now rendered as one Monaco content widget per commented line, with grouped same-line comments handled by a single grouped marker.
I also changed the hidden markdown comment anchor rendering so the
<!--comment:...-->anchor remains in the document model but has zero visual width in the editor. This avoids the extra visual spacing / apparent line break around anchors while still keeping the anchor in markdown.I verified this with a browser E2E flow on the local app: create a document, select text, add a comment, confirm exactly one editor marker, confirm preview marker rendering, confirm the comment panel entry, and confirm the hidden anchor contributes zero layout width.
zeigerpuppy commentedon Jun 29, 2026
Thanks @MuNeNiCK
I have tried the latest changes. The extra markers in the editor are gone.
However, now I don't see any markers at all in the editor pane and the line breaks around the comment anchor are still occurring for me.
Screenshot from Chromium:
Also noticed that if I edit the document, the text disappears at the end of the typing (I guess when comment markers should be re-rendering). The editor is also flickering, maybe re-rendering is breaking here?
MuNeNiCK commentedon Jun 29, 2026
Thanks for retesting and for the screenshots.
I found that my previous follow-up was still too fragile. The editor-side marker rendering has now been reworked again:
<!--comment:...-->anchor is handled as a separate inline decoration with explicit stickiness/letter-spacing handlingI verified this locally with browser E2E flows for both cases:
I have this committed locally on the core-comments branch and will push it with the branch update once the remaining issue-level fixes are ready.
fix: stabilize comment markers in editor (#52)
fix: stabilize legacy comment markers (#52)
zeigerpuppy commentedon Jul 6, 2026
Tried the latest commits and getting some unusual behaviour in the editor.
When an existing comment line is selected or a new edit made, the renderer starts flickering - in the video below, you can see the comment markers appearing/disappearing quickly.
When that is happening, it's no longer possible to edit (reloading page works to stop the flickering, but only temporarily)
I think there may be an issue with the hiding of the comments which is causing the flicker. It also looks to be related to line breaks where there shouldn't be any. Happy to test.
2026-07-06.23-36-23.webm
aswinm commentedon Aug 5, 2026
The screen kept refreshing continuously due to the content PUT request being triggered multiple times. I have pushed a fix here - #57