Skip to content

Support scrolling in vscode notebooks - #3380

Merged
AndreasArvidsson merged 2 commits into
mainfrom
notebook-scroll
Oct 21, 2026
Merged

AndreasArvidsson merged 2 commits into
mainfrom
notebook-scroll

Conversation

@AndreasArvidsson

@AndreasArvidsson AndreasArvidsson commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Fixes #3379

Note that bottom alignment is not supported in the vscode notebook api, but crown and center works. There's also a limitation that we can't scroll to a specific line in a notebook cell we can only scroll the notebook to a specific cell. These are all limitations in the vscode notebook api and not something I think we can work around.

@AndreasArvidsson
AndreasArvidsson requested a review from a team as a code owner October 21, 2026 13:50
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T14:16:16.948541Z 3340b0c New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added the lines/50-199 Pull request changes 50 to 199 lines label Oct 21, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 13b415a281

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

at: RevealLineAt,
): Promise<void> {
if (isDocumentNotebookCell(editor.vscodeEditor.document)) {
revealNotebookCell(editor, at);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Honor the target line when revealing notebook cells

When the target is inside a notebook cell taller than the viewport, this branch discards lineNumber and aligns the entire cell instead. Since Scroll.getLineNumber computes the specific line occupied by the target, crown/center on a token near the bottom of a long cell can leave that token off-screen or at the wrong position; pass the line through and reveal the position within the cell rather than only the cell range.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not supported by the vscode notebook api as far as I can tell

Comment on lines +55 to +58
case RevealLineAt.bottom:
throw new Error(
"VS Code's notebook API doesn't support bottom alignment.",
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid failing scroll-to-bottom for every notebook target

Whenever scrollToBottom is invoked on a notebook target, this branch throws instead of completing the existing action, so users receive an error for every such command. The lack of a direct notebook reveal enum should be handled with a fallback or approximation rather than making the action fail outright; any unavoidable notebook-specific limitation also needs to be documented.

AGENTS.md reference: AGENTS.md:L32-L32

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no way to make a fall back for this as far as I know

Comment thread packages/app-vscode/src/ide/vscode/VscodeRevealLine.ts Outdated
@github-actions github-actions Bot added lines/200-499 Pull request changes 200 to 499 lines and removed lines/50-199 Pull request changes 50 to 199 lines labels Oct 21, 2026
@AndreasArvidsson
AndreasArvidsson merged commit 0ceeafb into main Oct 21, 2026
22 of 24 checks passed
@AndreasArvidsson
AndreasArvidsson deleted the notebook-scroll branch October 21, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lines/200-499 Pull request changes 200 to 499 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Support Scrolling Commands like crown in Jupyter Notebooks

1 participant