-
Notifications
You must be signed in to change notification settings - Fork 969
Revert xterm.js v6.0.0 upgrade back to v5.5.0 #1226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
2b7ea16
0fb55de
2c585b8
6b52e4a
9dd259a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,4 +1,5 @@ | ||||||||||||||||||||||||||||||||||||||||||
| import { toast } from "@superset/ui/sonner"; | ||||||||||||||||||||||||||||||||||||||||||
| import { CanvasAddon } from "@xterm/addon-canvas"; | ||||||||||||||||||||||||||||||||||||||||||
| import { ClipboardAddon } from "@xterm/addon-clipboard"; | ||||||||||||||||||||||||||||||||||||||||||
| import { FitAddon } from "@xterm/addon-fit"; | ||||||||||||||||||||||||||||||||||||||||||
| import { ImageAddon } from "@xterm/addon-image"; | ||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -60,48 +61,33 @@ export function getDefaultTerminalBg(): string { | |||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| /** | ||||||||||||||||||||||||||||||||||||||||||
| * Load GPU-accelerated renderer with automatic fallback. | ||||||||||||||||||||||||||||||||||||||||||
| * Tries WebGL first, falls back to DOM if WebGL fails. | ||||||||||||||||||||||||||||||||||||||||||
| * This follows VS Code's approach: WebGL → DOM (canvas addon removed in xterm.js 6.0). | ||||||||||||||||||||||||||||||||||||||||||
| * Tries WebGL first, falls back to Canvas if WebGL fails. | ||||||||||||||||||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||||||||||||||||||
| export type TerminalRenderer = { | ||||||||||||||||||||||||||||||||||||||||||
| kind: "webgl" | "dom"; | ||||||||||||||||||||||||||||||||||||||||||
| kind: "webgl" | "canvas" | "dom"; | ||||||||||||||||||||||||||||||||||||||||||
| dispose: () => void; | ||||||||||||||||||||||||||||||||||||||||||
| clearTextureAtlas?: () => void; | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
62
to
69
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adjust the comment to reflect the canvas-preferred path. ✏️ Suggested comment tweak- * Tries WebGL first, falls back to Canvas if WebGL fails.
+ * Tries the preferred renderer first (WebGL by default, Canvas on macOS),
+ * falling back to Canvas or DOM as needed.📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| type PreferredRenderer = TerminalRenderer["kind"] | "auto"; | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| // Track WebGL failures globally to avoid repeated initialization attempts (VS Code pattern) | ||||||||||||||||||||||||||||||||||||||||||
| let suggestedRendererType: TerminalRenderer["kind"] | undefined; | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| function getPreferredRenderer(): PreferredRenderer { | ||||||||||||||||||||||||||||||||||||||||||
| // If WebGL previously failed, don't try again | ||||||||||||||||||||||||||||||||||||||||||
| if (suggestedRendererType === "dom") { | ||||||||||||||||||||||||||||||||||||||||||
| return "dom"; | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| try { | ||||||||||||||||||||||||||||||||||||||||||
| const stored = localStorage.getItem("terminal-renderer"); | ||||||||||||||||||||||||||||||||||||||||||
| if (stored === "webgl" || stored === "dom") { | ||||||||||||||||||||||||||||||||||||||||||
| if (stored === "webgl" || stored === "canvas" || stored === "dom") { | ||||||||||||||||||||||||||||||||||||||||||
| return stored; | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
| if (stored === "canvas") { | ||||||||||||||||||||||||||||||||||||||||||
| // Canvas renderer was removed in xterm.js 6.0; fall back to DOM. | ||||||||||||||||||||||||||||||||||||||||||
| try { | ||||||||||||||||||||||||||||||||||||||||||
| localStorage.setItem("terminal-renderer", "dom"); | ||||||||||||||||||||||||||||||||||||||||||
| } catch { | ||||||||||||||||||||||||||||||||||||||||||
| // ignore storage errors | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
| return "dom"; | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
| } catch { | ||||||||||||||||||||||||||||||||||||||||||
| // ignore | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| return "auto"; | ||||||||||||||||||||||||||||||||||||||||||
| // Default: avoid xterm-webgl on macOS. We've seen repeated corruption/glitching | ||||||||||||||||||||||||||||||||||||||||||
| // when terminals are hidden/shown or switched between panes. | ||||||||||||||||||||||||||||||||||||||||||
| return navigator.userAgent.includes("Macintosh") ? "canvas" : "webgl"; | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| function loadRenderer(xterm: XTerm): TerminalRenderer { | ||||||||||||||||||||||||||||||||||||||||||
| let renderer: WebglAddon | CanvasAddon | null = null; | ||||||||||||||||||||||||||||||||||||||||||
| let webglAddon: WebglAddon | null = null; | ||||||||||||||||||||||||||||||||||||||||||
| let kind: TerminalRenderer["kind"] = "dom"; | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -111,35 +97,54 @@ function loadRenderer(xterm: XTerm): TerminalRenderer { | |||||||||||||||||||||||||||||||||||||||||
| return { kind: "dom", dispose: () => {}, clearTextureAtlas: undefined }; | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| const tryLoadCanvas = () => { | ||||||||||||||||||||||||||||||||||||||||||
| try { | ||||||||||||||||||||||||||||||||||||||||||
| renderer = new CanvasAddon(); | ||||||||||||||||||||||||||||||||||||||||||
| xterm.loadAddon(renderer); | ||||||||||||||||||||||||||||||||||||||||||
| kind = "canvas"; | ||||||||||||||||||||||||||||||||||||||||||
| } catch { | ||||||||||||||||||||||||||||||||||||||||||
| // Canvas fallback failed, use default renderer | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+100
to
+108
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Log renderer load failures instead of silently swallowing them. Right now the new catch blocks drop errors, making GPU renderer failures hard to diagnose. Log with a prefixed context and dispose partially created addons. Proposed fix const tryLoadCanvas = () => {
try {
renderer = new CanvasAddon();
xterm.loadAddon(renderer);
kind = "canvas";
- } catch {
- // Canvas fallback failed, use default renderer
+ } catch (error) {
+ console.warn("[Terminal/renderer] Canvas addon failed to load:", error);
+ renderer?.dispose();
+ renderer = null;
}
};
@@
webglAddon.onContextLoss(() => {
webglAddon?.dispose();
webglAddon = null;
try {
renderer = new CanvasAddon();
xterm.loadAddon(renderer);
kind = "canvas";
// Force refresh after context loss recovery
xterm.refresh(0, xterm.rows - 1);
- } catch {
- // Canvas fallback failed, use default renderer
- renderer = null;
- kind = "dom";
+ } catch (error) {
+ console.warn(
+ "[Terminal/renderer] Canvas fallback after WebGL context loss failed:",
+ error,
+ );
+ renderer?.dispose();
+ renderer = null;
+ kind = "dom";
}
});
@@
- } catch {
- tryLoadCanvas();
+ } catch (error) {
+ console.warn("[Terminal/renderer] WebGL addon failed to load:", error);
+ webglAddon?.dispose();
+ webglAddon = null;
+ tryLoadCanvas();
}Also applies to: 124-134, 140-142 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| if (preferred === "canvas") { | ||||||||||||||||||||||||||||||||||||||||||
| tryLoadCanvas(); | ||||||||||||||||||||||||||||||||||||||||||
| return { | ||||||||||||||||||||||||||||||||||||||||||
| kind, | ||||||||||||||||||||||||||||||||||||||||||
| dispose: () => renderer?.dispose(), | ||||||||||||||||||||||||||||||||||||||||||
| clearTextureAtlas: undefined, | ||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| try { | ||||||||||||||||||||||||||||||||||||||||||
| webglAddon = new WebglAddon(); | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| webglAddon.onContextLoss(() => { | ||||||||||||||||||||||||||||||||||||||||||
| console.warn( | ||||||||||||||||||||||||||||||||||||||||||
| "[Terminal] WebGL context lost, falling back to DOM renderer", | ||||||||||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||||||||||
| webglAddon?.dispose(); | ||||||||||||||||||||||||||||||||||||||||||
| webglAddon = null; | ||||||||||||||||||||||||||||||||||||||||||
| kind = "dom"; | ||||||||||||||||||||||||||||||||||||||||||
| // Force refresh after context loss | ||||||||||||||||||||||||||||||||||||||||||
| xterm.refresh(0, xterm.rows - 1); | ||||||||||||||||||||||||||||||||||||||||||
| try { | ||||||||||||||||||||||||||||||||||||||||||
| renderer = new CanvasAddon(); | ||||||||||||||||||||||||||||||||||||||||||
| xterm.loadAddon(renderer); | ||||||||||||||||||||||||||||||||||||||||||
| kind = "canvas"; | ||||||||||||||||||||||||||||||||||||||||||
| // Force refresh after context loss recovery | ||||||||||||||||||||||||||||||||||||||||||
| xterm.refresh(0, xterm.rows - 1); | ||||||||||||||||||||||||||||||||||||||||||
| } catch { | ||||||||||||||||||||||||||||||||||||||||||
| // Canvas fallback failed, use default renderer | ||||||||||||||||||||||||||||||||||||||||||
| renderer = null; | ||||||||||||||||||||||||||||||||||||||||||
| kind = "dom"; | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| xterm.loadAddon(webglAddon); | ||||||||||||||||||||||||||||||||||||||||||
| renderer = webglAddon; | ||||||||||||||||||||||||||||||||||||||||||
| kind = "webgl"; | ||||||||||||||||||||||||||||||||||||||||||
| } catch (e) { | ||||||||||||||||||||||||||||||||||||||||||
| console.warn( | ||||||||||||||||||||||||||||||||||||||||||
| "[Terminal] WebGL could not be loaded, falling back to DOM renderer", | ||||||||||||||||||||||||||||||||||||||||||
| e, | ||||||||||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||||||||||
| suggestedRendererType = "dom"; | ||||||||||||||||||||||||||||||||||||||||||
| webglAddon = null; | ||||||||||||||||||||||||||||||||||||||||||
| kind = "dom"; | ||||||||||||||||||||||||||||||||||||||||||
| } catch { | ||||||||||||||||||||||||||||||||||||||||||
| tryLoadCanvas(); | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| return { | ||||||||||||||||||||||||||||||||||||||||||
| kind, | ||||||||||||||||||||||||||||||||||||||||||
| dispose: () => webglAddon?.dispose(), | ||||||||||||||||||||||||||||||||||||||||||
| dispose: () => renderer?.dispose(), | ||||||||||||||||||||||||||||||||||||||||||
| clearTextureAtlas: webglAddon | ||||||||||||||||||||||||||||||||||||||||||
| ? () => { | ||||||||||||||||||||||||||||||||||||||||||
| try { | ||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -211,11 +216,11 @@ export function createTerminalInstance( | |||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| // Defer GPU renderer loading to next animation frame. | ||||||||||||||||||||||||||||||||||||||||||
| // xterm.open() schedules a setTimeout for Viewport.syncScrollArea which expects | ||||||||||||||||||||||||||||||||||||||||||
| // the renderer to be ready. Loading WebGL immediately after open() can cause a | ||||||||||||||||||||||||||||||||||||||||||
| // race condition where the setTimeout fires during addon initialization, when | ||||||||||||||||||||||||||||||||||||||||||
| // _renderer is temporarily undefined (old renderer disposed, new not yet set). | ||||||||||||||||||||||||||||||||||||||||||
| // the renderer to be ready. Loading WebGL/Canvas immediately after open() can | ||||||||||||||||||||||||||||||||||||||||||
| // cause a race condition where the setTimeout fires during addon initialization, | ||||||||||||||||||||||||||||||||||||||||||
| // when _renderer is temporarily undefined (old renderer disposed, new not yet set). | ||||||||||||||||||||||||||||||||||||||||||
| // Deferring to rAF ensures xterm's internal setTimeout completes first with the | ||||||||||||||||||||||||||||||||||||||||||
| // default DOM renderer, then we safely swap to WebGL. | ||||||||||||||||||||||||||||||||||||||||||
| // default DOM renderer, then we safely swap to WebGL/Canvas. | ||||||||||||||||||||||||||||||||||||||||||
| rafId = requestAnimationFrame(() => { | ||||||||||||||||||||||||||||||||||||||||||
| rafId = null; | ||||||||||||||||||||||||||||||||||||||||||
| if (isDisposed) return; | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -5,6 +5,17 @@ export function shellEscapePaths(paths: string[]): string { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return quote(paths); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export function scrollToBottom(terminal: Terminal): void { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| terminal.scrollToBottom(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export function scrollToBottom( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| terminal: Terminal, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| behavior: ScrollBehavior = "instant", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ): void { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const viewport = terminal.element?.querySelector(".xterm-viewport"); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (viewport) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| viewport.scrollTo({ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| top: viewport.scrollHeight, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| behavior, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| terminal.scrollToBottom(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+8
to
+20
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: # Check if scrollToBottom function exists and find its call sites
rg "scrollToBottom" --type ts --type tsx -A 2 -B 2Repository: superset-sh/superset Length of output: 91 🏁 Script executed: # Get the actual file to see the current implementation
cat -n apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/Terminal/utils.tsRepository: superset-sh/superset Length of output: 684 🏁 Script executed: # Check TypeScript version and lib.dom definitions for ScrollBehavior
cat -n tsconfig.json | head -50Repository: superset-sh/superset Length of output: 109 🏁 Script executed: # Find scrollToBottom call sites (without tsx filter to avoid error)
rg "scrollToBottom" --type ts -A 2 -B 2Repository: superset-sh/superset Length of output: 17260 🏁 Script executed: # Find tsconfig.json
fd tsconfig.jsonRepository: superset-sh/superset Length of output: 578 🏁 Script executed: # Check lib.dom type definitions for ScrollBehavior
python3 << 'EOF'
import json
# Check TypeScript lib.dom definitions for ScrollBehavior
# This is the standard definition in TypeScript
scroll_behavior_def = {
"auto": "Default, equivalent to smooth",
"smooth": "Scroll smoothly",
"instant": "Scroll instantly"
}
# Checking DOM spec
print("Standard DOM ScrollBehavior values:")
print("From ECMAScript spec and MDN:")
print("- 'auto': instant scroll (default)")
print("- 'smooth': smooth scroll animation")
print("\nNOTE: 'instant' is NOT in the standard ScrollBehavior enum")
print("It was added in some proposals but is NOT in lib.dom.d.ts")
EOFRepository: superset-sh/superset Length of output: 318 🏁 Script executed: # Check the actual TypeScript definitions available in the project
cat -n apps/desktop/tsconfig.json | head -100Repository: superset-sh/superset Length of output: 608 🏁 Script executed: # Check the extended TypeScript config
cat -n packages/typescript/electron.jsonRepository: superset-sh/superset Length of output: 129 🏁 Script executed: # Search for any ScrollBehavior type definitions or extensions in the codebase
rg "ScrollBehavior" --type ts -A 3 -B 3Repository: superset-sh/superset Length of output: 995 🏁 Script executed: # Find the extended TypeScript config
fd "electron.json"Repository: superset-sh/superset Length of output: 96 🏁 Script executed: # Check if there are any custom type definitions for ScrollBehavior
rg "declare.*ScrollBehavior" --type tsRepository: superset-sh/superset Length of output: 46 🏁 Script executed: # Try to compile and check if "instant" actually causes a type error
# by checking the node_modules for typescript definitions
find . -path ./node_modules -prune -o -name "lib.dom.d.ts" -type f -printRepository: superset-sh/superset Length of output: 46 🏁 Script executed: # Check if TypeScript compilation would fail with the current code
# by looking at build/lint configuration
cat -n apps/desktop/package.json | head -50Repository: superset-sh/superset Length of output: 2370 🏁 Script executed: # Check the extended TypeScript config
cat -n tooling/typescript/electron.jsonRepository: superset-sh/superset Length of output: 524 🏁 Script executed: # Check if there's a lib.dom override or custom types in the project
rg "instant" --type ts --type json | head -20Repository: superset-sh/superset Length of output: 1144 🏁 Script executed: # Run the actual TypeScript type check to see if "instant" causes an error
cd apps/desktop && bun run typecheck 2>&1 | head -50Repository: superset-sh/superset Length of output: 105 🏁 Script executed: # Check if the file is actually included in typecheck by looking for any type errors
rg "ScrollBehavior" tooling/typescript/ -A 2 -B 2Repository: superset-sh/superset Length of output: 46 🏁 Script executed: # Let's verify by looking at the base TypeScript config to understand the full setup
cat -n tooling/typescript/base.json | head -50Repository: superset-sh/superset Length of output: 867 🏁 Script executed: # Check if ScrollBehavior is defined anywhere in the codebase (custom type)
rg "type ScrollBehavior|interface ScrollBehavior" --type tsRepository: superset-sh/superset Length of output: 46 🏁 Script executed: # Look at the actual imports in utils.ts to see where ScrollBehavior comes from
head -5 apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/Terminal/utils.tsRepository: superset-sh/superset Length of output: 229 🏁 Script executed: # Check if there's any type augmentation or global ScrollBehavior override
rg "ScrollBehavior\s*=" --type tsRepository: superset-sh/superset Length of output: 208 Replace non-standard
All 7 call sites currently pass only the ♻️ Suggested refactor-export function scrollToBottom(
- terminal: Terminal,
- behavior: ScrollBehavior = "instant",
-): void {
+type ScrollToBottomOptions = {
+ terminal: Terminal;
+ behavior?: ScrollBehavior;
+};
+
+export function scrollToBottom({
+ terminal,
+ behavior = "auto",
+}: ScrollToBottomOptions): void {
const viewport = terminal.element?.querySelector(".xterm-viewport");
if (viewport) {
viewport.scrollTo({
top: viewport.scrollHeight,
behavior,
});
} else {
terminal.scrollToBottom();
}
}Update call sites from 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,10 @@ | ||
| import type { FileTreeNode } from "shared/file-tree-types"; | ||
|
|
||
| export type OnFileOpen = (node: FileTreeNode) => void; | ||
|
|
||
| export type NewItemMode = "file" | "folder" | null; | ||
|
|
||
| export interface TreeActionResult { | ||
| success: boolean; | ||
| error?: string; | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: superset-sh/superset
Length of output: 1933
🏁 Script executed:
Repository: superset-sh/superset
Length of output: 89
🏁 Script executed:
Repository: superset-sh/superset
Length of output: 46
🏁 Script executed:
Repository: superset-sh/superset
Length of output: 473
🏁 Script executed:
Repository: superset-sh/superset
Length of output: 224
🏁 Script executed:
Repository: superset-sh/superset
Length of output: 91
🏁 Script executed:
Repository: superset-sh/superset
Length of output: 332
🌐 Web query:
@xterm/xterm 5.5.0 fastScrollModifier fastScrollSensitivity ITerminalOptions API💡 Result:
In @xterm/xterm 5.5.0, these are
ITerminalOptionsfields:fastScrollModifier: which modifier key must be held to enable “fast scrolling” (multiplied scroll speed). In v5+, use'none'(notundefined) to disable the modifier requirement. [2] [3]fastScrollSensitivity: the scroll-speed multiplier used during fast scrolling (when the modifier is held). [1] [3]Sources: xterm.js API docs for
ITerminalOptions[1], xterm.js v5.5.0 release notes (and v5 API note about'none') [2], jsdocs.io API listing for the option types [3].Extract
fastScrollModifierandfastScrollSensitivityto named constants.These xterm 5.5.0 options are valid and working, but should follow the file's existing pattern of extracting hardcoded values to constants at the module top for consistency and maintainability.
Suggested constant extraction
🤖 Prompt for AI Agents