create-agentic-app 1.1.56 → 1.1.58
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 +1 -1
- package/template/.agents/skills/security-scanner/SKILL.md +157 -0
- package/template/.agents/skills/security-scanner/references/A01-broken-access-control.md +136 -0
- package/template/.agents/skills/security-scanner/references/A02-security-misconfiguration.md +130 -0
- package/template/.agents/skills/security-scanner/references/A03-software-supply-chain-failures.md +117 -0
- package/template/.agents/skills/security-scanner/references/A04-cryptographic-failures.md +141 -0
- package/template/.agents/skills/security-scanner/references/A05-injection.md +155 -0
- package/template/.agents/skills/security-scanner/references/A06-insecure-design.md +145 -0
- package/template/.agents/skills/security-scanner/references/A07-authentication-failures.md +150 -0
- package/template/.agents/skills/security-scanner/references/A08-software-data-integrity-failures.md +132 -0
- package/template/.agents/skills/security-scanner/references/A09-security-logging-alerting-failures.md +130 -0
- package/template/.agents/skills/security-scanner/references/A10-mishandling-exceptional-conditions.md +154 -0
- package/template/.agents/skills/security-scanner/references/report-template.md +148 -0
- package/template/.claude/agents/security-scanner.md +214 -0
- package/template/.claude/skills/security-scanner/SKILL.md +157 -0
- package/template/.claude/skills/security-scanner/references/A01-broken-access-control.md +136 -0
- package/template/.claude/skills/security-scanner/references/A02-security-misconfiguration.md +130 -0
- package/template/.claude/skills/security-scanner/references/A03-software-supply-chain-failures.md +117 -0
- package/template/.claude/skills/security-scanner/references/A04-cryptographic-failures.md +141 -0
- package/template/.claude/skills/security-scanner/references/A05-injection.md +155 -0
- package/template/.claude/skills/security-scanner/references/A06-insecure-design.md +145 -0
- package/template/.claude/skills/security-scanner/references/A07-authentication-failures.md +150 -0
- package/template/.claude/skills/security-scanner/references/A08-software-data-integrity-failures.md +132 -0
- package/template/.claude/skills/security-scanner/references/A09-security-logging-alerting-failures.md +130 -0
- package/template/.claude/skills/security-scanner/references/A10-mishandling-exceptional-conditions.md +154 -0
- package/template/.claude/skills/security-scanner/references/report-template.md +148 -0
- package/template/AGENTS.md +21 -77
- package/template/DESIGN.md +451 -0
- package/template/next-env.d.ts +1 -1
- package/template/specs/ui-polish-responsive/README.md +59 -0
- package/template/specs/ui-polish-responsive/action-required.md +3 -0
- package/template/specs/ui-polish-responsive/requirements.md +53 -0
- package/template/specs/ui-polish-responsive/tasks/task-01-globals-css.md +144 -0
- package/template/specs/ui-polish-responsive/tasks/task-02-layout.md +66 -0
- package/template/specs/ui-polish-responsive/tasks/task-03-site-header.md +79 -0
- package/template/specs/ui-polish-responsive/tasks/task-04-site-footer.md +63 -0
- package/template/specs/ui-polish-responsive/tasks/task-05-home-page.md +215 -0
- package/template/specs/ui-polish-responsive/tasks/task-06-dashboard.md +222 -0
- package/template/specs/ui-polish-responsive/tasks/task-07-chat-page.md +225 -0
- package/template/specs/ui-polish-responsive/tasks/task-08-profile-page.md +192 -0
- package/template/specs/ui-polish-responsive/tasks/task-09-auth-pages.md +97 -0
- package/template/specs/ui-polish-responsive/tasks/task-10-setup-checklist.md +120 -0
- package/template/specs/ui-polish-responsive/tasks/task-11-starter-prompt-modal.md +87 -0
- package/template/src/app/globals.css +65 -7
- package/template/src/app/layout.tsx +2 -2
- package/template/src/app/page.tsx +174 -174
- package/template/src/components/setup-checklist.tsx +162 -162
- package/template/src/components/site-footer.tsx +2 -2
- package/template/src/components/site-header.tsx +3 -3
- package/template/src/components/starter-prompt-modal.tsx +202 -202
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
# Task 06: Dashboard Page
|
|
2
|
+
|
|
3
|
+
## Status
|
|
4
|
+
|
|
5
|
+
pending
|
|
6
|
+
|
|
7
|
+
## Wave
|
|
8
|
+
|
|
9
|
+
2
|
|
10
|
+
|
|
11
|
+
## Description
|
|
12
|
+
|
|
13
|
+
Update the dashboard page to use shadcn Card components instead of bare divs, add responsive breakpoints, improve the loading state, and add visual polish. The dashboard currently has two plain `<div>` cards with `border border-border rounded-lg` and a simple "Loading..." text.
|
|
14
|
+
|
|
15
|
+
## Dependencies
|
|
16
|
+
|
|
17
|
+
**Depends on:** task-01-globals-css.md
|
|
18
|
+
**Blocks:** None
|
|
19
|
+
|
|
20
|
+
**Context from dependencies:** Task 01 defines the `card-interactive` utility class in globals.css and updates the primary color to a blue-tinted hue. This task uses `card-interactive` on cards and `text-primary` on new icon accents.
|
|
21
|
+
|
|
22
|
+
## Files to Modify
|
|
23
|
+
|
|
24
|
+
- `src/app/dashboard/page.tsx` — Replace divs with Cards, add responsive classes, improve loading
|
|
25
|
+
|
|
26
|
+
## Technical Details
|
|
27
|
+
|
|
28
|
+
### Implementation Steps
|
|
29
|
+
|
|
30
|
+
1. **Add new imports**. The file currently imports: `Link`, `Lock`, `UserProfile`, `Button`, `useDiagnostics`, `useSession`. Add these:
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
import { Lock, Bot, User } from "lucide-react";
|
|
34
|
+
import {
|
|
35
|
+
Card,
|
|
36
|
+
CardContent,
|
|
37
|
+
CardDescription,
|
|
38
|
+
CardHeader,
|
|
39
|
+
CardTitle,
|
|
40
|
+
} from "@/components/ui/card";
|
|
41
|
+
import { Spinner } from "@/components/ui/spinner";
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Remove the existing `Lock` from the lucide-react import (it's being re-imported in the combined import).
|
|
45
|
+
|
|
46
|
+
2. **Update loading state** (lines 15-19). Change:
|
|
47
|
+
|
|
48
|
+
```tsx
|
|
49
|
+
return (
|
|
50
|
+
<div className="flex justify-center items-center h-screen">
|
|
51
|
+
Loading...
|
|
52
|
+
</div>
|
|
53
|
+
);
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
To:
|
|
57
|
+
|
|
58
|
+
```tsx
|
|
59
|
+
return (
|
|
60
|
+
<div className="flex justify-center items-center h-screen">
|
|
61
|
+
<Spinner size="lg" />
|
|
62
|
+
</div>
|
|
63
|
+
);
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
3. **Update unauthenticated state container** (line 24). Change:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
className="container mx-auto px-4 py-12"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
To:
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
className="container mx-auto px-4 sm:px-6 lg:px-8 py-8 sm:py-12"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
4. **Wrap unauthenticated content in Card** (lines 26-34). Change:
|
|
79
|
+
|
|
80
|
+
```tsx
|
|
81
|
+
<div className="mb-8">
|
|
82
|
+
<Lock className="w-16 h-16 mx-auto mb-4 text-muted-foreground" />
|
|
83
|
+
<h1 className="text-2xl font-bold mb-2">Protected Page</h1>
|
|
84
|
+
<p className="text-muted-foreground mb-6">
|
|
85
|
+
You need to sign in to access the dashboard
|
|
86
|
+
</p>
|
|
87
|
+
</div>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
To:
|
|
91
|
+
|
|
92
|
+
```tsx
|
|
93
|
+
<Card className="mb-8 text-center">
|
|
94
|
+
<CardContent className="pt-6">
|
|
95
|
+
<Lock className="w-16 h-16 mx-auto mb-4 text-muted-foreground" />
|
|
96
|
+
<h1 className="text-2xl font-bold mb-2">Protected Page</h1>
|
|
97
|
+
<p className="text-muted-foreground mb-6">
|
|
98
|
+
You need to sign in to access the dashboard
|
|
99
|
+
</p>
|
|
100
|
+
</CardContent>
|
|
101
|
+
</Card>
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
5. **Update authenticated container** (line 40). Change:
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
className="container mx-auto p-6"
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
To:
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
className="container mx-auto p-4 sm:p-6 max-w-5xl"
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
6. **Update title section** (lines 41-43). Change:
|
|
117
|
+
|
|
118
|
+
```tsx
|
|
119
|
+
<div className="flex justify-between items-center mb-8">
|
|
120
|
+
<h1 className="text-3xl font-bold">Dashboard</h1>
|
|
121
|
+
</div>
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
To:
|
|
125
|
+
|
|
126
|
+
```tsx
|
|
127
|
+
<div className="flex flex-wrap justify-between items-center gap-4 mb-6 sm:mb-8">
|
|
128
|
+
<h1 className="text-2xl sm:text-3xl font-bold">Dashboard</h1>
|
|
129
|
+
</div>
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
7. **Update card grid** (line 45). Change:
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
className="grid grid-cols-1 md:grid-cols-2 gap-6"
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
To:
|
|
139
|
+
|
|
140
|
+
```
|
|
141
|
+
className="grid grid-cols-1 sm:grid-cols-2 gap-6"
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
8. **Replace AI Chat card div** (lines 46-59). Change:
|
|
145
|
+
|
|
146
|
+
```tsx
|
|
147
|
+
<div className="p-6 border border-border rounded-lg">
|
|
148
|
+
<h2 className="text-xl font-semibold mb-2">AI Chat</h2>
|
|
149
|
+
<p className="text-muted-foreground mb-4">
|
|
150
|
+
Start a conversation with AI using the Vercel AI SDK
|
|
151
|
+
</p>
|
|
152
|
+
...button...
|
|
153
|
+
</div>
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
To:
|
|
157
|
+
|
|
158
|
+
```tsx
|
|
159
|
+
<Card className="card-interactive">
|
|
160
|
+
<CardHeader>
|
|
161
|
+
<CardTitle className="flex items-center gap-2">
|
|
162
|
+
<Bot className="h-5 w-5 text-primary" />
|
|
163
|
+
AI Chat
|
|
164
|
+
</CardTitle>
|
|
165
|
+
<CardDescription>
|
|
166
|
+
Start a conversation with AI using the Vercel AI SDK
|
|
167
|
+
</CardDescription>
|
|
168
|
+
</CardHeader>
|
|
169
|
+
<CardContent>
|
|
170
|
+
...button stays the same...
|
|
171
|
+
</CardContent>
|
|
172
|
+
</Card>
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
9. **Replace Profile card div** (lines 62-76). Change:
|
|
176
|
+
|
|
177
|
+
```tsx
|
|
178
|
+
<div className="p-6 border border-border rounded-lg">
|
|
179
|
+
<h2 className="text-xl font-semibold mb-2">Profile</h2>
|
|
180
|
+
<p className="text-muted-foreground mb-4">
|
|
181
|
+
Manage your account settings and preferences
|
|
182
|
+
</p>
|
|
183
|
+
<div className="space-y-2">
|
|
184
|
+
<p><strong>Name:</strong> {session.user.name}</p>
|
|
185
|
+
<p><strong>Email:</strong> {session.user.email}</p>
|
|
186
|
+
</div>
|
|
187
|
+
</div>
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
To:
|
|
191
|
+
|
|
192
|
+
```tsx
|
|
193
|
+
<Card className="card-interactive">
|
|
194
|
+
<CardHeader>
|
|
195
|
+
<CardTitle className="flex items-center gap-2">
|
|
196
|
+
<User className="h-5 w-5 text-primary" />
|
|
197
|
+
Profile
|
|
198
|
+
</CardTitle>
|
|
199
|
+
<CardDescription>
|
|
200
|
+
Manage your account settings and preferences
|
|
201
|
+
</CardDescription>
|
|
202
|
+
</CardHeader>
|
|
203
|
+
<CardContent>
|
|
204
|
+
<div className="space-y-2">
|
|
205
|
+
<p><strong>Name:</strong> {session.user.name}</p>
|
|
206
|
+
<p><strong>Email:</strong> {session.user.email}</p>
|
|
207
|
+
</div>
|
|
208
|
+
</CardContent>
|
|
209
|
+
</Card>
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
## Acceptance Criteria
|
|
213
|
+
|
|
214
|
+
- [ ] Both dashboard cards use shadcn `Card`/`CardHeader`/`CardTitle`/`CardDescription`/`CardContent`
|
|
215
|
+
- [ ] Both cards have `card-interactive` class
|
|
216
|
+
- [ ] AI Chat card has Bot icon with `text-primary`, Profile card has User icon with `text-primary`
|
|
217
|
+
- [ ] Loading state shows `Spinner` component instead of "Loading..." text
|
|
218
|
+
- [ ] Container has `max-w-5xl` to prevent overly wide content
|
|
219
|
+
- [ ] Grid uses `sm:grid-cols-2` breakpoint
|
|
220
|
+
- [ ] Title scales: `text-2xl sm:text-3xl`
|
|
221
|
+
- [ ] Unauthenticated state wraps in Card
|
|
222
|
+
- [ ] No TypeScript errors
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
# Task 07: Chat Page
|
|
2
|
+
|
|
3
|
+
## Status
|
|
4
|
+
|
|
5
|
+
pending
|
|
6
|
+
|
|
7
|
+
## Wave
|
|
8
|
+
|
|
9
|
+
2
|
|
10
|
+
|
|
11
|
+
## Description
|
|
12
|
+
|
|
13
|
+
Update the chat page to use shadcn Input/Button components instead of native HTML elements, add responsive breakpoints to the header and message bubbles, make the input form sticky at the bottom, and improve the empty state. This page has the most interactive elements and benefits significantly from consistent component usage.
|
|
14
|
+
|
|
15
|
+
## Dependencies
|
|
16
|
+
|
|
17
|
+
**Depends on:** task-01-globals-css.md
|
|
18
|
+
**Blocks:** None
|
|
19
|
+
|
|
20
|
+
**Context from dependencies:** Task 01 updates the color palette (so `text-primary`, `bg-primary` references use the new blue-tinted primary). No utility classes from Task 01 are used on this page (chat doesn't use `card-interactive`).
|
|
21
|
+
|
|
22
|
+
## Files to Modify
|
|
23
|
+
|
|
24
|
+
- `src/app/chat/page.tsx` — Replace native elements with shadcn components, add responsive classes, sticky input
|
|
25
|
+
|
|
26
|
+
## Technical Details
|
|
27
|
+
|
|
28
|
+
### Implementation Steps
|
|
29
|
+
|
|
30
|
+
1. **Add Input import**. Add to the existing imports:
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
import { Input } from "@/components/ui/input";
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The file already imports `Button` from `@/components/ui/button`.
|
|
37
|
+
|
|
38
|
+
2. **Also import Bot icon** for the improved empty state. Add `Bot` to the existing lucide-react import:
|
|
39
|
+
|
|
40
|
+
```tsx
|
|
41
|
+
import { Copy, Check, Loader2, Bot } from "lucide-react";
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
3. **Replace native `<button>` in CopyButton** (lines 165-177). Change the function body from:
|
|
45
|
+
|
|
46
|
+
```tsx
|
|
47
|
+
return (
|
|
48
|
+
<button
|
|
49
|
+
onClick={handleCopy}
|
|
50
|
+
className="p-1 hover:bg-muted rounded transition-colors"
|
|
51
|
+
title="Copy to clipboard"
|
|
52
|
+
>
|
|
53
|
+
{copied ? (
|
|
54
|
+
<Check className="h-3.5 w-3.5 text-green-500" />
|
|
55
|
+
) : (
|
|
56
|
+
<Copy className="h-3.5 w-3.5 text-muted-foreground" />
|
|
57
|
+
)}
|
|
58
|
+
</button>
|
|
59
|
+
);
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
To:
|
|
63
|
+
|
|
64
|
+
```tsx
|
|
65
|
+
return (
|
|
66
|
+
<Button
|
|
67
|
+
variant="ghost"
|
|
68
|
+
size="icon"
|
|
69
|
+
className="h-7 w-7"
|
|
70
|
+
onClick={handleCopy}
|
|
71
|
+
title="Copy to clipboard"
|
|
72
|
+
>
|
|
73
|
+
{copied ? (
|
|
74
|
+
<Check className="h-3.5 w-3.5 text-green-500" />
|
|
75
|
+
) : (
|
|
76
|
+
<Copy className="h-3.5 w-3.5 text-muted-foreground" />
|
|
77
|
+
)}
|
|
78
|
+
</Button>
|
|
79
|
+
);
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
4. **Update container** (line 247). Change:
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
className="container mx-auto px-4 py-8"
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
To:
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
className="container mx-auto px-4 sm:px-6 lg:px-8 py-6 sm:py-8"
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
5. **Update chat header** (lines 249-261). Change:
|
|
95
|
+
|
|
96
|
+
```tsx
|
|
97
|
+
<div className="flex justify-between items-center mb-6 pb-4 border-b">
|
|
98
|
+
<h1 className="text-2xl font-bold">AI Chat</h1>
|
|
99
|
+
<div className="flex items-center gap-4">
|
|
100
|
+
<span className="text-sm text-muted-foreground">
|
|
101
|
+
Welcome, {session.user.name}!
|
|
102
|
+
</span>
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
To:
|
|
106
|
+
|
|
107
|
+
```tsx
|
|
108
|
+
<div className="flex flex-col sm:flex-row sm:justify-between sm:items-center gap-3 sm:gap-4 mb-4 sm:mb-6 pb-4 border-b">
|
|
109
|
+
<h1 className="text-xl sm:text-2xl font-bold">AI Chat</h1>
|
|
110
|
+
<div className="flex items-center gap-2 sm:gap-4">
|
|
111
|
+
<span className="text-sm text-muted-foreground hidden sm:inline">
|
|
112
|
+
Welcome, {session.user.name}!
|
|
113
|
+
</span>
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Key changes: flex stacks on mobile, welcome text hidden on mobile (`hidden sm:inline`), smaller gaps.
|
|
117
|
+
|
|
118
|
+
6. **Update message bubble max-widths** (line ~289-290). For user messages, change:
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
bg-primary text-primary-foreground ml-auto max-w-[80%]
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
To:
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
bg-primary text-primary-foreground ml-auto max-w-[85%] sm:max-w-[80%] md:max-w-2xl shadow-sm
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
For AI messages, change:
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
bg-muted max-w-[80%]
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
To:
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
bg-muted max-w-[85%] sm:max-w-[80%] md:max-w-2xl shadow-sm
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
7. **Update message area** (line 271). Change:
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
className="min-h-[50vh] overflow-y-auto space-y-4 mb-4"
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
To:
|
|
149
|
+
|
|
150
|
+
```
|
|
151
|
+
className="min-h-[50vh] overflow-y-auto space-y-4 mb-4 pb-4"
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
8. **Improve empty state** (lines 272-275). Change:
|
|
155
|
+
|
|
156
|
+
```tsx
|
|
157
|
+
<div className="text-center text-muted-foreground py-12">
|
|
158
|
+
Start a conversation with AI
|
|
159
|
+
</div>
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
To:
|
|
163
|
+
|
|
164
|
+
```tsx
|
|
165
|
+
<div className="text-center text-muted-foreground py-16 space-y-3">
|
|
166
|
+
<Bot className="h-12 w-12 mx-auto text-muted-foreground/50" />
|
|
167
|
+
<p className="text-lg font-medium">Start a conversation with AI</p>
|
|
168
|
+
<p className="text-sm">Type a message below to begin chatting</p>
|
|
169
|
+
</div>
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
9. **Make input form sticky and replace native input** (lines 317-344). Change the form from:
|
|
173
|
+
|
|
174
|
+
```tsx
|
|
175
|
+
<form
|
|
176
|
+
onSubmit={...}
|
|
177
|
+
className="flex gap-2"
|
|
178
|
+
>
|
|
179
|
+
<input
|
|
180
|
+
value={input}
|
|
181
|
+
onChange={(e) => setInput(e.target.value)}
|
|
182
|
+
placeholder="Type your message..."
|
|
183
|
+
className="flex-1 p-2 border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-ring"
|
|
184
|
+
disabled={isStreaming}
|
|
185
|
+
/>
|
|
186
|
+
<Button type="submit" disabled={!input.trim() || isStreaming}>
|
|
187
|
+
...
|
|
188
|
+
</Button>
|
|
189
|
+
</form>
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
To:
|
|
193
|
+
|
|
194
|
+
```tsx
|
|
195
|
+
<form
|
|
196
|
+
onSubmit={...}
|
|
197
|
+
className="sticky bottom-0 bg-background py-4 border-t z-10 flex gap-2 sm:gap-3"
|
|
198
|
+
>
|
|
199
|
+
<Input
|
|
200
|
+
value={input}
|
|
201
|
+
onChange={(e) => setInput(e.target.value)}
|
|
202
|
+
placeholder="Type your message..."
|
|
203
|
+
className="flex-1 min-w-0"
|
|
204
|
+
disabled={isStreaming}
|
|
205
|
+
/>
|
|
206
|
+
<Button type="submit" disabled={!input.trim() || isStreaming}>
|
|
207
|
+
...
|
|
208
|
+
</Button>
|
|
209
|
+
</form>
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
Key changes: `sticky bottom-0 bg-background py-4 border-t z-10` makes the form stick. `Input` replaces native `<input>` for consistent styling. `min-w-0` prevents flex overflow.
|
|
213
|
+
|
|
214
|
+
## Acceptance Criteria
|
|
215
|
+
|
|
216
|
+
- [ ] Chat input uses shadcn `Input` component, not a native `<input>`
|
|
217
|
+
- [ ] CopyButton uses shadcn `Button variant="ghost" size="icon"`, not a native `<button>`
|
|
218
|
+
- [ ] Chat header stacks vertically on mobile (`flex-col`) and is horizontal on sm+
|
|
219
|
+
- [ ] Welcome text is hidden on mobile (`hidden sm:inline`)
|
|
220
|
+
- [ ] Message bubbles have `shadow-sm` for depth
|
|
221
|
+
- [ ] Message widths scale: `max-w-[85%]` on mobile, `max-w-[80%]` on sm, `max-w-2xl` on md+
|
|
222
|
+
- [ ] Input form is sticky at bottom with `bg-background` and `border-t`
|
|
223
|
+
- [ ] Empty state shows Bot icon, title text, and subtitle
|
|
224
|
+
- [ ] Container has responsive padding: `px-4 sm:px-6 lg:px-8`
|
|
225
|
+
- [ ] No TypeScript errors (Input import is correct)
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
# Task 08: Profile Page
|
|
2
|
+
|
|
3
|
+
## Status
|
|
4
|
+
|
|
5
|
+
pending
|
|
6
|
+
|
|
7
|
+
## Wave
|
|
8
|
+
|
|
9
|
+
2
|
|
10
|
+
|
|
11
|
+
## Description
|
|
12
|
+
|
|
13
|
+
Update the profile page with responsive stacking, improved grid breakpoints, and flex-wrap on tight rows. The avatar section needs to stack vertically on mobile, the quick actions grid needs an intermediate `sm:` breakpoint, and all the `flex items-center justify-between` rows in cards and dialogs need `flex-wrap` to prevent overflow on narrow screens.
|
|
14
|
+
|
|
15
|
+
## Dependencies
|
|
16
|
+
|
|
17
|
+
**Depends on:** task-01-globals-css.md
|
|
18
|
+
**Blocks:** None
|
|
19
|
+
|
|
20
|
+
**Context from dependencies:** Task 01 updates the color palette. No utility classes from Task 01 are specifically used on this page (profile cards are informational, not interactive).
|
|
21
|
+
|
|
22
|
+
## Files to Modify
|
|
23
|
+
|
|
24
|
+
- `src/app/profile/page.tsx` — Update responsive classes throughout
|
|
25
|
+
|
|
26
|
+
## Technical Details
|
|
27
|
+
|
|
28
|
+
### Implementation Steps
|
|
29
|
+
|
|
30
|
+
1. **Update container** (line 67). Change:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
className="container max-w-4xl mx-auto py-8 px-4"
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
To:
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
className="container max-w-4xl mx-auto py-6 sm:py-8 px-4 sm:px-6 lg:px-8"
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
2. **Update title row** (line 68). Change:
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
className="flex items-center gap-4 mb-8"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
To:
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
className="flex items-center gap-2 sm:gap-4 mb-6 sm:mb-8"
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
3. **Update title text** (line 78). Change:
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
className="text-3xl font-bold"
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
To:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
className="text-2xl sm:text-3xl font-bold"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
4. **Update avatar section** (line 85). Change:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
className="flex items-center space-x-4"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
To:
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
className="flex flex-col items-center sm:flex-row sm:items-center gap-4"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Important: remove `space-x-4` entirely — it conflicts with `flex-col`. The `gap-4` handles spacing in both directions.
|
|
79
|
+
|
|
80
|
+
5. **Update avatar size** (line 86). Change:
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
className="h-20 w-20"
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
To:
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
className="h-16 w-16 sm:h-20 sm:w-20"
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
6. **Update text container** next to avatar (line 96). Change:
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
className="space-y-2"
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
To:
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
className="space-y-2 text-center sm:text-left"
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
7. **Update name heading** (line 97). Change:
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
className="text-2xl font-semibold"
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
To:
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
className="text-xl sm:text-2xl font-semibold"
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
8. **Update email row** (line 98). Change:
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
className="flex items-center gap-2 text-muted-foreground"
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
To:
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
className="flex flex-wrap items-center justify-center sm:justify-start gap-2 text-muted-foreground"
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
9. **Update Account Status grid** (line 160). Change:
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
className="grid grid-cols-1 md:grid-cols-2 gap-4"
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
To:
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
className="grid grid-cols-1 sm:grid-cols-2 gap-4"
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
10. **Update all status/activity flex rows** — add `flex-wrap gap-2` and responsive padding. These appear at multiple locations. For each row that has `flex items-center justify-between p-4 border rounded-lg`, change to:
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
flex flex-wrap items-center justify-between gap-2 p-3 sm:p-4 border rounded-lg
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Apply this to the following locations:
|
|
147
|
+
- Line 161 (Email Verification status)
|
|
148
|
+
- Line 172 (Account Type status)
|
|
149
|
+
- Line 196 (Current Session activity)
|
|
150
|
+
|
|
151
|
+
11. **Update Quick Actions grid** (line 224). Change:
|
|
152
|
+
|
|
153
|
+
```
|
|
154
|
+
className="grid grid-cols-1 md:grid-cols-3 gap-4"
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
To:
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4"
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
12. **Update dialog inner rows** — For the Security Settings dialog (lines 325, 342, 357), each row with `flex items-center justify-between p-4 border rounded-lg`, change to:
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
flex flex-wrap items-center justify-between gap-2 p-3 sm:p-4 border rounded-lg
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
13. **Update Email Preferences dialog rows** (lines 388, 396) — same pattern, change:
|
|
170
|
+
|
|
171
|
+
```
|
|
172
|
+
flex items-center justify-between p-4 border rounded-lg
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
To:
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
flex flex-wrap items-center justify-between gap-2 p-3 sm:p-4 border rounded-lg
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## Acceptance Criteria
|
|
182
|
+
|
|
183
|
+
- [ ] Avatar section stacks vertically on mobile (flex-col) and is horizontal on sm+
|
|
184
|
+
- [ ] Avatar is smaller on mobile (h-16 w-16) and full size on sm+ (h-20 w-20)
|
|
185
|
+
- [ ] Text next to avatar is centered on mobile, left-aligned on sm+
|
|
186
|
+
- [ ] Email row wraps on narrow screens (flex-wrap)
|
|
187
|
+
- [ ] Quick actions grid has intermediate breakpoint: 1 col → 2 at sm → 3 at lg
|
|
188
|
+
- [ ] Account status grid uses sm:grid-cols-2 instead of md:grid-cols-2
|
|
189
|
+
- [ ] All flex justify-between rows in cards and dialogs have flex-wrap and gap-2
|
|
190
|
+
- [ ] Container and title have responsive padding and sizing
|
|
191
|
+
- [ ] No overflow or horizontal scroll at 320px viewport
|
|
192
|
+
- [ ] Profile page title scales: `text-2xl sm:text-3xl`
|