diff --git a/app/lib/features/chat/conversation/chat_send_later_menu.dart b/app/lib/features/chat/conversation/chat_send_later_menu.dart index e4bfd163..4c978313 100644 --- a/app/lib/features/chat/conversation/chat_send_later_menu.dart +++ b/app/lib/features/chat/conversation/chat_send_later_menu.dart @@ -56,6 +56,11 @@ class _ChatSendLaterMenuState extends State { context: context, initialTime: TimeOfDay(hour: initial.hour, minute: 0), helpText: 'Send at', + // The same 24-hour clock as "Scheduled ยท sends at 21:03". + builder: (context, child) => MediaQuery( + data: MediaQuery.of(context).copyWith(alwaysUse24HourFormat: true), + child: child!, + ), ); if (!mounted || picked == null || !widget.enabled) return; widget.onSchedule( diff --git a/app/lib/features/chat/data/chat_repository.dart b/app/lib/features/chat/data/chat_repository.dart index bb408656..30fa4753 100644 --- a/app/lib/features/chat/data/chat_repository.dart +++ b/app/lib/features/chat/data/chat_repository.dart @@ -200,12 +200,13 @@ class ChatRepository { String backend = 'opencode', String instructions = '', }) { - if (title.trim().isEmpty || directory.trim().isEmpty) { - throw ArgumentError('Enter a chat name and choose a directory.'); + if (directory.trim().isEmpty) { + throw ArgumentError('Choose a directory.'); } + // A blank title leaves naming the chat to its harness. return gateway.call('chat_create', { 'chat_create': { - 'title': title.trim(), + if (title.trim().isNotEmpty) 'title': title.trim(), 'directory': directory.trim(), 'operation_id': operationId, if (backend.isNotEmpty && backend != 'opencode') 'backend': backend, diff --git a/app/test/features/chat/chat_foundation_test.dart b/app/test/features/chat/chat_foundation_test.dart index aca0384c..018ff81b 100644 --- a/app/test/features/chat/chat_foundation_test.dart +++ b/app/test/features/chat/chat_foundation_test.dart @@ -252,6 +252,11 @@ void main() { 'operation_id': 'create', }, }); + // No name: the harness names the chat, so no title is sent. + await repo.create(title: ' ', directory: '~', operationId: 'bare'); + expect(gateway.calls.last.fields, { + 'chat_create': {'directory': '~', 'operation_id': 'bare'}, + }); await repo.selectModel('s', 'provider', 'model'); expect(gateway.calls.last.type, 'chat_model'); gateway.calls.clear(); diff --git a/app/tool/perf/chat_scroll_fixture.dart b/app/tool/perf/chat_scroll_fixture.dart index 46013643..955b4473 100644 --- a/app/tool/perf/chat_scroll_fixture.dart +++ b/app/tool/perf/chat_scroll_fixture.dart @@ -17,6 +17,8 @@ // one with a failed command) split by background-task notices; // `?links=1` answers and operator turns carry a markdown link, an // autolink, a bare URL and URLs inside code (linked too); +// `?tables=1` answers carry a wrapping table, one with a long token and +// one too wide for a phone (it scrolls sideways); // `?timestamps=1` messages carry recorded times over two calendar days. import 'dart:async'; @@ -144,9 +146,27 @@ String _answer(int i) { : ''; return '## Answer $i\n\nSome **bold** text with `code`.\n\n' '```dart\n${List.generate(8, (l) => 'final v$l = $i * $l;').join('\n')}' - '\n```\n$wide\n- one\n- two\n${_links ? _answerLinks : ''}'; + '\n```\n$wide${_tables ? _answerTables : ''}\n- one\n- two\n' + '${_links ? _answerLinks : ''}'; } +bool get _tables => _params['tables'] == '1'; + +/// `?tables=1`: a table whose prose wraps to fit, one with a long unbroken +/// token, and one whose words cannot fit a phone side by side. +const _answerTables = + '\n| Column | Description | Status |\n| --- | --- | --- |\n' + '| Parser | Reads the markdown source and keeps each table cell as ' + 'written, so wrapping happens only between words | Done |\n' + '| Renderer | Lays the cells out at the transcript width | Review |\n\n' + '| Commit | Link |\n| --- | --- |\n' + '| 4f1c2a9 | https://example.com/pipelines/commit/' + '4f1c2a9e0b7d3c6f5a8e1d2c3b4a5f6e7d8c9b0a |\n\n' + '| Component | Ownership | Lifecycle | Dependencies | Deployment | ' + 'Monitoring |\n| --- | --- | --- | --- | --- | --- |\n' + '| scheduler | platform | long-lived | database | kubernetes | ' + 'prometheus |\n\n'; + const _answerLinks = '\nRead [the release notes](https://example.com/releases/v2) or ' '; the bare https://example.com/bare/path. ' diff --git a/app/tool/search_selection_probe_entry.dart b/app/tool/search_selection_probe_entry.dart index ba72aa7e..797f6104 100644 --- a/app/tool/search_selection_probe_entry.dart +++ b/app/tool/search_selection_probe_entry.dart @@ -170,6 +170,10 @@ String? _liveRunStatus; bool _htmlArtifact = false; bool _warnings = false; +/// `?harnesses=1` offers three chat harnesses and two workspace folders in the +/// New chat dialog, so its per-folder harness default can be reviewed. +bool _harnesses = false; + /// `?turn=1` adds the runner-internal turn files the server records for a model /// visit (group `debug`) to run 7's build visit, so the Artifacts tab's hidden /// Debugging files group can be reviewed. @@ -584,13 +588,17 @@ JsonMap? probeReply(JsonMap request) { return { 'id': id, 'type': 'chat_backends', - 'chat_backends': ['opencode'], + 'chat_backends': _harnesses + ? ['claude', 'codex', 'opencode'] + : ['opencode'], }; case 'chat_directories': return { 'id': id, 'type': 'chat_directories', - 'chat_directories': ['/Users/fixture/workspace'], + 'chat_directories': _harnesses + ? ['/Users/fixture', '/Users/fixture/app', '/Users/fixture/site'] + : ['/Users/fixture/workspace'], }; case 'chat_sessions': return { @@ -963,6 +971,7 @@ Future main() async { probeUsage = params['usage'] == '1'; _htmlArtifact = params['html'] == '1'; _warnings = params['warnings'] == '1'; + _harnesses = params['harnesses'] == '1'; _turnFiles = params['turn'] == '1'; final route = params['route']; final opensRoute = route != null && route.startsWith('/');