Skip to content

Commit 3df1f9c

Browse files
committed
feat: replace Settings with Terminal in mobile bottom tabs — full-screen gateway terminal view
1 parent 9e43d3d commit 3df1f9c

3 files changed

Lines changed: 14 additions & 1 deletion

File tree

app/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ const VIEW_ICONS: Record<string, { icon: string; label: string }> = {
9191
workshop: { icon: 'lucide:bot', label: 'Workshop' },
9292
skills: { icon: 'lucide:sparkles', label: 'Skills' },
9393
settings: { icon: 'lucide:settings', label: 'Settings' },
94+
terminal: { icon: 'lucide:terminal', label: 'Terminal' },
9495
}
9596

9697
const MODE_BUTTONS: Array<{ id: AppMode; icon: string; label: string }> = [
@@ -134,7 +135,7 @@ export default function EditorLayout() {
134135
const mobileViewTabs = useMemo(() => {
135136
// On mobile, curate tabs to useful views + always include settings
136137
const mobile = visibleViews.filter((v) => !['preview', 'diff', 'workshop'].includes(v))
137-
if (!mobile.includes('settings')) mobile.push('settings')
138+
if (!mobile.includes('terminal')) mobile.push('terminal')
138139
return mobile.slice(0, 5)
139140
}, [visibleViews])
140141
const activeViewMeta = VIEW_ICONS[activeView] ?? {

components/view-router.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ const PreviewPanel = dynamic(
3131
const AgentPanel = dynamic(() => import('@/components/agent-panel').then((m) => m.AgentPanel), {
3232
ssr: false,
3333
})
34+
const GatewayTerminal = dynamic(
35+
() => import('@/components/gateway-terminal').then((m) => m.GatewayTerminal),
36+
{ ssr: false },
37+
)
3438

3539
const VIEW_ICONS: Record<string, { label: string }> = {
3640
chat: { label: 'Chat' },
@@ -40,6 +44,7 @@ const VIEW_ICONS: Record<string, { label: string }> = {
4044
workshop: { label: 'Workshop' },
4145
skills: { label: 'Skills' },
4246
settings: { label: 'Settings' },
47+
terminal: { label: 'Terminal' },
4348
}
4449

4550
const viewVariants = {
@@ -86,6 +91,11 @@ export function ViewRouter() {
8691
<SettingsPanel open={true} onClose={() => setView('editor')} />
8792
</div>
8893
)}
94+
{activeView === 'terminal' && (
95+
<div className="flex-1 flex min-h-0 min-w-0 overflow-hidden">
96+
<GatewayTerminal />
97+
</div>
98+
)}
8999
</ErrorBoundary>
90100
</motion.div>
91101
</AnimatePresence>

context/view-context.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export type ViewId =
2020
| 'workshop'
2121
| 'skills'
2222
| 'settings'
23+
| 'terminal'
2324

2425
const VIEW_ORDER: ViewId[] = [
2526
'chat',
@@ -29,6 +30,7 @@ const VIEW_ORDER: ViewId[] = [
2930
'workshop',
3031
'skills',
3132
'settings',
33+
'terminal',
3234
]
3335

3436
interface ViewState {

0 commit comments

Comments
 (0)