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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The asset importer checks SHA-256 `daa104aecdca43df5ca6dcf36b420351be09784a8436a

The visual dependency builder verifies all released files before bundling local Shoelace modules and embedding the exact local font/icon bytes. Editor, graph Worker and Rust/WASM source stay unchanged; no CDN is used by the frame. The resulting source-component manifest is not a released native-package manifest.

The read-only component workflow runs these checks on Linux, macOS and Windows and retains actual logs and saved outputs. It builds and retains a development candidate package without publishing a release. Every supported native app must install the eventual package and produce saved outputs for all 41 acceptance requirements before a release. The native Open action also depends on a [supported upstream capability](https://github.com/nimbalyst/nimbalyst/issues/1764), absent from released SDK 0.7.0. Track the remaining work in [NIM-10](https://github.com/terraphim/terraphim-editor/issues/6).
The read-only component workflow runs these checks on Linux, macOS and Windows and retains actual logs and saved outputs. It builds and retains a development candidate package without publishing a release. Every supported native app must install the eventual package and produce saved outputs for all 41 acceptance requirements before a release. The native Open action also depends on a [supported upstream capability](https://github.com/nimbalyst/nimbalyst/issues/1764), absent from the inspected released app 0.81.7 and SDK 0.7.1. The adapter still pins SDK 0.7.0. A [reviewed source proposal and actual upstream test results](docs/upstream/workspace-open/README.md) are available for review; they are not a shipped host capability. Track the remaining work in [NIM-10](https://github.com/terraphim/terraphim-editor/issues/6).

## Source and dependencies

Expand Down
21 changes: 21 additions & 0 deletions docs/upstream/workspace-open/NIMBALYST-LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024-2026 Nimbalyst Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
53 changes: 53 additions & 0 deletions docs/upstream/workspace-open/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Proposed workspace Open for custom editors

This is a review packet for [Nimbalyst issue 1764](https://github.com/nimbalyst/nimbalyst/issues/1764). It contains an agent-prepared nine-file source proposal and actual test results. It is published in Terraphim's repository so maintainers and a human contributor can inspect the concrete change before an upstream contribution.

**It is not accepted upstream or shipped in Nimbalyst.** At verification time on 17 October 2026, the inspected app 0.81.7 and SDK 0.7.1 did not expose this capability. Terraphim's adapter still pins SDK 0.7.0, and its first native release remains held for the required qualification.

## Behavior proposed

An optional `EditorHost.openWorkspaceFile()` asks the existing desktop host to choose an existing workspace text file and add or activate its tab. It returns `opened`, `cancelled` or `refused`; `opened` confirms tab admission, not a disk save or completed editor initialization. Existing tabs and dirty buffers are retained. Already-open files activate without reload.

The existing sender/workspace and symlink boundaries remain authoritative. The proposal refuses unsupported binary content, directories, absent files, oversized files and an originating tab/workspace that changed during admission. Embedded, collaborative and older hosts leave the method absent. It adds no extension permission to call private Electron IPC.

## Source and reproducible checks

- [Exact patch](workspace-open.patch), SHA-256 `09c211cbd4e7ce08a327c541b4fb18c9a5ab3ed4105618e96ae12d3d3b0b03cc`.
- [Upstream base and nine resulting file hashes](source.json): main `b5d994092c27ebe1f6a402c61351081b0dd52c56`. The patch also applies to inspected v0.81.7 source `4fc0ce0f4d41239b323cf6b478153f445a912d0e`.
- [Actual verification receipt](verification.json) and [final sequential gate output](final-sequential-gate.log). Only the disposable absolute checkout path is normalized to `$CHECKOUT`; both raw and public log hashes are recorded.
- [Upstream MIT notice](NIMBALYST-LICENSE.txt) accompanies the proposal, which includes upstream context.

In a disposable upstream checkout at that base, use its pinned package manager and Node 24, apply the patch, install the unchanged frozen lockfile, and build the documented workspace dependencies. Runtime and memory-engine output must exist before the whole-workspace gate:

```sh
git checkout b5d994092c27ebe1f6a402c61351081b0dd52c56
git apply /path/to/workspace-open.patch
pnpm install --frozen-lockfile
pnpm run build:tracker-packages
pnpm --filter @nimbalyst/extension-sdk run build
pnpm --filter @nimbalyst/runtime run build
pnpm --dir packages/extensions/nimbalyst-memory/engine run build
pnpm typecheck && pnpm test:prepush
```

The tested runtime was Node 24.22.0 and pnpm 12.9.1. Upstream's `pnpm install` prepare hook ran `build:tracker-packages`; that explicit command is shown above so preparation is visible. The SDK build also ran before the focused tests. Build scripts regenerate declaration byproducts; keep those separate from this exact nine-file contribution. Tests need loopback access for real local HTTP servers.

To repeat the separate fifteen-test filesystem/tab-store check without upstream's shared test setup or module substitutes, copy the included, unchanged [focused configuration](focused-open.config.mts) into the disposable checkout and run it there:

```sh
mkdir -p .artifacts
cp /path/to/workspace-open/focused-open.config.mts .artifacts/focused-open.config.mts
pnpm exec vitest --run --config .artifacts/focused-open.config.mts
```

That configuration aliases actual upstream source modules, uses real filesystem/Tab-store behavior, and has no setup files or IPC/module mocks. It is a validation harness accompanying this packet, not part of the nine-file upstream implementation patch.

The final official sequential gate exited zero: **37 workspace typechecks passed; 17,806 tests passed, zero failed, 30 skipped across 2,096 files**. Fifteen focused real filesystem/tab-store tests, SDK build, Electron types and four changed-module lint checks also passed. Two existing TabEditor lint-rule configuration errors and upstream runtime/JSDOM diagnostics are retained; no zero-warning or clean whole-repository lint result is claimed.

The initial unprepared/sandboxed full run failed; after official builds and loopback access, the exact ten previously failing files passed 135 tests. That history is retained in the receipt rather than presenting its failure as an earlier success. The later final passing whole gate is a distinct run, with all nine reviewed patch-file hashes unchanged afterward.

## Contribution and release gates

This code was prepared with an agent. No upstream commit, contributor identity or personal `Signed-off-by` certificate is supplied. Nimbalyst's current contribution policy requires truthful authorship, a real-name DCO, normal review and green checks. A contributor must personally decide whether they can certify the DCO and how to represent authorship accurately; this packet does not impersonate that decision.

Actual native chooser/cancellation/refusal/dirty-tab verification remains outstanding. Maintainer agreement, normal upstream contribution and a released host/SDK with the supported API must precede Terraphim's three-platform native acceptance. All 41 editor requirements on actual macOS, Windows and Linux apps, reviewed admission, released-package installation and marketplace admission remain separate gates. The adapter's closed release registry is unchanged.
91 changes: 91 additions & 0 deletions docs/upstream/workspace-open/final-sequential-gate.log

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions docs/upstream/workspace-open/focused-open.config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Reconstructed validation harness; not part of the preserved implementation.
// All aliases select actual upstream modules. No setup files, IPC/module mocks,
// or substitutes for the filesystem reader or Jotai/TabsProvider are loaded.
import { defineConfig } from 'vitest/config';
import path from 'node:path';
const root = path.resolve(import.meta.dirname, '..');
export default defineConfig({
root,
resolve: { alias: [
{ find: /^@nimbalyst\/runtime\/(.+)$/, replacement: path.join(root, 'packages/runtime/src') + '/$1' },
{ find: /^@nimbalyst\/extension-sdk$/, replacement: path.join(root, 'packages/extension-sdk/src/index.ts') },
{ find: /^@nimbalyst\/collab-protocol$/, replacement: path.join(root, 'packages/collab-protocol/src/index.ts') },
] },
test: {
environment: 'jsdom',
setupFiles: [],
include: ['packages/electron/src/renderer/services/__tests__/WorkspaceFileOpen.test.tsx'],
testTimeout: 10000,
hookTimeout: 10000,
reporters: ['default', 'json'],
outputFile: { json: path.join(root, '.artifacts/focused-open-results.json') },
},
});
39 changes: 39 additions & 0 deletions docs/upstream/workspace-open/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"files": [
{
"path": "NIMBALYST-LICENSE.txt",
"bytes": 1076,
"sha256": "999b2e2de90cea0f48c54acfce3a1875cf05c814092008cb5bb0cf06a4ab7201"
},
{
"path": "README.md",
"bytes": 5560,
"sha256": "0155b5a397e39742f0c5506e0daa6cb162b08b61d3bdd8ac191a30e8ae2981ff"
},
{
"path": "final-sequential-gate.log",
"bytes": 40816,
"sha256": "058ba3bcc462f932e8dd52905fa6e43ab91fbea1a53e3b9ae590a42a47ad0946"
},
{
"path": "focused-open.config.mts",
"bytes": 1101,
"sha256": "61dc66a24c9d4e5aca899fc965a71fc77b44eeffacb75eae70266769a611c7c4"
},
{
"path": "source.json",
"bytes": 2144,
"sha256": "4dc9a0285ff2b1565358c44af40ac072d5031588ec43183ae90a8d226b978b20"
},
{
"path": "verification.json",
"bytes": 2650,
"sha256": "b81004e2a486ce1becd2ba717541606186dd7ff0e117dba54475e792b4e2b35a"
},
{
"path": "workspace-open.patch",
"bytes": 25864,
"sha256": "09c211cbd4e7ce08a327c541b4fb18c9a5ab3ed4105618e96ae12d3d3b0b03cc"
}
]
}
55 changes: 55 additions & 0 deletions docs/upstream/workspace-open/source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"source": "b5d994092c27ebe1f6a402c61351081b0dd52c56",
"releasedTag": "v0.81.7",
"releasedTagCommit": "4fc0ce0f4d41239b323cf6b478153f445a912d0e",
"originalPatchAppliedWithoutModification": true,
"files": [
{
"path": "docs/EXTENSION_ARCHITECTURE.md",
"bytes": 55330,
"sha256": "39621589eac0cd152ad328c9c05f70da244d1e52f9779ec1c2e4af57d44803f9"
},
{
"path": "docs/FEATURE_INVENTORY.md",
"bytes": 74785,
"sha256": "8fef9794febbbd9349520dd9c9418893b9010a5ffecb99c1c6ffdc299ebc42a7"
},
{
"path": "packages/collab-bundle/types/internal/extension-sdk/src/types/editor.d.ts",
"bytes": 39452,
"sha256": "37f5fb3dceaf47dbaaccbd9ee2e7413e780b5a4d64660349f31445b08667254a"
},
{
"path": "packages/electron/src/renderer/components/TabContent/TabContent.tsx",
"bytes": 36197,
"sha256": "fa7fbcb7ae11acd883483a35cfe86ef34cafdced0e133e7a256761781464c41b"
},
{
"path": "packages/electron/src/renderer/components/TabEditor/TabEditor.tsx",
"bytes": 170494,
"sha256": "7855843cc5206c32ade12813bb8697094bc73e1e7ed10cbfb1c6e72bc5ad2dd2"
},
{
"path": "packages/electron/src/renderer/components/TabEditor/createEditorHost.ts",
"bytes": 9808,
"sha256": "c1d4ce9b10991b41939e6c2491b39d8b2f162792522fa0fef7616a3f297cfcc1"
},
{
"path": "packages/electron/src/renderer/services/WorkspaceFileOpen.ts",
"bytes": 3695,
"sha256": "056fa1f00f5d10e075c5cb879f85f58135081b3e963a78b828b0a4d697edd127"
},
{
"path": "packages/electron/src/renderer/services/__tests__/WorkspaceFileOpen.test.tsx",
"bytes": 9987,
"sha256": "0d1650248b4101dba586c48f238b441f9ba11c5a7a64a6b1ab10544c2715acac"
},
{
"path": "packages/extension-sdk/src/types/editor.ts",
"bytes": 39845,
"sha256": "46036169be82779d4759bb3b4b69f24a50c8d7649ffa37261031cd01ffd6bd5d"
}
],
"patchSha256": "09c211cbd4e7ce08a327c541b4fb18c9a5ab3ed4105618e96ae12d3d3b0b03cc",
"authorship": "Agent-prepared proposal for human review; no upstream commit or DCO sign-off supplied."
}
83 changes: 83 additions & 0 deletions docs/upstream/workspace-open/verification.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"verifiedOn": "2026-10-17",
"upstreamCommit": "b5d994092c27ebe1f6a402c61351081b0dd52c56",
"patchSha256": "09c211cbd4e7ce08a327c541b4fb18c9a5ab3ed4105618e96ae12d3d3b0b03cc",
"reviewedFilesUnchangedAfterFinalGate": true,
"focusedRealFilesystemTabStoreTests": 15,
"sdkBuild": "PASS",
"electronTypecheck": "PASS",
"changedModuleLint": "PASS for four modules; two baseline TabEditor missing-rule errors retained",
"finalSequentialGate": {
"command": "pnpm typecheck && pnpm test:prepush",
"exit": 0,
"loopbackPermitted": true,
"typecheck": {
"passedWorkspaces": 37,
"failedWorkspaces": 0,
"elapsedSeconds": 136.2
},
"prepush": {
"runId": "289e932a-99e7-4bd0-8533-90d4b29e0075",
"startedAt": "2026-10-17T09:23:16.848Z",
"finishedAt": "2026-10-17T09:31:36.191Z",
"counts": {
"passed": 17806,
"failed": 0,
"skipped": 30
},
"files": 2096,
"elapsedSeconds": 499.343
},
"warningsRetained": true,
"stdout": "final-sequential-gate.log"
},
"initialFullGate": {
"exit": 1,
"counts": {
"passed": 17756,
"failed": 50,
"skipped": 30
},
"files": 2096,
"elapsedSeconds": 736.873,
"errors": 23,
"state": "FAIL_RETAINED"
},
"boundedRecovery": {
"exit": 0,
"files": 10,
"passed": 135,
"failed": 0,
"skipped": 0,
"sandbox": "loopback permitted by escalated execution",
"sourceEdits": false,
"sameFailingFilesAsFullRun": true
},
"runtimeBuild": "PASS with preserved upstream warnings",
"nativeChooser": "NOT VERIFIED",
"upstreamAccepted": "NO",
"releasedHostSDKCapability": "NOT AVAILABLE in inspected app0.81.7/SDK0.7.1",
"terraphimThreeHostQualification": "NOT COMPLETE",
"signedOffBy": "NOT SUPPLIED",
"stdoutProvenance": {
"rawSha256": "d1303426b877d5fec130202e90518903cecc41969c9256d2b7ba99e010a60e19",
"publicSha256": "058ba3bcc462f932e8dd52905fa6e43ab91fbea1a53e3b9ae590a42a47ad0946",
"normalization": "Only disposable absolute checkout path replaced by $CHECKOUT; raw log remains in local execution evidence."
},
"cleanBasePatchApplication": {
"status": "PASS",
"files": 9,
"resultHashesMatchReviewedSource": true,
"newFiles": 2
},
"testedEnvironment": {
"node": "24.22.0",
"pnpm": "12.9.1"
},
"prerequisites": [
"pnpm install --frozen-lockfile (prepare hook runs build:tracker-packages)",
"pnpm --filter @nimbalyst/extension-sdk run build",
"pnpm --filter @nimbalyst/runtime run build",
"pnpm --dir packages/extensions/nimbalyst-memory/engine run build"
]
}
Loading
Loading