Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

feat(mobile): icons before the machine, folder and branch in the ⋯ sheet

bubu-dudu02b6c1c1dc4c
diff --git a/mobile/lib/phone/phone_sheet.dart b/mobile/lib/phone/phone_sheet.dart
index 8e01b6c95..4f30f9c47 100644
--- a/mobile/lib/phone/phone_sheet.dart
+++ b/mobile/lib/phone/phone_sheet.dart
@@ -69,7 +69,7 @@ class PhoneSheetSection {
///
/// [sections] draws captioned groups after [actions]; an empty section is left out.
///
-/// [titleDetail] is drawn under [titleParts] — the folder and branch, on an agent's sheet.
+/// [titleDetail] is drawn under [titleParts] — machine, folder and branch, on an agent's sheet.
Future<void> showPhoneSheet(
BuildContext context, {
required String title,
diff --git a/mobile/lib/phone/terminal_header.dart b/mobile/lib/phone/terminal_header.dart
index 17ca8ab53..2dd0d19e2 100644
--- a/mobile/lib/phone/terminal_header.dart
+++ b/mobile/lib/phone/terminal_header.dart
@@ -207,50 +207,64 @@ class _Identity extends StatelessWidget {
);
}
-/// Where an agent works, as the `⋯` sheet shows it under the names: the folder
-/// with its parent — `~/…/autonomous-harness/mobile` — then the branch.
+/// Where an agent runs, as the `⋯` sheet shows it under the agent's name, one
+/// line each behind its icon: the machine, the folder with its parent —
+/// `~/…/autonomous-harness/mobile` — and the branch.
///
/// The header has room for the folder's own name alone; the sheet is where the
/// rest of the path is read.
-class AgentPlaceLine extends StatelessWidget {
- const AgentPlaceLine({super.key, required this.project});
+class AgentPlaceLines extends StatelessWidget {
+ const AgentPlaceLines({
+ super.key,
+ required this.machineName,
+ required this.project,
+ });
+
+ /// Empty leaves the line out.
+ final String machineName;
- final AgentProject project;
+ final AgentProject? project;
@override
Widget build(BuildContext context) {
AppTheme.watch(context);
- final branch = project.branchLabel;
- final style = TextStyle(color: AppPalette.textSecondary, fontSize: 13);
- return Wrap(
- crossAxisAlignment: WrapCrossAlignment.center,
- spacing: 8,
- runSpacing: 2,
+ final project = this.project;
+ final branch = project?.branchLabel;
+ return Column(
+ mainAxisSize: MainAxisSize.min,
+ crossAxisAlignment: CrossAxisAlignment.start,
children: [
- Text(projectPathTrail(project.cwd), style: style),
- if (branch != null)
- Row(
- mainAxisSize: MainAxisSize.min,
- children: [
- Icon(
- LucideIcons.gitBranch300,
- size: 13,
- color: AppPalette.textFaint,
- ),
- const SizedBox(width: 3),
- Flexible(
- child: Text(
- branch,
- maxLines: 1,
- overflow: TextOverflow.ellipsis,
- style: style,
- ),
- ),
- ],
- ),
+ if (machineName.isNotEmpty)
+ _line(LucideIcons.laptopMinimal300, machineName),
+ if (project != null)
+ _line(LucideIcons.folder300, projectPathTrail(project.cwd)),
+ if (branch != null) _line(LucideIcons.gitBranch300, branch),
],
);
}
+
+ Widget _line(IconData icon, String text) => Padding(
+ padding: const EdgeInsets.only(top: 2),
+ child: Row(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ // Nudged down to sit on the text's first line rather than its top.
+ Padding(
+ padding: const EdgeInsets.only(top: 2),
+ child: Icon(icon, size: 13, color: AppPalette.textFaint),
+ ),
+ const SizedBox(width: 6),
+ Expanded(
+ child: Text(
+ text,
+ maxLines: 2,
+ overflow: TextOverflow.ellipsis,
+ style: TextStyle(color: AppPalette.textSecondary, fontSize: 13),
+ ),
+ ),
+ ],
+ ),
+ );
}
/// A folder with its parent, everything above them folded into `…` —
diff --git a/mobile/lib/phone/terminal_page.dart b/mobile/lib/phone/terminal_page.dart
index 13c4c8199..3fafe02ee 100644
--- a/mobile/lib/phone/terminal_page.dart
+++ b/mobile/lib/phone/terminal_page.dart
@@ -839,10 +839,10 @@ class _TerminalPageState extends State<TerminalPage>
showPhoneSheet(
context,
title: '$agentName · $machineName',
- // Two lines — the agent, then its machine — shown in full, then where it works: the folder
- // with its parent and the branch, which the header has no room for.
- titleParts: [agentName, machineName],
- titleDetail: project == null ? null : AgentPlaceLine(project: project),
+ // The agent, then where it runs — machine, folder with its parent, branch — one line each
+ // behind its icon. The header has no room for the path.
+ titleParts: [agentName],
+ titleDetail: AgentPlaceLines(machineName: machineName, project: project),
// Two groups: what acts on THIS agent, and the two screens the app itself has. Machines is a
// door like Settings rather than a list of its own — the list belongs on the page behind it,
// where it has room for every machine and does not push the rest of this sheet down.