Read a timeout in units, share one usage answer, and let a tilde mean home
The composer's settings row is outlined bubbles opening round menus, and the message box is a TextFieldValue so anything put into it without being typed -- a draft, a share, a slash command -- leaves the cursor at the end. A tap that puts a text selection away no longer also collapses the card the text was drawn in: every open and close on the session screen goes through one guard that spends such a press on the selection. The usage bar and the usage dialog were two polls of one measurement and disagreed for up to a minute at a time; they are one feed now, and the countdown rounds up to the minute in the one place both read. A working directory typed as ~/repos/ai-app was four literal characters on the local transport and as an argument on both, so the existence check refused every home-relative path. It is checked by entering the directory now, expanded for a local spawn the way the remote shell expands it, and stored short so the phone draws what somebody would write. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2970a6cf9a
commit
32b2a4871a
16 files changed
+414
-99
No files matched your search
@@ -7,13 +7,23 @@ import java.time.OffsetDateTime
|
||||
// arithmetic is the same in both and only the sentence around it differs, so everything here
|
||||
// returns the span or the state on its own and leaves the wording to the caller.
|
||||
|
||||
/** "1d 4h", "3h 12m", "12m" -- the span alone, with no leading or trailing words. */
|
||||
fun formatSpan(until: Duration): String =
|
||||
when {
|
||||
until.toHours() >= 24 -> "${until.toDays()}d ${until.toHours() % 24}h"
|
||||
until.toHours() > 0 -> "${until.toHours()}h ${until.toMinutes() % 60}m"
|
||||
else -> "${until.toMinutes()}m"
|
||||
/**
|
||||
* "1d 4h", "3h 12m", "12m" -- the span alone, with no leading or trailing words.
|
||||
*
|
||||
* Rounded **up** to the whole minute, rather than truncated as it was. A window with 3h 12m 50s
|
||||
* left is nearer four minutes past the twelve than it is to twelve, and truncating also parks the
|
||||
* figure on a minute it has already spent -- so the reader watching the number decide whether to
|
||||
* start something was consistently told less headroom than they had. One rule, so the session bar
|
||||
* and the usage dialog cannot round a shared measurement two different ways.
|
||||
*/
|
||||
fun formatSpan(until: Duration): String {
|
||||
val up = if (until.seconds % 60 == 0L && until.nano == 0) until else until.plusMinutes(1)
|
||||
return when {
|
||||
up.toHours() >= 24 -> "${up.toDays()}d ${up.toHours() % 24}h"
|
||||
up.toHours() > 0 -> "${up.toHours()}h ${up.toMinutes() % 60}m"
|
||||
else -> "${up.toMinutes()}m"
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* What is known about when a usage window ends.
|
||||
|
||||
Reference in new issue
Block a user