Chat info: Session section with native id, resume command and export
The chat information sheet gains a Session section: the harness's native session id (copy), harness, directory, a verified resume command (copy) and Export conversation (Markdown), Export JSON and, for Claude Code, Export native session (the JSONL transcript). Server: chat_sessions rows carry resume_command and native_export; new chat_export command builds Markdown/JSON from the same paged history chat_messages serves (bounded at 8 MiB), refuses non-operator sessions. App: exports go through the artifact file bridge (web download, share sheet on phones).
This commit is contained in:
@@ -39,6 +39,17 @@ Future<FakeChatGateway> _thread(
|
||||
return gateway;
|
||||
}
|
||||
|
||||
/// "Unavailable" inside the usage metric rows only; the Session section says
|
||||
/// it too for a conversation opened without its list row.
|
||||
final _metricUnavailable = find.descendant(
|
||||
of: find.byWidgetPredicate(
|
||||
(widget) =>
|
||||
widget.key is ValueKey<String> &&
|
||||
(widget.key! as ValueKey<String>).value.startsWith('chat-info-metric-'),
|
||||
),
|
||||
matching: find.text('Unavailable'),
|
||||
);
|
||||
|
||||
Future<void> _openInfo(WidgetTester tester) async {
|
||||
await tester.tap(find.byKey(const Key('chat-info')));
|
||||
await tester.pumpAndSettle();
|
||||
@@ -109,7 +120,7 @@ void main() {
|
||||
|
||||
await _openInfo(tester);
|
||||
|
||||
expect(find.text('Unavailable'), findsNWidgets(4));
|
||||
expect(_metricUnavailable, findsNWidgets(4));
|
||||
expect(find.text('0'), findsNothing);
|
||||
|
||||
await tester.tap(find.byKey(const Key('chat-info-close')));
|
||||
@@ -128,7 +139,7 @@ void main() {
|
||||
await tester.pump();
|
||||
await _openInfo(tester);
|
||||
|
||||
expect(find.text('Unavailable'), findsNothing);
|
||||
expect(_metricUnavailable, findsNothing);
|
||||
expect(find.text('0 tok/s'), findsOneWidget);
|
||||
expect(find.text('0'), findsOneWidget);
|
||||
expect(find.text('0 / 1,000'), findsOneWidget);
|
||||
|
||||
Reference in New Issue
Block a user