Skip to content

Upgrade Ωedit™ to v2.0.0#1668

Open
scholarsmate wants to merge 1 commit intoapache:mainfrom
ctc-oss:omega-edit-v2-upgrade
Open

Upgrade Ωedit™ to v2.0.0#1668
scholarsmate wants to merge 1 commit intoapache:mainfrom
ctc-oss:omega-edit-v2-upgrade

Conversation

@scholarsmate
Copy link
Copy Markdown
Contributor

Closes: #1667

Enhancement Request: Upgrade Ωedit™ to v2.0.0

Summary

  • updated the data editor to the Ωedit™ 2.x client APIs, including heartbeat and viewport subscription helpers
  • adjusted server metrics and packaging to the new native runtime fields and @omega-edit/server/out layout
  • refreshed the Ωedit™ test startup call sites for the 2.x startServer(..., { logConfigFile }) signature

Details

Ωedit™ v2.0.0 changes the client/server package layout and several APIs. This PR aligns the VS Code extension with the migration guide and the new helper APIs so we can validate the upgrade in CI.

  • keeps the data editor building and packaging against the v2.0.0 release
  • updates the runtime metrics surfaced in the UI to match the new server fields
  • ensures the packaged VSIX includes the server binaries from the new out/ directory structure

Review Instructions:

  • yarn install
  • yarn compile
  • yarn test:svelte
  • yarn vite:pkg
  • yarn package
  • Install the .vsix and manual run through of the data editor features in the extension, including:
    • opening a data editor and confirming it loads successfully
    • confirming the server info shows the new heartbeat messages
    • confirming the file type information in the profile view is correct
    • confirming the server shuts down after the idle timeout when no editor is open
    • confirming search and replace features work as expected with the new client APIs
    • confirming the viewport subscription helper correctly updates the visible range in the UI as we scroll
    • others as needed to validate the upgrade and new features

Wiki:

  • I have determined that no documentation updates are needed for these changes

@scholarsmate scholarsmate self-assigned this Apr 17, 2026
@scholarsmate scholarsmate added enhancement New feature or request dependencies Pull requests that update a dependency file build Issues related to building of the code typescript data editor Issues related to the Data Editor capability labels Apr 17, 2026
@scholarsmate scholarsmate added this to the 1.6.0 milestone Apr 17, 2026
@scholarsmate scholarsmate moved this to In Review in daffodil-vscode v1.6.0 Apr 17, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Upgrades the VS Code data editor integration to Ωedit™ v2.0.0, updating client/server APIs, packaging/runtime layout, and the webview↔extension message contract to match the new server/heartbeat/viewport behaviors.

Changes:

  • Bump Ωedit™ dependencies to 2.0.0 and adapt server start/heartbeat/viewport subscription flows to new helper APIs.
  • Update webview messaging/metrics fields for the new native runtime heartbeat payload and byte transport format.
  • Rework packaging so the VSIX includes Ωedit™ runtime bits from the new @omega-edit/server/out layout and syncs the Ωedit™ client runtime into dist/package.

Reviewed changes

