Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
# This file should be checked into version control along with the pnpm-lock.yaml file.
package.json=1645056029
packages/core/package.json=-1407934132
packages/vscode/package.json=-460142765
packages/vscode/package.json=988212829
pnpm-lock.yaml=1115513514
pnpm-workspace.yaml=-1673009026
1 change: 1 addition & 0 deletions packages/vscode/.vscodeignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
**
!dist/extension.js
!dist/taskRunner.js
!package.json
!README.md
!CHANGELOG.md
Expand Down
20 changes: 20 additions & 0 deletions packages/vscode/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ ts_project(
"src/output.ts",
"src/projects.ts",
"src/targetShortcuts.ts",
"src/taskProgress.ts",
"src/taskProgressView.ts",
"src/taskRunner.ts",
"src/tasks.ts",
"src/testing.ts",
"src/workspaceMembers.ts",
Expand Down Expand Up @@ -124,6 +127,22 @@ esbuild(
],
)

# A native process task keeps stdin/stdout attached to VS Code; this wrapper streams structured stderr to the host.
esbuild(
name = "task_runner",
srcs = glob(["src/**/*.ts"]) + [
"tsconfig.json",
"//:tsconfig_base",
],
entry_point = "src/taskRunner.ts",
format = "cjs",
output = "dist/taskRunner.js",
platform = "node",
target = "node22",
tsconfig = "tsconfig.json",
deps = [":node_modules/@elide/ide-core"],
)

