Apply scrollBeyondLastLine for CodeEditor in QueryEditor and Logs Explorer (#51082)

## Context

As per PR title - this was the behaviour for the SQL Editor and figured
it makes sense to also have this behaviour in the Explorer QueryEditor +
Logs Explorer where the main UX is writing queries, and lets the user
bring the active section of the code closer to the middle of the
viewport (rather than right at the bottom)
<img width="790" height="305" alt="image"
src="https://github.com/user-attachments/assets/07eb63fa-1bb9-4abe-859e-2968a73e7ca5"
/>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Editor Improvements**
* Query editors now allow scrolling beyond the final line, providing
more room to position the last lines on screen.
* The SQL editor no longer forces the decoration area to zero width; it
now uses Monaco’s default width behavior.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Joshen Lim authored and GitHub committed 2026-10-01 11:20:41 +08:00
1 parent 5fbf1ac4ff
commit d6c81b66c9
3 files changed
+2 -1

No files matched your search

@@ -478,6 +478,7 @@ export const QueryEditor = forwardRef<QueryEditorHandle, QueryEditorProps>(funct
options={{
minimap: { enabled: false },
padding: { top: 8 },
scrollBeyondLastLine: true,
}}
onInputChange={(value) => onSqlChange(value ?? '')}
onMount={(editor, monaco) => {
@@ -210,7 +210,6 @@ export const MonacoEditor = ({
}}
options={{
placeholder,
lineDecorationsWidth: 0,
fixedOverflowWidgets: false,
lineNumbersMinChars: 5,
scrollBeyondLastLine: true,
@@ -509,6 +509,7 @@ export const LogsExplorerPage: NextPageWithLayout = () => {
defaultValue={editorValue}
onInputChange={(v) => setEditorValue(v || '')}
actions={{ runQuery: { enabled: true, callback: handleRun } }}
options={{ scrollBeyondLastLine: true }}
/>
{rewriteProposal && (
<div className="absolute inset-0 z-10 flex flex-col bg-studio">