An agentic browser harness: an AI side panel & orb in your own logged-in Chrome, Edge, Arc, Brave or even Firefox run by the agent/subscription you already use (Claude Code, Codex, Antigravity). Free, open source, no API key. Also an MCP server.
TypeScript agentic-browseragentic-browsingagy-cliaiai-agentai-browser-extensionai-toolsbrave-extensionbrowser-agentbrowser-automationbrowser-extensionbrowser-usebrowserskillchrome-extensionclaude-codecodexfirefox-addonmcp-servernanobrowserweb-automation
feat(apps): Agents, Skills, Activity and Logs become pages of Settings, picked from a sidebar beside General, leaving five tabs; the Android tab carries an Experimental badge; the Mac menu bar shows the Browsentic mark, its centre dot filled while the Bridge runs
Shahriar1dc8a0efa49a
diff --git a/docs/guide/mac-app.md b/docs/guide/mac-app.mdindex 0fd7a6a..865fd66 100644--- a/docs/guide/mac-app.md+++ b/docs/guide/mac-app.md@@ -73,35 +73,33 @@ the folder holds a newer build than the browser has loaded.## The window-The tabs float at the top; ⌘1 to ⌘9 switch between them.+The tabs float at the top; ⌘1 to ⌘5 switch between them. Agents, Skills, Activity and Logs are pages of+**Settings**, picked from its sidebar.---+++| Tab | What you do there || --- | --- || **Overview** | Turn Browsentic Bridge on and off with the power button, restart it, see its address and version. One row per browser: where its extension comes from, whether it is connected, and a button that adds it from the store. The unpacked folder sits behind **Load it unpacked instead** || **Browsers** | Get a [pairing code](pair.md) with a live countdown, see every paired browser and the store its extension came from, unpair one or all |-| **Android** | Whether a phone is ready to drive from the side panel: adb, the phone, USB debugging, Chrome, Chrome open and the screen, one row each, the same checks `browsentic android` prints. A row that fails says what to do, with **Open Chrome on the phone**, **Get Chrome** or the adb install command to copy. **Set up your phone** has the steps. The Bridge looks for phones only while this tab is open |-| **Agents** | See which agent CLIs are ready, [switch](agents.md) between them, pick a model, install a missing one, or let Browsentic fix what one still needs |-| **Skills** | Every [skill](features/skills.md) the router can see and which folder it came from |-| **Activity** | Your standing [approvals](approvals.md), forgettable per site, and the downloads agents captured |-| **Logs** | `~/.browsentic/daemon.log`, followed live |-| **Settings** | Light, dark or system appearance for this window; whether the Bridge starts with the app; the **Browser theme** and **Guardrails** every paired browser uses, the same rows as the extension's settings page, kept in step both ways; `browsentic` in your terminal; the line that registers Browsentic with an [MCP client](mcp-clients.md); uninstall |+| **Android** (experimental) | Whether a phone is ready to drive from the side panel: adb, the phone, USB debugging, Chrome, Chrome open and the screen, one row each, the same checks `browsentic android` prints. A row that fails says what to do, with **Open Chrome on the phone**, **Get Chrome** or the adb install command to copy. **Set up your phone** has the steps. The Bridge looks for phones only while this tab is open |+| **Settings** | Five pages, picked from its sidebar. **General**: light, dark or system appearance for this window; whether the Bridge starts with the app; the **Browser theme** and **Guardrails** every paired browser uses, the same rows as the extension's settings page, kept in step both ways; `browsentic` in your terminal; the line that registers Browsentic with an [MCP client](mcp-clients.md); uninstall. **Agents**: see which agent CLIs are ready, [switch](agents.md) between them, pick a model, install a missing one, or let Browsentic fix what one still needs. **Skills**: every [skill](features/skills.md) the router can see and which folder it came from. **Activity**: your standing [approvals](approvals.md), forgettable per site, and the downloads agents captured. **Logs**: `~/.browsentic/daemon.log`, followed live || **About** | Who makes Browsentic, a GitHub star, every version on this computer with a copy button, **Report a bug** (GitHub's issue form with those versions filled in; nothing is sent until you submit it), and links to the guide, this page, [troubleshooting](troubleshooting.md) and the release notes. **Run the checks again** reruns the first-run checks |-A menu bar item shows the Bridge’s state and has the same on, off and restart controls.+A menu bar item, the Browsentic mark with its centre dot filled while the Bridge runs, shows the+Bridge’s state and has the same on, off and restart controls.**Closing the window does not stop anything.** The Bridge is a background process of its own, sothe side panel and any MCP client keep working with the app closed or quit.## `browsentic` in your terminal-**Settings → “browsentic” in your terminal** links the launcher into a folder that is already on+**Settings → General → “browsentic” in your terminal** links the launcher into a folder that is already onyour `PATH` and writable: `~/.local/bin`, `/opt/homebrew/bin` or `/usr/local/bin`. It edits no shellprofile and asks for no password. Every command in the [CLI reference](../reference/cli.md) thenworks against the install the app manages.@@ -129,7 +127,7 @@ line, which installs the same release from a terminal.## Uninstall-**Settings → Uninstall…** runs [`browsentic uninstall`](../reference/cli.md#uninstall): it unpairs+**Settings → General → Uninstall…** runs [`browsentic uninstall`](../reference/cli.md#uninstall): it unpairsevery browser, stops the Bridge and removes `~/.browsentic` and `~/browsentic`, optionally keepingyour skills. Remove the extension from each browser first (right-click its toolbar icon →**Remove**), and drag the app to the Trash afterwards.diff --git a/docs/guide/windows-app.md b/docs/guide/windows-app.mdindex 3b76506..020da07 100644--- a/docs/guide/windows-app.md+++ b/docs/guide/windows-app.md@@ -57,19 +57,16 @@ its shell commands through.## The window-The tabs float at the top; Ctrl+1 to Ctrl+9 switch between them. Ctrl+Shift+D turns the Bridge-on or off, Ctrl+Shift+R restarts it, and Ctrl+Shift+P gets a new pairing code.+The tabs float at the top; Ctrl+1 to Ctrl+5 switch between them. Agents, Skills, Activity and Logs are+pages of **Settings**, picked from its sidebar. Ctrl+Shift+D turns the Bridge on or off, Ctrl+Shift+R+restarts it, and Ctrl+Shift+P gets a new pairing code.| Tab | What you do there || --- | --- || **Overview** | Turn Browsentic Bridge on and off with the power button, restart it, see its address and version. One row per browser: where its extension comes from, whether it is connected, and a button that adds it from the store. The unpacked folder sits behind **Load it unpacked instead** || **Browsers** | Get a [pairing code](pair.md) with a live countdown, see every paired browser and the store its extension came from, unpair one or all |-| **Android** | Whether a phone is ready to drive from the side panel: adb, the phone, USB debugging, Chrome, Chrome open and the screen, one row each, the same checks `browsentic android` prints. A row that fails says what to do, with **Open Chrome on the phone**, **Get Chrome**, the `winget` command that installs adb, or the page of phone makers' USB drivers, which many phones need before Windows shows them to adb. **Set up your phone** has the steps. The Bridge looks for phones only while this tab is open |-| **Agents** | See which agent CLIs are ready, [switch](agents.md) between them, pick a model, install a missing one, or let Browsentic fix what one still needs |-| **Skills** | Every [skill](features/skills.md) the router can see and which folder it came from |-| **Activity** | Your standing [approvals](approvals.md), forgettable per site, and the downloads agents captured |-| **Logs** | `%USERPROFILE%\.browsentic\daemon.log`, followed live |-| **Settings** | Light, dark or system appearance for this window; whether the Bridge starts with the app; the **Browser theme** and **Guardrails** every paired browser uses, the same rows as the extension's settings page, kept in step both ways; `browsentic` in your terminal; the line that registers Browsentic with an [MCP client](mcp-clients.md); uninstall |+| **Android** (experimental) | Whether a phone is ready to drive from the side panel: adb, the phone, USB debugging, Chrome, Chrome open and the screen, one row each, the same checks `browsentic android` prints. A row that fails says what to do, with **Open Chrome on the phone**, **Get Chrome**, the `winget` command that installs adb, or the page of phone makers' USB drivers, which many phones need before Windows shows them to adb. **Set up your phone** has the steps. The Bridge looks for phones only while this tab is open |+| **Settings** | Five pages, picked from its sidebar. **General**: light, dark or system appearance for this window; whether the Bridge starts with the app; the **Browser theme** and **Guardrails** every paired browser uses, the same rows as the extension's settings page, kept in step both ways; `browsentic` in your terminal; the line that registers Browsentic with an [MCP client](mcp-clients.md); uninstall. **Agents**: see which agent CLIs are ready, [switch](agents.md) between them, pick a model, install a missing one, or let Browsentic fix what one still needs. **Skills**: every [skill](features/skills.md) the router can see and which folder it came from. **Activity**: your standing [approvals](approvals.md), forgettable per site, and the downloads agents captured. **Logs**: `%USERPROFILE%\.browsentic\daemon.log`, followed live || **About** | Who makes Browsentic, a GitHub star, every version on this computer with a copy button, **Report a bug** (GitHub's issue form with those versions filled in; nothing is sent until you submit it), and links to the guide, this page, [troubleshooting](troubleshooting.md) and the release notes. **Run the checks again** reruns the first-run checks |The Browsentic icon in the notification area shows the Bridge's state and has the same on, off and@@ -96,7 +93,7 @@ than the browser has loaded.## `browsentic` in your terminal-**Settings → “browsentic” in your terminal** adds `%USERPROFILE%\.browsentic\bin` to your user+**Settings → General → “browsentic” in your terminal** adds `%USERPROFILE%\.browsentic\bin` to your user`PATH`, without administrator rights and without changing anything else in it. Terminals alreadyopen keep their old `PATH`, so open a new one. Every command in the[CLI reference](../reference/cli.md) then works against the install the app manages.@@ -131,7 +128,7 @@ release.## Uninstall-**Settings → Uninstall…** runs [`browsentic uninstall`](../reference/cli.md#uninstall): it unpairs+**Settings → General → Uninstall…** runs [`browsentic uninstall`](../reference/cli.md#uninstall): it unpairsevery browser, stops the Bridge and removes `%USERPROFILE%\.browsentic` and `%USERPROFILE%\browsentic`,optionally keeping your skills. Remove the extension from each browser first (right-click itstoolbar icon → **Remove**). Then uninstall the app itself in **Settings › Apps › Installed apps**.diff --git a/src/mac/Sources/Browsentic/App/AppModel.swift b/src/mac/Sources/Browsentic/App/AppModel.swiftindex f7d3570..4c493d9 100644--- a/src/mac/Sources/Browsentic/App/AppModel.swift+++ b/src/mac/Sources/Browsentic/App/AppModel.swift@@ -17,7 +17,7 @@ enum DaemonPhase: Equatable {}enum Tab: String, CaseIterable, Identifiable {- case overview, browsers, android, agents, skills, activity, logs, settings, about+ case overview, browsers, android, settings, aboutvar id: String { rawValue }var label: String { rawValue.capitalized }@@ -26,12 +26,25 @@ enum Tab: String, CaseIterable, Identifiable {case .overview: "power"case .browsers: "globe"case .android: "candybarphone"+ case .settings: "gearshape"+ case .about: "info.circle"+ }+ }+ var badge: String? { self == .android ? "Experimental" : nil }+}++enum SettingsSection: String, CaseIterable, Identifiable {+ case general, agents, skills, activity, logs++ var id: String { rawValue }+ var label: String { rawValue.capitalized }+ var icon: String {+ switch self {+ case .general: "slider.horizontal.3"case .agents: "sparkles"case .skills: "book.closed"case .activity: "checkmark.shield"case .logs: "text.alignleft"- case .settings: "gearshape"- case .about: "info.circle"}}}@@ -46,6 +59,7 @@ struct Notice: Identifiable, Equatable {final class AppModel: ObservableObject {@Published var phase: Phase = .preflight@Published var tab: Tab = .overview+ @Published var settingsSection: SettingsSection = .general@Published var checks: [CheckID: CheckState] = Dictionary(uniqueKeysWithValues: CheckID.allCases.map { ($0, .waiting) })@Published var preflightBusy = true@Published var fixing = falsediff --git a/src/mac/Sources/Browsentic/App/BrowsenticApp.swift b/src/mac/Sources/Browsentic/App/BrowsenticApp.swiftindex 2013e24..d7e3c21 100644--- a/src/mac/Sources/Browsentic/App/BrowsenticApp.swift+++ b/src/mac/Sources/Browsentic/App/BrowsenticApp.swift@@ -48,7 +48,7 @@ struct BrowsenticApp: App {MenuBarExtra {MenuBarContent().environmentObject(model)} label: {- Image(systemName: model.daemon == .on ? "circle.hexagongrid.fill" : "circle.hexagongrid")+ Image(nsImage: model.daemon == .on ? MenuBarMark.on : MenuBarMark.off)}}}diff --git a/src/mac/Sources/Browsentic/Core/CLI.swift b/src/mac/Sources/Browsentic/Core/CLI.swiftindex 10d094f..a3f2a40 100644--- a/src/mac/Sources/Browsentic/Core/CLI.swift+++ b/src/mac/Sources/Browsentic/Core/CLI.swift@@ -6,7 +6,7 @@ enum CLIError: LocalizedError {var errorDescription: String? {switch self {- case .failed(let detail): detail.isEmpty ? "The browsentic command exited with an error — see the Logs tab." : detail+ case .failed(let detail): detail.isEmpty ? "The browsentic command exited with an error — see Settings → Logs." : detailcase .unreadable(let command): "“browsentic \(command)” printed something this app cannot read — update the app."}}diff --git a/src/mac/Sources/Browsentic/Theme/MenuBarMark.swift b/src/mac/Sources/Browsentic/Theme/MenuBarMark.swiftnew file mode 100644index 0000000..ab113fd--- /dev/null+++ b/src/mac/Sources/Browsentic/Theme/MenuBarMark.swift@@ -0,0 +1,50 @@+import AppKit++/// The brand mark for the menu bar, a template so macOS tints it for the bar. Its centre node is hollow while the Bridge is off.+enum MenuBarMark {+ static let on = draw(running: true)+ static let off = draw(running: false)++ private static func draw(running: Bool) -> NSImage {+ let image = NSImage(size: NSSize(width: 18, height: 18), flipped: true) { rect in+ guard let context = NSGraphicsContext.current?.cgContext else { return false }+ let unit = rect.width / 32+ func at(_ x: CGFloat, _ y: CGFloat) -> CGPoint { CGPoint(x: x * unit, y: y * unit) }+ func circle(_ x: CGFloat, _ y: CGFloat, _ r: CGFloat) -> CGRect {+ CGRect(x: (x - r) * unit, y: (y - r) * unit, width: 2 * r * unit, height: 2 * r * unit)+ }+ let ink = NSColor.black.cgColor+ context.setLineCap(.round)++ context.setStrokeColor(ink.copy(alpha: 0.7)!)+ context.setLineWidth(2.1 * unit)+ context.addPath(CGPath(roundedRect: CGRect(x: 2.25 * unit, y: 4.25 * unit, width: 27.5 * unit, height: 23.5 * unit), cornerWidth: 6 * unit, cornerHeight: 6 * unit, transform: nil))+ context.strokePath()+ context.setStrokeColor(ink.copy(alpha: 0.5)!)+ context.setLineWidth(1.6 * unit)+ context.move(to: at(3, 10.6))+ context.addLine(to: at(29, 10.6))+ context.strokePath()++ context.setStrokeColor(ink)+ context.setLineWidth(2.4 * unit)+ context.move(to: at(9, 22.2))+ context.addCurve(to: at(15.9, 15.8), control1: at(11.4, 22.2), control2: at(11.4, 15.8))+ context.addCurve(to: at(22.9, 22.2), control1: at(20.4, 15.8), control2: at(20.5, 22.2))+ context.strokePath()++ for (x, y, r, filled) in [(9.0, 22.2, 2.6, false), (15.9, 15.8, 2.7, running), (22.9, 22.2, 2.6, false)] as [(CGFloat, CGFloat, CGFloat, Bool)] {+ context.setBlendMode(.clear)+ context.fillEllipse(in: circle(x, y, r))+ context.setBlendMode(.normal)+ context.setFillColor(ink)+ if filled { context.fillEllipse(in: circle(x, y, r + 0.3)) }+ context.setLineWidth(2 * unit)+ context.strokeEllipse(in: circle(x, y, r))+ }+ return true+ }+ image.isTemplate = true+ return image+ }+}diff --git a/src/mac/Sources/Browsentic/Views/MainView.swift b/src/mac/Sources/Browsentic/Views/MainView.swiftindex 7984a61..47593cf 100644--- a/src/mac/Sources/Browsentic/Views/MainView.swift+++ b/src/mac/Sources/Browsentic/Views/MainView.swift@@ -5,37 +5,41 @@ struct MainView: View {var body: some View {ZStack(alignment: .top) {- ScrollView {- Group {- switch model.tab {- case .overview: OverviewView()- case .browsers: BrowsersView()- case .android: AndroidView()- case .agents: AgentsView()- case .skills: SkillsView()- case .activity: ActivityView()- case .logs: LogsView()- case .settings: SettingsView()- case .about: AboutView()- }+ Group {+ switch model.tab {+ case .overview: Page { OverviewView() }+ case .browsers: Page { BrowsersView() }+ case .android: Page { AndroidView() }+ case .settings: SettingsScreen()+ case .about: Page { AboutView() }}+ }+ .id(model.tab)+ .transition(.opacity.combined(with: .offset(y: 8)))++ TabCapsule().padding(.top, 6)+ }+ .animation(.easeInOut(duration: 0.22), value: model.tab)+ }+}++private struct Page<Content: View>: View {+ @ViewBuilder var content: Content++ var body: some View {+ ScrollView {+ content.frame(maxWidth: 880).padding(.horizontal, 28).padding(.top, 64).padding(.bottom, 36).frame(maxWidth: .infinity)- .id(model.tab)- .transition(.opacity.combined(with: .offset(y: 8)))- }- .scrollIndicators(.never)-- TabCapsule().padding(.top, 6)}- .animation(.easeInOut(duration: 0.22), value: model.tab)+ .scrollIndicators(.never)}}-/// The view switcher floats at the top centre, ⌘1…⌘9.+/// The view switcher floats at the top centre, ⌘1…⌘5.private struct TabCapsule: View {@EnvironmentObject private var model: AppModel@Namespace private var highlight@@ -48,6 +52,9 @@ private struct TabCapsule: View {HStack(spacing: 6) {Image(systemName: tab.icon).font(.system(size: 11, weight: .semibold))Text(tab.label).font(.system(size: 12, weight: .medium))+ if let badge = tab.badge {+ TabBadge(text: badge, selected: selected)+ }if tab == .overview, model.update != nil {Circle().fill(selected ? Palette.onBrand : Palette.brand).frame(width: 6, height: 6)}@@ -71,6 +78,22 @@ private struct TabCapsule: View {}}+private struct TabBadge: View {+ let text: String+ let selected: Bool++ var body: some View {+ let tint = selected ? Palette.onBrand : Palette.amber+ Text(text.uppercased())+ .font(.system(size: 8.5, weight: .semibold, design: .monospaced))+ .tracking(0.5)+ .foregroundStyle(tint)+ .padding(.horizontal, 5)+ .padding(.vertical, 1.5)+ .overlay(RoundedRectangle(cornerRadius: 4, style: .continuous).strokeBorder(tint.opacity(0.5)))+ }+}+struct NoticeBanner: View {let notice: Noticediff --git a/src/mac/Sources/Browsentic/Views/SettingsScreen.swift b/src/mac/Sources/Browsentic/Views/SettingsScreen.swiftnew file mode 100644index 0000000..49c52a4--- /dev/null+++ b/src/mac/Sources/Browsentic/Views/SettingsScreen.swift@@ -0,0 +1,65 @@+import SwiftUI++/// Settings, with the pages that once had tabs of their own, picked from a sidebar that stays put while a page scrolls.+struct SettingsScreen: View {+ @EnvironmentObject private var model: AppModel++ var body: some View {+ HStack(alignment: .top, spacing: 28) {+ SettingsSidebar().frame(width: 168).padding(.top, 64)+ ScrollView {+ Group {+ switch model.settingsSection {+ case .general: SettingsView()+ case .agents: AgentsView()+ case .skills: SkillsView()+ case .activity: ActivityView()+ case .logs: LogsView()+ }+ }+ .padding(.top, 64)+ .padding(.bottom, 36)+ .id(model.settingsSection)+ .transition(.opacity.combined(with: .offset(y: 6)))+ }+ .scrollIndicators(.never)+ }+ .frame(maxWidth: 1076)+ .padding(.horizontal, 28)+ .frame(maxWidth: .infinity)+ .animation(.easeInOut(duration: 0.18), value: model.settingsSection)+ }+}++private struct SettingsSidebar: View {+ @EnvironmentObject private var model: AppModel+ @State private var hovered: SettingsSection?++ var body: some View {+ VStack(alignment: .leading, spacing: 2) {+ ForEach(SettingsSection.allCases) { section in+ let selected = model.settingsSection == section+ let lit = hovered == section+ Button { model.settingsSection = section } label: {+ HStack(spacing: 9) {+ Image(systemName: section.icon).font(.system(size: 12, weight: .semibold)).frame(width: 16)+ Text(section.label).font(.system(size: 13, weight: .medium))+ Spacer(minLength: 0)+ }+ .foregroundStyle(selected ? Palette.brand : lit ? Palette.inkDim : Palette.inkFaint)+ .padding(.horizontal, 10)+ .padding(.vertical, 8)+ .background(+ selected ? Palette.brand.opacity(0.12) : lit ? Palette.surface.opacity(0.6) : Color.clear,+ in: RoundedRectangle(cornerRadius: 9, style: .continuous)+ )+ .contentShape(RoundedRectangle(cornerRadius: 9, style: .continuous))+ }+ .buttonStyle(.plain)+ .onHover { inside in+ if inside { hovered = section } else if hovered == section { hovered = nil }+ }+ }+ }+ }+}diff --git a/src/mac/Tests/BrowsenticTests/ModelTests.swift b/src/mac/Tests/BrowsenticTests/ModelTests.swiftindex ba4c552..8e96ad2 100644--- a/src/mac/Tests/BrowsenticTests/ModelTests.swift+++ b/src/mac/Tests/BrowsenticTests/ModelTests.swift@@ -230,4 +230,10 @@ import Testing#expect(Tab.allCases.firstIndex(of: .android) == 2)#expect(Tab.allCases.last == .about)}++ @Test func agentsSkillsActivityAndLogsLiveInSettings() {+ #expect(Tab.allCases.map(\.rawValue) == ["overview", "browsers", "android", "settings", "about"])+ #expect(SettingsSection.allCases.map(\.label) == ["General", "Agents", "Skills", "Activity", "Logs"])+ #expect(Tab.allCases.compactMap(\.badge) == ["Experimental"])+ }}diff --git a/src/windows/ui/main.tsx b/src/windows/ui/main.tsxindex 610552a..614571d 100644--- a/src/windows/ui/main.tsx+++ b/src/windows/ui/main.tsx@@ -4,17 +4,18 @@ import { createRoot } from 'react-dom/client';import './app.css';import { App } from './app';import { isTauri, tauriBackend } from './backend';-import { Model, type Tab } from './model';+import { isSettingsSection, Model, type Tab } from './model';const backend = isTauri() ? await tauriBackend() : await import('./mock-backend').then(({ mockBackend }) => mockBackend());const model = new Model(backend);-const previewTab = !isTauri() && (new URLSearchParams(location.search).get('tab') as Tab | null);+const previewTab = !isTauri() && new URLSearchParams(location.search).get('tab');if (previewTab) {const stop = model.subscribe(() => {if (model.snapshot().phase !== 'main') return;stop();- model.setTab(previewTab);+ if (isSettingsSection(previewTab)) model.openSettings(previewTab);+ else model.setTab(previewTab as Tab);});}diff --git a/src/windows/ui/model.test.ts b/src/windows/ui/model.test.tsindex 79945c0..e52682e 100644--- a/src/windows/ui/model.test.ts+++ b/src/windows/ui/model.test.ts@@ -113,6 +113,16 @@ describe('the running app', () => {return model;}+ it('opens Agents, Skills, Activity and Logs as pages of Settings, and only once past the checks', async () => {+ const model = start(mockBackend({ instant: true }));+ model.openSettings('logs');+ expect(model.snapshot()).toMatchObject({ tab: 'overview', settingsSection: 'general' });+ await model.runPreflight();+ await until(model, (state) => state.phase === 'main');+ model.openSettings('agents');+ expect(model.snapshot()).toMatchObject({ tab: 'settings', settingsSection: 'agents' });+ });+it('offers the browsers on this computer, each with the store it gets the extension from', async () => {const model = await running();await until(model, (state) => state.browserRows.length > 0);@@ -198,10 +208,8 @@ describe('the Android tab', () => {};}- it('sits after Browsers, so Ctrl+3 opens it and About is Ctrl+9', () => {- expect(TABS.indexOf('android')).toBe(2);- expect(TABS.at(-1)).toBe('about');- expect(TABS.length).toBeLessThanOrEqual(9);+ it('sits after Browsers, so Ctrl+3 opens it and About is Ctrl+5', () => {+ expect(TABS).toEqual(['overview', 'browsers', 'android', 'settings', 'about']);});it('watches for phones only while it shows, and reads the checklist the CLI prints', async () => {diff --git a/src/windows/ui/model.ts b/src/windows/ui/model.tsindex 12bd2c0..4b974bf 100644--- a/src/windows/ui/model.ts+++ b/src/windows/ui/model.ts@@ -28,8 +28,11 @@ import type {export type Phase = 'preflight' | 'main';export type DaemonPhase = 'off' | 'starting' | 'on' | 'stopping';-export type Tab = 'overview' | 'browsers' | 'android' | 'agents' | 'skills' | 'activity' | 'logs' | 'settings' | 'about';-export const TABS: Tab[] = ['overview', 'browsers', 'android', 'agents', 'skills', 'activity', 'logs', 'settings', 'about'];+export type Tab = 'overview' | 'browsers' | 'android' | 'settings' | 'about';+export const TABS: Tab[] = ['overview', 'browsers', 'android', 'settings', 'about'];+export type SettingsSection = 'general' | 'agents' | 'skills' | 'activity' | 'logs';+export const SETTINGS_SECTIONS: SettingsSection[] = ['general', 'agents', 'skills', 'activity', 'logs'];+export const isSettingsSection = (value: string): value is SettingsSection => (SETTINGS_SECTIONS as string[]).includes(value);export type CheckId = 'system' | 'node' | 'command' | 'browser' | 'agent';export const CHECKS: CheckId[] = ['system', 'node', 'command', 'browser', 'agent'];@@ -63,6 +66,7 @@ export interface Notice {export interface State {phase: Phase;tab: Tab;+ settingsSection: SettingsSection;checks: Record<CheckId, CheckState>;preflightBusy: boolean;fixing: boolean;@@ -131,7 +135,7 @@ export const isInstalling = (phase: UpdatePhase) => phase.kind === 'downloading'export function failureOf(output: CliOutput): string {const text = (output.stderr.trim() || output.stdout.trim()).slice(-400);- return text || 'The browsentic command exited with an error. See the Logs tab.';+ return text || 'The browsentic command exited with an error. See Settings → Logs.';}/** The CLI's --json output, from its first bracket: a warning printed before it is not part of it. */@@ -155,6 +159,7 @@ export function short(path: string, info: AppInfo | undefined): string {export const initialState = (): State => ({phase: 'preflight',tab: 'overview',+ settingsSection: 'general',checks: Object.fromEntries(CHECKS.map((id) => [id, { kind: 'waiting' }])) as Record<CheckId, CheckState>,preflightBusy: true,fixing: false,@@ -394,6 +399,10 @@ export class Model {if (this.state.phase === 'main') this.set({ tab });}+ openSettings(settingsSection: SettingsSection) {+ if (this.state.phase === 'main') this.set({ tab: 'settings', settingsSection });+ }+// Daemonprivate startPolling() {@@ -505,7 +514,7 @@ export class Model {try {this.set({ agents: parseJson<AgentListing>(await this.backend.cli(['agent', '--json']), 'agent') });} catch {- /* The Agents tab shows its own offline hint; a failed background read says nothing. */+ /* Settings → Agents shows its own offline hint; a failed background read says nothing. */}}diff --git a/src/windows/ui/views/main.tsx b/src/windows/ui/views/main.tsxindex 6c0eb49..6c4af3c 100644--- a/src/windows/ui/views/main.tsx+++ b/src/windows/ui/views/main.tsx@@ -1,26 +1,18 @@-import { AlignLeft, BookOpen, Globe, Info, Power, Settings, ShieldCheck, Smartphone, Sparkles, type LucideIcon } from 'lucide-react';+import { Globe, Info, Power, Settings, Smartphone, type LucideIcon } from 'lucide-react';import { cn } from '@/lib/utils';import { TABS, type Model, type State, type Tab } from '../model';import { AboutView } from './about';-import { ActivityView } from './activity';-import { AgentsView } from './agents';import { AndroidView } from './android';import { BrowsersView } from './browsers';-import { LogsView } from './logs';import { OverviewView } from './overview';-import { SettingsView } from './settings';-import { SkillsView } from './skills';+import { SettingsScreen } from './settings-screen';-const TAB: Record<Tab, { label: string; icon: LucideIcon; view: typeof OverviewView }> = {+const TAB: Record<Tab, { label: string; icon: LucideIcon; view: typeof OverviewView; badge?: string }> = {overview: { label: 'Overview', icon: Power, view: OverviewView },browsers: { label: 'Browsers', icon: Globe, view: BrowsersView },- android: { label: 'Android', icon: Smartphone, view: AndroidView },- agents: { label: 'Agents', icon: Sparkles, view: AgentsView },- skills: { label: 'Skills', icon: BookOpen, view: SkillsView },- activity: { label: 'Activity', icon: ShieldCheck, view: ActivityView },- logs: { label: 'Logs', icon: AlignLeft, view: LogsView },- settings: { label: 'Settings', icon: Settings, view: SettingsView },+ android: { label: 'Android', icon: Smartphone, view: AndroidView, badge: 'Experimental' },+ settings: { label: 'Settings', icon: Settings, view: SettingsScreen },about: { label: 'About', icon: Info, view: AboutView },};@@ -29,7 +21,7 @@ export function MainView({ model, state }: { model: Model; state: State }) {return (<div className="relative h-full"><div className="h-full overflow-y-auto [scrollbar-width:none]">- <div key={state.tab} className="enter mx-auto max-w-[880px] px-7 pt-16 pb-9">+ <div key={state.tab} className={cn('enter mx-auto px-7 pt-16 pb-9', state.tab === 'settings' ? 'max-w-[1076px]' : 'max-w-[880px]')}><View model={model} state={state} /></div></div>@@ -38,12 +30,12 @@ export function MainView({ model, state }: { model: Model; state: State }) {);}-/** The view switcher floats at the top centre, Ctrl+1…Ctrl+9. */+/** The view switcher floats at the top centre, Ctrl+1…Ctrl+5. */function TabCapsule({ model, state }: { model: Model; state: State }) {return (<nav className="absolute top-1.5 left-1/2 flex -translate-x-1/2 gap-0.5 rounded-full border border-line bg-surface/80 p-1 shadow-[0_6px_18px_rgb(0_0_0/0.25)] backdrop-blur-md">{TABS.map((tab, index) => {- const { label, icon: Icon } = TAB[tab];+ const { label, icon: Icon, badge } = TAB[tab];const selected = state.tab === tab;return (<button@@ -59,6 +51,16 @@ function TabCapsule({ model, state }: { model: Model; state: State }) {><Icon className="size-3" strokeWidth={2.5} />{label}+ {badge && (+ <span+ className={cn(+ 'rounded-sm border px-1 font-mono text-[9px] tracking-wider uppercase',+ selected ? 'border-ground/50 text-ground' : 'border-amber/50 text-amber',+ )}+ >+ {badge}+ </span>+ )}{tab === 'overview' && state.update && <span className={cn('size-1.5 rounded-full', selected ? 'bg-ground' : 'bg-brand')} />}</button>);diff --git a/src/windows/ui/views/settings-screen.tsx b/src/windows/ui/views/settings-screen.tsxnew file mode 100644index 0000000..1933f08--- /dev/null+++ b/src/windows/ui/views/settings-screen.tsx@@ -0,0 +1,50 @@+import { AlignLeft, BookOpen, ShieldCheck, SlidersHorizontal, Sparkles, type LucideIcon } from 'lucide-react';++import { cn } from '@/lib/utils';+import { SETTINGS_SECTIONS, type Model, type SettingsSection, type State } from '../model';+import { ActivityView } from './activity';+import { AgentsView } from './agents';+import { LogsView } from './logs';+import { SettingsView } from './settings';+import { SkillsView } from './skills';++const SECTION: Record<SettingsSection, { label: string; icon: LucideIcon; view: typeof SettingsView }> = {+ general: { label: 'General', icon: SlidersHorizontal, view: SettingsView },+ agents: { label: 'Agents', icon: Sparkles, view: AgentsView },+ skills: { label: 'Skills', icon: BookOpen, view: SkillsView },+ activity: { label: 'Activity', icon: ShieldCheck, view: ActivityView },+ logs: { label: 'Logs', icon: AlignLeft, view: LogsView },+};++/** Settings, with the pages that once had tabs of their own, picked from a sidebar that stays put while a page scrolls. */+export function SettingsScreen({ model, state }: { model: Model; state: State }) {+ const View = SECTION[state.settingsSection].view;+ return (+ <div className="flex items-start gap-7">+ <nav aria-label="Settings sections" className="sticky top-16 flex w-42 shrink-0 flex-col gap-0.5">+ {SETTINGS_SECTIONS.map((section) => {+ const { label, icon: Icon } = SECTION[section];+ const active = state.settingsSection === section;+ return (+ <button+ key={section}+ type="button"+ aria-current={active ? 'page' : undefined}+ onClick={() => model.openSettings(section)}+ className={cn(+ 'flex items-center gap-2 rounded-lg px-3 py-2 text-sm font-medium transition-colors',+ active ? 'bg-brand/12 text-brand' : 'text-ink-faint hover:bg-surface/60 hover:text-ink-dim',+ )}+ >+ <Icon className="size-4" />+ {label}+ </button>+ );+ })}+ </nav>+ <div key={state.settingsSection} className="enter min-w-0 flex-1">+ <View model={model} state={state} />+ </div>+ </div>+ );+}