-
Notifications
You must be signed in to change notification settings - Fork 112
Feat/notebook cell execution info #9026
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
base: main
Are you sure you want to change the base?
Conversation
E2E Tests 🚀 |
14a2e04
to
77ab7a4
Compare
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.
This is really cool!
I noticed 2 strange-feeling things:
- When the hover pops up, the outline of the entire Positron window seems to flash. In my video this is clearest up by the menu bar.
- When the hover is onscreen, I can't scroll the notebook. For some reason this subconsciously feels really sticky and annoying 😅
clip.mov
Ah, this is probably because of my super-heavy handed use of the full positron modal system rather than a more lightweight popup. |
9066d40
to
4051f4b
Compare
4051f4b
to
9066d40
Compare
070484a
to
291c5f6
Compare
Switched to a new lighterweight "Popover" component for the info... popover. Should be good now. |
c397033
to
158f3f0
Compare
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.
Very nice! Sometimes the popover flickers for a frame in the top left of the window:
Screen.Recording.2025-08-22.at.11.27.06.mov
I think the UI details (alignment, choice of text and what we display in the popover, etc) can be refined via mockups and followup PRs.
Oh, also not sure how we want to approach Release Notes with Positron NB |
158f3f0
to
dfc9973
Compare
Fixed flicker and removed the release notes |
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.
Pull Request Overview
This pull request adds a comprehensive cell execution information display feature for Positron notebooks, allowing users to view execution order, duration, timing, and status through an interactive hover popup. The feature enhances the notebook user experience by providing clear visibility into cell execution history and performance metrics.
- Adds execution info icon to notebook cells displaying execution order badges or status indicators
- Implements detailed hover popup showing execution status, duration, timing, and completion information
- Provides responsive status updates during cell execution with visual feedback (spinning icons, status badges)
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
test/e2e/tests/notebook/positron-notebook-editor.test.ts | Refactors test setup by extracting helper functions to the page object |
test/e2e/tests/notebook/cell-execution-info.test.ts | Comprehensive e2e test covering all execution info popup scenarios |
test/e2e/pages/notebooksPositron.ts | Adds extensive page object methods for Positron notebook interactions |
src/vs/workbench/services/positronNotebook/browser/IPositronNotebookInstance.ts | Updates observable import to use newer module |
src/vs/workbench/services/positronNotebook/browser/IPositronNotebookCell.ts | Adds execution timing observables to code cell interface |
src/vs/workbench/contrib/positronNotebook/browser/notebookCells/NotebookCodeCell.tsx | Integrates execution info icon component into code cells |
src/vs/workbench/contrib/positronNotebook/browser/notebookCells/NotebookCellWrapper.tsx | Adds test identifier for e2e testing |
src/vs/workbench/contrib/positronNotebook/browser/notebookCells/NotebookCellWrapper.css | Updates cell styling with margin adjustments and improved animations |
src/vs/workbench/contrib/positronNotebook/browser/notebookCells/CellExecutionInfoPopup.tsx | New popup component displaying detailed execution information |
src/vs/workbench/contrib/positronNotebook/browser/notebookCells/CellExecutionInfoPopup.css | Styling for the execution info popup with theme support |
src/vs/workbench/contrib/positronNotebook/browser/notebookCells/CellExecutionInfoIcon.tsx | New icon component with hover interactions and state management |
src/vs/workbench/contrib/positronNotebook/browser/notebookCells/CellExecutionInfoIcon.css | Styling for execution info icons with status-specific appearance |
src/vs/workbench/contrib/positronNotebook/browser/PositronNotebookCells/PositronNotebookCodeCell.ts | Backend implementation for tracking execution timing and metadata |
src/vs/workbench/contrib/positronNotebook/browser/KernelStatusBadge.tsx | Adds accessibility label for e2e test compatibility |
src/vs/workbench/browser/positronComponents/popover/popover.tsx | New reusable popover component with auto-positioning |
src/vs/workbench/browser/positronComponents/popover/popover.css | Basic styling for the popover component |
Comments suppressed due to low confidence (1)
@@ -10,6 +10,7 @@ import { QuickAccess } from './quickaccess'; | |||
import test, { expect, Locator } from '@playwright/test'; | |||
import { HotKeys } from './hotKeys.js'; | |||
|
|||
const DEFAULT_TIMEOUT = 10000; |
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.
[nitpick] Consider making this timeout configurable or using a constant from a shared configuration file to ensure consistency across test suites.
const DEFAULT_TIMEOUT = 10000; | |
import { DEFAULT_TIMEOUT } from '../config'; |
Copilot uses AI. Check for mistakes.
cell: PositronNotebookCodeCell; | ||
} | ||
|
||
const POPUP_DELAY = 100; |
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.
[nitpick] Consider extracting this magic number to a configuration constant or making it configurable, as hover delays can impact user experience and may need adjustment.
Copilot uses AI. Check for mistakes.
? completedMoreThanAnHourAgo | ||
? `${getRelativeTime(lastRunEndTime)} (${formatTimestamp(lastRunEndTime)})` | ||
: `${getRelativeTime(lastRunEndTime)}` | ||
: ''} |
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.
[nitpick] The type narrowing comment should be more descriptive or the code could be restructured to make the type narrowing more explicit without inline comments.
: ''} | |
{completionTimeText} |
Copilot uses AI. Check for mistakes.
anchorElement, | ||
onClose, | ||
autoCloseOnMouseLeave = true, | ||
autoCloseDelay = 100, |
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.
[nitpick] Consider extracting magic numbers like this delay to named constants for better maintainability and consistency across the codebase.
autoCloseDelay = 100, | |
autoCloseDelay = DEFAULT_AUTO_CLOSE_DELAY_MS, |
Copilot uses AI. Check for mistakes.
In terms of release notes, we're not including any public facing release notes until we're ready to invite users to try it out, but I would still encourage folks to outline what a PR does in a single line like we usually do, for ease of navigating. |
Addresses #5495.
@:notebooks
Adds execution information display for notebook cells, showing execution order, duration, and status through a hover popup. The feature includes an execution order badge or status icon in the cell gutter that triggers a detailed popup on hover, providing users with visibility into when cells were executed, how long they took, and their success status. Includes e2e tests covering popup interactions, status changes, and accessibility features.
Release Notes
Bug Fixes
QA Notes
The e2e tests in
test/e2e/tests/notebook/cell-execution-info.test.ts
verify all interaction patternsManual Testing
Create a new Python notebook and execute cells to verify the execution info appears correctly.
After running these cells, you should see: