Skip to content

Your team of AI agents, on your Mac, Windows or Linux. Agents that talk in channels, write code, review each other and use your tools, on the Claude Code, Codex, OpenCode or Pi you already have. Anything that touches the real world waits for your yes.

Make the app usable on a phone (#28)

Eduardo Machado973310a30587
diff --git a/src/renderer/src/App.tsx b/src/renderer/src/App.tsx
index 5230706..6931f77 100644
--- a/src/renderer/src/App.tsx
+++ b/src/renderer/src/App.tsx
@@ -1,5 +1,6 @@
import { useEffect, type ReactNode } from 'react'
-import { getState, navigate, openDialog, useStore } from './store'
+import { L } from '../../shared/lang'
+import { getState, navigate, openDialog, setNav, useStore } from './store'
import { Sidebar } from './components/Sidebar'
import { ConversationView } from './components/Conversation'
import { AgentPage, ApprovalsPage, ConnectorsPage, SettingsPage } from './components/Pages'
@@ -10,6 +11,7 @@ import { SkillsPage } from './components/Skills'
import { ReportPage } from './components/Report'
import { Onboarding } from './components/Onboarding'
import { Dialogs } from './components/Dialogs'
+import { Icon } from './components/ui'
export function App(): ReactNode {
const view = useStore((s) => s.view)
@@ -17,6 +19,7 @@ export function App(): ReactNode {
const language = useStore((s) => s.settings.language)
const intro = useStore((s) => s.ready && s.settings.onboarding?.done === false)
const mac = useStore((s) => s.platform === 'mac')
+ const navOpen = useStore((s) => s.navOpen)
useEffect(() => {
document.documentElement.lang = language === 'en' ? 'en' : 'pt-BR'
@@ -67,7 +70,12 @@ export function App(): ReactNode {
)
return (
- <div className="app">
+ <div className={`app ${navOpen ? 'is-nav-open' : ''}`}>
+ {/* On a phone the sidebar is a drawer: this opens it, the shade closes it. */}
+ <button className="mobile-nav" aria-label={L('Abrir o menu', 'Open the menu')} onClick={() => setNav(true)}>
+ <Icon name="menu" size={18} />
+ </button>
+ <div className="nav-shade" onClick={() => setNav(false)} />
<Sidebar />
<main className="main">
{view.kind === 'conversation' && <ConversationView key={view.id} id={view.id} />}
diff --git a/src/renderer/src/components/ui.tsx b/src/renderer/src/components/ui.tsx
index 6fe595b..e48c2e6 100644
--- a/src/renderer/src/components/ui.tsx
+++ b/src/renderer/src/components/ui.tsx
@@ -4,6 +4,7 @@ import type { Agent } from '../store'
const PATHS: Record<string, ReactNode> = {
hash: <path d="M5 9h14M5 15h14M10 4 8 20M16 4l-2 16" />,
+ menu: <path d="M4 7h16M4 12h16M4 17h16" />,
at: (
<>
<circle cx="12" cy="12" r="4" />
diff --git a/src/renderer/src/store.ts b/src/renderer/src/store.ts
index aedc16e..5730686 100644
--- a/src/renderer/src/store.ts
+++ b/src/renderer/src/store.ts
@@ -56,6 +56,7 @@ export type View =
export interface State {
ready: boolean
+ navOpen: boolean // on a phone, the sidebar slid in over the view
view: View | null
me: { name: string; initials: string }
settings: Settings
@@ -93,6 +94,7 @@ const initials = (name: string): string =>
let state: State = {
ready: false,
+ navOpen: false,
view: null,
me: { name: 'Eu', initials: 'EU' },
settings: {
@@ -295,10 +297,13 @@ export function conversationTitle(s: State, c: Conversation): string {
// ---------- actions ----------
+export const setNav = (navOpen: boolean): void => set((s) => ({ ...s, navOpen }))
+
export const navigate = (view: View): void =>
set((s) => ({
...s,
view,
+ navOpen: false,
panel: s.view?.kind === view.kind && JSON.stringify(s.view) === JSON.stringify(view) ? s.panel : null,
conversations:
view.kind === 'conversation' ? s.conversations.map((c) => (c.id === view.id ? { ...c, unread: 0 } : c)) : s.conversations
@@ -413,7 +418,7 @@ export function patchAgent(agentId: string, patch: Partial<Agent>): void {
}
export const openPanel = (panel: Panel | null): void => set((s) => ({ ...s, panel }))
-export const openDialog = (dialog: Dialog | null): void => set((s) => ({ ...s, dialog }))
+export const openDialog = (dialog: Dialog | null): void => set((s) => ({ ...s, dialog, navOpen: dialog ? false : s.navOpen }))
export const setTab = (page: string, tab: string): void => set((s) => ({ ...s, tabs: { ...s.tabs, [page]: tab } }))
export const computerAction = (agentId: string, action: 'start' | 'restart' | 'erase' | 'open_folder' | 'refresh'): void =>
void call('computerAction', { agentId, action })
diff --git a/src/renderer/src/styles.css b/src/renderer/src/styles.css
index 298cb1f..cb54395 100644
--- a/src/renderer/src/styles.css
+++ b/src/renderer/src/styles.css
@@ -6244,3 +6244,175 @@ kbd {
.update-note__text a:hover {
text-decoration: underline;
}
+
+/* ---------- phone (Tucano as a server, opened in a phone's browser) ---------- */
+/* The sidebar becomes a drawer behind a menu button, the view takes the whole
+ width, and side panels cover the screen. A desktop window never gets this narrow. */
+.mobile-nav,
+.nav-shade {
+ display: none;
+}
+@media (max-width: 760px) {
+ .app {
+ grid-template-columns: minmax(0, 1fr);
+ height: 100dvh;
+ }
+ .sidebar {
+ position: fixed;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ width: min(300px, 86vw);
+ z-index: 60;
+ padding-top: env(safe-area-inset-top);
+ transform: translateX(-102%);
+ transition: transform 0.22s var(--ease);
+ box-shadow: var(--shadow-panel);
+ }
+ .app.is-nav-open .sidebar {
+ transform: none;
+ }
+ .nav-shade {
+ display: block;
+ position: fixed;
+ inset: 0;
+ z-index: 55;
+ background: rgba(0, 0, 0, 0.35);
+ opacity: 0;
+ pointer-events: none;
+ transition: opacity 0.2s var(--ease);
+ }
+ .app.is-nav-open .nav-shade {
+ opacity: 1;
+ pointer-events: auto;
+ }
+ .main {
+ margin: 0;
+ border-radius: 0;
+ box-shadow: none;
+ }
+ .mobile-nav {
+ display: grid;
+ place-items: center;
+ position: fixed;
+ top: calc(env(safe-area-inset-top) + 8px);
+ left: 8px;
+ width: 36px;
+ height: 36px;
+ z-index: 50;
+ border-radius: 9px;
+ border: 1px solid var(--border);
+ background: var(--panel);
+ color: var(--text);
+ }
+ .topbar {
+ height: calc(52px + env(safe-area-inset-top));
+ padding: env(safe-area-inset-top) 12px 0 52px;
+ gap: 8px;
+ }
+ .side-panel {
+ position: fixed;
+ inset: 0;
+ width: auto;
+ min-width: 0;
+ z-index: 58;
+ border-left: 0;
+ padding-top: env(safe-area-inset-top);
+ }
+ /* A conversation's header: its name first; the agents' count and Summary's label go. */
+ .conversation .topbar__title {
+ min-width: 0;
+ flex: 1;
+ }
+ .conversation .topbar__title h1 {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .conversation .topbar__actions {
+ flex: none;
+ }
+ .stack__count {
+ display: none;
+ }
+ .conversation .topbar__actions > .btn--ghost {
+ font-size: 0;
+ gap: 0;
+ padding: 0 8px;
+ }
+ /* An agent's page: one column, the form then its profile. */
+ .agent-layout {
+ grid-template-columns: minmax(0, 1fr);
+ }
+ /* Routines: the week scrolls sideways rather than squeezing seven days in. */
+ .sheet__head {
+ flex-wrap: wrap;
+ align-items: flex-start;
+ }
+ .cal {
+ margin: 0 8px;
+ overflow-x: auto;
+ }
+ .cal__days,
+ .cal__scroll {
+ min-width: 640px;
+ }
+ /* Rows with an address: no harness tags, so the name and the button fit. */
+ .from-harness__row .tag {
+ display: none;
+ }
+ /* The weekly report: the headline above its chart. */
+ .rep-head {
+ flex-direction: column;
+ align-items: stretch;
+ gap: 16px;
+ }
+ /* The introduction: narrower margins, shorter progress dots so Skip fits, one column. */
+ .onb__top {
+ padding: calc(env(safe-area-inset-top) + 16px) 16px 0;
+ gap: 12px;
+ }
+ .onb__top button {
+ flex: none;
+ white-space: nowrap;
+ }
+ .onb__dots {
+ gap: 4px;
+ min-width: 0;
+ }
+ .onb__dots span {
+ width: 12px;
+ }
+ .onb__dots span.is-now {
+ width: 20px;
+ }
+ .onb__stage {
+ padding: 20px 16px 32px;
+ }
+ .onb-pair,
+ .onb-skills {
+ grid-template-columns: minmax(0, 1fr);
+ }
+ .onb-templates {
+ grid-template-columns: repeat(2, minmax(0, 1fr));
+ }
+ .onb-note {
+ display: block;
+ }
+ .onb__row {
+ flex-wrap: wrap;
+ }
+ .onb__row > .onb__field {
+ flex: 1 1 100%;
+ }
+ .onb-note .icon {
+ vertical-align: -3px;
+ margin-right: 6px;
+ }
+ /* iOS zooms into a field with text under 16 px. */
+ input,
+ textarea,
+ select {
+ font-size: 16px;
+ }
+}