Skip to content

Commit 6a056e3

Browse files
committed
feat: mobile polish — 'Let's weave' branding, minimal chrome, clean composer
1 parent 6d30c7f commit 6a056e3

2 files changed

Lines changed: 40 additions & 48 deletions

File tree

app/page.tsx

Lines changed: 14 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -505,35 +505,21 @@ export default function EditorLayout() {
505505
className="shrink-0 border-b border-[var(--border)] bg-[color-mix(in_srgb,var(--bg-elevated)_94%,black)] px-3 pb-3"
506506
style={{ paddingTop: 'calc(env(safe-area-inset-top) + 0.75rem)' }}
507507
>
508-
<div className="flex items-start gap-2">
509-
{showMobileSidebarButton ? (
510-
<button
511-
type="button"
512-
onClick={() => setMobileSidebarOpen(true)}
513-
className="flex h-11 w-11 shrink-0 items-center justify-center rounded-2xl border border-[var(--border)] bg-[color-mix(in_srgb,var(--bg)_92%,transparent)] text-[var(--text-secondary)] transition hover:bg-[color-mix(in_srgb,var(--text-primary)_5%,transparent)] hover:text-[var(--text-primary)]"
514-
title="Open workspace"
515-
>
516-
<Icon icon="lucide:panel-left-open" width={18} height={18} />
517-
</button>
518-
) : (
519-
<div className="flex h-11 w-11 shrink-0 items-center justify-center rounded-2xl border border-[var(--border)] bg-[color-mix(in_srgb,var(--bg)_92%,transparent)] text-[var(--brand)]">
520-
<Icon icon={activeViewMeta.icon} width={18} height={18} />
521-
</div>
522-
)}
523-
524-
<div className="min-w-0 flex-1 pt-0.5">
525-
<div className="truncate text-[10px] font-medium uppercase tracking-[0.18em] text-[var(--text-disabled)]">
526-
{workspaceLabel}
527-
</div>
528-
<div className="mt-1 flex items-center gap-2">
529-
<span className="truncate text-[15px] font-semibold text-[var(--text-primary)]">
530-
{activeViewMeta.label}
508+
<div className="flex items-center gap-2">
509+
<div className="min-w-0 flex-1">
510+
<div className="flex items-center gap-2">
511+
<span className="text-[15px] font-semibold text-[var(--text-primary)] tracking-tight">
512+
Knot Code
531513
</span>
532-
{dirtyCount > 0 && (
533-
<span className="rounded-full bg-[color-mix(in_srgb,var(--brand)_12%,transparent)] px-2 py-0.5 text-[10px] font-semibold text-[var(--brand)]">
534-
{dirtyCount} dirty
535-
</span>
536-
)}
514+
<span
515+
className={`h-2 w-2 rounded-full ${
516+
status === 'connected'
517+
? 'bg-emerald-400'
518+
: status === 'connecting'
519+
? 'bg-amber-400 animate-pulse'
520+
: 'bg-[var(--text-disabled)]'
521+
}`}
522+
/>
537523
</div>
538524
</div>
539525

components/chat-home.tsx

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -203,22 +203,26 @@ export const ChatHome = memo(function ChatHome({
203203
<KnotLogo size={40} color="var(--brand)" />
204204
</div>
205205

206-
<h1 className="text-center text-[32px] font-semibold tracking-[-0.04em] leading-none text-[var(--text-primary)]">
207-
Let&apos;s build
206+
<h1 className="text-center text-[28px] sm:text-[32px] font-semibold tracking-[-0.04em] leading-none text-[var(--text-primary)]">
207+
Let&apos;s weave
208208
</h1>
209209

210-
{/* Workspace dropdown */}
210+
{/* Workspace dropdown — hidden on mobile */}
211211
<button
212212
onClick={onSelectFolder}
213-
className="codex-workspace-dropdown mt-2.5 inline-flex items-center gap-1.5 text-[14px] text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors cursor-pointer"
213+
className="codex-workspace-dropdown mt-2.5 hidden sm:inline-flex items-center gap-1.5 text-[14px] text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors cursor-pointer"
214214
>
215215
{repoShort ?? 'Select workspace'}
216216
<Icon icon="lucide:chevron-down" width={14} height={14} className="opacity-50" />
217217
</button>
218+
{/* Subtle tagline on mobile */}
219+
<p className="mt-2 text-[13px] text-[var(--text-disabled)] sm:hidden">
220+
Your AI-powered code companion
221+
</p>
218222
</div>
219223

220-
{/* "Explore more" link */}
221-
<div className="flex justify-end mb-2">
224+
{/* "Explore more" link — desktop only */}
225+
<div className="hidden sm:flex justify-end mb-2">
222226
<button
223227
onClick={() => emit('open-folder')}
224228
className="text-[12px] text-[var(--text-disabled)] hover:text-[var(--text-secondary)] transition-colors cursor-pointer"
@@ -227,8 +231,8 @@ export const ChatHome = memo(function ChatHome({
227231
</button>
228232
</div>
229233

230-
{/* Suggestion cards — 1-up mobile, 3-up desktop */}
231-
<div className="codex-suggestion-grid grid grid-cols-1 sm:grid-cols-3 gap-2.5 sm:gap-3 mb-4 sm:mb-5">
234+
{/* Suggestion cards — hidden on mobile, 3-up desktop */}
235+
<div className="codex-suggestion-grid hidden sm:grid grid-cols-3 gap-3 mb-5">
232236
{suggestions.map((card, i) => (
233237
<button
234238
key={i}
@@ -323,12 +327,12 @@ export const ChatHome = memo(function ChatHome({
323327
{/* Mode selector */}
324328
<ModeSelector mode={agentMode} onChange={setAgentMode} size="sm" />
325329

326-
{/* Divider */}
327-
<div className="w-px h-4 bg-[var(--border)]" />
330+
{/* Divider — desktop only */}
331+
<div className="hidden sm:block w-px h-4 bg-[var(--border)]" />
328332

329-
{/* Gateway status */}
333+
{/* Gateway status — desktop only */}
330334
<span
331-
className={`codex-pill inline-flex items-center gap-1.5 px-2.5 py-1 rounded-lg text-[11px] font-medium border cursor-default ${
335+
className={`codex-pill hidden sm:inline-flex items-center gap-1.5 px-2.5 py-1 rounded-lg text-[11px] font-medium border cursor-default ${
332336
status === 'connected'
333337
? 'text-[var(--text-secondary)] border-[var(--border)] bg-[color-mix(in_srgb,var(--text-primary)_4%,transparent)]'
334338
: 'text-[var(--text-disabled)] border-[var(--border)] bg-[color-mix(in_srgb,var(--text-primary)_3%,transparent)]'
@@ -338,12 +342,14 @@ export const ChatHome = memo(function ChatHome({
338342
{status === 'connected' ? 'Local' : 'Offline'}
339343
</span>
340344

341-
{/* Permissions */}
342-
<PermissionsToggle size="sm" />
345+
{/* Permissions — desktop only */}
346+
<span className="hidden sm:inline-flex">
347+
<PermissionsToggle size="sm" />
348+
</span>
343349

344-
{/* Branch pill */}
350+
{/* Branch pill — desktop only */}
345351
{branchName && (
346-
<span className="codex-pill inline-flex items-center gap-1.5 px-2.5 py-1 rounded-lg text-[11px] font-medium text-[var(--text-secondary)] border border-[var(--border)] bg-[color-mix(in_srgb,var(--text-primary)_4%,transparent)] cursor-default">
352+
<span className="codex-pill hidden sm:inline-flex items-center gap-1.5 px-2.5 py-1 rounded-lg text-[11px] font-medium text-[var(--text-secondary)] border border-[var(--border)] bg-[color-mix(in_srgb,var(--text-primary)_4%,transparent)] cursor-default">
347353
<Icon icon="lucide:git-branch" width={12} height={12} />
348354
{branchName}
349355
</span>
@@ -370,9 +376,9 @@ export const ChatHome = memo(function ChatHome({
370376
</div>
371377
</div>
372378

373-
{/* Workspace setup (no workspace) */}
379+
{/* Workspace setup (no workspace) — desktop only */}
374380
{!hasWorkspace && (
375-
<div className="mt-6 sm:mt-8 space-y-3 sm:space-y-4">
381+
<div className="mt-6 sm:mt-8 space-y-3 sm:space-y-4 hidden sm:block">
376382
<div className="h-px bg-[var(--border)]" />
377383
<div className="grid grid-cols-1 sm:grid-cols-2 gap-2">
378384
<button
@@ -421,8 +427,8 @@ export const ChatHome = memo(function ChatHome({
421427
</div>
422428
)}
423429

424-
{/* Footer */}
425-
<div className="mt-6 sm:mt-8 flex justify-center">
430+
{/* Footer — desktop only */}
431+
<div className="mt-6 sm:mt-8 hidden sm:flex justify-center">
426432
<span className="text-[10px] font-mono tracking-[0.08em] text-[var(--text-disabled)] opacity-40 uppercase">
427433
KnotCode
428434
</span>

0 commit comments

Comments
 (0)