@cueloop/client 0.1.0-alpha.65 → 0.1.0-alpha.67
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 +6 -5
- package/src/App.autoclose.test.tsx +2 -2
- package/src/App.diff.test.tsx +79 -112
- package/src/App.plan-review.test.tsx +23 -205
- package/src/App.prototype.test.tsx +1 -8
- package/src/App.readonly.test.tsx +9 -27
- package/src/App.submit-confirm.test.tsx +19 -72
- package/src/App.test.tsx +136 -31
- package/src/App.tsx +491 -322
- package/src/App.walk.test.tsx +15 -16
- package/src/App.workbench.test.tsx +390 -0
- package/src/__snapshots__/view-plan.regression.test.ts.snap +1 -1
- package/src/annotation-palette.ts +61 -0
- package/src/app-screens.tsx +197 -77
- package/src/app-view-model.ts +9 -69
- package/src/components/AnnotationCard.stories.tsx +1 -1
- package/src/components/AnnotationCard.tsx +1 -1
- package/src/components/AnnotationCards.stories.tsx +87 -0
- package/src/components/AnnotationCards.tsx +303 -0
- package/src/components/AppHeader.stories.tsx +50 -0
- package/src/components/AppHeader.tsx +83 -0
- package/src/components/AppShell.stories.tsx +89 -0
- package/src/components/AppShell.tsx +239 -0
- package/src/components/AppShell.zoom.test.tsx +94 -0
- package/src/components/Breadcrumb.stories.tsx +1 -1
- package/src/components/ChangesColumn.stories.tsx +39 -0
- package/src/components/ChangesColumn.tsx +170 -0
- package/src/components/CodeBlock.stories.tsx +1 -1
- package/src/components/CompletionOverlay.stories.tsx +1 -1
- package/src/components/ConfirmCard.stories.tsx +1 -1
- package/src/components/ConfirmCard.tsx +3 -4
- package/src/components/ConfirmDialog.stories.tsx +1 -1
- package/src/components/DiffSheet.scroll.test.tsx +38 -55
- package/src/components/DiffSheet.split.test.tsx +140 -0
- package/src/components/DiffSheet.stories.tsx +56 -54
- package/src/components/DiffSheet.syntax.test.tsx +24 -7
- package/src/components/DiffSheet.tsx +607 -276
- package/src/components/DiscussionMarkerRail.stories.tsx +54 -0
- package/src/components/DiscussionMarkerRail.tsx +181 -0
- package/src/components/EditorGrid.stories.tsx +59 -0
- package/src/components/EditorGrid.tabs.test.tsx +105 -0
- package/src/components/EditorGrid.tsx +338 -0
- package/src/components/EditorGrid.zoom.test.tsx +68 -0
- package/src/components/FileContentsView.stories.tsx +16 -0
- package/src/components/FileContentsView.test.tsx +29 -0
- package/src/components/FileContentsView.tsx +78 -0
- package/src/components/InboxList.stories.tsx +23 -8
- package/src/components/InboxList.tsx +188 -33
- package/src/components/KeybindsDialog.stories.tsx +1 -1
- package/src/components/MarkerPopover.stories.tsx +1 -1
- package/src/components/MenuBar.stories.tsx +3 -12
- package/src/components/MenuBar.tsx +25 -56
- package/src/components/PaneGrid.stories.tsx +84 -0
- package/src/components/PaneGrid.tsx +128 -0
- package/src/components/PanelColumn.stories.tsx +25 -0
- package/src/components/PanelColumn.tsx +95 -0
- package/src/components/ProjectTreeView.stories.tsx +25 -0
- package/src/components/ProjectTreeView.test.tsx +32 -0
- package/src/components/ProjectTreeView.tsx +82 -0
- package/src/components/PromptDialog.stories.tsx +1 -1
- package/src/components/PromptDialog.tsx +8 -1
- package/src/components/PrototypeSheet.stories.tsx +1 -1
- package/src/components/RootOverlay.stories.tsx +44 -0
- package/src/components/RootOverlay.tsx +35 -0
- package/src/components/SettingsDialog.stories.tsx +7 -1
- package/src/components/SettingsDialog.tsx +114 -67
- package/src/components/SettingsRows.stories.tsx +1 -1
- package/src/components/ShellHeader.stories.tsx +50 -0
- package/src/components/ShellHeader.tsx +137 -0
- package/src/components/SurfaceScrollbar.stories.tsx +34 -0
- package/src/components/SurfaceScrollbar.test.tsx +111 -0
- package/src/components/SurfaceScrollbar.tsx +93 -0
- package/src/components/ThreadFooter.stories.tsx +30 -0
- package/src/components/ThreadFooter.test.tsx +31 -0
- package/src/components/ThreadFooter.tsx +54 -0
- package/src/components/ThreadView.slash.test.tsx +113 -0
- package/src/components/ThreadView.stories.tsx +1 -1
- package/src/components/ThreadView.tsx +62 -1352
- package/src/components/ThreadsSidebar.stories.tsx +36 -0
- package/src/components/ThreadsSidebar.tsx +70 -0
- package/src/components/Toast.stories.tsx +1 -1
- package/src/components/Tooltip.stories.tsx +26 -0
- package/src/components/Tooltip.tsx +72 -0
- package/src/components/TreePane.stories.tsx +1 -1
- package/src/components/WalkWizard.stories.tsx +1 -1
- package/src/components/WelcomeSurface.stories.tsx +12 -0
- package/src/components/WelcomeSurface.tsx +52 -0
- package/src/components/__snapshots__/stories.test.tsx.snap +732 -572
- package/src/components/agent-launcher.stories.tsx +1 -1
- package/src/components/diff-sheet-layout.test.ts +125 -55
- package/src/components/diff-sheet-layout.ts +3 -103
- package/src/components/editor-grid.test.ts +86 -0
- package/src/components/editor-grid.ts +138 -0
- package/src/components/fade-title.test.ts +49 -0
- package/src/components/fade-title.ts +61 -0
- package/src/components/file-tree.test.ts +60 -0
- package/src/components/file-tree.ts +112 -0
- package/src/components/pages/Workspace.stories.tsx +181 -0
- package/src/components/primitives/Button.stories.tsx +1 -1
- package/src/components/primitives/Card.stories.tsx +1 -1
- package/src/components/primitives/Dialog.stories.tsx +1 -1
- package/src/components/primitives/IconButton.stories.tsx +36 -0
- package/src/components/primitives/IconButton.tsx +62 -0
- package/src/components/primitives/StatusBar.stories.tsx +1 -1
- package/src/components/primitives/Tabs.stories.tsx +1 -1
- package/src/components/primitives/Toolbar.stories.tsx +1 -1
- package/src/components/primitives/Tree.stories.tsx +124 -0
- package/src/components/primitives/Tree.tsx +96 -0
- package/src/components/primitives/icons.ts +61 -0
- package/src/components/primitives/tree-model.test.ts +99 -0
- package/src/components/primitives/tree-model.ts +137 -0
- package/src/components/quick-actions-editor.stories.tsx +1 -1
- package/src/components/session-tree.test.ts +134 -0
- package/src/components/session-tree.ts +108 -0
- package/src/components/stories-app.tsx +142 -82
- package/src/components/story-tree.test.ts +100 -0
- package/src/components/story.ts +55 -0
- package/src/components/theme-context.stories.tsx +1 -1
- package/src/config.test.ts +20 -49
- package/src/config.ts +26 -28
- package/src/diff-fold.test.ts +78 -0
- package/src/diff-fold.ts +126 -0
- package/src/diff-syntax.test.ts +16 -0
- package/src/diff-syntax.ts +6 -3
- package/src/discussions.ts +79 -0
- package/src/intent-dispatch.test.ts +31 -11
- package/src/intent-dispatch.ts +93 -48
- package/src/key-bindings.test.ts +1 -1
- package/src/keymap.test.ts +3 -25
- package/src/keymap.ts +17 -18
- package/src/mark-runs.ts +120 -0
- package/src/pty.ts +10 -2
- package/src/run.ts +17 -7
- package/src/serve.test.ts +4 -8
- package/src/session-controller.curate.test.ts +75 -0
- package/src/session-controller.share.test.ts +1 -0
- package/src/session-controller.tree.test.ts +26 -0
- package/src/session-controller.ts +160 -31
- package/src/slash-palette.ts +83 -0
- package/src/split-diff.test.ts +110 -0
- package/src/split-diff.ts +149 -0
- package/src/test-support.test.ts +3 -3
- package/src/test-support.ts +39 -8
- package/src/theme.ts +4 -4
- package/src/thread-chords.test.ts +25 -9
- package/src/thread-chords.ts +33 -8
- package/src/use-annotation-surface.tsx +837 -0
- package/src/use-changes-workbench.ts +151 -0
- package/src/use-frame-measure.ts +38 -0
- package/src/use-settings-dialog.tsx +23 -24
- package/src/use-terminal-virtualizer.ts +233 -0
- package/src/view-diff.ts +114 -0
- package/src/App.review-panel.test.tsx +0 -140
- package/src/App.tree.test.tsx +0 -224
- package/src/components/ReviewPanel.stories.tsx +0 -100
- package/src/components/ReviewPanel.tsx +0 -103
- package/src/components/ReviewRail.stories.tsx +0 -232
- package/src/components/ReviewRail.tsx +0 -327
- package/src/review-panel.test.ts +0 -113
- package/src/review-panel.ts +0 -83
package/src/review-panel.ts
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pure geometry and state for the resizable review panel. The panel shows the
|
|
3
|
-
* review rail in one of three modes and the expanded rail resizes within a
|
|
4
|
-
* clamp; App owns the React state and the mouse wiring, this module owns the
|
|
5
|
-
* arithmetic so the layout math stays unit-tested and out of the JSX. Bounds
|
|
6
|
-
* and the compact width carry over verbatim from the approved prototype.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
/** Expanded (full rail), compact (count + dots strip), or hidden (nothing). */
|
|
10
|
-
export type ReviewPanelMode = "expanded" | "compact" | "hidden";
|
|
11
|
-
|
|
12
|
-
/** Expanded-rail width bounds, in terminal columns. */
|
|
13
|
-
export const REVIEW_MIN_WIDTH = 24;
|
|
14
|
-
export const REVIEW_MAX_WIDTH = 50;
|
|
15
|
-
export const REVIEW_DEFAULT_WIDTH = 34;
|
|
16
|
-
/**
|
|
17
|
-
* Columns the plan/diff column keeps for itself: the expanded rail yields past
|
|
18
|
-
* this so a narrow terminal (or a wide persisted width) can never crowd the
|
|
19
|
-
* plan out to nothing - the whole reason the panel is resizable. On terminals
|
|
20
|
-
* wide enough for the full 50-col rail this bound never binds.
|
|
21
|
-
*/
|
|
22
|
-
export const REVIEW_PLAN_MIN_WIDTH = 30;
|
|
23
|
-
/** The compact strip is a fixed narrow column: count on top, one dot per card. */
|
|
24
|
-
export const REVIEW_COMPACT_WIDTH = 6;
|
|
25
|
-
/** Keyboard resize step, in columns, for the widen/narrow keys. */
|
|
26
|
-
export const REVIEW_RESIZE_STEP = 2;
|
|
27
|
-
|
|
28
|
-
/** Round a desired width to a whole column and clamp it to the bounds. */
|
|
29
|
-
export function clampWidth(
|
|
30
|
-
desiredWidth: number,
|
|
31
|
-
min = REVIEW_MIN_WIDTH,
|
|
32
|
-
max = REVIEW_MAX_WIDTH,
|
|
33
|
-
): number {
|
|
34
|
-
return Math.max(min, Math.min(max, Math.round(desiredWidth)));
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* The widest the expanded rail may be on a given terminal, reserving the plan
|
|
39
|
-
* its minimum and one column for the divider. Never drops below REVIEW_MIN_WIDTH
|
|
40
|
-
* (an extremely narrow terminal is the auto-collapse case, handled elsewhere).
|
|
41
|
-
*/
|
|
42
|
-
export function maxWidthForTerminal(terminalWidth: number): number {
|
|
43
|
-
return Math.max(
|
|
44
|
-
REVIEW_MIN_WIDTH,
|
|
45
|
-
Math.min(REVIEW_MAX_WIDTH, terminalWidth - REVIEW_PLAN_MIN_WIDTH - 1),
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/** Clamp a desired rail width to the bounds AND the terminal, so the plan keeps its room. */
|
|
50
|
-
export function resolveReviewWidth(desiredWidth: number, terminalWidth: number): number {
|
|
51
|
-
return clampWidth(desiredWidth, REVIEW_MIN_WIDTH, maxWidthForTerminal(terminalWidth));
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/** The keybinding cycle: expanded -> compact -> hidden -> expanded. */
|
|
55
|
-
export function cycleReviewPanelMode(mode: ReviewPanelMode): ReviewPanelMode {
|
|
56
|
-
return mode === "expanded" ? "compact" : mode === "compact" ? "hidden" : "expanded";
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* The clickable chevron toggles only between expanded and compact - hidden is
|
|
61
|
-
* reachable by keybinding alone, so it never leaves a leftover tab behind. A
|
|
62
|
-
* toggle from hidden still opens the panel rather than doing nothing.
|
|
63
|
-
*/
|
|
64
|
-
export function toggleReviewPanelMode(mode: ReviewPanelMode): ReviewPanelMode {
|
|
65
|
-
return mode === "expanded" ? "compact" : "expanded";
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Rail width from an absolute mouse column while dragging the divider: the rail
|
|
70
|
-
* spans from the mouse column to the terminal's right edge, then clamps.
|
|
71
|
-
*/
|
|
72
|
-
export function widthFromMouseColumn(mouseColumn: number, terminalWidth: number): number {
|
|
73
|
-
return resolveReviewWidth(terminalWidth - mouseColumn, terminalWidth);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* The divider is a single-column stack of vertical glyphs (a text block, not a
|
|
78
|
-
* bordered box - a one-column box with a border renders a full box). One glyph
|
|
79
|
-
* per row, at least one so the column never collapses.
|
|
80
|
-
*/
|
|
81
|
-
export function reviewRowsToDivider(rows: number): string {
|
|
82
|
-
return Array.from({ length: Math.max(1, rows) }, () => "│").join("\n");
|
|
83
|
-
}
|