Read a session's transcript as the file it is

The conversation on screen is a drawing of the record, and when the two
disagree -- or when something in the record is what has gone wrong -- there
was no way to see the record itself from the phone.

View raw in the session settings dialog opens the file explorer on the
transcript, which is its third caller and needed no new screen: the file
name and path in the header, a back button, and the lines as code. The
session says where the file is, because only the backend knows, and it
names this backend's machine rather than the session's -- for a remote
session those are two different filesystems. Back from the file lands in
the session's own directory, where the log and the process record are.

The paragraph under Reload goes, and both buttons move to a line of their
own: two buttons and a measurement do not fit a phone's width.
This commit is contained in:
iris-ai committed 2026-09-21 02:51:19 -04:00
1 parent 049780fda6
commit 66b3403a71
8 files changed
+123 -12

No files matched your search

@@ -243,8 +243,17 @@ data class SessionSummary(
val lastActivity: Double,
/** Latest measured number of live background tasks; zero also covers older servers. */
val backgroundTasks: Int,
/**
* Where the transcript file itself is, for reading the record rather than the conversation
* drawn from it. Null from a server that does not say, and from one whose own machine is not in
* its config -- there is then nothing that could read the file, and no way in is offered.
*/
val transcriptFile: FileOnMachine?,
)
/** A file somewhere the explorer can be pointed at: which machine, and the path on it. */
data class FileOnMachine(val machine: String, val machineName: String, val path: String)
private fun parseSession(session: JSONObject) =
SessionSummary(
id = session.getString("id"),
@@ -277,6 +286,14 @@ private fun parseSession(session: JSONObject) =
status = session.getString("status"),
lastActivity = session.getDouble("lastActivity"),
backgroundTasks = session.optInt("backgroundTasks", 0),
transcriptFile =
session.optJSONObject("transcriptFile")?.let { file ->
FileOnMachine(
machine = file.getString("machine"),
machineName = file.getString("machineName"),
path = file.getString("path"),
)
},
)
fun fetchSessions(settings: ServerSettings): List<SessionSummary> =