Skip to content

Commit 747bca6

Browse files
committed
feat(loops): widen landing, revamp prompt area, add works-with to templates
1 parent 27a34e0 commit 747bca6

3 files changed

Lines changed: 27 additions & 15 deletions

File tree

packages/ui/src/features/loops/components/LoopDetailView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export function LoopDetailView({ loopId }: { loopId: string }) {
110110

111111
if (isLoading) {
112112
return (
113-
<div className="mx-auto max-w-3xl px-6 py-6">
113+
<div className="mx-auto w-full max-w-5xl px-8 py-6">
114114
<div className="h-24 animate-pulse rounded-(--radius-2) border border-border bg-(--gray-2)" />
115115
</div>
116116
);
@@ -135,7 +135,7 @@ export function LoopDetailView({ loopId }: { loopId: string }) {
135135
}
136136

137137
return (
138-
<div className="mx-auto max-w-3xl px-6 py-6">
138+
<div className="mx-auto w-full max-w-5xl px-8 py-6">
139139
<Flex direction="column" gap="5">
140140
<Flex direction="column" gap="3">
141141
<button

packages/ui/src/features/loops/components/LoopsListView.tsx

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export function LoopsListView() {
6565
<Flex
6666
direction="column"
6767
gap="8"
68-
className="mx-auto max-w-3xl px-6 py-8"
68+
className="mx-auto w-full max-w-5xl px-8 py-8"
6969
>
7070
<Flex align="start" justify="between" gap="3">
7171
<Flex direction="column" gap="1" className="min-w-0">
@@ -89,30 +89,29 @@ export function LoopsListView() {
8989
</Button>
9090
</Flex>
9191

92-
<Flex
93-
direction="column"
94-
gap="3"
95-
className="rounded-(--radius-3) border border-border bg-(--color-panel-solid) p-4"
96-
>
92+
<Flex direction="column" gap="2">
9793
<TextArea
9894
value={prompt}
95+
variant="soft"
96+
color="gray"
97+
size="3"
9998
placeholder="What do you want automated?"
100-
className="min-h-[76px] text-[13px] leading-relaxed"
99+
className="min-h-[64px] text-[13px] leading-relaxed"
101100
onChange={(e) => setPrompt(e.target.value)}
102101
onKeyDown={(e) => {
103102
if ((e.metaKey || e.ctrlKey) && e.key === "Enter") {
104103
startFromPrompt();
105104
}
106105
}}
107106
/>
108-
<Flex align="center" justify="between" gap="4">
107+
<Flex align="center" justify="between" gap="3">
109108
<Flex gap="2" wrap="wrap" className="min-w-0 flex-1">
110109
{EXAMPLE_PROMPTS.map((example) => (
111110
<button
112111
key={example}
113112
type="button"
114113
onClick={() => setPrompt(example)}
115-
className="rounded-full border border-border bg-(--gray-2) px-3 py-1.5 text-[12px] text-gray-11 leading-none transition-colors hover:border-(--gray-7) hover:text-gray-12"
114+
className="rounded-(--radius-2) bg-(--gray-a3) px-3 py-1.5 text-[12px] text-gray-11 leading-none transition-colors hover:bg-(--gray-a4) hover:text-gray-12"
116115
>
117116
{example}
118117
</button>
@@ -125,7 +124,7 @@ export function LoopsListView() {
125124
disabled={!prompt.trim()}
126125
onClick={startFromPrompt}
127126
>
128-
Create loop
127+
Draft loop
129128
<ArrowRightIcon size={13} />
130129
</Button>
131130
</Flex>
@@ -211,9 +210,14 @@ function TemplateCard({
211210
<Text className="text-[12px] text-gray-10 leading-snug">
212211
{template.description}
213212
</Text>
214-
<Flex align="center" gap="1" className="text-gray-10">
215-
<ClockIcon size={11} className="shrink-0" />
216-
<Text className="text-[11px]">{template.triggerLabel}</Text>
213+
<Flex direction="column" gap="0.5" className="text-gray-10">
214+
<Flex align="center" gap="1">
215+
<ClockIcon size={11} className="shrink-0" />
216+
<Text className="text-[11px]">{template.triggerLabel}</Text>
217+
</Flex>
218+
<Text className="text-[11px]">
219+
Works with {template.worksWith.join(" · ")}
220+
</Text>
217221
</Flex>
218222
</button>
219223
);

packages/ui/src/features/loops/loopTemplates.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ export interface LoopTemplate {
2121
description: string;
2222
/** Short, human phrase describing the trigger, shown on the card. */
2323
triggerLabel: string;
24+
/** Integrations and surfaces the template works with, shown on the card. */
25+
worksWith: string[];
2426
build: () => Partial<LoopFormValues>;
2527
}
2628

@@ -52,6 +54,7 @@ export const LOOP_TEMPLATES: LoopTemplate[] = [
5254
description:
5355
"Summarize open pull requests, their review and CI status, and what needs attention.",
5456
triggerLabel: "Runs weekdays at 11:00",
57+
worksWith: ["GitHub", "Slack"],
5558
build: () => ({
5659
name: "PR review digest",
5760
instructions:
@@ -66,6 +69,7 @@ export const LOOP_TEMPLATES: LoopTemplate[] = [
6669
description:
6770
"Digest the failing CI runs from the last day and post a summary to your team channel.",
6871
triggerLabel: "Runs daily at 9:00",
72+
worksWith: ["GitHub", "Slack"],
6973
build: () => ({
7074
name: "CI failure summary",
7175
instructions:
@@ -80,6 +84,7 @@ export const LOOP_TEMPLATES: LoopTemplate[] = [
8084
description:
8185
"Find tests that pass and fail intermittently across recent CI runs, and open an issue.",
8286
triggerLabel: "Runs Mondays at 9:00",
87+
worksWith: ["GitHub"],
8388
build: () => ({
8489
name: "Flaky test tracker",
8590
instructions:
@@ -94,6 +99,7 @@ export const LOOP_TEMPLATES: LoopTemplate[] = [
9499
description:
95100
"Scan for outdated packages, security patches, and breaking changes, then open a PR.",
96101
triggerLabel: "Runs Mondays at 11:30",
102+
worksWith: ["GitHub"],
97103
build: () => ({
98104
name: "Dependency update check",
99105
instructions:
@@ -108,6 +114,7 @@ export const LOOP_TEMPLATES: LoopTemplate[] = [
108114
description:
109115
"Draft user-facing release notes each time a pull request merges to the main branch.",
110116
triggerLabel: "Triggered when a PR merges",
117+
worksWith: ["GitHub"],
111118
build: () => ({
112119
name: "Release notes drafter",
113120
instructions:
@@ -122,6 +129,7 @@ export const LOOP_TEMPLATES: LoopTemplate[] = [
122129
description:
123130
"Review new issues, categorize bugs and feature requests, and flag likely duplicates.",
124131
triggerLabel: "Triggered by new issues",
132+
worksWith: ["GitHub"],
125133
build: () => ({
126134
name: "Issue triage",
127135
instructions:

0 commit comments

Comments
 (0)