Repository navigation
Timeline: multi-select, workspace timelines, and API cleanup for finalization - #341560
Merged
Logan Ramos (lramos15) merged 2 commits intoOct 15, 2026
Merged
Logan Ramos (lramos15) merged 2 commits into
Logan Ramos (lramos15) merged 2 commits into
Conversation
Logan Ramos (lramos15)
force-pushed
the
lramos15/agents/vscode-issue-145202-investigation
branch
from
October 14, 2026 14:38
d67e770 to
e3f62e9
Compare
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved correctness defects affect history completeness, provider lifecycle, item isolation, comparisons, and selection handling.
6 open findings
Empty repository failure hides timelines from healthy repositories · New Workspace paging skips commits with out-of-order timestamps · New Disposing a shared provider blanks the surviving timeline · New File log comparisons fail across renames · New Frozen copies expose mutable provider-owned fields · New Inline actions ignore timeline multi-selection · New
What changed in this PR
Updates VS Code’s proposed Timeline API and its core, Git, and local-history integrations toward finalization.
Changes:
- Adds multi-selection, bulk deletion, and cross-provider comparisons.
- Adds workspace and folder timelines.
- Simplifies paging, change events, and extension command arguments.
| File | Description |
|---|---|
| src/vscode-dts/vscode.proposed.timeline.d.ts | Defines the revised proposed API. |
| src/vs/workbench/contrib/timeline/test/browser/timelinePane.test.ts | Tests reload limits and selection arguments. |
| src/vs/workbench/contrib/timeline/common/timelineService.ts | Routes workspace providers and events. |
| src/vs/workbench/contrib/timeline/common/timeline.ts | Updates internal timeline contracts. |
| src/vs/workbench/contrib/timeline/browser/timelinePane.ts | Implements workspace views and multi-selection. |
| src/vs/workbench/contrib/timeline/browser/timeline.contribution.ts | Enables folder timeline commands. |
| src/vs/workbench/contrib/localHistory/electron-browser/localHistoryCommands.ts | Restricts reveal to single selections. |
| src/vs/workbench/contrib/localHistory/browser/localHistoryTimeline.ts | Supplies snapshot URIs and revised events. |
| src/vs/workbench/contrib/localHistory/browser/localHistoryCommands.ts | Adds bulk deletion and selection-aware menus. |
| src/vs/workbench/contrib/localHistory/browser/localHistory.ts | Defines single-selection menu conditions. |
| src/vs/workbench/api/test/browser/mainThreadTimeline.test.ts | Tests workspace routing and events. |
| src/vs/workbench/api/test/browser/extHostTimeline.test.ts | Tests revised extension API behavior. |
| src/vs/workbench/api/common/extHostTypes.ts | Adds timeline trigger kinds. |
| src/vs/workbench/api/common/extHostTimeline.ts | Adapts providers and command-item copies. |
| src/vs/workbench/api/common/extHost.protocol.ts | Updates timeline communication contracts. |
| src/vs/workbench/api/common/extHost.api.impl.ts | Exposes new API entry points. |
| src/vs/workbench/api/browser/mainThreadTimeline.ts | Bridges workspace providers and events. |
| extensions/github/package.json | Updates GitHub timeline menu conditions. |
| extensions/git/src/timelineProvider.ts | Adds workspace history and snapshot URIs. |
| extensions/git/src/commands.ts | Opens workspace and folder commits. |
| extensions/git/package.json | Extends commit menus to new timelines. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…lization Reshapes the proposed timeline API ahead of finalization and implements it in core, git, github and local history. - Commands on timeline items receive the selected items as a 4th argument; local history supports bulk delete and core adds Compare Selected for items that set the new `TimelineItem.resourceUri`. - New `WorkspaceTimelineProvider`/`registerWorkspaceTimelineProvider`; the Timeline view shows the workspace timeline when no editor has a resource, and Explorer's Open Timeline works for folders. Git implements both. - Other extensions receive read-only copies of timeline items. - Simplified paging (`limit` count + `Timeline.cursor`), `TimelineTriggerKind`, and `onDidChangeTimeline: Event<Uri | Uri[] | undefined>`. Fixes #145202 Refs #84297 Co-authored-by: Copilot <[email protected]>
- Git workspace timeline: treat repositories without commits as empty, only resolve details for repositories in the page, and only skip the commits a page took from the start of each log, so commits whose log order differs from their timestamps are not dropped. - Git file timeline: resolve the path of the file at each commit with `--numstat`, so `resourceUri` points to the old name before a rename. - Other extensions get copies of timeline items that share no mutable values with the original. - Removing one kind of provider with a shared id reloads the other kind. - Inline actions get the same selection context keys as the context menu and are re-rendered when items enter or leave a multi-selection. Co-authored-by: Copilot <[email protected]>
Logan Ramos (lramos15)
force-pushed
the
lramos15/agents/vscode-issue-145202-investigation
branch
from
October 14, 2026 15:15
89d05b0 to
726d433
Compare
Contributor
|
This all looks good. I plan to wait for the PR to land in Insiders, then revise my extension to cater for the changes to the proposed API it's already leveraging. |
Logan Ramos (lramos15)
marked this pull request as ready for review
October 15, 2026 14:29
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Ladislau Szomoru (@lszomoru)Matched files:
|
Henning Dieterichs (hediet)
approved these changes
Oct 15, 2026
Logan Ramos (lramos15)
deleted the
lramos15/agents/vscode-issue-145202-investigation
branch
October 15, 2026 23:40
2 tasks done
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


