Output a command produced can be selected and copied

A build's error is the tail of what the compiler actually said, and on a
phone there was no way to get it out: the machine that produced it is not
the machine in your hand, so a message you cannot copy is one you have to
retype into whatever you are fixing it with.

Theme.kt's OutputText is the one place that decides this, and every failure
message now goes through it -- a component's build or download, a service
action, a checkout's remote check, and the log dialog's own failure line.
The log body gets a SelectionContainer directly rather than going through
OutputText, since it is an AnnotatedString the ANSI renderer coloured inside
its own scrolling panel; Copy stays beside it for taking the whole thing.

The app's own words are deliberately left alone. Selection handles on a
status word like "failed" are noise, and a card that starts a selection on
long-press fights the gestures it already has -- so the split is by where
the words came from, not by how important they look.

Checked on the emulator against a failing build: long-pressing the error on
the card raises handles and the Copy toolbar, the state word above it does
not, and the log dialog still scrolls in both directions with selection
enabled.
This commit is contained in:
iris committed 2026-09-01 03:22:38 -04:00
1 parent 90082bd286
commit a7f7f4550e
4 files changed
+95 -48

No files matched your search

+13
View File
@@ -425,6 +425,19 @@ mutable at runtime from the phone.
build happen under one lock for the same reason `claim` is
synchronous -- a phone polling in the gap would see a project that is
neither pulling nor building and call the run finished.
- **Text a command produced is selectable; text this app wrote is not.**
`Theme.kt`'s `OutputText` is the whole of it, and every failure message
goes through it -- a component's build or download, a service action, a
checkout's remote check, and the log dialog's own failure line -- plus a
`SelectionContainer` around the log body, which cannot use `OutputText`
because it is an `AnnotatedString` the ANSI renderer coloured inside its
own scrolling panel. The reason is that this is the one text on screen a
person has to take somewhere else, and the machine that produced it is
not the machine in their hand. A status word or a button label stays
unselectable on purpose: selection handles on those are noise, and a
card that starts a selection on long-press fights the gestures it
already has. Iris asked for exactly that line on 2026-09-01: "not the
'failed' but the command output for build errors and stuff".
- **A finished component shows nothing, and its button goes back to
normal.** Iris's call, 2026-09-01: "you shouldn't see the time it took
once it finishes, it should just go back to its normal enabled button