@cueloop/client 0.1.0-alpha.68 → 0.1.0-alpha.69

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.
Files changed (82) hide show
  1. package/package.json +7 -6
  2. package/src/App.appearance.test.tsx +8 -6
  3. package/src/App.diff.test.tsx +3 -3
  4. package/src/App.export.test.tsx +9 -3
  5. package/src/App.plan-review.test.tsx +10 -8
  6. package/src/App.prototype-markdown.test.tsx +92 -0
  7. package/src/App.prototype.test.tsx +17 -28
  8. package/src/App.readonly.test.tsx +3 -3
  9. package/src/App.rendering.test.tsx +3 -4
  10. package/src/App.test.tsx +14 -18
  11. package/src/App.tsx +117 -42
  12. package/src/App.walk.test.tsx +2 -2
  13. package/src/App.workbench.test.tsx +85 -14
  14. package/src/app-screens.tsx +26 -10
  15. package/src/app-view-model.ts +17 -3
  16. package/src/components/AnnotatableFileView.stories.tsx +42 -0
  17. package/src/components/AnnotatableFileView.test.tsx +102 -0
  18. package/src/components/AnnotatableFileView.tsx +126 -0
  19. package/src/components/AnnotationCards.tsx +6 -6
  20. package/src/components/AppShell.tsx +62 -15
  21. package/src/components/BareWorkbenchFileView.stories.tsx +27 -0
  22. package/src/components/BareWorkbenchFileView.tsx +69 -0
  23. package/src/components/ChangesColumn.tsx +3 -2
  24. package/src/components/{DiffSheet.scroll.test.tsx → DiffContentView.scroll.test.tsx} +2 -2
  25. package/src/components/{DiffSheet.split.test.tsx → DiffContentView.split.test.tsx} +3 -3
  26. package/src/components/{DiffSheet.stories.tsx → DiffContentView.stories.tsx} +3 -3
  27. package/src/components/{DiffSheet.syntax.test.tsx → DiffContentView.syntax.test.tsx} +2 -2
  28. package/src/components/{DiffSheet.tsx → DiffContentView.tsx} +187 -28
  29. package/src/components/DiscussionMarkerRail.tsx +2 -2
  30. package/src/components/EditorGrid.tabs.test.tsx +17 -4
  31. package/src/components/EditorGrid.tsx +49 -19
  32. package/src/components/FileContentsView.test.tsx +3 -3
  33. package/src/components/FileContentsView.tsx +37 -17
  34. package/src/components/{SurfaceScrollbar.stories.tsx → OverlayScrollbar.stories.tsx} +5 -6
  35. package/src/components/{SurfaceScrollbar.test.tsx → OverlayScrollbar.test.tsx} +41 -13
  36. package/src/components/{SurfaceScrollbar.tsx → OverlayScrollbar.tsx} +49 -13
  37. package/src/components/ProjectTreeView.tsx +3 -2
  38. package/src/components/{PrototypeSheet.stories.tsx → PrototypeContentView.stories.tsx} +4 -5
  39. package/src/components/{PrototypeSheet.tsx → PrototypeContentView.tsx} +58 -58
  40. package/src/components/ScrollArea.stories.tsx +20 -0
  41. package/src/components/ScrollArea.tsx +44 -0
  42. package/src/components/SettingsDialog.tsx +3 -2
  43. package/src/components/{InboxList.stories.tsx → ThreadTree.stories.tsx} +5 -5
  44. package/src/components/{InboxList.tsx → ThreadTree.tsx} +6 -6
  45. package/src/components/ThreadsSidebar.tsx +5 -4
  46. package/src/components/TreePane.tsx +3 -2
  47. package/src/components/WelcomePlayground.stories.tsx +12 -0
  48. package/src/components/WelcomePlayground.test.tsx +47 -0
  49. package/src/components/WelcomePlayground.tsx +140 -0
  50. package/src/components/__snapshots__/stories.test.tsx.snap +163 -283
  51. package/src/components/{diff-sheet-layout.test.ts → diff-content-view-layout.test.ts} +1 -1
  52. package/src/components/{diff-sheet-layout.ts → diff-content-view-layout.ts} +1 -1
  53. package/src/config.test.ts +19 -6
  54. package/src/config.ts +26 -6
  55. package/src/intent-dispatch.test.ts +2 -0
  56. package/src/intent-dispatch.ts +1 -1
  57. package/src/key-bindings.test.ts +1 -1
  58. package/src/key-bindings.ts +5 -1
  59. package/src/keymap.ts +1 -1
  60. package/src/prototype-browser.ts +8 -0
  61. package/src/prototype-pixels.tsx +35 -0
  62. package/src/ready-signal.test.ts +85 -0
  63. package/src/ready-signal.ts +52 -0
  64. package/src/session-controller.live-diff.test.ts +198 -0
  65. package/src/session-controller.ts +141 -26
  66. package/src/slash-palette.test.ts +54 -0
  67. package/src/slash-palette.ts +32 -18
  68. package/src/test-support.ts +42 -3
  69. package/src/theme-presets.ts +20 -0
  70. package/src/theme.ts +18 -0
  71. package/src/thread-chords.ts +1 -1
  72. package/src/use-annotation-surface.tsx +12 -2
  73. package/src/use-settings-dialog.tsx +4 -4
  74. package/src/view-diff.test.ts +44 -1
  75. package/src/view-diff.ts +81 -0
  76. package/src/components/AnnotationCard.compose-rows.test.ts +0 -49
  77. package/src/components/AnnotationCard.stories.tsx +0 -94
  78. package/src/components/AnnotationCard.tsx +0 -250
  79. package/src/components/MarkerPopover.stories.tsx +0 -58
  80. package/src/components/MarkerPopover.tsx +0 -109
  81. package/src/components/WelcomeSurface.stories.tsx +0 -12
  82. package/src/components/WelcomeSurface.tsx +0 -52
