@cueloop/client 0.1.0-alpha.43 → 0.1.0-alpha.44
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 +2 -16
- package/src/components/AnnotationCard.stories.tsx +6 -2
- package/src/components/AnnotationCard.tsx +7 -3
- package/src/components/ConfirmCard.tsx +1 -1
- package/src/components/ReviewRail.tsx +4 -2
- package/src/components/agent-launcher.tsx +1 -1
- package/src/theme.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cueloop/client",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.44",
|
|
4
4
|
"description": "The cueloop review UI: projection renderer, keyboard grammar, review rail",
|
|
5
5
|
"homepage": "https://github.com/mmurakaru/cueloop#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"access": "public"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@cueloop/daemon": "0.1.0-alpha.
|
|
30
|
-
"@cueloop/extension-api": "0.1.0-alpha.
|
|
31
|
-
"@cueloop/integration-obsidian": "0.1.0-alpha.
|
|
32
|
-
"@cueloop/schema": "0.1.0-alpha.
|
|
29
|
+
"@cueloop/daemon": "0.1.0-alpha.44",
|
|
30
|
+
"@cueloop/extension-api": "0.1.0-alpha.44",
|
|
31
|
+
"@cueloop/integration-obsidian": "0.1.0-alpha.44",
|
|
32
|
+
"@cueloop/schema": "0.1.0-alpha.44",
|
|
33
33
|
"@opentui/core": "^0.5.2",
|
|
34
34
|
"@opentui/keymap": "0.5.2",
|
|
35
35
|
"@opentui/react": "^0.5.2",
|
|
@@ -87,20 +87,6 @@ function backgroundsOf(setup: Setup, needle: string): string[] {
|
|
|
87
87
|
return backgrounds;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
/** Whether any border character (box-drawing) is painted in the given foreground hex. */
|
|
91
|
-
function hasBorderColor(setup: Setup, hex: string): boolean {
|
|
92
|
-
for (const line of setup.captureSpans().lines) {
|
|
93
|
-
for (const span of line.spans) {
|
|
94
|
-
if (!/[╭╮╰╯│─┌┐└┘]/.test(span.text)) continue;
|
|
95
|
-
const [red, green, blue] = span.fg.toInts();
|
|
96
|
-
const rendered =
|
|
97
|
-
"#" + [red, green, blue].map((part) => part.toString(16).padStart(2, "0")).join("");
|
|
98
|
-
if (rendered === hex) return true;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
return false;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
90
|
/** Move the cursor to "The daemon persists sessions to disk atomically." */
|
|
105
91
|
async function toContextParagraph(setup: Setup): Promise<void> {
|
|
106
92
|
await press(setup, "j");
|
|
@@ -629,9 +615,9 @@ describe("edit-exit reconciliation", () => {
|
|
|
629
615
|
|
|
630
616
|
// Act
|
|
631
617
|
// deselect the card so e reaches the editor hand-off, then edit; deselection
|
|
632
|
-
// shows as the card's
|
|
618
|
+
// shows as the card's selected fill (elevated) clearing to a transparent card
|
|
633
619
|
await press(setup, "escape");
|
|
634
|
-
await waitForState(setup, () => !
|
|
620
|
+
await waitForState(setup, () => !backgroundsOf(setup, "Anchor me").includes(DARK.elevated));
|
|
635
621
|
await press(setup, "e");
|
|
636
622
|
|
|
637
623
|
// Assert
|
|
@@ -29,6 +29,7 @@ export const SavedSelected: Story = {
|
|
|
29
29
|
isOrphan: false,
|
|
30
30
|
isBlocking: false,
|
|
31
31
|
author: "me",
|
|
32
|
+
tone: DARK.accent,
|
|
32
33
|
editing: null,
|
|
33
34
|
onPress: () => {},
|
|
34
35
|
}}
|
|
@@ -48,12 +49,13 @@ export const SavedCollaborator: Story = {
|
|
|
48
49
|
isOrphan: false,
|
|
49
50
|
isBlocking: false,
|
|
50
51
|
author: "Priya",
|
|
52
|
+
tone: DARK.blue,
|
|
51
53
|
editing: null,
|
|
52
54
|
onPress: () => {},
|
|
53
55
|
}}
|
|
54
56
|
/>
|
|
55
57
|
),
|
|
56
|
-
expectedColors: [DARK.
|
|
58
|
+
expectedColors: [DARK.blue],
|
|
57
59
|
};
|
|
58
60
|
|
|
59
61
|
export const SavedOrphanBlocking: Story = {
|
|
@@ -67,12 +69,13 @@ export const SavedOrphanBlocking: Story = {
|
|
|
67
69
|
isOrphan: true,
|
|
68
70
|
isBlocking: true,
|
|
69
71
|
author: "me",
|
|
72
|
+
tone: DARK.accent,
|
|
70
73
|
editing: null,
|
|
71
74
|
onPress: () => {},
|
|
72
75
|
}}
|
|
73
76
|
/>
|
|
74
77
|
),
|
|
75
|
-
expectedColors: [DARK.
|
|
78
|
+
expectedColors: [DARK.accent],
|
|
76
79
|
};
|
|
77
80
|
|
|
78
81
|
export const SavedEditing: Story = {
|
|
@@ -86,6 +89,7 @@ export const SavedEditing: Story = {
|
|
|
86
89
|
isOrphan: false,
|
|
87
90
|
isBlocking: false,
|
|
88
91
|
author: "me",
|
|
92
|
+
tone: DARK.accent,
|
|
89
93
|
editing: { text: "new body", ...draftCallbacks },
|
|
90
94
|
onPress: () => {},
|
|
91
95
|
}}
|
|
@@ -34,6 +34,8 @@ export interface AnnotationSaved {
|
|
|
34
34
|
isBlocking: boolean;
|
|
35
35
|
/** Border-title author: a collaborator's display name, or "me" for the reviewer's own note. */
|
|
36
36
|
author: string;
|
|
37
|
+
/** Border + title color for this card (own = salmon, collaborator = blue). */
|
|
38
|
+
tone: string;
|
|
37
39
|
/** Non-null while the card body is being rewritten in place. */
|
|
38
40
|
editing: AnnotationDraft | null;
|
|
39
41
|
onPress: () => void;
|
|
@@ -202,9 +204,11 @@ export function AnnotationCard({
|
|
|
202
204
|
height: cardHeight(contentRows),
|
|
203
205
|
border: true,
|
|
204
206
|
borderStyle: FRAME_BORDER_STYLE,
|
|
205
|
-
//
|
|
206
|
-
//
|
|
207
|
-
|
|
207
|
+
// the border (and its title) always wears the card's tone - salmon for
|
|
208
|
+
// own notes, blue for a collaborator's; selection reads from a filled
|
|
209
|
+
// background so the color stays put whether or not the card is active
|
|
210
|
+
borderColor: card.tone,
|
|
211
|
+
backgroundColor: card.isSelected || card.editing ? tokens.elevated : "transparent",
|
|
208
212
|
paddingLeft: 1,
|
|
209
213
|
paddingRight: 1,
|
|
210
214
|
}}
|
|
@@ -103,7 +103,7 @@ export function ConfirmCard({
|
|
|
103
103
|
<Card
|
|
104
104
|
title=" submit review "
|
|
105
105
|
contentRows={CONFIRM_CONTENT_ROWS + (viewedSummary !== undefined ? 1 : 0)}
|
|
106
|
-
borderColor={tokens.
|
|
106
|
+
borderColor={tokens.text}
|
|
107
107
|
backgroundColor="transparent"
|
|
108
108
|
marginRight={1}
|
|
109
109
|
theme={theme}
|
|
@@ -140,6 +140,8 @@ export const ReviewRail = forwardRef<ReviewRailHandle, ReviewRailProps>(function
|
|
|
140
140
|
: isAgentNote(annotation)
|
|
141
141
|
? "agent"
|
|
142
142
|
: "me",
|
|
143
|
+
// own + agent notes read as salmon; a share collaborator's note as blue
|
|
144
|
+
tone: annotation.author && !isAgentNote(annotation) ? tokens.blue : tokens.accent,
|
|
143
145
|
editing:
|
|
144
146
|
cardEdit && cardEdit.id === annotation.id
|
|
145
147
|
? {
|
|
@@ -293,8 +295,8 @@ function RemovalCard({
|
|
|
293
295
|
<Card
|
|
294
296
|
title={title}
|
|
295
297
|
contentRows={contentRows}
|
|
296
|
-
borderColor={
|
|
297
|
-
backgroundColor="transparent"
|
|
298
|
+
borderColor={tokens.red}
|
|
299
|
+
backgroundColor={isSelected ? tokens.elevated : "transparent"}
|
|
298
300
|
theme={theme}
|
|
299
301
|
>
|
|
300
302
|
{previewLines.length === 0 ? (
|
package/src/theme.ts
CHANGED
|
@@ -57,8 +57,8 @@ export const DARK: Theme = {
|
|
|
57
57
|
accent: "#f5a3a3",
|
|
58
58
|
accentInk: "#2a1416",
|
|
59
59
|
green: "#62d96b",
|
|
60
|
-
red: "#
|
|
61
|
-
blue: "#
|
|
60
|
+
red: "#f08080",
|
|
61
|
+
blue: "#a9c8f5",
|
|
62
62
|
cursorBackground: "#33262a",
|
|
63
63
|
markCommentBackground: "#3d2a2e",
|
|
64
64
|
insertedForeground: "#62d96b",
|