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
Broken auto indent behavior in raw text editor #4650
Reproduced this in the browser on the compose Raw editor. Concrete case:
Line ports: has 4 spaces of indentation.
Placing the cursor at end of line and pressing Enter produces a new line with 10 spaces of leading indentation (should be 4, matching the current level).
So the auto-indent is definitely miscomputing the indent (confirmed the 10-space output, no tabs involved).
The editor is CodeMirror 6 (@uiw/react-codemirror + @codemirror/lang-yaml) in apps/dokploy/components/shared/code-editor.tsx, with no explicit indentation config. I tried the obvious fix — setting tabSize: 2 in basicSetup and adding indentUnit.of(" ") — but it did not change the behavior (still 10 spaces). That means the extra indentation is coming from the YAML language's indent service itself (@codemirror/lang-yaml), not from an indentUnit/tabSize mismatch, so it likely needs either a pinned/updated @codemirror/lang-yaml version or an explicit indentService override rather than a one-line config tweak.
I'm not opening a PR with a fix I couldn't verify actually works. Leaving this documented for a maintainer who can decide between (a) pinning the codemirror YAML packages to the versions from before the regression, or (b) adding a custom YAML indentService.
Note: there's already an open PR for this — #4828 (fix(editor): consistent YAML auto-indent on newline). It likely supersedes my analysis above; deferring to that PR.
Activity
Ritinder-Singh commentedon Jun 23, 2026
I'd like to take a stab at this. Will dig into the editor config and report back.
Siumauricio commentedon Jul 21, 2026
Reproduced this in the browser on the compose Raw editor. Concrete case:
ports:has 4 spaces of indentation.So the auto-indent is definitely miscomputing the indent (confirmed the 10-space output, no tabs involved).
The editor is CodeMirror 6 (
@uiw/react-codemirror+@codemirror/lang-yaml) inapps/dokploy/components/shared/code-editor.tsx, with no explicit indentation config. I tried the obvious fix — settingtabSize: 2inbasicSetupand addingindentUnit.of(" ")— but it did not change the behavior (still 10 spaces). That means the extra indentation is coming from the YAML language's indent service itself (@codemirror/lang-yaml), not from anindentUnit/tabSizemismatch, so it likely needs either a pinned/updated@codemirror/lang-yamlversion or an explicitindentServiceoverride rather than a one-line config tweak.I'm not opening a PR with a fix I couldn't verify actually works. Leaving this documented for a maintainer who can decide between (a) pinning the codemirror YAML packages to the versions from before the regression, or (b) adding a custom YAML
indentService.Marking
awaiting-feedback.Siumauricio commentedon Jul 21, 2026
Note: there's already an open PR for this — #4828 (
fix(editor): consistent YAML auto-indent on newline). It likely supersedes my analysis above; deferring to that PR.fix(editor): consistent YAML auto-indent on newline
chore(release): 0.42.0 [skip ci]