copy_to_bin(
name = "assets",
srcs = [
Expand Down Expand Up @@ -159,6 +178,7 @@ filegroup(
srcs = [
":assets",
":bundle",
":task_runner",
":typescript_plugin",
":vscode_typecheck",
],
Expand Down
10 changes: 9 additions & 1 deletion packages/vscode/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,21 @@ All notable changes to the Elide extension are documented here. The format follo
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project uses
[semantic versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
## [Unreleased]

### Added

- Workspace member strings in `elide.pkl` link to the member's manifest and support Go to Definition.
Hover shows the project's name and description when the member is already loaded and synced.
Navigation follows unsaved edits without triggering project loading or synchronization.
- Structured task progress beside normal task output inside VS Code's existing Terminal container. Inspect live
build steps, progress, durations and skipped tasks; cancel a running task or open its step log. Task history is
also available in Activity. Native stdin/stdout and task reruns are preserved, as are subsequent user layout changes.

### Fixed

- Enable colorized process output for Elide task terminals, including tasks launched from sidebar targets
and Android builds. Preserve color opt-outs and keep failure messages free of ANSI escapes.

## [0.8.0](https://github.com/elide-dev/vscode/compare/v0.7.0...v0.8.0) (2026-11-03)

Expand Down
11 changes: 9 additions & 2 deletions packages/vscode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ test, and debug commands are available from the editor.
- **Mixed-editor checkouts.** A repository can carry both an IntelliJ `.idea` directory and the generated
`workspace.json`; each editor uses its own.
- **Tasks.** `elide build`, `elide test`, `elide install`, and one run task per manifest entrypoint.
Task terminals keep colorized process output, stdin and native terminal behavior, including Android build failures.
**Task Progress** sits beside the terminal inside the existing **Terminal** tab: live build steps, progress,
durations, skipped-task reasons and cancellation, using the same timeline as syncs. The extension places it there
once, on first use; later moves and resizing are yours. **Elide: Show Task Progress** reopens it in its current location.
Step logs record build progress and stderr; program stdout remains in the terminal. Older Elide releases fall back
to their text progress. Explicit CLI color options and color opt-outs (`NO_COLOR`, `FORCE_COLOR=0`) are preserved.
- **Test Explorer.** JUnit tests of the project's test source roots in the **Testing** view, run and debugged through
`elide test --reporter=tap` with live results, failure messages and stack-trace locations. **Run with Coverage**
shows the run's LCOV and JaCoCo XML reports in the editor's coverage gutter and Test Coverage view.
Expand All @@ -42,7 +48,7 @@ test, and debug commands are available from the editor.
task's, build target's or Android artifact's context menu) keeps a target in a **Pinned** section above the
projects, and a **Frequently used** section lists the five targets run most often from the sidebar itself — runs
from the CLI, code lenses or the palette are not counted. Both are remembered per workspace.
- **Activity.** The sidebar's **Activity** view lists every sync and Compose preview build of the window, live
- **Activity.** The sidebar's **Activity** view lists every sync, task and Compose preview build of the window, live
while it runs: each step (reading the manifest, installing dependencies, resolving classpaths, generating
resources, writing `workspace.json`), the `elide` commands it ran, and the build tasks those reported, each with
its duration and share of the whole; a task Elide skipped is listed with the reason, such as `Up to date`, since its
Expand Down Expand Up @@ -111,7 +117,8 @@ accept); add it to `.gitignore` instead to cover every clone.
| `Elide: Add Workspace Member…` | Create a project inside an existing one and declare it in `workspace.members`. |
| `Elide: Open Generated Kotlin LSP Workspace` | Open the generated `workspace.json`. |
| `Elide: Show Output` | Open the `Elide` output channel. |
| `Elide: Show Activity` | Reveal the **Activity** view: syncs and preview builds, step by step, with durations. |
| `Elide: Show Activity` | Reveal the **Activity** view: syncs, tasks and preview builds, step by step, with durations. |
| `Elide: Show Task Progress` | Reveal structured task progress beside the terminal in the existing **Terminal** container. |
| `Elide: Open Activity Log` | Open the latest operation's output, with timestamps, in an editor. |
| `Elide: Select Android Deployment Target…` | Choose the remembered project, APK and device shared by Run and Debug. |
| `Elide: Check Android Environment` | Inspect local tools and device readiness, including before sync succeeds; select a finding for fixes. |
Expand Down
26 changes: 22 additions & 4 deletions packages/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"onTaskType:elide",
"onView:elide.projects",
"onView:elide.activity",
"onView:elide.taskProgress",
"onWebviewPanel:elide.composePreview"
],
"contributes": {
Expand Down Expand Up @@ -489,6 +490,12 @@
"title": "Show Activity",
"icon": "$(pulse)"
},
{
"command": "elide.showTaskProgress",
"category": "Elide",
"title": "Show Task Progress",
"icon": "$(tasklist)"
},
{
"command": "elide.openActivityLog",
"category": "Elide",
Expand Down Expand Up @@ -910,7 +917,7 @@
},
{
"command": "elide.clearActivity",
"when": "view == elide.activity",
"when": "view == elide.activity || view == elide.taskProgress",
"group": "navigation@1"
}
],
Expand Down Expand Up @@ -1075,12 +1082,12 @@
},
{
"command": "elide.cancelActivity",
"when": "view == elide.activity && viewItem =~ /Cancellable$/",
"when": "(view == elide.activity || view == elide.taskProgress) && viewItem =~ /Cancellable$/",
"group": "inline@1"
},
{
"command": "elide.openActivityLog",
"when": "view == elide.activity && viewItem =~ /^activity/",
"when": "(view == elide.activity || view == elide.taskProgress) && viewItem =~ /^activity/",
"group": "inline@2"
}
]
Expand All @@ -1107,6 +1114,13 @@
"name": "Activity",
"contextualTitle": "Elide",
"icon": "media/elide.svg"
},
{
"id": "elide.taskProgress",
"name": "Task Progress",
"visibility": "hidden",
"contextualTitle": "Elide",
"icon": "media/elide.svg"
}
]
},
Expand All @@ -1118,7 +1132,11 @@
},
{
"view": "elide.activity",
"contents": "Nothing has run yet. Syncs and Compose preview builds appear here while they run, step by step, with the time each step took and its output.\n[Sync Project(s)](command:elide.sync)"
"contents": "Nothing has run yet. Syncs, tasks and Compose preview builds appear here while they run, step by step, with the time each step took and its output.\n[Sync Project(s)](command:elide.sync)"
},
{
"view": "elide.taskProgress",
"contents": "Elide tasks appear here while they run, step by step, alongside their terminal output. Open a step to read its log.\n[Run Task…](command:elide.runTask)"
}
],
"problemMatchers": [
Expand Down
2 changes: 1 addition & 1 deletion packages/vscode/src/activity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export interface ElideActivityApi {
}

/**
* What Elide is doing and has done in this window: syncs and preview builds, each a tree of the steps it went
* What Elide is doing and has done in this window: syncs, tasks and preview builds, each a tree of the steps it went
* through, every step with its duration and share of the whole, and the output it produced, readable as a log.
*
* The status bar and notifications only ever show the step in progress; this view is where a slow or failed
Expand Down
5 changes: 4 additions & 1 deletion packages/vscode/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ export async function activate(context: vscode.ExtensionContext): Promise<ElideE
const ui = new ElideUi();
const workspace = new ElideWorkspace(ui, context.globalState, context.asAbsolutePath("media/kotlin-lsp"), context.globalStorageUri.fsPath);
context.subscriptions.push(ui, workspace);
// Register the view without moving or opening the terminal until a task actually starts.
void workspace.taskProgress;
const composePreview = registerComposePreview(workspace, ui, context);
const agentPreviews = new ComposeAgentPreviews(workspace, ui, composePreview.agentHost);
const composePreviewMcp = registerComposePreviewMcp(context, agentPreviews, ui, String(context.extension.packageJSON.version));
Expand Down Expand Up @@ -438,7 +440,8 @@ const MENU_ACTIONS: { label: string; description: string; command: string; andro
{ label: "$(beaker) Run All Tests", description: "Run every test in the Testing view", command: "testing.runAll" },
{ label: "$(file-code) Open elide.pkl", description: "Project manifest", command: "elide.openManifest" },
{ label: "$(json) Open Generated Kotlin LSP Workspace", description: WORKSPACE_JSON, command: "elide.openWorkspaceJson" },
{ label: "$(pulse) Show Activity", description: "What syncs and preview builds did, step by step, and where their time went", command: "elide.showActivity" },
{ label: "$(pulse) Show Activity", description: "What syncs, tasks and preview builds did, step by step, and where their time went", command: "elide.showActivity" },
{ label: "$(tasklist) Show Task Progress", description: "Structured task progress beside the task terminal", command: "elide.showTaskProgress" },
{ label: "$(output) Show Output", description: "Elide output channel", command: "elide.showOutput" },
{ label: "$(new-folder) New Project…", description: "Create a project from an Elide template", command: "elide.newProject" },
{ label: "$(add) Add Workspace Member…", description: "Create a project inside this one and declare it a member", command: "elide.addMember" },
Expand Down
8 changes: 8 additions & 0 deletions packages/vscode/src/projects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import { probeSourceRoot } from "./kotlinAnalysis.js";
import { kotlinLspPlugin, withoutKotlinLspPlugin } from "./kotlinLspPlugin.js";
import { moduleReaders, projectModules } from "./manifestModules.js";
import type { ElideUi } from "./output.js";
import { ElideTaskProgress } from "./taskProgress.js";

export interface ElideProject {
/** Absolute project root (directory containing `elide.pkl`). */
Expand Down Expand Up @@ -142,6 +143,7 @@ export class ElideWorkspace implements vscode.Disposable {
private readonly komodoServer: KomodoLanguageServer;
/** Manifests {@link writeManifest} writes, by path: the text it left there, or `null` while it is still writing. */
private readonly manifestWrites = new Map<string, string | null>();
private taskProgressInstance: ElideTaskProgress | undefined;

constructor(
private readonly ui: ElideUi,
Expand All @@ -154,6 +156,11 @@ export class ElideWorkspace implements vscode.Disposable {
this.komodoServer = new KomodoLanguageServer(cacheRoot, (message) => this.ui.log(message));
}

/** Shared native task progress and its Terminal-container view; sync-only consumers do not initialize it. */
get taskProgress(): ElideTaskProgress {
return this.taskProgressInstance ??= new ElideTaskProgress(this.ui.activity, this.state, path.join(__dirname, "taskRunner.js"));
}

get projects(): ElideProject[] {
return [...this.folders.values()].flatMap((f) => [...f.projects.values()]);
}
Expand Down Expand Up @@ -1159,6 +1166,7 @@ export class ElideWorkspace implements vscode.Disposable {
}

dispose(): void {
this.taskProgressInstance?.dispose();
this.kotlinLspEnvironment.dispose();
this.komodoServer.dispose();
this.manifestDiagnostics.dispose();
Expand Down
Loading
Loading