@@ -1,109 +0,0 @@
1
- /**
2
- * The marker-actions popover: the visible form of plan span mode, floated as a
3
- * bordered card above the marked block. The toolbar card is always shown -
4
- * `comment · cut · actions · [x]`, each label keyboard-shortcut-backed and
5
- * clickable. Pressing `actions` drops a second card below it listing the
6
- * quick-actions; picking one inserts its preset comment. Plan-only: the diff
7
- * review has no span.
8
- */
9
-
10
- import React from "react";
11
- import type { MouseEvent } from "@opentui/core";
12
- import type { Theme } from "../theme";
13
- import type { QuickAction } from "../config";
14
- import { useComponentTheme } from "./theme-context";
15
- import { cardHeight } from "./primitives/Card";
16
- import { FRAME_BORDER_STYLE } from "./primitives/frame";
17
-
18
- export interface MarkerPopoverProps {
19
- /** "toolbar" is the bar alone; "actions" also drops the quick-actions card. */
20
- view: "toolbar" | "actions";
21
- actions: QuickAction[];
22
- /** Highlighted action in the dropdown (accent); ignored in toolbar view. */
23
- actionIndex: number;
24
- /** Show the cut affordance: owner-only, like every other plan-edit control. */
25
- canCut: boolean;
26
- onComment: () => void;
27
- onCut: () => void;
28
- onOpenActions: () => void;
29
- onClose: () => void;
30
- onPickAction: (index: number) => void;
31
- onBack: () => void;
32
- theme?: Theme;
33
- }
34
-
35
- export function MarkerPopover({
36
- view,
37
- actions,
38
- actionIndex,
39
- canCut,
40
- onComment,
41
- onCut,
42
- onOpenActions,
43
- onClose,
44
- onPickAction,
45
- onBack,
46
- theme,
47
- }: MarkerPopoverProps): React.ReactNode {
48
- const tokens = useComponentTheme(theme);
49
- const cardStyle = {
50
- border: true,
51
- borderStyle: FRAME_BORDER_STYLE,
52
- borderColor: tokens.border,
53
- backgroundColor: tokens.elevated,
54
- flexDirection: "column" as const,
55
- paddingLeft: 1,
56
- paddingRight: 1,
57
- };
58
- const open = view === "actions";
59
-
60
- return (
61
- <box
62
- style={{ flexDirection: "column", alignItems: "flex-start" }}
63
- // a release on the popover is the popover's own click; it must never
64
- // bubble to the sheet's selection-release fallback and re-enter span mode
65
- onMouseUp={(event: MouseEvent) => event.stopPropagation()}
66
- >
67
- <box style={{ ...cardStyle, height: cardHeight(1) }}>
68
- <box style={{ flexDirection: "row" }}>
69
- <text fg={tokens.accent} onMouseUp={onComment}>
70
- comment
71
- </text>
72
- <text fg={tokens.textDim}> · </text>
73
- {canCut ? (
74
- <>
75
- <text fg={tokens.red} onMouseUp={onCut}>
76
- cut
77
- </text>
78
- <text fg={tokens.textDim}> · </text>
79
- </>
80
- ) : null}
81
- <text fg={open ? tokens.accent : tokens.textMuted} onMouseUp={onOpenActions}>
82
- actions
83
- </text>
84
- <text fg={tokens.textDim}> · </text>
85
- <text fg={tokens.textDim} onMouseUp={onClose}>
86
- [x]
87
- </text>
88
- </box>
89
- </box>
90
- {open ? (
91
- <box style={{ ...cardStyle, height: cardHeight(actions.length + 1) }}>
92
- {actions.map((action, index) => (
93
- <text
94
- key={index}
95
- fg={index === actionIndex ? tokens.accent : tokens.textMuted}
96
- onMouseUp={() => onPickAction(index)}
97
- >
98
- {index === actionIndex ? "› " : " "}
99
- {action.prompt}
100
- </text>
101
- ))}
102
- <text fg={tokens.textDim} onMouseUp={onBack}>
103
- {" "}‹ back
104
- </text>
105
- </box>
106
- ) : null}
107
- </box>
108
- );
109
- }
@@ -1,12 +0,0 @@
1
- import React from "react";
2
- import { DARK } from "../theme";
3
- import type { Story, StoryMeta } from "./story";
4
- import { WelcomeSurface } from "./WelcomeSurface";
5
-
6
- export const meta: StoryMeta = { title: "Surfaces/WelcomeSurface" };
7
-
8
- export const Welcome: Story = {
9
- render: () => <WelcomeSurface version="0.1.0-alpha.66" theme={DARK} />,
10
- expectedColors: [DARK.accent],
11
- size: { width: 60, height: 16 },
12
- };
@@ -1,52 +0,0 @@
1
- // The Welcome body: the disposable default tab's contents in the Changes panel,
2
- // shown when nothing else is open. Points at where to start, the docs, and what
3
- // shipped in this build. The tab chrome (label + close) lives in the panel header.
4
-
5
- import React from "react";
6
- import type { Theme } from "../theme";
7
-
8
- const DOCS_URL = "www.cueloop.dev";
9
-
10
- export interface WelcomeSurfaceProps {
11
- version: string;
12
- theme?: Theme;
13
- }
14
-
15
- function Section({
16
- title,
17
- children,
18
- theme,
19
- }: {
20
- title: string;
21
- children: React.ReactNode;
22
- theme?: Theme;
23
- }): React.ReactNode {
24
- return (
25
- <box style={{ flexDirection: "column", flexShrink: 0, marginTop: 1 }}>
26
- <text fg={theme?.text}>{title}</text>
27
- {children}
28
- </box>
29
- );
30
- }
31
-
32
- export function WelcomeSurface({ version, theme }: WelcomeSurfaceProps): React.ReactNode {
33
- return (
34
- <box
35
- style={{ flexDirection: "column", flexGrow: 1, flexShrink: 0, paddingLeft: 2, paddingTop: 1 }}
36
- >
37
- <text fg={theme?.accent}>Welcome to cueloop</text>
38
- <text fg={theme?.textDim}>a review loop for coding agents</text>
39
- <Section title="Start" theme={theme}>
40
- <text fg={theme?.textDim}>· select a thread on the left</text>
41
- <text fg={theme?.textDim}>· or run cueloop plan / cueloop diff from a repo</text>
42
- </Section>
43
- <Section title="Learn" theme={theme}>
44
- <text fg={theme?.textDim}>{`· docs ${DOCS_URL}`}</text>
45
- <text fg={theme?.textDim}>{`· changelog ${DOCS_URL}/changelog`}</text>
46
- </Section>
47
- <Section title="What's new" theme={theme}>
48
- <text fg={theme?.textDim}>{`· cueloop v${version}`}</text>
49
- </Section>
50
- </box>
51
- );
52
- }