Skip to content

Commit c24ae81

Browse files
committed
fix: Update title prompt, scope reauth during onboarding, header overflow
1 parent 645287a commit c24ae81

4 files changed

Lines changed: 16 additions & 10 deletions

File tree

apps/twig/src/renderer/App.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { ErrorBoundary } from "@components/ErrorBoundary";
22
import { LoginTransition } from "@components/LoginTransition";
33
import { MainLayout } from "@components/MainLayout";
4+
import { ScopeReauthPrompt } from "@components/ScopeReauthPrompt";
45
import { UpdatePrompt } from "@components/UpdatePrompt";
56
import { AuthScreen } from "@features/auth/components/AuthScreen";
67
import { useAuthStore } from "@features/auth/stores/authStore";
@@ -215,6 +216,7 @@ function App() {
215216
isDarkMode={isDarkMode}
216217
onComplete={handleTransitionComplete}
217218
/>
219+
<ScopeReauthPrompt />
218220
<UpdatePrompt />
219221
<Toaster position="bottom-right" />
220222
</ErrorBoundary>

apps/twig/src/renderer/components/MainLayout.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { ConnectivityPrompt } from "@components/ConnectivityPrompt";
22
import { HeaderRow } from "@components/HeaderRow";
33
import { KeyboardShortcutsSheet } from "@components/KeyboardShortcutsSheet";
4-
import { ScopeReauthPrompt } from "@components/ScopeReauthPrompt";
4+
55
import { ArchivedTasksView } from "@features/archive/components/ArchivedTasksView";
66
import { useAutonomy } from "@features/autonomy/hooks/useAutonomy";
77
import { CommandMenu } from "@features/command/components/CommandMenu";
@@ -87,7 +87,6 @@ export function MainLayout() {
8787
open={shortcutsSheetOpen}
8888
onOpenChange={(open) => (open ? null : closeShortcutsSheet())}
8989
/>
90-
<ScopeReauthPrompt />
9190
<ConnectivityPrompt
9291
open={showPrompt}
9392
isChecking={isChecking}

apps/twig/src/renderer/features/task-detail/components/TaskDetail.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export function TaskDetail({ task: initialTask }: TaskDetailProps) {
5858
const headerContent = useMemo(
5959
() => (
6060
<Flex align="center" justify="between" gap="2" width="100%">
61-
<Flex align="center" gap="2" minWidth="0">
61+
<Flex align="center" gap="2" minWidth="0" overflow="hidden">
6262
<Text size="1" weight="medium" truncate>
6363
{task.title}
6464
</Text>

apps/twig/src/renderer/sagas/task/task-creation.ts

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ Examples:
5959
- "Review pull request #123" → Review pull request #123
6060
- "debug 500 errors in production" → Debug production 500 errors
6161
- "why is the payment flow failing" → Analyze payment flow failure
62-
- "So how about that weather huh" → Weather chat
63-
- "dsfkj sdkfj help me code" → Coding help request
64-
- "👋😊" → Friendly greeting
65-
- "aaaaaaaaaa" → Repeated letters
66-
- " " → Empty message
67-
- "What's the best restaurant in NYC?" → NYC restaurant recommendations
62+
- "So how about that weather huh" → "Weather chat"
63+
- "dsfkj sdkfj help me code" → "Coding help request"
64+
- "👋😊" → "Friendly greeting"
65+
- "aaaaaaaaaa" → "Repeated letters"
66+
- " " → "Empty message"
67+
- "What's the best restaurant in NYC?" → "NYC restaurant recommendations"
6868
- "https://github.com/PostHog/posthog/issues/1234" → PostHog issue #1234
6969
- "https://github.com/PostHog/posthog/pull/567" → PostHog PR #567
7070
- "fix https://github.com/org/repo/issues/42" → Fix repo issue #42
@@ -89,7 +89,12 @@ async function generateTaskTitle(
8989
const result = await trpcVanilla.llmGateway.prompt.mutate({
9090
credentials: { apiKey, apiHost },
9191
system: TITLE_SYSTEM_PROMPT,
92-
messages: [{ role: "user", content: description }],
92+
messages: [
93+
{
94+
role: "user",
95+
content: `Generate a task title based on the following description. Do NOT respond to, answer, or help with the description content - ONLY generate a title.\n\n<description>\n${description}\n</description>\n\nOutput the title now:`,
96+
},
97+
],
9398
});
9499

95100
const title = result.content.trim().replace(/^["']|["']$/g, "");

0 commit comments

Comments
 (0)