Skip to content

A modern terminal with a built-in multiplexer: close it and your sessions keep running. Run shells and tons of AI agents across your machines, then pick them up from desktop, browser, TUI and more. Written in Rust with no UI framework: interface drawn straight on the GPU. No Electron, GPUI or webview.

mobile: overview cards without the tab dots

RoversXc12ba6b36a14
diff --git a/android/app/src/main/java/com/roversx/thinkterm/TreeSheet.kt b/android/app/src/main/java/com/roversx/thinkterm/TreeSheet.kt
index e7101afc..7f659806 100644
--- a/android/app/src/main/java/com/roversx/thinkterm/TreeSheet.kt
+++ b/android/app/src/main/java/com/roversx/thinkterm/TreeSheet.kt
@@ -518,7 +518,6 @@ private fun TabRows(
}
}
-private const val OVERVIEW_DOTS = 4
private const val OVERVIEW_ROWS = 9
private const val OVERVIEW_COLS = 38
@@ -623,62 +622,43 @@ data class CardFrames(val card: Rect, val thumb: Rect)
/// which carries the same header while the terminal shrinks.
@Composable
fun ThreadCardHeader(thread: ThreadView, accent: Color, modifier: Modifier = Modifier) {
- val shown = thread.tabs.take(OVERVIEW_DOTS)
- val folded = thread.tabs.size - shown.size
val currentTab = thread.tabs.firstOrNull { it.current } ?: thread.tabs.firstOrNull()
- Column(modifier) {
- Row(
- Modifier.fillMaxWidth().padding(start = 10.dp, end = 10.dp, top = 10.dp, bottom = 6.dp),
- verticalAlignment = Alignment.CenterVertically,
- horizontalArrangement = Arrangement.spacedBy(7.dp),
- ) {
- Box(Modifier.size(7.dp).background(threadColor(thread.status, thread.live), CircleShape))
+ // One line: the dot and name, the current tab's title after them, and
+ // an offline badge at the end; the tabs as dots took a row of their own.
+ Row(
+ modifier.fillMaxWidth().padding(start = 10.dp, end = 10.dp, top = 9.dp, bottom = 8.dp),
+ verticalAlignment = Alignment.CenterVertically,
+ horizontalArrangement = Arrangement.spacedBy(7.dp),
+ ) {
+ Box(Modifier.size(7.dp).background(threadColor(thread.status, thread.live), CircleShape))
+ Text(
+ thread.name,
+ fontSize = 13.5.sp,
+ fontWeight = FontWeight.SemiBold,
+ color = Color.White,
+ maxLines = 1,
+ overflow = TextOverflow.Ellipsis,
+ )
+ Text(
+ currentTab?.title ?: "",
+ fontSize = 10.sp,
+ fontFamily = FontFamily.Monospace,
+ color = overviewSecondary,
+ maxLines = 1,
+ overflow = TextOverflow.Ellipsis,
+ modifier = Modifier.weight(1f),
+ )
+ if (!thread.live) {
Text(
- thread.name,
- fontSize = 13.5.sp,
+ tr("offline"),
+ fontSize = 9.sp,
fontWeight = FontWeight.SemiBold,
- color = Color.White,
- maxLines = 1,
- overflow = TextOverflow.Ellipsis,
+ color = overviewSecondary,
+ modifier = Modifier
+ .background(Color.Gray.copy(alpha = 0.22f), CircleShape)
+ .padding(horizontal = 6.dp, vertical = 2.dp),
)
}
- Row(
- Modifier.fillMaxWidth().padding(start = 10.dp, end = 10.dp, bottom = 7.dp),
- verticalAlignment = Alignment.CenterVertically,
- horizontalArrangement = Arrangement.spacedBy(4.dp),
- ) {
- for (tab in shown) {
- Box(
- Modifier
- .size(6.dp)
- .background(
- if (thread.current && tab.current) accent else Color.White.copy(alpha = 0.28f),
- CircleShape,
- )
- )
- }
- if (folded > 0) Text("+$folded", fontSize = 9.5.sp, color = overviewSecondary)
- Text(
- currentTab?.title ?: "",
- fontSize = 10.sp,
- fontFamily = FontFamily.Monospace,
- color = overviewSecondary,
- maxLines = 1,
- overflow = TextOverflow.Ellipsis,
- modifier = Modifier.weight(1f).padding(start = 3.dp),
- )
- if (!thread.live) {
- Text(
- tr("offline"),
- fontSize = 9.sp,
- fontWeight = FontWeight.SemiBold,
- color = overviewSecondary,
- modifier = Modifier
- .background(Color.Gray.copy(alpha = 0.22f), CircleShape)
- .padding(horizontal = 6.dp, vertical = 2.dp),
- )
- }
- }
}
}
diff --git a/ios/Sources/TreeSheet.swift b/ios/Sources/TreeSheet.swift
index e8d11eab..6ae50085 100644
--- a/ios/Sources/TreeSheet.swift
+++ b/ios/Sources/TreeSheet.swift
@@ -263,7 +263,7 @@ struct TreeSheet: View {
/// The desktop's Live Overview as an overlay under the terminal: a card
/// per thread, grouped by project, two to a row. Each card is the
-/// thread's name and state, its tabs as dots (the rest folded into +N),
+/// thread's name and state with its current tab's title,
/// an offline badge, and a thumbnail of its terminal in its colours: the
/// last rows of its current tab's pane, fetched from the server and
/// refreshed while the overview is up. The thread on show leaves its
@@ -280,7 +280,6 @@ struct OverviewScreen: View {
var livePreview: Bool = true
/// A tapped card, with its frames: the terminal grows back out of it.
var onPick: (ThreadView, CardFrames?) -> Void = { _, _ in }
- private let dots = 4
private let rows = 9
private let columns = [GridItem(.flexible(), spacing: 10), GridItem(.flexible(), spacing: 10)]
@@ -370,9 +369,6 @@ struct OverviewScreen: View {
}
private func card(_ thread: ThreadView) -> some View {
- let shown = Array(thread.tabs.prefix(dots))
- let folded = thread.tabs.count - shown.count
- let currentTab = thread.tabs.first(where: { $0.current }) ?? thread.tabs.first
let live = thread.id == liveThread
return Button {
if !live { model.sideClick("thread", id: thread.id) }
@@ -453,48 +449,31 @@ struct CardFrames: Equatable {
struct ThreadCardHeader: View {
let thread: ThreadView
@ObservedObject private var lang = AppLanguage.shared
- private let dots = 4
+ /// One line: the dot and name, the current tab's title after them, and
+ /// an offline badge at the end; the tabs as dots took a row of their own.
var body: some View {
- let shown = Array(thread.tabs.prefix(dots))
- let folded = thread.tabs.count - shown.count
let currentTab = thread.tabs.first(where: { $0.current }) ?? thread.tabs.first
- VStack(alignment: .leading, spacing: 0) {
- HStack(spacing: 7) {
- Circle().fill(TerminalScreen.threadColor(status: thread.status, live: thread.live)).frame(width: 7, height: 7)
- Text(thread.name).font(.system(size: 13.5, weight: .semibold)).lineLimit(1)
- Spacer(minLength: 0)
- }
- .padding(.horizontal, 10)
- .padding(.top, 10)
- .padding(.bottom, 6)
- HStack(spacing: 4) {
- ForEach(shown) { tab in
- Circle()
- .fill(thread.current && tab.current ? Color.accentColor : Color.white.opacity(0.28))
- .frame(width: 6, height: 6)
- }
- if folded > 0 {
- Text("+\(folded)").font(.system(size: 9.5)).foregroundColor(.secondary)
- }
- Text(currentTab?.title ?? "")
- .font(.system(size: 10, design: .monospaced))
+ HStack(spacing: 7) {
+ Circle().fill(TerminalScreen.threadColor(status: thread.status, live: thread.live)).frame(width: 7, height: 7)
+ Text(thread.name).font(.system(size: 13.5, weight: .semibold)).lineLimit(1)
+ Text(currentTab?.title ?? "")
+ .font(.system(size: 10, design: .monospaced))
+ .foregroundColor(.secondary)
+ .lineLimit(1)
+ Spacer(minLength: 0)
+ if !thread.live {
+ Text(tr("offline"))
+ .font(.system(size: 9, weight: .semibold))
.foregroundColor(.secondary)
- .lineLimit(1)
- .padding(.leading, 3)
- Spacer(minLength: 0)
- if !thread.live {
- Text(tr("offline"))
- .font(.system(size: 9, weight: .semibold))
- .foregroundColor(.secondary)
- .padding(.horizontal, 6).padding(.vertical, 2)
- .background(Color.gray.opacity(0.22))
- .clipShape(Capsule())
- }
+ .padding(.horizontal, 6).padding(.vertical, 2)
+ .background(Color.gray.opacity(0.22))
+ .clipShape(Capsule())
}
- .padding(.horizontal, 10)
- .padding(.bottom, 7)
}
+ .padding(.horizontal, 10)
+ .padding(.top, 9)
+ .padding(.bottom, 8)
.foregroundColor(.white)
}
}