Skip to content

Commit ac810c1

Browse files
fix(fixtures): make composer list evidence paths portable
1 parent 7b595cb commit ac810c1

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

‎scripts/fixtures/issue-17124/README.md‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ document builder and serializer and dispatches through the real EditorView.
66
It does not synthesize editor DOM or keyboard events.
77

88
```js
9-
window.fixture =
10-
await import("/@fs/home/ubuntu/wt/issue-17124/scripts/fixtures/issue-17124/seed.js");
9+
const worktreePath = "/absolute/path/to/your/worktree";
10+
window.fixture = await import(`/@fs${worktreePath}/scripts/fixtures/issue-17124/seed.js`);
1111
await fixture.seed(fixture.fixtures.A[0]);
1212
// Use preview_press for Tab, X, Shift+Enter, and Backspace.
1313
await fixture.observe();
@@ -19,8 +19,10 @@ marker prefixes normalize to the reachable content position. Seed returns both
1919
requested and canonical text so a capture can report normalization.
2020

2121
`installRpc(environmentId)` binds normal guarded app commands to the isolated
22-
environment. `createFixtureThread(rpc, projectId)` creates an empty synthetic
23-
thread in this worktree. `stageRenderedFixture(rpc, threadId)` takes the current
22+
environment. `createFixtureThread(rpc, projectId, worktreePath)` creates an empty
23+
synthetic thread in the supplied absolute worktree path. Use the isolated server's
24+
worktree path for `worktreePath` in both the module import and thread creation.
25+
`stageRenderedFixture(rpc, threadId)` takes the current
2426
serialized composer text, dispatches it with `defer_start`, then interrupts the
2527
prepared run with its queue held. Never release the prepared run: this path is
2628
for inspecting the real message renderer without starting a provider. Use a

‎scripts/fixtures/issue-17124/seed.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export async function observe() {
5252

5353
export async function installRpc(environmentId) {
5454
const { createEnvironmentRpcCommand } =
55-
await import("/@fs/home/ubuntu/wt/issue-17124/packages/client-runtime/src/state/runtime.ts");
55+
await import("../../../packages/client-runtime/src/state/runtime.ts");
5656
const { connectionAtomRuntime } = await import("/src/connection/runtime.ts");
5757
const { appAtomRegistry } = await import("/src/rpc/atomRegistry.ts");
5858
return (input) =>
@@ -62,7 +62,7 @@ export async function installRpc(environmentId) {
6262
}).run(appAtomRegistry, { environmentId, input: { commandId: crypto.randomUUID(), ...input } });
6363
}
6464

65-
export async function createFixtureThread(rpc, projectId) {
65+
export async function createFixtureThread(rpc, projectId, worktreePath) {
6666
const threadId = `list-evidence-${crypto.randomUUID()}`;
6767
const result = await rpc({
6868
type: "thread.create",
@@ -73,7 +73,7 @@ export async function createFixtureThread(rpc, projectId) {
7373
runtimeMode: "full-access",
7474
interactionMode: "default",
7575
branch: "fix/issue-17124",
76-
worktreePath: "/home/ubuntu/wt/issue-17124",
76+
worktreePath,
7777
createdBy: "user",
7878
creationSource: "web",
7979
});

0 commit comments

Comments
 (0)