@cueloop/client 0.1.0-alpha.15 → 0.1.0-alpha.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -5
- package/src/App.plan-review.test.tsx +1 -1
- package/src/App.readonly.test.tsx +3 -3
- package/src/App.rendering.test.tsx +16 -16
- package/src/App.test.tsx +1 -1
- package/src/App.tsx +193 -139
- package/src/App.walk.test.tsx +208 -0
- package/src/components/AnnotationCard.tsx +4 -4
- package/src/components/ComposeBar.tsx +2 -2
- package/src/components/ConfirmCard.stories.tsx +15 -0
- package/src/components/ConfirmCard.tsx +8 -1
- package/src/components/DiffSheet.tsx +8 -8
- package/src/components/PlanSheet.stories.tsx +3 -3
- package/src/components/PlanSheet.tsx +31 -31
- package/src/components/WalkWizard.stories.tsx +89 -0
- package/src/components/WalkWizard.tsx +146 -0
- package/src/components/__snapshots__/stories.test.tsx.snap +130 -0
- package/src/components/stories.test.tsx +1 -1
- package/src/components/story-fixtures.ts +1 -1
- package/src/components/story.ts +1 -1
- package/src/components/syntax-highlight.ts +1 -1
- package/src/components/theme-context.tsx +1 -1
- package/src/components/truncate-text.ts +6 -0
- package/src/config.test.ts +29 -29
- package/src/config.ts +13 -12
- package/src/editor.ts +1 -1
- package/src/herdr.ts +1 -1
- package/src/key-bindings.test.ts +18 -1
- package/src/key-bindings.ts +23 -2
- package/src/keymap.test.ts +138 -101
- package/src/keymap.ts +81 -56
- package/src/run.ts +3 -3
- package/src/serve.test.ts +6 -6
- package/src/serve.ts +7 -7
- package/src/session-controller.ts +140 -66
- package/src/theme.ts +20 -1
- package/src/view-diff.test.ts +8 -8
- package/src/view-diff.ts +22 -22
- package/src/{view.test.ts → view-plan.test.ts} +48 -48
- package/src/view-plan.ts +362 -0
- package/src/walk.test.ts +110 -0
- package/src/walk.ts +65 -0
- package/src/components/format.ts +0 -6
- package/src/view.ts +0 -341
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cueloop/client",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.17",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": "./src/index.ts"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@cueloop/daemon": "0.1.0-alpha.
|
|
11
|
-
"@cueloop/extension-api": "0.1.0-alpha.
|
|
12
|
-
"@cueloop/integration-obsidian": "0.1.0-alpha.
|
|
13
|
-
"@cueloop/schema": "0.1.0-alpha.
|
|
10
|
+
"@cueloop/daemon": "0.1.0-alpha.17",
|
|
11
|
+
"@cueloop/extension-api": "0.1.0-alpha.17",
|
|
12
|
+
"@cueloop/integration-obsidian": "0.1.0-alpha.17",
|
|
13
|
+
"@cueloop/schema": "0.1.0-alpha.17",
|
|
14
14
|
"@opentui/core": "^0.5.1",
|
|
15
15
|
"@opentui/keymap": "0.5.1",
|
|
16
16
|
"@opentui/react": "^0.5.1",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The plan review surface v2
|
|
2
|
+
* The plan review surface v2: native selection feeds the annotation
|
|
3
3
|
* quote, the inline compose box keeps its anchor painted, the rail edits what
|
|
4
4
|
* the document selects, and edit-exit reconciliation orphans annotations
|
|
5
5
|
* whose passage was removed. Char-frame + styled-span assertions over the
|
|
@@ -56,8 +56,8 @@ async function renderObserver() {
|
|
|
56
56
|
|
|
57
57
|
/** Session state that any mutating verb would change. */
|
|
58
58
|
function snapshot() {
|
|
59
|
-
const
|
|
60
|
-
return { annotations:
|
|
59
|
+
const stored = server.core.sessionGet(session.id);
|
|
60
|
+
return { annotations: stored.annotations.length, workingCopy: stored.workingCopy, status: stored.status };
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
describe("observer rendering", () => {
|
|
@@ -114,7 +114,7 @@ describe("observer navigation still works", () => {
|
|
|
114
114
|
await press(setup, "j");
|
|
115
115
|
await setup.renderOnce();
|
|
116
116
|
const lines = setup.captureCharFrame().split("\n");
|
|
117
|
-
const cursorLine = lines.find((
|
|
117
|
+
const cursorLine = lines.find((line) => line.includes("▎"))!;
|
|
118
118
|
expect(cursorLine).toContain("persists sessions");
|
|
119
119
|
});
|
|
120
120
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Plan rendering
|
|
1
|
+
/** Plan rendering: code blocks verbatim + contained, spacing never collapses. */
|
|
2
2
|
|
|
3
3
|
import { afterEach, beforeEach, describe, expect, test } from "bun:test";
|
|
4
4
|
import { mkdtempSync, rmSync } from "node:fs";
|
|
@@ -57,30 +57,30 @@ async function frame(): Promise<string> {
|
|
|
57
57
|
|
|
58
58
|
describe("code blocks", () => {
|
|
59
59
|
test("lines render verbatim: indentation preserved, no word-wrap", async () => {
|
|
60
|
-
const
|
|
61
|
-
expect(
|
|
62
|
-
expect(
|
|
60
|
+
const rendered = await frame();
|
|
61
|
+
expect(rendered).toContain(" const blocked = full < 0.6;");
|
|
62
|
+
expect(rendered).toContain(' return <text>{blocked ? "blocked" : "clear"}</text>;');
|
|
63
63
|
});
|
|
64
64
|
|
|
65
65
|
test("the block carries its language tag", async () => {
|
|
66
|
-
const
|
|
67
|
-
expect(
|
|
66
|
+
const rendered = await frame();
|
|
67
|
+
expect(rendered).toContain("tsx");
|
|
68
68
|
});
|
|
69
69
|
});
|
|
70
70
|
|
|
71
71
|
describe("block spacing", () => {
|
|
72
72
|
test("a code block never glues to the list item above it", async () => {
|
|
73
|
-
const lines = (await frame()).split("\n").map((
|
|
74
|
-
const
|
|
75
|
-
const codeHeader = lines.findIndex((
|
|
76
|
-
expect(
|
|
77
|
-
expect(codeHeader).toBeGreaterThan(
|
|
78
|
-
expect(lines.slice(
|
|
73
|
+
const lines = (await frame()).split("\n").map((line) => line.trimEnd());
|
|
74
|
+
const listItemLineIndex = lines.findIndex((line) => line.includes("wire the duck over MQTT"));
|
|
75
|
+
const codeHeader = lines.findIndex((line) => line.trim().startsWith("tsx"));
|
|
76
|
+
expect(listItemLineIndex).toBeGreaterThan(-1);
|
|
77
|
+
expect(codeHeader).toBeGreaterThan(listItemLineIndex);
|
|
78
|
+
expect(lines.slice(listItemLineIndex + 1, codeHeader).some((line) => line === "")).toBe(true);
|
|
79
79
|
});
|
|
80
80
|
|
|
81
81
|
test("a heading never sits directly on the previous block", async () => {
|
|
82
|
-
const lines = (await frame()).split("\n").map((
|
|
83
|
-
const gate = lines.findIndex((
|
|
82
|
+
const lines = (await frame()).split("\n").map((line) => line.trimEnd());
|
|
83
|
+
const gate = lines.findIndex((line) => line.trim() === "Gate");
|
|
84
84
|
expect(gate).toBeGreaterThan(0);
|
|
85
85
|
expect(lines[gate - 1]).toBe("");
|
|
86
86
|
});
|
|
@@ -93,8 +93,8 @@ describe("block spacing", () => {
|
|
|
93
93
|
});
|
|
94
94
|
const setup = await testRender(<App home={home} sessionId={s2.id} />, { width: 120, height: 30 });
|
|
95
95
|
await waitForText(setup, "one");
|
|
96
|
-
const lines = setup.captureCharFrame().split("\n").map((
|
|
97
|
-
const one = lines.findIndex((
|
|
96
|
+
const lines = setup.captureCharFrame().split("\n").map((line) => line.trimEnd());
|
|
97
|
+
const one = lines.findIndex((line) => line.includes("- one"));
|
|
98
98
|
expect(lines[one + 1]).toContain("- two");
|
|
99
99
|
});
|
|
100
100
|
});
|
package/src/App.test.tsx
CHANGED
|
@@ -75,7 +75,7 @@ describe("keyboard grammar", () => {
|
|
|
75
75
|
await press(setup, "j");
|
|
76
76
|
await setup.renderOnce();
|
|
77
77
|
const lines = setup.captureCharFrame().split("\n");
|
|
78
|
-
const cursorLine = lines.find((
|
|
78
|
+
const cursorLine = lines.find((line) => line.includes("▎"))!;
|
|
79
79
|
expect(cursorLine).toContain("persists sessions");
|
|
80
80
|
});
|
|
81
81
|
|