Fixes #145202, refs #84297
Reshapes the proposed timeline API so it can be finalized in one step, and implements it in core, local history, git and github. Breaking changes to the proposal are intentional. Outside this repo, the distro product.json allowlists only
GitHub.remotehubandms-vscode.remote-repositories, and only the latter declares the proposal. It's updated in microsoft/vscode-remotehub#915, which requires^1.143.0and should be published after this lands in Insiders.Why the larger changes
Selection as a 4th command argument: commands on timeline items now run with
(item, uri, source, selectedItems?). It is appended rather than following tree views'(item, selectedItems)becausetimeline/item/contextis a stable menu and existing commands rely onuribeing second. Selected items are limited to the clicked item's provider, since the view mixes providers. Context menus now seelistMultiSelection/listDoubleSelection; before this change, the!listMultiSelectionclauses in git had no effect.TimelineItem.resourceUri: the content of the resource as of that entry. It lets core own Compare Selected across providers (local history ↔ git, Timeline: cant select compare between local saves and git commits #225360) and gives other extensions something meaningful to act on (TimelineItem command callback values are now useless for "foreign" extensions #177319).Read-only copies for other extensions: the extension that provided an item receives the original object, and other extensions get a frozen copy of its public properties without
command. This follows jrieken's plan on TimelineItem command callback values are now useless for "foreign" extensions #177319. Copies are still only given to extensions with the proposal enabled until finalization.Separate
WorkspaceTimelineProvider: the workspace timeline was the blocker for finalizing in 2021. It gets its own interface rather than makingurioptional onprovideTimeline:schemeonly applies where it means something.uri: Uriagainst aUri | undefinedparameter, which would turn into runtime errors.A timeline provider and a workspace timeline provider from the same extension can share an id and appear as one source in the filter.
Workspace timeline in the view: shown when following an editor without a resource, or pinned from the title menu (Show Workspace Timeline). Explorer's Open Timeline now also works for folders, and always opens the folder's own timeline, including for the workspace root. Opening a commit no longer replaces the timeline with the multi-diff editor's.
Simpler paging:
limitis now just a count, andTimeline.paging.cursorbecomesTimeline.cursor. The{ timestamp, id }form oflimitexisted only so the view could reload the items already shown. The view now re-requests the newest items with a count at least as large as what is loaded, and drops duplicates by id. Paging confusion was the most common provider feedback (Cursor and limit properties are ambiguous #94155, Paging API suggestions #94178, API support for Timeline view #84297).Change events:
onDidChangeTimeline: Event<Uri | Uri[] | undefined>replacesTimelineChangeEvent. No provider ever sentreset: false, so a change always means the shown items are requested again, which also covers removed items (Timeline API has no way to signal an entry should be removed #145984).TimelineTriggerKind: lets caching providers tell an explicit Refresh apart from automatic requests (requested by the Perforce extension author on API support for Timeline view #84297).Cleanup: internal
cacheResults/resetCacheno longer reach providers (Merge internal options to timeline options #147304), the deprecateddetailfallback is removed,iconPathusesIconPath, and both menus' arguments plusonView:timelineactivation are documented.Extensions and local history
--follow; selecting a commit opens it), and setsresourceUrion file items.resourceUri.How to test
Validation
Rebased onto
main(after #341538 and #341549), including the review fixes.npm run typecheck-client: passedtsc -p extensions/git/tsconfig.json --noEmitandtsc -p extensions/github/tsconfig.json --noEmit: passednpm run eslint -- <changed files>: passed./scripts/test.sh --run src/vs/workbench/api/test/browser/extHostTimeline.test.ts --run src/vs/workbench/api/test/browser/mainThreadTimeline.test.ts --run src/vs/workbench/contrib/timeline/test/browser/timelinePane.test.ts --run src/vs/workbench/contrib/timeline/test/browser/timeline.contribution.test.ts --run src/vs/workbench/contrib/timeline/test/common/timelineService.test.ts: 30 passing./scripts/test-integration.sh --suite git --grep 'parseGitFileLog|git timeline': 4 passing