Copilot reviewed 22 out of 23 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
yarn.lock Locks Ωedit™ client/server v2.0.0 and new transitive deps (protobuf-ts, pino updates).
vite.config.mjs Copies new server out/ layout and marks @omega-edit/client as an external runtime dependency.
src/utils.ts Changes default data editor log file setting to empty (meaning “use default/app-data path”).
src/tests/suite/utils.test.ts Aligns expected default config with empty log file setting.
src/tests/suite/omegaEditClientLogger.test.ts Adds coverage ensuring Ωedit™ client logger can be required/used without explicit setup.
src/tests/suite/dataEditor.test.ts Updates startServer call signature and adds test covering server idle session reaping / shutdown behavior.
src/svelte/src/utilities/message.ts Adds webviewReady command for extension↔webview synchronization.
src/svelte/src/components/dataEditor.svelte Updates byte payloads to arrays and adjusts viewport refresh decoding for v2 message shape.
src/svelte/src/components/ServerMetrics/ServerMetrics.svelte Updates heartbeat field names for native runtime metrics and fixes uptime string formatting.
src/svelte/src/components/DataDisplays/CustomByteDisplay/DataLineFeed.svelte Sends selection bytes as arrays for message serialization compatibility.
src/svelte/src/App.svelte Sends webviewReady on mount and adjusts byte payload handling for apply/viewport refresh.
src/dataEditor/svelteWebviewInitializer.ts Fixes nonce replacement and restructures HTML loading/injection logic.
src/dataEditor/include/server/heartbeat/index.ts Replaces manual interval heartbeat polling with v2 heartbeat loop helper.
src/dataEditor/include/server/heartbeat/HeartBeatInfo.ts Updates heartbeat model fields to v2 native memory metrics.
src/dataEditor/include/server/Sessions.ts Removes client-driven server stop; adds resilience for “server already stopped” session cleanup.
src/dataEditor/include/server/ServerInfo.ts Updates runtime metadata fields to v2 (runtime/platform/compiler/build info).
src/dataEditor/dataEditorClient.ts Major v2 API migration: server lifecycle options, viewport subscription helper, byte serialization helpers, webview resync + ready handshake, logging tweaks.
src/dataEditor/config/Extract.ts Updates defaults to v2 log/checkpoint path helpers; fixes port keyword substitution to string.
src/dataEditor/config/Config.ts Adds log file normalization helpers and default log/checkpoint path helpers by port.
package.json Pins Ωedit™ deps to 2.0.0, updates packaging pipeline, adds postinstall runtime patch hook, updates config defaults and activation event.
build/yarn-scripts.ts Adds Ωedit™ runtime patching + runtime sync + VSIX packaging helper; changes .vscodeignore generation.
build/package/NONOTICE Adds notice entry for @protobuf-ts/runtime-rpc.
build/package/LICENSE Adds license entries for protobuf-ts runtime and @pinojs/redact.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/dataEditor/dataEditorClient.ts
Comment thread src/tests/suite/dataEditor.test.ts Outdated
Comment thread package.json Outdated
Comment thread build/yarn-scripts.ts Outdated
Comment thread build/yarn-scripts.ts
@scholarsmate scholarsmate force-pushed the omega-edit-v2-upgrade branch from 04255ff to b41f4a1 Compare April 17, 2026 20:15
@scholarsmate scholarsmate marked this pull request as draft April 17, 2026 20:31
@scholarsmate scholarsmate force-pushed the omega-edit-v2-upgrade branch from b41f4a1 to cbae7b9 Compare April 17, 2026 22:24
@scholarsmate scholarsmate marked this pull request as ready for review April 18, 2026 02:30
@scholarsmate scholarsmate requested a review from Copilot April 18, 2026 02:31
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 24 out of 25 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/dataEditor/include/server/ServerInfo.ts Outdated
Comment thread build/yarn-scripts.ts
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 24 out of 25 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/dataEditor/dataEditorClient.ts Outdated
Comment thread src/svelte/src/App.svelte Outdated
Comment thread src/svelte/src/components/dataEditor.svelte
- updated the data editor to the Ωedit™ 2.x client APIs, including heartbeat and viewport subscription helpers
- adjusted server metrics and packaging to the new native runtime fields and `@omega-edit/server/out` layout
- refreshed the Ωedit™ test startup call sites for the 2.x `startServer(..., { logConfigFile })` signature

Ωedit™ `v2.0.0` changes the client/server package layout and several APIs. This PR aligns the VS Code extension with the migration guide and the new helper APIs so we can validate the upgrade in CI.

- keeps the data editor building and packaging against the RC release
- updates the runtime metrics surfaced in the UI to match the new server fields
- ensures the packaged VSIX includes the server binaries from the new `out/` directory structure

- `yarn install`
- `yarn compile`
- `yarn test:svelte`
- `yarn vite:pkg`
- `yarn package`
- Manual run through of the data editor features in the extension, including:
  - opening a data editor and confirming it loads successfully
  - confirming the server info shows the new heartbeat messages
  - confirming the file type information in the profile view is correct
  - confirming the server shuts down after the idle timeout when no editor is open
  - confirming search and replace features work as expected with the new client APIs
  - confirming the viewport subscription helper correctly updates the visible range in the UI as we scroll
  - others _as needed_ to validate the upgrade and new features

- [x] I have determined that no documentation updates are needed for these changes

Closes: apache#1667
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 24 out of 25 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@stricklandrbls
Copy link
Copy Markdown
Contributor

Getting the following output in the VSCode debugger output when pressing the Profile button. This was after deleting a single byte.

rejected promise not handled within 1 second: Error: profileSession error: 2 UNKNOWN: Profile function failed with error code: -1
extensionHostProcess.js:615
stack trace: Error: profileSession error: 2 UNKNOWN: Profile function failed with error code: -1
extensionHostProcess.js:615
	at makeWrappedError (./daffodil-vscode/node_modules/@omega-edit/client/dist/cjs/protobuf_ts/utils.js:58:21)
