UI layer
Lives in the desktopApp module: desktopApp/src/main/kotlin/dev/taxilane/ui, plus AppContainer.kt at the package root. It uses the domain and infrastructure from the core module.
Navigation
Section titled “Navigation”No navigation-compose: the main window is a shell (ui/shell/AppShell) with a persistent Sidebar and a content area. ShellViewModel owns the selected ShellDestination (Active, All(projectFilter), Machine(resource), ProjectSettings, AddProject), the project catalog (sorted alphabetically) and the sidebar state, and the content area does a when over the destination. There are two worktree views: Active is the main one and the default when nothing was saved, All(null) is “All worktrees”, and selecting a project is the second view filtered to it (All(projectId)). A sidebar app has no meaningful back stack: Cancel on a form returns to the destination selected before it, and saving selects the view filtered to the saved project. With no destination (no projects), the content area shows the first-launch empty state.
The selected view is saved as lastDestination in settings.json (active, all, project:<id> for a filtered view, machine:<RESOURCE> for a machine view, the same value earlier versions wrote for a project) and restored on startup; forms are never restored, and a project that no longer exists falls back to “Active”. The catalog is re-read when the window regains focus and on View > Reload, which also bumps reloadRequests so the shown view reloads its data.
The sidebar starts with a views section, whose “Active” entry shows the number of worktrees waiting for the user (WorktreeBoard.waitingCount, hidden at zero) and “All worktrees” the total (WorktreeBoard.totalWorktreeCount), followed by the projects and the multirepos; the machine resources live in the status bar at the bottom of the window (see “Machine resources”). Every expanded row has the same geometry: a 16 dp leading slot (the view’s icon, a multirepo’s disclosure chevron, or empty for a project) before the label, so labels start right of the section labels and never read as headers; a multirepo’s projects are indented one level more. Inside a multirepo, the workspace repository’s project is labelled with its alias (SidebarMultirepo.labels, from multirepoChildLabels), which also decides its alphabetical place; reordering keeps using project ids. Each project shows its own count of worktrees waiting for the user (waitingCountOf; a multirepo folder adds its multirepo agent when it is blocked or done) and, while an agent runs in any of its worktrees, the agent icon in the info color (a small compact AgentIndicator) with a tooltip and an accessible name naming the agents. Cmd/Ctrl+K opens the command palette (see “Command palette”). Cmd/Ctrl+1 opens “Active” and Cmd/Ctrl+2 “All worktrees” (View menu). It’s 240 dp wide, and becomes a 64 dp rail (an icon for each view and each project’s initial, with tooltips) when the window is narrower than 900 dp or the user collapses it (View > Toggle sidebar, Cmd/Ctrl+Backslash). The manual choice is saved as sidebarCollapsed and only applies to wide windows; toggling on a narrow window expands it until the width changes. Each project row has a context menu with Edit project and Remove project.
Success messages are transient and don’t move the layout: the shell owns one AppMessages (a SnackbarHostState shown at the bottom of the content area) and provides it as LocalAppMessages. show(message, action) replaces the current message, keeps it 4 seconds, or 8 seconds when it has an action (MessageAction, e.g. “Copy launch command”), and runs the action when it’s activated. Errors stay as ErrorNotice where the action happened (see Errors).
main.kt adds the desktop conventions around the shell:
- A
MenuBar(AppMenuBar) with File (New worktree while a worktree view is active, Save while project settings have changes, Add project; Preferences and Quit off macOS), View (Find while a worktree view is active, Reload, Toggle sidebar) and Help (About off macOS, and Check for Updates…), labelled fromStringsso it follows the language. On macOS,java.awt.Desktophandlers put About and Settings… in the Taxilane menu, and a quit handler cancels the system quit and goes through theLeaveGuard, which saves the window bounds when it really quits. PreferencesWindow(theme mode and language, the Tools section with the terminal and default IDE, the Resources section with the capacity profile (ResourcePreferences: Automatic, Light, Balanced, One per worktree and Custom, each showing the limits it gives on this machine, and for Custom a number or “No limit” per kind, and the device lease duration in minutes (leaseDraft), saved throughJsonResourceLimitsRepository; invalid numbers keep the previous value; the iOS simulator line only on macOS), the tray options where the system has a tray, and the automatic update check; a single instance brought to the front when reopened, closed with Cmd/Ctrl+W throughisCloseWindowShortcut) andAboutWindow(icon, name,BuildInfo.VERSION, repository link). Every window reads the sameAppearanceholder, so a change applies to all of them at once.- The window’s bounds and maximized state are saved as
windowBoundswhen it closes and restored on startup; bounds that don’t intersect any connected display open the window centered instead. The minimum size is 720×480. - The menu bar or tray icon (see “Menu bar and tray”) and the closing behavior it allows: with the icon shown and “keep running” on (
TrayPreferences.closeActionisHIDE), closing the main window hides it after theLeaveGuardagrees, and Quit in the tray menu or Cmd/Ctrl+Q quits. Hiding the icon shows the window again. - The update check (see “Update check”): one background check after start-up and then every 24 hours while the app runs.
- When
projects.jsonorsettings.jsoncouldn’t be read, the shell shows a notice naming the file and where the unreadable copy was kept (ShellViewModel.unreadableFiles), once.
Screens and ViewModels
Section titled “Screens and ViewModels”| Screen | ViewModel | Responsibility |
|---|---|---|
AppShell |
ShellViewModel |
Sidebar with the project catalog from ProjectRepository (alphabetical; add, edit and remove with confirmation) and the content area for the selected destination. |
ProjectSettingsView |
ProjectConfigViewModel |
Form for a Project (name, base repository path, worktrees root, main branch, the repository’s provisioning, local files with their copy or link mode, the count of symbolic links a copied folder skips and the mobile secrets suggested by DetectMobileSecretsUseCase (each linked as a pending link pattern), the project’s agents with their command and Headroom switch, and its IDE on this machine); validates the fields and asks before discarding unsaved changes. |
WorktreeScreen |
WorktreeBoard |
Lists the worktrees of every project, or of the project in the filter, grouped by project as two-line rows with a detail pane for the selected one; creates them from a new, existing or remote branch, removes them (optionally deleting the branch, retrying with --force when Git asks for it or the worktree is locked), cleans them up, provisions them, and copies their launch command or opens them in a terminal, an IDE, the file manager, Herdr or Orca. |
Each ViewModel uses androidx.lifecycle viewmodel-compose (viewModelScope) to call use cases without blocking the UI thread. Changes made outside the app (a branch created from the terminal, a worktree removed by hand) show up without pressing “Reload”: the worktree board watches the Git metadata and reads statuses again when the window regains focus (see auto-refresh below). ProjectConfigViewModel lives in a ViewModelStore of its own for each visit of the configuration screen (rememberScreenViewModelStoreOwner), cleared when the screen leaves the composition, so every visit starts from the saved project and rereads the repository.
Worktree board
Section titled “Worktree board”WorktreeBoard is a ViewModel scoped to the shell, created in AppShell and fed with the catalog through syncCatalog(projects). It keeps one ProjectWorktrees per project: a plain state holder with that project’s list, statuses, overview, providers, creation, removal and cleanup, bound to a CoroutineScope that is a child of the board’s. A project whose configuration changed (same id, different ProjectConfig) is disposed and recreated, so the view never uses use cases bound to old paths, and a project removed from the catalog is disposed, clearing a selection, filter or dialog that pointed at it. Renaming a project keeps its holder.
View-level state lives in the board, because it can point at any project: the destination’s project (show(projectFilter), set from the destination), the local project filter of “Active” and “All worktrees” (viewProjectFilter, one per GroupedView, kept in memory for the session and applied only when the destination has no project), the text filter, the selection as a WorktreeRef(projectId, path), the collapsed groups, and the create and cleanup dialogs.
- Loading: each holder lists its worktrees on creation, with at most 2 lists in parallel across projects (a
Semaphoreshared by the board); statuses stay at 4 at a time within a project. A project’sloadStateisLoadinguntil its first list, thenLoadedorFailed(error). A failure is shown inside its group with a reload action and never blocks the other groups;ListWorktreesUseCasereports a missing base repository asBaseRepositoryNotFoundwithout running Git. - Sizes: worktree sizes are measured through one board-wide
SizeQueue, one worktree at a time. A manual reload measures every worktree again and replaces that project’s pending measurements; any other load only queues the worktrees without a known size. Known sizes stay shown until their new value arrives, and the queue measures the projects shown in the view first. - Groups:
groupsis the list of shown projects with their rows after the text filter. In the unfiltered view each group has a sticky header (stickyHeader) with a collapse toggle, the name, the worktree count, a progress indicator while it reloads, and “Project settings” and “New worktree” as icons for that project, with “Clean up” in its ⋯ menu (projectGroupOverflow), never as a button. Collapsed groups are saved ascollapsedProjectsinsettings.json. In the filtered view the single group’s header is merged into the view’s header, so a project view looks as before. - Text filter: a field in the header, focused with View > Find (Cmd/Ctrl+F), keeps the worktrees whose branch or folder name contains the text, ignoring case (
filterWorktrees, a pure function). Groups without matches are hidden, the view says when nothing matches with an action to clear the filter, and Escape clears it before clearing the selection (WorktreeBoard.escape(), called from the main window’sonPreviewKeyEvent, see the shortcuts below).
Creating worktrees
Section titled “Creating worktrees”Worktrees are created in CreateWorktreeDialog, opened from the “New worktree” action in the view’s header or a group’s header, from File > New worktree or with Cmd/Ctrl+N (onNewItemShortcut on the view, and ShellViewModel.newWorktreeRequests for the menu item, which only exists while a worktree view is active). WorktreeBoard owns the dialog’s state: the target project (createProjectId, which also means the dialog is open), whether to ask for it (createAsksForProject) and the form fields (taskId, branchType, createMode, selectedBranch); together with the start point (startFrom) and the fetch option (fetchFirst); the project’s ProjectWorktrees keeps isCreating, createError, branches, branchesError, fetchError and lastCreatedWorktree. From a group’s header or a filtered view the dialog creates in that project. From the unfiltered view it shows a project selector, defaulting to the project of the last worktree created (lastCreateProject in settings.json, saved on each creation) or the first project. openCreateDialog() resets the task id, the selected branch and the error, so the fields are reset on open and never on close. confirmCreate() creates only when canCreate holds (a valid task id, or an available branch), which is also what the “Create worktree” button and Enter in the task id field check.
While creating, the dialog shows InlineProgress and disables its inputs, the mode selector and both actions, and dismissCreateDialog() is ignored, so Escape and clicking outside do nothing. A failure keeps the dialog open with the entered values and shows the error as a Notice inside it (createError, separate from the view’s error). A success closes the dialog, adds the worktree to the list (replacing any entry with the same path, so a refresh that already listed it can’t duplicate it) and sets lastCreatedWorktree and success, which the screen turns into “Worktree created: copyLastCreatedLaunchCommand()). The watcher doesn’t reload a project while it creates.
When the repository isn’t approved on this machine, AppContainer.repositoryApproval (a DialogRepositoryApproval) suspends the creation before the environment is prepared, and the dialog shows an “Approve this repository’s configuration” step listing the post-creation commands, the declared variables with their templates and the environment file in the data style (ApprovalSubjectLines), with “Skip” and “Approve and remember”; the creation stays in progress until one is chosen. Skipping reports that the configuration wasn’t approved. The same approval serves “Provision” in the worktree’s detail.
updateTaskId applies the normalization (trim + whitespace runs collapsed to -) before storing the value, so the field always shows the already-normalized id while typing.
The branches come from ListBranchesUseCase, read once when the dialog opens or the project changes, and again after a fetch. A failure to read them is shown in the dialog with a retry (branchesError), not as an empty list.
- “New branch”: a “Start from” selector (
StartOption) offers “Current branch of the repository · same as taxilane new” first (StartOption.Current, the base repository’sHEAD) as the default, astaxilane newdoes, then the project’s main branch (ProjectWorktrees.defaultStartRef, itsorigin/ref when it exists) and every local andorigin/branch. When the repository has anoriginremote (canFetchFirst), “Fetch from origin first” runsFetchRemoteUseCasebefore creating; its value is saved per project asProjectConfig.fetchBeforeCreate. The chosen ref is resolved withResolveStartPointUseCaseafter the fetch. A failed fetch keeps the dialog open with the error, “Create without fetching” and “Retry”. - “Existing branch”: the branches are shown in a
DropdownSelectorgrouped by the segment before the first/(or “other” for branches without one), with theorigin/branches that have no local twin (withoutLocalTwins); choosing one creates a local branch that tracks it. Branches that already have a worktree are rendered disabled and can’t be selected, and “Create worktree” is only enabled for an available branch (ProjectWorktrees.isBranchAvailable).
Worktree list and detail
Section titled “Worktree list and detail”The view’s header shows “Active”, “All worktrees” or the filtered project’s name and, right-aligned, the reload action, “Project settings” in a filtered view (opens ShellDestination.ProjectSettings through ShellViewModel.editProject), a “More actions” (⋯) menu with, in a multirepo view, “Open multirepo agent in viewOverflow reads the default runner from ViewCatalog) and, last and in danger text, “Clean up”, and “New worktree” or “New change” (the view’s only ink action), all from viewCatalog. A second row holds, in “Active” and “All worktrees” only, the local project filter (ViewProjectFilter: “All projects” and each project, set with WorktreeBoard.updateViewProjectFilter, which narrows the current view without navigating, so the sidebar keeps its selection; a project’s view has none), the text filter, the grouping selector (by state or by project), which each view remembers as grouping.active and grouping.all in settings.json, and the sort selector (SortSelector: “Name” or “Last activity”), shown in every view and remembered per view as sorting.active, sorting.all and sorting.project. Below them, WorktreeScreen lays out WorktreeListPane and, when there’s room, a 320 dp detail pane (TaxilaneLayout.inspectorWidth) with a vertical divider. BoxWithConstraints on the content area decides the layout: below 760 dp of content width (TaxilaneLayout.compactBreakpoint) the detail is drawn over the list from the right edge, with the theme’s scrim, and closing it clears the selection.
- Rows:
WorktreeListPaneis aLazyColumnkeyed by project and worktree path. Rows are ordered by the view’s sort (sortWorktreeItemsinWorktreeSorting.kt): “Name” compares branches in natural order (naturalComparator: case-insensitive, digit runs compared by value, the full label as tie-breaker), “Last activity” comparesactivityDatedescending with undated worktrees last, and the main worktree comes first in both; grouped by state the sort applies across projects within each group. EachWorktreeRowrenders aWorktreeRowModelbuilt by the pureworktreeRowModel(...)(inWorktreeRowModel.kt, unit-tested without Compose) as a grid of fixed-width cells with two fixed-height lines each, kept even when empty so the same data sits at the same x position in every row: a 20 dp state badge (StateBadge: a circle in the state’s color with a distinct Material icon, the state’s name as tooltip andcontentDescription), a 136 dp execution cell (the most urgent agent, by blocked > done > working > unknown > idle, with “+N” and a tooltip listing all agents, and a second line,DeviceLine, with the first of the worktree’s desktop turn (holding or waiting, from the board’sDesktopTurnWatch), its emulator or simulator while booting or running and its running headless app, with “+N” and a tooltip listing them; 44 dp and icons only when compact), the name cell taking the remaining width (the branch, with the origin in its tooltip, then a second line that only identifies the row: the group tag, the folder when it differs from the branch’s last segment and, last and truncated last, the project when the view spans several projects and isn’t grouped by project, separated by “ · “; the origin is the inspector’s chip), a 76 dp Git cell (✎N, then↑N ↓Nor “merged”, with the main branch in tooltips, a progress indicator while loading and a muted dash when unavailable), a 104 dp time cell (the activity date as “commit 3 hours ago” or “created 2 days ago”, or, when compact,compactRelativeTime’s “3 h” or “2 d” with the full text as tooltip, then the main and locked marks). In the multirepo view the alias column comes first, as wide as the longest alias measured withaliasColumnWidth(between 48 and 128 dp) and shared by every row and a 28 dp action slot.WorktreeListPanemeasures its width withBoxWithConstraintsand passescompact = width < 640.dpto every row, so they all switch together. Hovering a row shows a copy-launch-commandIconAction; a secondary click opens its context menu, built from the action catalog (see “Action catalog”): open in the default runner, “Open with ▸”, copy launch command, copy path and, except for the main worktree, “Delete worktree…”. - Selection:
WorktreeBoard.selectedis aWorktreeRefset withselect(ref)and the up and down arrows (selectNext()/selectPrevious(), which cross project groups, skip collapsed ones and stop at the ends), andanimateScrollToItemkeeps the selected row visible.selectedWorktreeresolves it against the shown projects’ lists, so a worktree that’s no longer listed isn’t shown as selected and the selection survives auto refresh. - Detail:
WorktreeDetailPaneshows the project’s name when the view spans several projects, the branch with its origin chip, the full path as selectable text with a copy action (which confirms with a message), theWorktreeActionBar(the “Open in” split button, whose ▾ opens “Open with…”; the icons “Copy launch command”, “Open in ” and “Open folder”; and ⋯ with “Copy path” and “Delete worktree…”), and then its sections in the inspector’s fixed order: Status, Agent, Environment, Resources (emulator, simulator, Compose, headless app, desktop turn and disk) and Provisioned files. The header and each section are files in worktree/inspector/, drawn withInspectorSectionandPropertyList; what each section shows, its summary and its state (loading until first read, empty, not applicable) come from pure functions inInspectorModels.kt. The action bar (WorktreeActionBar) sits between the header and the sections and is built from the action catalog. Failures of that worktree’s actions (emulator, simulator, copy, terminal, IDE, folder, Herdr, Orca) are kept inactionErrors[path]and shown as aNoticeinside the detail, not in the view’s error banner. - Provisioning and environment: selecting a linked worktree runs
CheckProvisionedFilesUseCasefor it (ProjectWorktrees.provisioning:Checking,Checked(drift)orUnavailable), with no cache, since a stale answer would hide a stale copy. The Provisioned files section shows that the files are up to date, or each missing, different or unlinked file with “Provision”, which runsProvisionWorktreeUseCase(post-creation commands included, behind the same approval) and checks again. The Environment section shows the reserved ports and the worktree’s variables (environments, resolved without reserving) as selectable text with “Copy as .env”, and names the declared variables awaiting approval without values; they aren’t copied. - Summary: with nothing selected,
ProjectSummaryshows the worktree count of the shown projects, their total size and how many can be cleaned up. It only informs: “Clean up” is in the view’s ⋯ menu. - Shortcuts: while a worktree view is active,
AppShellhands the board’s actions toShellViewModel.worktreeActions(find, the Worktree menu’s catalog entries andrunFromMenu, clear selection), andAppMenuBarshows View > Find and a Worktree menu with Cmd/Ctrl+O (open the selection in the default runner), Cmd/Ctrl+Shift+O (open its “Open with…” menu, throughWorktreeBoard.openWithRequests), Cmd/Ctrl+Shift+C (copy its launch command), Cmd/Ctrl+Backspace (ask to delete it, ignored for the main worktree, while a dialog is open or while a text field has focus) and “Clear selection”; its items are disabled without a selection. Cmd/Ctrl+E, the former Herdr shortcut, stays one release as a hidden alias of Cmd/Ctrl+O, handled in the main window’sonPreviewKeyEvent. Text fields report their focus withModifier.trackTextInputFocus()intoTextInputFocus, which the board checks before running a shortcut action. Escape clears the text filter, or else the selection, through the main window’sonPreviewKeyEventinstead of a menu accelerator: on macOS the window only receives Escape’s key-up, so neither an accelerator nor a handler on the focused node sees it. The handler doesn’t consume the event.
Action catalog
Section titled “Action catalog”Every action is declared once in ui/actions as an ActionSpec: an ActionId with a stable key (worktree.open.orca), a scope (ActionScope: app, project, multirepo, worktree, machine), a group (ActionGroup: open, copy, provision, resources, manage, destructive, in menu order), a label, an ActionIcon, an optional ActionShortcut, an Availability (available, hidden when its tool isn’t installed or it can never apply, or disabled with a translated reason), whether it is agent-aware and the ConfirmKind it needs. worktreeCatalog(WorktreeActionContext, strings) builds a worktree’s catalog from the installed tools, the default runner, the project’s agents and the openings in progress; viewCatalog(ViewActionContext, strings) builds a view header’s. Both are plain Kotlin, unit-tested without Compose, and ProjectWorktrees.perform(worktree, id, agent) runs an id.
Every surface is a projection of the same catalog (ActionSurfaces.kt): the detail’s ActionBar (openWithEntries, iconActions, overflowEntries), the row’s context menu (contextMenuEntries, drawn by WorktreeContextMenu with a TaxilaneMenu at the pointer), the command palette (paletteEntries, with one item per other agent, such as “Open in Orca with Codex”, and nothing destructive), the tray (trayEntries) and the Worktree menu of the menu bar (menuBarEntries). toMenu turns the entries into MenuEntrys; agent-aware actions get a “with agent” submenu when the project has several agents.
The default runner is ToolsPreferences.defaultRunner: the runner saved in settings.json when it’s installed, else the first installed runner; a file without runner means Herdr. LocalToolDetector detects Herdr and Orca (DetectedTools.runners); until the first detection both count as installed. Without any runner the primary action falls back to the terminal, then the IDE, then the folder.
Rules for actions:
- A new action goes into the catalog, never as an
onClickwritten in a screen; the surfaces receive it. - One primary action per view: “New worktree” or “New change” in the header, the “Open in
” split button in the detail. - Placement ladder: the view’s purpose is the primary; a frequent action with a self-explanatory icon takes one of the three icon slots; opening in another tool is an entry of “Open with…”; anything else goes to ⋯ and the context menu, in its group; the palette receives everything except destructive actions.
- Destructive actions never go in a bar: they come last in ⋯ or the context menu, after a separator, in danger text. A filled danger button only confirms in a dialog.
- A new runner appears only in “Open with…”, in Preferences’ “Default runner”, as an origin, as the source of an agent state and in the removal dialogs’ notice; never with its own button, column or shortcut unless it is the default runner.
- A new agent is a property of the worktree: it’s chosen in “With agent” and launched through the “with agent” submenus.
Command palette
Section titled “Command palette”Cmd/Ctrl+K (View > Command palette) opens CommandPalette over the main window from any view, with the search field focused; Escape or a click outside closes it without running anything; while open it registers its dismissal with OpenMenus, so the main window’s Escape key-up handler closes it on macOS, where the dialog never sees the key press, without clearing the selection. ShellViewModel.isPaletteOpen holds its state and AppShell builds its index when it opens.
- Index:
buildPaletteIndex(projects, worktrees, machineResources, canCleanUp, strings, openActions, launchChoices, shortcutLabel)is a pure function that returnsPaletteItems of five kinds: views (Active, All worktrees, each visible machine resource), settings (Preferences, with the settings icon), projects, the worktrees of every project (WorktreeBoard.paletteWorktrees, with their state indicator) and actions (Add project, “New worktree in”, “Settings of ”, Clean up while there is something to clean, Reload, Toggle sidebar). With a worktree selected, the actions also include opening it in the terminal, the IDE or the folder ( OpenSelected) and, when its project has several agents, launching it with each other agent (LaunchSelected). Each item has a stable id, search keys, a primary action and, for worktrees, a secondary one (copy the launch command), which the palette’s footer names when a worktree is highlighted. No item deletes or removes anything. - Matching and ranking (
PaletteMatcher.kt, pure and unit-tested):matchScore(query, key)matches the typed letters in order, ignoring case and allowing gaps. An exact match scores above a prefix, which scores above a match with letters at word starts (after/,-,_, a space or a case change), which scores above any other match; ties inside a tier favor contiguous letters and fewer gaps. An item’s score is its best key; the project of a worktree is a weak key, so a worktree ranks below the project itself. Remaining ties go to the most recently used item, then to projects before views, actions and worktrees, then alphabetically. - Recent items: running a result records its id in
recentPaletteItemsofsettings.json(unique, most recent first, at most 20). With an empty query the palette lists them, dropping the ones that no longer exist, or the views before anything has been run. - Running a result: Up and Down move the highlight, Enter runs the primary action and Cmd/Ctrl+Enter the secondary one. Navigation goes through
ShellViewModel.navigate(destination, andThen), which usesrequestLeave, so unsaved project settings still ask before being discarded and the follow-up (select the worktree, open the create or clean up dialog) only runs once the user has confirmed. Selecting a worktree opens “All worktrees” with it selected (WorktreeBoard.revealInAllWorktrees), clearing the text filter, clearing that view’s local project filter when it excludes the worktree’s project, and expanding its project if needed.
Worktree status
Section titled “Worktree status”Each row shows a compact status and the detail pane the full one. ProjectWorktrees keeps it in statuses, a map from worktree path to WorktreeStatusState (Loading, Loaded or Unavailable):
- Once the list is read, the main branch is resolved with
ResolveMainBranchUseCase(exposed asmainBranch) and every worktree’s status is read withReadWorktreeStatusUseCase, at most 4 at a time. The list shows right away and each row shows a small progress indicator until its status arrives. - A worktree whose status can’t be read shows “Status unavailable” without affecting the others or the screen’s error. A worktree whose folder is gone (
isPrunable) shows “Folder missing” instead, and a locked one (isLocked, e.g. in use by an agent session) shows a neutral “locked” chip next to its branch. - Reloading the list reads every status again; each row keeps its previous status until the new one is read, and only worktrees seen for the first time show a loading state, so “Active” doesn’t regroup during a reload. Results from an older load are dropped. Creating a worktree reads only the new one’s status, and removing one drops its status.
The row’s Git cell shows uncommitted changes as ✎N in the warning color, the divergence from the main branch as ↑N ↓N (the main branch’s name in its tooltip), a merged branch as “merged” instead of that divergence, and a branch that never had commits of its own as a new worktree (never as merged). The detail’s Status section lists the changes, the merged and not started chips and the segments from statusSegments (in WorktreeDetailPane.kt): ↑N ↓N upstream, ↑N ↓N <main branch>, the last commit date (“commit 2 days ago”) and the creation date (“created 2 days ago”), as relative time (relativeTime, in RelativeTime.kt).
Auto refresh
Section titled “Auto refresh”While WorktreeScreen is shown, a DisposableEffect calls WorktreeBoard.startWatching(), and stopWatching() when it leaves the composition. The board runs a single ticker whose interval comes from the refresh cadence (RefreshCadence, see Refresh cadence): focusedCheck while the main window is focused, unfocusedCheck while it is visible but another app or window has the focus; if a check is still running when the next one is due, that one is skipped instead of piling up. While the window is minimized, closed to the tray or the app is hidden (Cmd+H on macOS, reported by rememberAppHidden() through AppHiddenListener), the loop suspends until the window is shown again, so no check runs in the background. A state the platform doesn’t report counts as shown and focused. Occlusion (a window fully covered by others) isn’t detected. On each check, every shown project that is idle (not loading, no create, remove or cleanup running) reads ReadGitMetadataFingerprintUseCase through ProjectWorktrees.checkFingerprint(): a project whose fingerprint changed reloads, and only that project. When every path that changed is an index file (index, worktrees/<name>/index, or their .lock), which agents and their tools touch all the time, it calls refreshStatuses() instead and counts as unchanged: the statuses are read again without listing the worktrees or reading devices, ports and sizes. Then the board calls DetectRunningAgentsUseCase once for the unchanged shown projects and every other loaded, idle project, so the sidebar’s agent indicators stay current, with an AgentSearch per project (its agent commands and its worktrees): processes, Herdr and Orca are read once and each agent is attributed to its worktree in any project. Then each shown project refreshes its emulators, simulators and background apps, at most once per devices interval of the cadence; a Start or Stop and a list reload refresh devices right away. Device reads resolve each worktree’s Git directories through the WorktreeEnvironmentCache, which keeps them while the worktree’s .git entry reads the same, so they don’t run git rev-parse on every check; only provisioning clears it. Use cases that do file work (creation, provisioning, provider reads) run on the IO dispatcher. refresh() stores the fingerprint it starts from, so a reload triggered by the app itself isn’t repeated on the next check. A manual reload (the button, View > Reload, the palette) reloads every shown project. When the window regains focus, WorktreeBoard.refreshOnFocus() runs a lighter refresh: for each shown project that isn’t busy and wasn’t loaded or refreshed in the last 5 seconds (ProjectWorktrees.lastReadAt), refreshStatuses() reads the statuses of the listed worktrees again without listing them, and the board detects agents once for all of them. It catches edits that haven’t touched the index, which the fingerprint can’t see; sizes, ports and devices aren’t read again.
Refresh cadence
Section titled “Refresh cadence”RefreshCadence (core) holds the five intervals the app refreshes at: focusedCheck and unfocusedCheck for the board’s checks, devices for device states, machineView for the shown machine view and summaries for the status bar summaries. ResolveRefreshCadenceUseCase derives it from the stored capacity profile, nothing else is saved: Light, Balanced (also for Custom) and One per worktree have their own values, and Automatic is Balanced with 16 GB of memory or more and Light below, or while PowerSource reports battery. PmsetPowerSource reads pmset -g batt on macOS; other systems use PowerSource.UNKNOWN, which counts as AC. The answer is kept for a minute and only asked for Automatic. AppContainer.refreshCadence() runs it on the IO dispatcher, and the board and MachineResources call it before each wait, so a profile chosen in Preferences applies from the next wait. AppShell derives a WindowActivity (FOCUSED, UNFOCUSED, HIDDEN) from windowShown and LocalWindowInfo.isWindowFocused and pushes it to both; a waiting loop ends its wait when the activity changes and starts the interval of the new one. Tying the cadence to the capacity profiles is a provisional decision, to be revisited with the Settings rethink on the roadmap.
Worktree overview
Section titled “Worktree overview”WorktreeScreen receives the project’s ProjectConfig to classify each row’s origin with classifyOrigin, together with Herdr’s worktrees folder, which ProjectWorktrees reads on each list load (herdrWorktreesRoot, through WorktreeUseCases.herdr), and Orca’s origins (orcaOrigins, from WorktreeUseCases.orca.origins, which OrcaWorktreeReader updates on every agent detection). After each list load, ProjectWorktrees also runs DetectRunningAgentsUseCase once for its worktrees (agents, null when processes can’t be listed) and queues size measurements with MeasureWorktreeSizeUseCase in the board’s SizeQueue (sizes, added up in totalSize; every worktree on a manual reload, only those without a size otherwise); sizes of worktrees no longer listed are dropped. It also reads each worktree’s reserved ports (ports, through WorktreeUseCases.readPorts, which resolves the environment with reserve = false, so opening the screen never reserves a port) and the detail’s Environment section shows them with portsLabel (PORT 20001 · api 20002).
- The row shows the origin (Taxilane, Claude Code, Herdr, Orca or other location) in muted text after the folder name, the most urgent running agent in the execution cell, and the “Inactive” state in its badge when
isInactiveholds; the detail repeats the origin as a chip and names the agents in its Agents section. An agent Herdr, Orca or Claude Code’s hooks report carries its state (“Claude · blocked”): warning for blocked, info for working, success for done and neutral for idle; one without a state is in the info color. - The detail’s Disk section shows the size (
formatSize, binary units with one decimal), and the project summary shows “N worktrees ·”.
Cleaning up worktrees
Section titled “Cleaning up worktrees”Each project’s cleanupCandidates come from selectCleanupCandidates over its listed worktrees and their loaded statuses. The “Clean up” action in the view’s header covers the projects shown in the view, and the one in a group’s header covers that project; each is enabled when some project in its scope can clean up (WorktreeBoard.canCleanUp(projectId)). It opens CleanupDialog over that scope (cleanupScope), which lists the candidates by folder name and branch under a heading per project (no heading in a filtered view) and offers “Also delete their local branches”, unchecked by default. Candidates with a running agent (keptForRunningAgent, from the agents the board already detected) are listed apart, disabled, with the agent’s name, and never removed. Confirming runs ProjectWorktrees.cleanUp(options) for each project in scope, one after the other (CleanUpWorktreesUseCase), shows a progress indicator with the dialog’s actions disabled, then closes the dialog, shows one “N worktrees cleaned up” message with the totals of every project (cleanupSuccess) and reloads them. Failures and kept branches stay visible in each project’s group in CleanupIssues until dismissed. When the dialog opens, each project in scope looks up which of its candidates are open in Herdr (openInHerdrPaths, through WorktreeUseCases.herdr.openWorkspaces, which is empty when Herdr isn’t available) without blocking the dialog; those candidates are marked “open in Herdr” and a notice says their workspace, and the agent in it, will be closed. Workspaces that fail to close are listed in the project’s herdrCloseFailures and shown in its group by HerdrCloseFailures; headless apps that couldn’t be stopped, from a removal or a cleanup, go to headlessStopFailures and are shown by HeadlessStopFailures. In the same way, the candidates with Orca terminals (orcaTerminalPaths, through WorktreeUseCases.orca.withTerminals, empty when Orca isn’t running) are marked “open in Orca” with their own notice, and terminals that fail to close go to orcaCloseFailures, shown by OrcaCloseFailures.
Provider options follow the projects in scope: each one is offered when at least one of them declares its provider, and applies only to the worktrees of the projects that declare it.
When a project declares the Gradle provider, the dialog also offers “Also stop the idle Gradle daemons of the worktrees being removed”, checked by default (cleanupStopGradleDaemons): stopping an idle daemon only costs a restart on the next build. Before cleaning up, cleanUp lists the daemons with the worktrees as they were; after the removals it stops the idle ones whose last build was in a removed worktree (idleDaemonsOfRemovedWorktrees, StopGradleDaemonsUseCase). The success message then adds how many daemons were stopped and kept. A daemon that can’t be listed or stopped never turns the cleanup into a failure.
Android emulators
Section titled “Android emulators”Only for repositories whose .taxilane.json declares the emulator provider (EmulatorUseCases.declared, read on every list load); otherwise nothing below is shown and no Android tool runs.
- Worktree row and detail:
ProjectWorktreesloadsemulators(ReadEmulatorStatesUseCase, oneadb devicesfor all rows, no reservation) after each list load and on each auto-refresh tick without changes. The row shows a device chip while the emulator boots or runs, and the detail’s Devices section showsEmulator · emulator-5556 · runningwith Stop, or Start when stopped; a worktree that never started its emulator shows a “Not acquired” chip with Start, and one whose emulator was released shows below it “Released forat - Cleanup: the dialog adds “Also stop the emulators of the worktrees being removed”, checked by default (
cleanupStopEmulators). The serials of the candidates’ running emulators are taken from the loaded states before removing (removal deletes their reservations) and stopped after (stopSerials); the success message adds how many were stopped. - Project configuration:
EmulatorSettingsSectionshows the “Android emulator” section whenProjectConfigViewModel.emulatorSectionisn’tHidden: the AVD list loaded in the background throughAppContainer.loadAvds(with “Automatic” first, and a saved AVD the machine lacks marked as missing), the “Run without a window” switch, and the SDK-not-found message with the places checked. The settings are saved inProjectConfig.emulatorand count as unsaved changes. The section follows the base repository path as it’s edited.
iOS simulators
Section titled “iOS simulators”Only on macOS and for repositories whose .taxilane.json declares the iOS simulator provider (SimulatorUseCases.declared, read on every list load); otherwise nothing below is shown and no Xcode tool runs.
- Worktree row and detail:
ProjectWorktreesloadssimulators(ReadSimulatorStatesUseCase, onesimctl list devicesfor all rows, nothing created) after each list load. The row shows a device chip while the simulator boots or is booted, and the detail’s Devices section showsiOS simulator · bootedwith Stop, or Start when it’s shut down; a worktree that never started its simulator shows a “Not acquired” chip with Start.startSimulator(worktree)marks the worktree instartingSimulators, runsStartWorktreeSimulatorUseCase(which acquires the simulator from the simulator pool if needed, waits for the boot and opens it in Simulator or Device Hub) and reloads the states; errors go to the worktree’sactionErrors, shown in its detail. - Cleanup: the dialog adds “Also delete the iOS simulators of the worktrees being removed, and orphaned Taxilane simulators”, checked by default (
cleanupDeleteSimulators), and lists the orphaned Taxilane simulators (orphanedSimulators, loaded with the list) that will be deleted too. “Clean up” is enabled when there are orphans even without candidates (canCleanUp). The candidates’ UDIDs are taken from the loaded states before removing and deleted after, with the orphans, looked for again after removing (a worktree whose folder was already gone has no readable simulator before, and becomes an orphan once removed); the success message adds how many were deleted. - Project configuration:
SimulatorSettingsSectionshows the “iOS simulator” section whenProjectConfigViewModel.simulatorSectionisn’tHidden: runtime and device dropdowns built from the machine’s iOS runtimes (AppContainer.simulatorSetup, “Automatic” first, a saved name the machine lacks marked as missing), and, in a Kotlin Multiplatform repository whose KMP tests aren’t wired (KmpTestWiring), the repository snippet with Copy and “Install for every project on this machine”, which installs the Gradle init script only after a confirmation dialog. The settings are saved inProjectConfig.simulatorand count as unsaved changes.
Open in Herdr
Section titled “Open in Herdr”“Open in Herdr” comes from the action catalog: it’s the detail’s primary action when Herdr is the default runner and an entry of “Open with…” otherwise, and it’s hidden when Herdr isn’t installed. openInHerdr(worktree, agent) marks the worktree in openingInHerdr (the action is disabled with a progress indicator meanwhile). When Herdr already reports an agent in the worktree, it focuses that agent’s pane (HerdrClient.focusAgent); otherwise it runs WorktreeUseCases.herdr.open (OpenWorktreeInHerdrUseCase, built in AppContainer with CliHerdrClient) with that worktree and the worktree’s agent, or the one picked. The success message says the worktree was opened with its agent, that its agent was started in its already open workspace, or that it was already open and Herdr switched to its agent (WorktreeSuccess.OpenedInHerdr with the HerdrOutcome); a missing herdr, a failing command or an agent that didn’t start goes to the worktree’s actionErrors, shown in its detail with the link to herdr.dev, Herdr’s own message, or the pane and command.
Removing a worktree also releases its providers’ resources and closes its Herdr workspace. Before the removal, ReleaseWorktreeResourcesUseCase.plan reads its running emulator, booted simulator and idle Gradle daemons, and after it release stops them in the background, ignoring failures. A failed removal shows its error inside the remove dialog (removeError), which can’t be dismissed while the removal runs, and a successful one clears the selection when it pointed at the removed worktree. For Herdr, requestRemoval looks the worktree up the same way as the cleanup dialog (pendingRemovalOpenInHerdr) and the remove dialog adds the notice when it’s open; a failing close shows the removal’s success together with a HerdrCloseFailures warning in the project’s group naming the worktree and Herdr’s message. Orca works the same way: pendingRemovalHasOrcaTerminals adds the Orca notice, and orcaCloseFailures the warning.
Open in Orca
Section titled “Open in Orca”“Open in Orca” comes from the action catalog like “Open in Herdr”: the primary action when Orca is the default runner, an entry of “Open with…” otherwise, with its “with agent” submenu when the project has several agents. openInOrca(worktree, agent) marks the worktree in openingInOrca and runs WorktreeUseCases.orca.open (OpenWorktreeInOrcaUseCase, built in AppContainer with CliOrcaClient), which does its own live-agent check, so the view doesn’t look up a pane first. The success message says whether the agent was started in a new terminal or a running agent was focused (WorktreeSuccess.OpenedInOrca with the OrcaOutcome); a missing Orca, an Orca that didn’t start, a failing command or an agent that didn’t start goes to the worktree’s actionErrors, with the link to onorca.dev, Orca’s message, or the terminal and command as technical details.
Machine resources
Section titled “Machine resources”Gradle daemons, Android emulators, iOS simulators and Xcode DerivedData belong to the machine, not to a project, so they have their own views (ui/machine/), across every saved project, opened from the status bar at the bottom of the main window. AppShell lays out a column with the sidebar and content row and, below a divider, MachineStatusBar (28 dp, a single line, always shown). It starts with a “Machine” item that selects ShellDestination.MachineOverview (saved as machine), whose MachineOverviewView lists machineStatusItems for MachineResources.overviewResources (the visible resources plus the desktop turn, with overviewSummaries, which always hold the turn’s summary) and, when no project declares a provider, explains how to declare one. Its other items come from the pure machineStatusItems(resources, summaries, failures, strings): one MachineStatusItem per visible resource in a fixed order (Desktop, Gradle, emulators, simulators, DerivedData, Maven, Compose) with a short name, a mono figure (pool inUse/limit when a limit applies, else the count; DerivedData size / quota or the size; the desktop holder and waiters), a tooltip with the full title and summary, and an attention Status (warning over the pool limit or the DerivedData quota, danger when MachineResources.summaryFailures holds the last read’s failure, whose describe summary goes in the tooltip, unless the failure is a missing or optional tool, isMissingTool(): the Android SDK not found, Docker unavailable or iOS simulators unsupported, which keep the neutral colors). A null figure (not read yet, or sizes still being calculated) is drawn as a dash. Each item is a button (interactive, the theme’s focus ring, Role.Button with the tooltip as its description) that selects ShellDestination.Machine, with its tooltip opening above it (WithTooltip(side = TooltipSide.Above)) because below there’s no room and the popup would cover the item and take its click; the shown view’s item is selected, and in the rail layout items drop their short name. An item is shown only when some saved project declares its provider (MachineResources.visibleResources, from ProjectWorktrees.declaredResources; iOS simulators and DerivedData also need macOS). The destination is ShellDestination.Machine(resource), saved as machine:<RESOURCE>; if the board has loaded every project and the resource is no longer visible, the shell falls back to “Active”. The “Desktop” item (MachineResource.DESKTOP_TURN) is the exception to providers: it is visible while DesktopTurnWatch.isActive (someone holds or waits for the desktop turn) or while its view is shown. DesktopTurnWatch, built in AppContainer over ReadDesktopTurnUseCase and ReleaseDesktopTurnUseCase.force, is shared by MachineResources (refreshed on every summary tick and while its view is shown), the WorktreeBoard (refreshed on every watch tick, for the rows and the detail) and the detail’s and view’s “Release”, which asks first (pendingRelease, ReleaseDesktopTurnDialog).
MachineResources is the shell-scoped state holder, built in AppShell over AppContainer.machineUseCases (MachineUseCases: machine-wide Gradle and DerivedData use cases that need no repository, plus the per-project emulator and simulator ones, all delegating to the existing use cases and their rules). It reads the projects from the board as MachineProject (worktrees, or null while that project’s list is loading, the providers it declares, its Gradle settings and build cache state, whether it declares compilation caching). A loader runs only while its view is shown: at the cadence’s machineView interval for daemons, emulators and simulators (no more often than unfocusedCheck while the window is in the background, right away when it regains focus), and once on opening and on View > Reload for DerivedData, whose sizes are expensive. A separate tick at the cadence’s summaries interval (runSummaryTicks, restarted when the declared set changes) refreshes only the status bar summaries, recording in summaryFailures the failure of each read (cleared when it succeeds again, the last summary kept); the DerivedData size is read once and then kept. AppShell passes the same WindowActivity it gives the board to MachineResources.setWindowActivity: while the window is minimized, in the tray or the app is hidden, the shown view’s loader suspends and the summary tick only trims Gradle daemons to the pool limit, so the pool stays bounded while agents work; both refresh at once when the window is shown again. Every MachineUseCases call runs on MachineResources’ ioDispatcher (Dispatchers.IO by default; tests pass their test dispatcher) and only the results are written back on the Compose scope, because those use cases read settings and reservation files under locks; DesktopTurnWatch’s read and forceRelease switch to IO in AppContainer for the same reason.
Owners are computed from the board’s worktree lists, never by running git worktree list again: attributeToProjects (in core) picks the deepest worktree of any saved project containing the folder (Owned(projectId, worktreePath)), or RemovedWorktree when the folder no longer exists, or Outside, or Loading while a project that could own it hasn’t loaded. The CLI keeps its per-repository attribution. In the views, an owner is a link that selects that worktree in “All worktrees” (WorktreeRef).
Pools. Each of the emulator, simulator and Gradle daemon views starts with the usage of its pool (PoolUsageSection: “1 of 2 in use” in the data font and the profile, “Automatic”, in the interface font, an “Over the limit” chip when more are in use than the limit allows, and a link that opens Preferences), followed by the dismissable notices of what was released: MachineResources.startEmulator and startSimulator keep a PoolNotice for each PoolRelease of the start, and the summary refresh keeps a single one for the idle Gradle daemons it stopped, which each later trim updates with the running total, the number of trims and the time of the last one until the banner is dismissed. When the Gradle pool is over the limit and none of its daemons is idle (buildsHoldingPool), nothing can be trimmed until a build ends, which is expected with long-running builds such as hotRun or bootRun: the chip becomes an informational “Over the limit: builds running” and a line under the usage says how many daemons are running a build and how many have an unknown state; the status bar item then keeps its neutral colors and says so in its tooltip (MachineSummary.poolHeldByBuilds). The Gradle daemons view’s summary counts Gradle and Kotlin compile daemons apart, since only Gradle daemons belong to the pool. MachineResources.pools is read with ReadResourcePoolUseCase each time a view loads and on every summary tick, and the status bar items show in use/limit. The 30-second summary refresh also runs TrimGradleDaemonsUseCase when a saved project declares the Gradle provider. A worktree row whose device was never acquired shows “Not acquired” with Start.
Every Machine list draws its rows with MachineRow (a one-line DataRow that isn’t selectable, its cells built with machineCell and machineActionCell over shared ColumnSpecs), and both device views start with a column header row (MachineColumnHeader, a DataHeader: device, worktree, state).
- Gradle daemons: one row per daemon (kind and version, PID, memory, “busy” / “idle · 12 minutes ago” / “state unknown”, owner), a “Stop” button per row and “Stop idle daemons”. A button is enabled only for daemons the stop rules allow (
isStoppable: an idle Gradle daemon, or a Kotlin daemon while no Gradle daemon is busy or unknown);StopGradleDaemonsUseCasechecks the state again anyway. The result (daemonStopReport) stays until dismissed. Below, each declaring project’s worktree build settings (e.g. “api · Worktree builds: 2 GB heap · idle after 30 min”,formatMemorySettingturns2ginto “2 GB”) and the build cache note for each declaring project that has it off. - Android emulators: the emulator of every worktree of the declaring projects (serial, or the AVD it will start when stopped: the project’s AVD setting, else “Automatic”; owner, state, Start or Stop through the same use cases as the worktree’s detail, after which that project’s board state is reloaded so both places agree), and, apart, running emulators no worktree owns (
adb devicesminus the reserved serials), with Stop. Listing reserves no port. - iOS simulators: every Taxilane simulator (or “Not created” with the configured device type for a worktree without one) with its owner, state and Start or Stop, and the orphaned ones (
DeleteSimulatorsUseCase.orphans) apart, with “Delete orphans” behind a confirmation dialog. Simulators not created by Taxilane aren’t listed. - Xcode DerivedData: every folder (workspace, size, last access, owner), the total, the orphans’ count and size with “Delete orphans” behind a confirmation (disabled without orphans, running
DeleteOrphanedDerivedDataUseCase), folders on unavailable volumes shown as kept, and the compilation cache size when any saved project declares it.
ProjectWorktrees no longer loads daemons or DerivedData for display. It still reads the provider declarations (isGradleRepository, isXcodeRepository, gradleSettings, isGradleBuildCacheEnabled, hasCompilationCache) and the DerivedData orphans, which the cleanup dialog needs. A project’s group header shows a small “Gradle” chip when it declares the provider, linking to the Gradle daemons view.
Launch command
Section titled “Launch command”The detail’s “Copy launch command” icon, the row’s hover icon and context menu, and Cmd/Ctrl+Shift+C on the selected worktree call ProjectWorktrees.copyLaunchCommand(worktree, picked); the row’s icon shows a “Copied” state for a couple of seconds. The command (cd <quoted path> && <agent command>, with the worktree’s agent) is pasted by the user in the terminal of their choice.
Opening in a terminal, an IDE or the file manager
Section titled “Opening in a terminal, an IDE or the file manager”ToolsPreferences (shell-scoped, built in AppContainer) holds the detected terminals and IDEs (LocalToolDetector, run once at start-up in the background and again when Preferences opens) and the choice saved through JsonToolPreferenceRepository; until a terminal is chosen, the first detected one is preselected in Preferences. editorFor(override) gives the project’s editorOverride when this machine has it, else the default IDE.
- Open in terminal:
ProjectWorktrees.openInTerminal(worktree, agent)runsOpenWorktreeInTerminalUseCasewith the chosen terminal. With none chosen yet, it setsterminalChoiceForand the screen asks which detected terminal to use, saving the answer. The macOS refusal to let Taxilane control Terminal or iTerm2 (TerminalAutomationRefused) gets its own message explaining where to allow it in System Settings. - Open in Claude Desktop: offered on macOS when
LocalToolDetectorfinds Claude Desktop (DetectedTools.claudeDesktop).openInClaudeDesktop(worktree)runs theClaudeDesktopLauncher(MacClaudeDesktopLauncher), which executesopen claude://code/new?folder=<encoded path>&source=taxilaneand starts a new Claude Code session with the worktree as its working directory (it can’t focus an existing one). The link is the one Claude Desktop’s own Finder action uses but it isn’t documented, so it may change; it lives in a single constant, covered by a test. - Open in IDE and Open folder:
openInEditor(worktree)andopenFolder(worktree)run theEditorLauncherof the project’s IDE and theFolderLauncher(WorktreeUseCases.tools).
They are catalog actions (ActionId.Open with OpenTarget.TERMINAL, EDITOR, CLAUDE_DESKTOP, FOLDER), labelled with the tool’s name and hidden when the tool isn’t available. Errors go to the worktree’s actionErrors.
Agents
Section titled “Agents”A project’s agents are ProjectConfig.agents; AgentUseCases (built per project in AppContainer) combines them with AgentChoices, the shell-scoped, observable copy of settings.json’s worktreeAgents. agentFor(path) is the worktree’s agent (WorktreeAgents.agentFor), choose(path, agent) remembers a non-default one, and prune drops the choices of worktrees that are no longer listed, on every list load.
With a single agent nothing of this is visible. With several (hasAgentChoice), “Open with…” has a “With agent” section that sets the worktree’s agent without launching (ActionId.ChooseAgent), the agent-aware actions (Herdr, Orca, the terminal, copy launch command) have a “with agent” submenu that launches with another agent, which also becomes the worktree’s agent, the primary action’s tooltip names the worktree’s agent, and the palette offers one item per other agent (“Open in Orca with Codex”).
Menu bar and tray
Section titled “Menu bar and tray”Where SystemTray.isSupported(), main.kt adds a Compose Tray (TaxilaneTray) while TrayPreferences.isIconShown (Preferences can hide it, showTrayIcon). Its icon is Taxilane’s mark: a monochrome template picked from the system’s dark mode on macOS, which follows appearance changes, and the colored tile elsewhere (rememberTrayIconPainter). Clicking it shows the main window.
- Menu:
buildTrayMenu(strings, recentProjects, recentWorktrees)is a pure function that returnsTrayEntrys: “Show Taxilane”, “New worktree…”, the recent projects, the recent worktrees, Preferences and Quit. Each worktree is a submenu with “Show in Taxilane”, “Open in”, “Open with ▸” with its other open actions and “Copy launch command”, from the action catalog ( trayEntries), labelled<branch or folder> — <project>, prefixed with “● “ while an agent works in it and “! “ when it needs the user (worktreeActivity, from what the board already loaded; a project not loaded yet shows its worktrees without prefix and with “Show in Taxilane” only). - Recents:
ShellViewModelrecords a project when its view opens (recentProjects, 5) and a worktree when it’s selected, created or launched (recentWorktrees, 8RecentWorktrees), most recent first, insettings.json, and prunes removed projects and worktrees when a project’s list loads. The palette’s recents are separate. - Actions (
TrayAction) go through the same view model and board as the window: “Show in Taxilane” reveals the worktree in “All worktrees”, “New worktree…” opens the window and the create dialog for the last project used, and launches use the worktree’s agent. A launch that fails (TrayLaunchWatchcompares the worktree’s action error before and after) opens the window with the worktree selected, so its error is visible; so does a launch that needs the terminal to be chosen. - Keep running:
keepRunningInTray(off by default, available only with the icon shown) makes closing the main window hide it instead of quitting (seemain.kt).
Claude Code hooks and the command-line tool
Section titled “Claude Code hooks and the command-line tool”ClaudeHooksState backs both the hooks section in Preferences (ClaudeHooksSection) and the notice above the worktree board (ClaudeHooksNotice). It also holds the status of the taxilane command, computed by the CommandLineTool use case (AVAILABLE, INSTALLED_NOT_ON_PATH, BROKEN or MISSING; see Infrastructure). The hooks’ “Install” and “Update” are disabled until the command is usable, with the reason under them, and both places show the prerequisite with its action (“Install command-line tool”, “Repair” when the launcher points at an app that is gone) or, for a build that isn’t an installed app, the manual steps for the operating system. “Remove” for the hooks is never gated. The notice and the Preferences button use the primary button style, and the notice keeps its “Dismiss”.
Guided tour
Section titled “Guided tour”TourState (in AppContainer, as tour) drives the tour through TourActions: CreateTourUseCase and EndTourUseCase from the domain, the tour project and leftover folder lookups (TourLocation), the command-line tool check through the shared ClaudeHooksState, and the tourOffered setting. Its step is null while closed, then EXISTING (a tour project or folder already exists: open it or restart), WELCOME, TOOL (only when taxilane isn’t available; it reuses CommandLineToolPrerequisite, so installing there also updates Preferences and the hooks notice), CREATING (with the error and a retry when it fails) and OPEN_AGENT. Starting the tour or dismissing TourNotice sets tourOffered, so the notice for people who already had projects shows once. AppShell shows TourDialog, TourNotice as one line in the sidebar’s footer (an icon on the rail), and TourBanner when the destination is the tour project. The ways to open the agent are a composable slot that AppShell fills with TourAgentChoices, which selects the sample’s main worktree and offers its holder’s terminal, Herdr, Claude Desktop and copy actions with the project’s default agent; the slot keeps the dialog and the banner testable without a board.
Update check
Section titled “Update check”UpdateState (built in AppContainer over CheckForUpdateUseCase, GitHubReleaseSource and JsonUpdatePreferenceRepository) is the shell’s update state. checkInBackground() runs the automatic check and, when a newer version is available, sets notice; failures are ignored. The UpdateNotice banner at the top of the main content says which version is out and which is running, with “What’s new”, the channel’s reminder (the command with “Copy”, or the installer with “Download” and, for a .deb, the apt command), “Skip this version” (skipVersion(), saved as skippedVersion) and close (hides it until the next start). It never takes focus.
Both “What’s new” and the notice’s ⓘ icon (Notice’s optional onIconClick, which turns its leading icon into a button with a tooltip) call showNotes(available), and ReleaseNotesDialog shows notes until closeNotes(): titled with the newest version, a scrollable body with one section per VersionNotes of UpdateCheck.Available.notes (headed by its version when there are several), “View on GitHub” (the newest release page) and “Close”. It stacks over UpdateCheckDialog when opened from it. Each version’s notes are ReleaseNotes.forLanguage(LocalStrings.current.language), so switching language with the dialog open shows them in the new one; a version without notes says so. The notes are rendered by MarkdownText (ui/components): Markdown.parse turns the text into headings, bullets with one nesting level and paragraphs with bold, code, links and bare URLs, and links call UpdateState.open.
Help > “Check for Updates…” runs checkNow(), which reports in UpdateCheckDialog whether the app is up to date, a newer version with the same actions, or the error. Preferences’ “Check for updates automatically” (checkForUpdates, on by default) controls the automatic check. The app never downloads or runs anything itself; commands are copied as text.
Project settings
Section titled “Project settings”ProjectSettingsView (ui/projectconfig) hosts the ProjectSettings and AddProject destinations. An existing project’s title is “Settings · .taxilane.json), Agent and, when the repository declares them, Android emulator and iOS simulator. Sections are separated by a heading, not cards, with each field’s label above it and its help below. From 1000 dp of content width a section index sits on the left: activating an entry animates the scroll to the section, and the entry for the section in view is highlighted.
ProjectConfigViewModel shows a required-field error only once the field was edited (touchedFields) or a save was attempted (saveAttempted), through isErrorVisible. “Save” is always enabled: submit() returns SaveOutcome.Invalid with the first invalid field, which the view focuses, or saves. A save bar slides in at the bottom while hasUnsavedChanges holds, with “Discard” and “Save”; while adding a project it always shows “Cancel” and “Add project”. File > Save (Cmd/Ctrl+S) is enabled by ShellViewModel.canSaveSettings, which the view keeps up to date, and reaches the view through saveSettingsRequests.
Besides the name, validation (firstInvalidField) rejects a blank worktrees folder, an agent without a command, two agents with the same display name, and a base repository path that another project already uses (duplicateProject) or that isn’t a repository’s top level.
The Agent section lists the project’s agents in order (AgentDraft: name, command and Headroom switch, off for a new agent), the first marked as default, with add, remove and “Make default”, which moves an agent into agentLaunchConfig. Below them, the IDE this project opens with on this machine (editorOverride, “Default” or one of the detected IDEs; a saved IDE the machine lacks is marked as missing).
The “Repository configuration” section (RepositoryConfigSection, between Worktree files and Agent) edits the repository’s .taxilane.json instead of the project’s own settings. ProjectConfigViewModel keeps it as an immutable RepositoryConfigDraft (providers on or off with their options as text, the env rows and envFile), compared with the draft read when the settings opened to count as unsaved changes. Validation (RepositoryConfigDraft.problems) uses RepositoryConfigRules from core, the same rules the readers apply, and the typed RepositoryConfigIssues are rendered by Strings.repositoryConfigIssue. iOS simulator and Xcode are only offered on macOS, but their declarations are kept in the draft and written back. An unreadable .taxilane.json (RepositoryProvisioningState.Unreadable) leaves the section read-only with the reason. When the repository declares post-creation commands, variables or an environment file, the section lists them with “Approved on this machine” or “Not approved” and the action to approve or revoke them (JsonRepositoryTrust). Saving the environment approves what was saved, provided the repository was approved before the save or declares no post-creation commands, so a save never approves commands the user didn’t. The editor rejects reserved names and templates with line breaks or control characters with the same rules as the readers.
Saving runs in this order: validate (SaveOutcome.InvalidRepositoryConfig scrolls to the section), show the resulting file in a dialog before the first repository write of the visit (SaveOutcome.NeedsPreview; cancelling keeps the edits and saves nothing), write .taxilane.json through RepositoryProvisioningSource.write with the content hash recorded when the settings opened (RepositoryProvisioningSource.fingerprint), and only then save the project. Moved local files and provider edits go in the same write. If the file changed on disk the write is refused with WorktreeError.RepositoryConfigChanged and the section offers to reload; any write failure leaves the project unsaved. Reloading the file from disk shows the preview again before the next write. After a repository write the shell asks WorktreeBoard to reload the project’s holder, which refreshes the providers the machine views, the status bar and the worktree detail read. The emulator and iOS simulator sections are labeled “This machine only”; the preferred AVD, device and runtime live in this section because they are repository configuration.
The view registers its ProjectConfigViewModel as the shell’s LeaveGuard. ShellViewModel.requestLeave runs a navigation (sidebar, shortcuts, menu entries) or the window close only when the guard has no unsaved changes; otherwise it keeps it as pending and AppShell asks to discard, with confirmLeave or keepEditing resolving it. The window’s close request, File > Quit and the macOS quit handler all go through it. The save bar’s “Discard” is already the user’s answer: it resets the form and leaves without asking again (discardForm).
Editing the base repository path only updates the text; the repository is read again once the path settles (400 ms after the last keystroke, on focus loss, or after Browse or a drop). The same repository keeps the unsaved repository edits; a different one with unsaved repository edits asks before discarding them. Browse checks the folder like “Add project” does.
“Add project” starts by choosing the repository folder, with the picker or by dropping a folder on the window (folderDropTarget, which only accepts a single directory and outlines the window while hovering). AppContainer.inspectRepository resolves the folder to its repository’s top level with ResolveRepositoryUseCase and detects the main branch with ResolveMainBranchUseCase; ProjectConfigViewModel.chooseFolder then prefills the name, the <folder>-worktrees folder next to the repository and the detected branch as the main branch placeholder. A folder that isn’t a Git repository is rejected with a message and the form stays closed. The prefilled values count as the form’s initial values, so an unedited prefilled form has no unsaved changes.
Repository provisioning and local files
Section titled “Repository provisioning and local files”The configuration form has two file sections:
- From the repository (read-only): the patterns of the base repository’s
.taxilane.jsonand.worktreeinclude, each with the file it comes from.ProjectConfigViewModel.repositoryProvisioningholds aRepositoryProvisioningState(None,Declared, orUnreadablewith the file and the parse error), read throughRepositoryProvisioningSourcewhen the form opens and every time the base repository path changes. - Local files: the project’s
secretFiles, exact paths of files or folders stored only in~/.taxilane/projects.json. A folder brings every file under it when a worktree is created or provisioned;keysandkeys/are the same entry.
“Move to .taxilane.json” (moveLocalFilesToRepository) is offered when some local file is inside the repository (relative, not starting with ..) and .taxilane.json isn’t unreadable. It turns those entries into patterns anchored to the root (local.properties → /local.properties), lists them under “From the repository” marked “on save”, and removes them from the local list; absolute entries stay local. Nothing is written yet: pending patterns count as an unsaved change, so cancelling discards them. save() returns Result<Project>: it first appends the pending patterns with addCopyPatterns, then saves the project; if writing the repository file fails, the project isn’t saved and the screen shows the error above the buttons, keeping the form open.
Moving a repository
Section titled “Moving a repository”When the user edits a project because its repository moved on disk:
ProjectConfigViewModelturns absolute local file or folder entries inside the base repository into relative ones, so they follow the repository, and drops a trailing separator so a folder has one spelling.- Changing the base repository path also moves the worktrees root when it was inside the repository, its parent or a sibling folder, unless the user edited it by hand (
RepositoryRelocation.kt). - After saving with a different base path or worktrees root,
ShellViewModel.onProjectSavedselects the view filtered to the project with the previous worktrees root, andWorktreeBoard.repairAfterMoverunsRepairWorktreesUseCaseon that project before listing. A failed repair stays visible as an error. - The board recreates a project’s
ProjectWorktreeswhen its configuration changes, not only its id, so an edited project never reuses use cases bound to the old paths.
List loads are tagged with a generation number: a result is only applied if no newer load started meanwhile, so a slow earlier load can’t overwrite a newer state (or clear a newer error).
Shared components (ui/components)
Section titled “Shared components (ui/components)”Spacing: spacing scale (xxs=2dp,xs=4dp,sm=8dp,smd=12dp,md=16dp,lg=24dp,xl=32dp) used instead of ad hocdpvalues. Component-internal sizes, such as icon sizes, are named constants.SegmentedSelector<T>: compact segmented control (28 dp, the control radius, the accent container on the selected option) for a small, fixed set of options that should all be visible at once (e.g.CreateMode,BranchType). Each option is a radio button in a selectable group, and its label is sized to its full text (Modifier.width(IntrinsicSize.Max)).DropdownSelector<T>: dropdown (ExposedDropdownMenuBox) for longer or dynamically loaded lists, with optional collapsible groups (groupBy) and disabled options (enabled), which are ignored whatever the input method.SectionCard: titledOutlinedCard, used to group sections of a long form (every section ofProjectSettingsView).- Keyboard shortcuts (
KeyboardShortcuts.kt):onEnterKeytriggers the main action of a text field (e.g. adding a local file), andonNewItemShortcutbinds Cmd+N (macOS) / Ctrl+N (other systems) to opening the “New worktree” dialog.
Theme (ui/theme)
Section titled “Theme (ui/theme)”AppTheme applies the light or dark color scheme from the stored ThemeMode, chosen in the Preferences window. In SYSTEM mode, rememberSystemInDarkTheme polls the OS theme every second, because Compose Desktop’s isSystemInDarkTheme() doesn’t react to changes while the app is open.
Design system
Section titled “Design system”The theme and the shared components form the app’s design system. Screens use its tokens and components instead of literal colors, sizes or per-screen copies. The idea is an instrument panel: surfaces stay neutral and calm, color is kept for state, and each view has a single action in ink.
Palette
Section titled “Palette”Every Material 3 color role of the light and dark schemes is defined by the app (TaxilaneLightColorScheme, TaxilaneDarkColorScheme in Theme.kt), so no dialog, menu or selected control falls back to Material’s baseline purple. The roles come from one cool neutral ramp (Neutral* in Color.kt):
primaryis ink: Neutral9 with white text in light, Neutral91 with Neutral6 text in dark, with neutral containers. It marks the one main action of a view (“New worktree”, “New change”, a dialog’s confirmation). Material controls that readprimary(switches, checkboxes, progress indicators) are ink as well.- Accent:
TaxilaneTheme.colors.accent(SlateBlue, withonAccent,accentContainerandonAccentContainer) is for the keyboard focus ring, links, the selected row (onaccentContainer), the active entry of an index and the palette’s cursor.tertiarykeeps the same values as an alias. It never conveys a status. - Brand:
TaxilaneTheme.colors.brandis the brand yellow, taxiway signage yellow (BrandYellow#F5C518in the dark scheme,BrandYellowLightScheme#A37800in the light one). It is reserved for a brand mark drawn directly on the app’s surfaces, which nothing draws today: the mark itself is always drawn inBrandYellowon its asphalt tile, or as a monochrome template in the macOS menu bar. The brand never appears on a control, a link, a focus indicator or a state, and its hue stays apart from every warning color, so a brand mark is never read as a warning. - Mark: Taxilane’s mark (a taxiway centerline with branches that curve off to parking stands) is defined once in
ui/brand/TaxilaneMark.ktas Java2D shapes on the unit square, drawn bydrawMarkas a template, a tile in yellow on asphalt (Neutral11), or a tile inset to Apple’s icon grid. The tray icon draws it at runtime. The packaging icons (desktopApp/icons/icon.{png,icns,ico}), the window and Dock icon resources and the docs logo and favicon (docs/assets/logo.svg,logo.png,favicon.png) are generated from it by./gradlew :desktopApp:exportBrandAssetsand committed; run it again after changing the mark (the.icnsneeds macOS). - Disabled:
disabledContentanddisabledContainerreach 3:1 on every surface; the shared buttons andIconActionuse them instead of Material’s 38 % alpha. - Scrim:
TaxilaneTheme.colors.scrimdims what’s behind an overlay panel, such as the worktree detail on a narrow window.
Status colors are separate tokens with one meaning each, exposed as TaxilaneTheme.status (TaxilaneStatusColors). Each status has a color for text and icons, an onColor, and a container/onContainer pair for chips and notices. attention is an alias of warning and active of info, so code can name the use:
| Status | Meaning | Examples |
|---|---|---|
| success | done or healthy | merged, device running, operation succeeded |
warning (attention) |
needs your attention, not broken | waiting for you, uncommitted changes, inactive |
info (active) |
work in progress | agent running, device booting |
| danger | failed or destructive | errors, missing folder, delete actions |
| neutral | plain state | new, locked, device stopped |
The mapping from worktree indicators and device states to a status lives in StatusMapping.kt. The “New” state badge is an outlined circle in the neutral color.
Contrast is checked by tests, not by eye: ThemeContrastTest uses contrastRatio (WCAG relative luminance) to assert that text reaches 4.5:1 and outlines 3:1 on every surface, in both schemes, together with ink on primary, the accent on every surface, text and status colors on the selection, disabled content at 3:1 and the elevation levels. ColorSchemeTest asserts that no role keeps Material’s baseline value or uses the brand yellow, that the brand’s hue stays at least 5° from its scheme’s warning colors, and that the primary container differs from the danger container.
Elevation
Section titled “Elevation”TaxilaneTheme.elevation has three levels, and borders carry the separation more than shadows:
| Level | Container | Border | Shadow | Use |
|---|---|---|---|---|
level0 |
surface |
none | none | the view |
level1 |
surfaceContainerLow |
1 dp outlineVariant |
none | panels and cards |
level2 |
surfaceContainerHigh |
1 dp outlineVariant |
4 dp | menus, dialogs, popovers (the command palette) |
Modifier.elevation(level, shape) draws a level.
The app bundles Geist for UI text and Geist Mono for data, in weights 400, 500 and 600, under desktopApp/src/main/resources/fonts/ with their SIL Open Font License (OFL.txt). Bundling them makes text render the same on macOS, Windows and Linux. Every Typography slot uses Geist, with sizes tuned for a dense desktop tool. TaxilaneTheme.typography adds the roles of the design system:
| Role | Style | Use |
|---|---|---|
viewTitle |
Geist 600 · 16/22 | one per view, in its header |
sectionTitle |
Geist 600 · 13/18 | group headers, settings sections, dialog titles |
eyebrow |
Geist Mono 500 · 10.5/14, +0.06 em, uppercase (Eyebrow) |
section labels and table columns |
bodyMedium |
Geist 400 · 13/18 | general text; buttons use labelLarge (500 · 13/18) |
bodySmall |
Geist 400 · 12/16 | second lines of rows, help and hints |
data, dataSmall |
Geist Mono 400 · 13/18 and 12/16, tabular figures | values |
Mono is for data, not for states: branches, paths, ports, PIDs, sizes and counts use data or dataSmall, so values that refresh don’t shift the layout; agent states (“working”, “busy”), relative dates written as text (“commit 3 h ago”) and project names use the sans.
Shapes, sizes and focus
Section titled “Shapes, sizes and focus”The radius scale has four steps, named in Shape.kt: ControlShape 4 dp (buttons, chips, fields), RowShape 6 dp (rows, menu items, Modifier.interactive), PanelShape 8 dp (panels, menus, the palette) and DialogShape 12 dp. TaxilaneShapes maps Material’s extraSmall to extraLarge onto 4, 6, 8, 12 and 12. No control is drawn as a pill.
Controls are 28 dp high in their compact size and 32 dp in forms and dialogs, with 10 dp of horizontal padding; icon-only actions are 28 × 28 dp. That is also the space they take: AppTheme turns off Material’s 48 dp minimum touch target (LocalMinimumInteractiveComponentSize), which only makes sense on touch screens. The layout widths are tokens in TaxilaneLayout: the sidebar between 196 and 240 dp, the inspector (the worktree detail) 320 dp, and the 760 dp breakpoint below which the detail is drawn over the list.
The focus ring (Modifier.focusRing) is 2 dp in the accent color. The theme raises the focused state layer of Material’s ripple, so keyboard focus is also visible on every Material control.
Shared components
Section titled “Shared components”- Buttons:
PrimaryButton(ink fill),SecondaryButton(outlined),GhostButton(no fill or border, secondary text color),DangerButton(danger fill),DangerTextButtonandNeutralTextButton. Each takessize(ButtonSize.Compactby default,Regularfor forms and dialogs) and sets its own label style, so screens never restyle a label. Labels stay on one line. A filledDangerButtonis only the confirm action of a confirmation dialog; where a destructive action is offered it’s aDangerTextButton, and an action in a view’s header that only opens a confirmation (such as “Clean up”) is aGhostButton. InlineProgress: the one inline spinner, inSmallandMediumsizes.Notice: error, warning, success and info messages with their status icon and color, the message and a dismiss action. It has adetailsslot for extra content.ErrorNoticebuilds on it for errors (summary, next step, fix, “Try again” and “Technical details”).StatusChip: a compact label on a status container color, with an optional icon.IconAction: a 28 × 28 dp icon-only action whose label is both its tooltip and its accessible description.Modifier.interactive: makes a custom row or header clickable, with a hover state, the hand pointer and a focus ring (Modifier.focusRing).ViewTitle,SectionTitle,GroupTitle: the title of a view, of a form section or dialog, and of a list group. Each declares itself a heading (semantics { heading() }), so a screen reader can jump between them;SectionCard,SettingsSection,TaxilaneDialogandMachineViewFrameuse them.Field,PathField: form fields with the label above a 32 dp input (never a floating label) and the help or the error below; the error replaces the help while it applies.PathFieldadds “Browse…”.inputModifierreaches the text input itself, for aFocusRequester,onEnterKeyor a test tag.FieldIconActionis the small icon action that fits inside a field, such as clearing the filter.DropdownSelector’s anchor is the same field, read-only.TaxilaneDialog: every dialog, in three widths (DialogSize.Small400,Medium520,Large680 dp), with a heading title, a body that scrolls when it doesn’t fit (scrollable = falsewhen the body has its own list), anoticesslot above the footer, and a footer with the dismiss action followed by the confirm action, aligned to the end.dismissible = falsekeeps it open while an operation runs.EmptyState,ErrorState,SkeletonRows: the empty, error and first-load states of an asynchronous surface (see below).StateActionis the label and callback of their action or link.InlineConfirmButton,InlineConfirmIconAction: controls that confirm a trivial action in place, showing a check and “Copied” for 1.5 s (rememberInlineConfirm).DisabledReason: wraps a control and, when it’s disabled for a reason, shows the reason in a tooltip and exposes it as the control’s state description.TaxilaneMenu: the app’s menu, a focusable popup at elevation level 2 with sections, separators, submenus (which can also be actions themselves), shortcuts, checked items and disabled items that explain why. Arrow keys move, Right opens a submenu, Left or Escape closes it, Enter activates.ContextMenuBoxopens one at the pointer on a secondary click. On macOS the window gets Escape instead of the popup, so the main window’sonPreviewKeyEventasksOpenMenus.handleEscape()to close the topmost menu before clearing the selection.ActionBar,SplitButtonandMoreMenuButton: the detail’s bar with fixed slots (one primary, at most three icons, ⋯), the primary split into its action and a ▾ that opens a menu, and the ⋯ icon that opens aTaxilaneMenu.DataRow,ColumnSpec,DataHeader: the row of every list (worktrees, Machine, the multirepo’s repositories). A row is a list ofDataCells, each with aColumnSpec: a fixed width or a share of the remaining width, and its compact behavior (Keep,Shrink(width)orHide), applied to every row of a list at once.RowLines.ONEandTWOset the 32 and 48 dp minimum heights. WithonSelectthe row is focusable, activated with a click, Enter or Space, and drawn on the accent container when selected; without it the row takes no focus.ActionSlotis a fixed-width slot at the end, shown on hover, while focus is inside the row, whilepinned, or always.DataHeaderlabels the columns in the eyebrow style with the same specs, so labels sit above their cells.InspectorSection: a section of the inspector, with its eyebrow label declared as a heading, an optional summary at the end of the label line, collapsible (remembered per section id) and aSectionState:Content,Loading(a skeleton row),Empty(message)orNotApplicable(not drawn).SectionCardstays for forms.PropertyList,PropertyRow: key and value rows, the key in the interface font at a fixed width and the value in the data font (or the interface font for a date or a state), selectable, with a copy action confirmed in place on copyable rows. A key or value that doesn’t fit is truncated and shows its full text in a tooltip.PropertyRowputs free content (a chip and a button) in the value column.AgentIndicator: an agent’s state as the agent icon (the robot of the “open agent” action) in its status color, its name and its state in the shared vocabulary (AgentPhase: needs you, done, working, running, idle), “+N” for the other agents, and a tooltip with every agent, the source of the state and when the agents were read. Compact shows the icon only, same size and color, with the label in the tooltip and the accessible name.AgentIndicatorSizesets the icon’s size by place:SMALL(12 dp) in the sidebar,MEDIUM(14 dp, the default, the size of the execution cell’s device icon) in the worktree row, the group headers by change and the multirepo header, andLARGE(16 dp) in the inspector’s Agent section.agentIndicator(...)inworktree/AgentIndicatorModel.ktbuilds it from the detected agents, adding where each agent runs (RunningAgent.runner(): Herdr when Herdr reports its pane, Orca when Orca reports its state, unknown otherwise). With anonClick, the indicator is a button with the hand pointer and the focus ring. The worktree row passes one whenagentFocusTarget(...)finds the most urgent agent in a known runner (clickToFocusadds “click to focus” to its tooltip line): the click selects the row and callsProjectWorktrees.focusAgent(worktree), which focuses the Herdr pane through the same path as “Open in Herdr”, or opens the worktree in Orca, which focuses its open terminal. Enter in the list callsWorktreeBoard.focusSelectedAgent(), and is left to the focused row when there is nothing to focus.GroupedNoticeandgroupNotices: one banner that summarizes several notices of the same kind and source, with “Details (n)” listing each one and a single dismiss.
Rules for states, disabled controls, notices and titles
Section titled “Rules for states, disabled controls, notices and titles”- Four states for every asynchronous surface. Loading shows
SkeletonRowson the first read only; a reload keeps the previous data with at most a small progress indicator. Empty shows anEmptyStatewith one action. An error is shown inside the scope that failed (the section, the group or the view), never in an enclosing one; when the whole surface can’t be read because an external tool is missing, it’s anErrorStatewith “Try again” and the raw message under “Technical details” (the Compose view without Docker). A section that doesn’t apply isn’t drawn. - A disabled control explains why. Its reason is typed in the ViewModel (
CleanupBlockinWorktreeBoard,DaemonStopBlockfor Gradle daemons), translated, and shown throughDisabledReason. A control that can never be used in its context isn’t drawn. - Notices are grouped. Notices of the same kind and source become one
GroupedNotice, and a scope shows at most one such banner: each machine view summarizes its release and trim reports (poolNoticeBanner). - Trivial actions confirm in place with the inline-confirm controls; global messages are for results the user isn’t looking at.
- Titles come from the title components, never from a
Textstyled as a title, so every heading is declared.
Rules for rows and the inspector
Section titled “Rules for rows and the inspector”- The inspector has a fixed order: header (branch, origin and path), actions, the worktree’s notices, then Status, Agent, Environment, Resources and Provisioned files. New information goes into an existing section; a new section needs at least three properties of its own.
- Columns before lines: a value to compare across rows becomes a column with its
ColumnSpecand compact behavior; the name’s second line only identifies the row (folder, origin, project). - Chip, indicator or text: the worktree’s state is the
StateBadge, one per row, in the first columns; the agent’s state is anAgentIndicator; a searchable category is aStatusChip(at most two per row); any value is mono text. - One agent vocabulary: whatever tool reports the state, it’s shown as needs you, working, done, idle or running, and the source is only named in the indicator’s tooltip.
- One main action per view, in ink; nothing else uses the primary style.
- Color only means state, and always comes from
StatusMappingwith an icon or a text next to it. The brand never appears on controls or states. NoColor(0x…)or loose.dpin screens: a component’s internal sizes are named constants and layout widths are tokens. - Selection, focus and links use the accent.
- A disabled control stays readable at 3:1.
- Mono is for data, not for states.
- What already works isn’t changed casually: Geist, Geist Mono with tabular figures, the neutral ramp and the status tokens with their contrast tests need their own OpenSpec change, saying which problem it solves, to change.
Multirepo and its workspace repository
Section titled “Multirepo and its workspace repository”multirepoMemberships maps projects to aliases through Multirepo.repositories, so the project of a multirepo folder that is a Git repository is a member with the workspace alias and drops out of the loose projects; with "workspace": false it doesn’t match and stays loose. ShellViewModel takes registerWorkspaceProject (AppContainer.registerWorkspaceProject) and calls it for every loaded multirepo, registering the workspace project once. ProjectConfigViewModel takes multirepoOfWorkspace and chooseFolder rejects such a folder with rejectedMultirepo, shown as a notice instead of adding the project (the drop of the folder opens the same form).
WorktreeBoard adds AgentSearch.multirepoFolder for each multirepo to the searches it already makes on focus, on the periodic check and when a multirepo view opens, and keeps the result in multirepoAgents; multirepoAgentsOf(folder) feeds the multirepo view’s header and multirepoActivityCountOf(folder) (working or blocked) adds to the multirepo’s sidebar activity. MultirepoSettingsState has the workspace draft (workspaceDeclared, workspaceAlias, workspaceOff) and saves it through MultirepoSetup.setWorkspace/clearWorkspace before the default repositories.
MultirepoCatalog keeps every registered multirepo with its approved state. multirepoMemberships gives an unapproved one no aliases, so its repositories stay loose projects and its view lists no groups; ShellViewModel registers workspace projects only for approved multirepos, WorktreeBoard searches agents only in their folders and refuses openMultirepoAgent/openNewChange for the others. The sidebar marks an unapproved multirepo (SidebarMultirepo.needsReview), and WorktreeScreen shows MultirepoReviewPane instead of the list, whose “Trust” calls WorktreeBoard.trustShownMultirepo → MultirepoActions.trust (ConfigureMultirepoUseCase.trust) and then ShellViewModel.onMultirepoChanged. MultirepoReviewDetails (also in the add dialog for a folder whose declaration exists, through AddMultirepoState.existing) lists multirepoReviewLines: each repository and the worktrees root with their resolved path, flagged when outside the folder’s parent, with control characters escaped. AddMultirepoState.confirm approves the reviewed declaration with MultirepoSetup.trust before adding repositories; MultirepoSettingsState.needsReview disables saving and adding, and the agent is saved through MultirepoSetup.setAgent into the local settings.
MultirepoActions also carries the Orca actions and whether each runner is installed (herdrInstalled, orcaInstalled, read once when the container is built). WorktreeBoard.openAllInOrca passes a group to openGroupInOrca, records each member’s failure on its holder (showOpenResult) and reports the rest as MultirepoNotice.GroupOpenedInOrca; openMultirepoAgentInOrca reports AgentOpenedInOrca or Failed. NewChange offers the installed runners (ChangeRunner), and after creating the group confirmNewChange opens the worktrees that exist with openGroupInHerdr or openGroupInOrca, keeping each repository’s RunnerOutcome in NewChange.openings and the dialog open.
AppContainer
Section titled “AppContainer”Builds every port implementation once at app startup: JsonProjectRepository, JsonSettingsFile with the theme, language, shell, tool and update repositories, NioFileManager, ProcessBuilderShellCommandExecutor, AwtClipboardWriter, RepositoryProvisioningFiles, ProcessGradleDaemonSource, MacDerivedDataSource, NioEnvironmentStateStore with SocketPortProbe, JsonResourceLimitsRepository with JvmMachineCapacity (the shell-scoped ResourcePreferences, and the resource pool use cases the emulator and simulator ones acquire through), SimctlAppleSimulators, FileKmpTestWiring, LocalAndroidSdk wrapped in SharedDeviceStatesAndroidSdk, HerdrConfigFile, CliHerdrClient, JsonRepositoryTrust, the terminal, IDE and folder launchers with LocalToolDetector, and GitHubReleaseSource. It also builds the machine-wide pieces shared by every project: MachineProviderContributions (reading each repository’s simulator settings from its project), the environment resolver (with its WorktreeEnvironmentCache and the trust store) and preparer, the simulator and emulator use cases, DetectRunningAgentsUseCase with the Herdr client and FileAgentSessionStore, and the shell-scoped ToolsPreferences, ClaudeHooksState (Settings’ Claude Code section, which previews and applies ClaudeCodeHooks on the user settings and warns when taxilane isn’t on the PATH, and the one-time notice, remembered in settings.json as claudeHooksNoticeDismissed and shown by AppShell when WorktreeBoard.hasClaudeWithoutState), AgentChoices, UpdateState and DialogRepositoryApproval.
- The project configuration screen gets
simulatorSetup(runtimes, KMP wiring, the init script) andloadAvdsfor its provider sections. - The worktree use cases are scoped to a project, so
worktreeUseCases(config)builds aWorktreeUseCasesbundle for the selectedProjectConfig, with itsGradleUseCases,XcodeUseCases,EmulatorUseCases,SimulatorUseCases, Herdr, tool, provisioning, resource release and agent use cases over the shared implementations.
There’s no DI framework.
main.kt
Section titled “main.kt”The entry point of the packaged app. With arguments (ignoring macOS’s legacy -psn_… one) it runs the taxilane command and exits without loading AWT or Compose, so the app’s launcher doubles as the command. Without arguments it sets the Dock icon where the platform supports it and opens the window with AppRoot.
Folder and local file pickers
Section titled “Folder and local file pickers”Folders. Every folder choice (a project’s base repository and worktrees folder, adding a project, a multirepo’s folder and worktrees folder, adding a repository to a multirepo) goes through the PathPicker port, whose single method pickDirectory suspends until the user chooses or cancels. NativeFolderPicker, provided as LocalPathPicker by the main window with that window as owner, opens the operating system’s own dialog through FileKit: NSOpenPanel on macOS and IFileOpenDialog on Windows through JNA, and the org.freedesktop.portal.FileChooser portal on Linux through dbus-java. It starts at the field’s folder when that folder exists, ignores a second request while a dialog is open, and falls back to SwingFolderPicker (JFileChooser, hidden folders shown) when the native dialog fails or no portal is running. Callers launch it in a coroutine, so the window keeps painting while the dialog is open. The multirepo views take it as a pickFolder parameter that defaults to LocalPathPicker, and tests pass a lambda or AnsweringPathPicker, so no test opens a real dialog.
The packaged app needs two things for it: ProGuard keeps JNA, FileKit’s platform bindings and dbus-java, which are reached by reflection (proguard-rules.pro), and the runtime image includes jdk.net and jdk.security.auth, which dbus-java uses to reach the portal. macOS needs no extra entitlement because the app isn’t sandboxed; JNA’s native library loads under the hardened runtime’s existing disable-library-validation.
Local files. “Choose…” under “Local files” opens LocalFilePickerDialog, an in-app dialog over the base repository instead of a system one. ProjectConfigViewModel.openLocalFilePicker() creates a LocalFilePickerState from the current entries and loads its candidates with ListLocalFileCandidatesUseCase (core), injected as listLocalFileCandidates: the untracked and ignored files and folders (git ls-files --others --exclude-standard --directory, with and without --ignored), without generated folders such as build or node_modules, each marked with the mobile secret kind stack detection gives its name and whether the repository’s .taxilane.json or .worktreeinclude already provides it. The state sorts suggestions first, filters by text or by a local files pattern (matchesLocalPattern), offers a pattern filter as a new pattern entry, and returns the entries to add and remove; the view model applies them with addSecretFile/removeSecretFile, so new entries start in copy mode and existing ones keep theirs.
End-to-end tests
Section titled “End-to-end tests”The tests in desktopApp/src/test/kotlin/dev/taxilane/e2e/ build the real AppContainer with a host environment from E2eEnvironment, render AppShell the way the main window does (with shellViewModelOf, shared with main.kt) or the Claude Code hooks section of Settings, and drive them with Compose UI test actions against real Git repositories: the guided tour, adding a project with a local file typed or chosen among the repository’s ignored files, creating a worktree whose local files (a root file, a nested one and a folder) are copied, installing and removing Claude Code’s hooks, and the tour and the hooks section both with and without a taxilane command. They wait on what the real work leaves behind (a text on screen, a file on disk) with a 30-second limit, since Git runs outside the test clock.
They run in their own Gradle task, :desktopApp:desktopE2eTest, which test depends on and excludes them from. The task isolates the machine: user.home, HOME and USERPROFILE point at desktopApp/build/e2e/home (emptied before each test, with a generic Git identity), java.io.tmpdir at build/e2e/tmp, SHELL is empty so no login shell is read, PATH keeps only folders without a taxilane launcher plus build/e2e/bin first (where the hooks test writes a fake one), CLAUDE_CONFIG_DIR is removed and GIT_CONFIG_NOSYSTEM is set. E2eEnvironment.prepare() fails a test that runs outside that task, such as from an IDE’s default test run. E2eEnvironment.hostEnvironment() takes the task’s variables, no login shell and build/e2e/bin as the only usual install folder, so taxilane exists only when a test writes the fake launcher there (installFakeTaxilane()), whatever the machine has in /opt/homebrew/bin. dockHostEnvironment() (macOS and Linux) reproduces the app opened from the Dock: its PATH is /usr/bin:/bin:/usr/sbin:/sbin and SHELL is a fake login shell written in build/e2e that prints a PATH holding build/e2e/bin; DockLaunchE2eTest checks with it that the login shell is read, that the hooks section reads the command as available rather than off the PATH, and that the tour skips its command step.
Errors
Section titled “Errors”Every error is shown as a UserFacingError built by Strings.describe(error): a summary that says what failed, a next step that says what to do, an optional fix (ErrorFix.OpenProjectSettings or OpenPreferences, a button next to the next step) and optional technical details (TechnicalDetails: the command, its exit code and the tool’s output, unchanged). Neither the summary nor the next step contains a command line, an exit code or a tool’s output. The texts live in EnglishErrors.kt and SpanishErrors.kt and are exhaustive over the sealed WorktreeError hierarchy, so a new variant doesn’t compile until both languages describe it. The domain errors stay language-agnostic (the CLI prints its own English messages).
- Git causes:
classifyGitFailure(stderr)incorerecognizes a lock file, permission denied, a folder that isn’t a repository, an existing branch and local changes in the worktree from Git’s output (GitFailureCause); anything else isUnknownand gets a general explanation. Only Git’s English output is matched, so every Git command runs withLC_ALL=C(GitLocale, applied byProcessBuilderShellCommandExecutor). - Rendering:
ErrorNoticewrapsNoticewith the summary, the next step in muted text, the fix button, “Try again” and a collapsed “Technical details” disclosure (data style, scrollable up to 200 dp) with a copy action that copies plain text. Holders store theThrowableand describe it at render time, so a language change re-renders it. Every shown error is recorded in the diagnostics log throughRecordShownErrorand the app-wideShownErrorLog(LocalShownErrorLog), which remembers the identity of the last 256 errors it recorded: a notice that leaves the composition and comes back (aLazyColumnitem scrolled away, a list rebuilt) records nothing new, while a new occurrence of the same failure is a newThrowableand is recorded. The fix buttons useLocalErrorFixActions, which the shell provides (openProjectSettings(projectId),openPreferences()). - Placement: a dialog’s errors stay inside the dialog (
createError), an action on one worktree shows in its detail (actionErrors[path]), a project that fails to load shows in its group (loadState), the machine views show theirs at the top of the view (MachineResources.error), and the project settings show a save failure above the buttons. - Lifetime: an error stays until it is dismissed or the same action succeeds; a success of another action never clears it. Errors of actions that can be repeated safely (reloading, starting or stopping a device, stopping a daemon, listing branches) keep a retry (
actionRetry(path),errorRetry,MachineResources.errorRetry) that “Try again” runs after clearing the error. A project that failed to load offers “Try again” too and can’t be dismissed, since its group has nothing else to show.
Languages (ui/i18n)
Section titled “Languages (ui/i18n)”The UI is available in English (default) and Spanish. Every visible text lives in interface Strings, with one implementation per language (EnglishStrings, SpanishStrings); texts with parameters are functions (deleteProjectMessage(projectName)), so arguments are checked at compile time.
Appearanceloads the storedAppLanguage(LanguagePreferenceRepository) andAppearanceScopeprovides the active table withCompositionLocalProvider(LocalStrings provides ...)in every window: switching language recomposes texts, including the menu bar, without recreating ViewModels or losing screen state.- Composables read texts with
val strings = LocalStrings.current. Non-composable code (such asNativeFolderPicker) receives the already-translated text as a parameter. - The language selector in Preferences shows each language by its own name (“English”, “Español”).
- ViewModels and state holders expose data, not messages:
ProjectWorktreesexposeslistFailure,error: Throwable?andsuccess: WorktreeSuccess?(worktree created, worktrees repaired after a move, worktree opened in Herdr),WorktreeBoardexposescleanupSuccess(cleanup done), and the screen formats them withstrings.describe(error)and the matchingStringstext.describeis exhaustive over the sealedWorktreeErrorhierarchy, so a new variant doesn’t compile until it’s translated; a process that can’t start (CommandExecutionException) gets its own message, and anything else falls back to a generic one. Git’s error output is shown as-is, untranslated, in the error’s technical details (see Errors).
Adding a text: declare the member in Strings and implement it in every language (the compiler flags any missing one). Adding a language: new AppLanguage value, new object implementing Strings, and its branch in AppLanguage.strings().
The Active view and activity
Section titled “The Active view and activity”A worktree’s activity is a pure function in core (worktreeActivity, next to isInactive and activityDate), and each worktree has exactly one: Missing when its folder is gone; WaitingForYou when one of its agents is blocked or done; AgentWorking when another agent works in it or runs without a known state (an idle agent is skipped and doesn’t decide the state, so an open agent no longer hides pending work); Unknown (status not read yet, no agent); Idle for the main worktree, whatever its changes; Inactive (commits of its own, not merged, no agent, activity older than the threshold, even with uncommitted or unpushed work); Unfinished when it has uncommitted changes, commits ahead of its upstream, or commits of its own and no upstream (hasUnpushedCommits, isUnpushedBranch); New when it has no commits of its own and isn’t merged; Merged; and Stopped otherwise. The enum is in order of urgency, which the change groups’ combined state relies on. The first five are the active ones, and “Active” lists them across every project. The inactivity threshold comes from InactivityPreferences (days, 3 by default, 1 to 90, edited in Preferences and kept as inactiveAfterDays), which WorktreeBoard reads when it computes activities, so changing it regroups every view without reading any status again.
Grouped by state, “Active” shows “Waiting for you”, “Agent working”, “Unfinished”, “New” and “Stopped”; “All worktrees” adds “Merged” (whose header offers “Clean up”), “Inactive”, “Folder missing” and a trailing “Other” for the main worktrees without an agent and those whose status isn’t read yet. The “Waiting for you” header’s title and icon use the warning color; every other header is neutral. Each header toggles its group (WorktreeBoard.toggleStateCollapsed): the collapsed groups are kept per view for the session (collapsedStates, with “Stopped” collapsed in “Active”), a collapsed group keeps its header and count, visibleRefs skips its rows, collapsing the selected worktree’s group clears the selection, select expands the group of the worktree it selects, and a text filter shows every group. Empty groups are hidden. A project that failed to load, or has an action error, shows that error before the first state group (ListItem.GroupState, named after the project) in the state grouping, and right after its header, even collapsed, in the project grouping; such a project hides “Nothing needs you”. Each group header (StateGroupHeader) shows, after the title and before the count, a short hint in bodySmall and onSurfaceVariant that truncates first on narrow widths, and a WithTooltip over the title and hint with the full criterion (StateGroupKind.hint and criterion in Strings). The selected worktree is pinned: it stays in “Active” in the group for its real state until it’s deselected, so it never vanishes under the cursor. While statuses are being read the header shows a loading line. When no listed worktree is waiting for the user (isNothingWaiting), “Active” shows a neutral “Nothing needs you” line above its groups with the number of working agents (workingAgentCount) and “See all worktrees” (NothingNeedsYouNotice), or, when it lists nothing, the same as a centered empty state.