Skip to content

Commit c38420b

Browse files
feat: redesign prompt editor UI with document-style depth and grounding
1 parent 0296454 commit c38420b

3 files changed

Lines changed: 262 additions & 227 deletions

File tree

app/prompts/new/page.tsx

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ export default function NewPromptPage() {
1212
const router = useRouter();
1313
const [isDirty, setIsDirty] = useState(false);
1414

15-
// Warn on browser refresh / tab close when form has unsaved content
1615
useEffect(() => {
1716
if (!isDirty) return;
1817
const handler = (e: BeforeUnloadEvent) => {
@@ -35,16 +34,20 @@ export default function NewPromptPage() {
3534

3635
return (
3736
<Layout header={<Header promptCount={prompts.length} />} sidebar={null}>
38-
<div className="max-w-2xl mx-auto">
39-
<button
40-
onClick={handleBack}
41-
className="inline-flex items-center text-sm text-neutral-500 dark:text-neutral-400 hover:text-neutral-900 dark:hover:text-neutral-100 transition-colors mb-8"
42-
>
43-
&larr; Back
44-
</button>
45-
<h1 className="text-2xl font-medium text-neutral-900 dark:text-neutral-100 mb-8">
46-
New prompt
47-
</h1>
37+
<div className="max-w-3xl mx-auto w-full">
38+
<div className="flex items-center gap-3 mb-6">
39+
<button
40+
onClick={handleBack}
41+
className="inline-flex items-center gap-1.5 text-sm text-neutral-500 dark:text-neutral-400 hover:text-neutral-900 dark:hover:text-neutral-100 transition-colors"
42+
>
43+
<svg className="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
44+
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={1.5} d="M10 19l-7-7m0 0l7-7m-7 7h18" />
45+
</svg>
46+
Back
47+
</button>
48+
<span className="text-neutral-200 dark:text-neutral-700">/</span>
49+
<span className="text-sm text-neutral-400 dark:text-neutral-500">New prompt</span>
50+
</div>
4851
<PromptForm onDirtyChange={setIsDirty} />
4952
</div>
5053
</Layout>

0 commit comments

Comments
 (0)