extensionHostProcess.js:615
	at Object.callback (./daffodil-vscode/node_modules/@omega-edit/client/dist/cjs/protobuf_ts/session.js:643:64)
extensionHostProcess.js:615
	at Object.onReceiveStatus (./daffodil-vscode/node_modules/@grpc/grpc-js/build/src/client.js:193:36)
extensionHostProcess.js:615
	at Object.onReceiveStatus (./daffodil-vscode/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:360:141)
extensionHostProcess.js:615
	at Object.onReceiveStatus (./daffodil-vscode/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:323:181)
extensionHostProcess.js:615
	at ./daffodil-vscode/node_modules/@grpc/grpc-js/build/src/resolving-call.js:129:78
extensionHostProcess.js:615
	at process.processTicksAndRejections (node:internal/process/task_queues:84:11)

@scholarsmate
Copy link
Copy Markdown
Contributor Author

@stricklandrbls, thanks for testing that. I'll try to reproduce it and get it fixed. We'll want to hit this pretty hard and find edge cases and if the problem(s) are on the Ωedit™ side, I'll cover any/all regressions with unit tests there and push out a bug fix release.

@scholarsmate scholarsmate mentioned this pull request Apr 24, 2026
2 tasks
@stricklandrbls
Copy link
Copy Markdown
Contributor

Getting this different error output to the debug console when attempting to profile:

rejected promise not handled within 1 second: Error: profileSession error: 8 RESOURCE_EXHAUSTED: Bandwidth exhausted or memory limit exceeded
extensionHostProcess.js:176
stack trace: Error: profileSession error: 8 RESOURCE_EXHAUSTED: Bandwidth exhausted or memory limit exceeded
	at makeWrappedError (/<path>/<to>/daffodil-vscode/node_modules/@omega-edit/client/dist/cjs/protobuf_ts/utils.js:58:21)
	at Object.callback (/<path>/<to>/daffodil-vscode/node_modules/@omega-edit/client/dist/cjs/protobuf_ts/session.js:643:64)
	at Object.onReceiveStatus (/<path>/<to>/daffodil-vscode/node_modules/@grpc/grpc-js/build/src/client.js:193:36)
	at Object.onReceiveStatus (/<path>/<to>/daffodil-vscode/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:360:141)
	at Object.onReceiveStatus (/<path>/<to>/daffodil-vscode/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:323:181)
	at /<path>/<to>/daffodil-vscode/node_modules/@grpc/grpc-js/build/src/resolving-call.js:129:78
	at process.processTicksAndRejections (node:internal/process/task_queues:77:11)

@scholarsmate
Copy link
Copy Markdown
Contributor Author

scholarsmate commented Apr 24, 2026

@stricklandrbls, can you give me details on the file you're attempting to profile and how you're profiling it (e.g., are you using a range)? I've been using large images from the Webb telescope because they are big (100+MB PNG) and binary (and beautiful) to test the data editor. For smaller files, I load misc source files, and the .vsix file itself. Based on this finding, I may consider adding some scaling tests on the Ωedit™ side to test the limits of the core library and gRPC. Ωedit™ ought to be able to handle any size file given a proportional amount of time. The gRPC profile is surprising because it's just handling coordinates and counts, nothing that would be considered resource intensive.

@stricklandrbls
Copy link
Copy Markdown
Contributor

@scholarsmate - I found it's unrelate to this PR. I had an old version of OE still running as a process from a previous run.

@scholarsmate
Copy link
Copy Markdown
Contributor Author

@stricklandrbls, you're really emphasizing the importance of the new Ωedit™ v2 lifecycle management.

@stricklandrbls
Copy link
Copy Markdown
Contributor

@stricklandrbls, you're really emphasizing the importance of the new Ωedit™ v2 lifecycle management.

Gotta love it!

In other words, I think that this might be fixed due to the changes to the message registry pr. Copilot was actually useful and noticed a property misspelling that may have been causing the OE server to bomb out

I'll try rebasing those changes with this PR to see it it's resolved.

@scholarsmate
Copy link
Copy Markdown
Contributor Author

@stricklandrbls, how's testing going?

@stricklandrbls
Copy link
Copy Markdown
Contributor

@stricklandrbls, how's testing going?

Hadn't had much of a chance lately due to a surgery but I'm planning to hop on here in a bit to test it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Issues related to building of the code data editor Issues related to the Data Editor capability dependencies Pull requests that update a dependency file enhancement New feature or request typescript

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

Upgrade Ωedit™ to v2.0.0

3 participants