-
Notifications
You must be signed in to change notification settings - Fork 229
Fix jupyter console frame and add to frame type selector #8750
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
a4fe6c7
frontend/jupyter: fix jupyter console frame and add it to frame type …
haraldschilly 1205d81
Merge branch 'master' into fix-jupyter-console-20260219
haraldschilly db575fb
frontend/jupyter: fix terminal lifecycle for shell frames (codex review)
haraldschilly a799ef2
frontend/jupyter, project/terminal: fix terminal session lifecycle an…
haraldschilly 4292c8b
frontend/terminal: guard closed xterm option access
haraldschilly 9f8aec3
frontend/jupyter: kill backend jupyter-console on close and sync with…
haraldschilly 2832643
frontend/terminal: fix terminal() reusing cleared shell frames
haraldschilly 84a68c6
frontend/jupyter: fix shell() fallback, listener cleanup, and remove …
haraldschilly 99907a7
Merge branch 'master' into fix-jupyter-console-20260219
haraldschilly File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/packages/frontend/frame-editors/terminal-editor/normalize-args.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| /* | ||
| * This file is part of CoCalc: Copyright © 2026 Sagemath, Inc. | ||
| * License: MS-RSL – see LICENSE.md for details | ||
| */ | ||
|
|
||
| /** | ||
| * Convert args from an Immutable.js List (or other iterable) to a plain string[]. | ||
| * | ||
| * When frame tree node data is read via node.get("args"), the result is an | ||
| * Immutable.js List rather than a plain array. Downstream code (e.g. MsgPack | ||
| * serialization over Conat) requires plain arrays, so we normalise here. | ||
| */ | ||
| export function normalizeArgs(rawArgs: unknown): string[]; | ||
| export function normalizeArgs( | ||
| rawArgs: unknown, | ||
| allowUndefined: true, | ||
| ): string[] | undefined; | ||
| export function normalizeArgs( | ||
| rawArgs: unknown, | ||
| allowUndefined?: boolean, | ||
| ): string[] | undefined { | ||
| if (rawArgs == null) { | ||
| return allowUndefined ? undefined : []; | ||
| } | ||
| const iter = Array.isArray(rawArgs) | ||
| ? rawArgs | ||
| : typeof (rawArgs as any)?.toArray === "function" | ||
| ? (rawArgs as any).toArray() | ||
| : typeof (rawArgs as any)?.[Symbol.iterator] === "function" | ||
| ? Array.from(rawArgs as Iterable<unknown>) | ||
| : undefined; | ||
| if (iter == null) { | ||
| return allowUndefined ? undefined : []; | ||
| } | ||
| return iter.filter((arg): arg is string => typeof arg === "string"); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.