clickable T/D/Q/R cross-refs in the Claude conversation (T-279)
Linkify bare ticket/governance refs (T-281, D-77, Q-5, R-2) in rendered conversation messages so clicking one opens the record in its context-pane reader — T- in the tickets reader, D/Q/R in the decisions reader — reusing the existing `selection` MessageBus addressing (the same path clide ui open and the panels use; D-6 parity already satisfied by `clide ui open`). ClideMarkdown now linkifies bare refs in running text (paragraphs, lists, headings, bold/italic), not just record-shaped markdown links. Matching is word-boundary anchored so "T-shirt" (no digits) and "PT-281" (mid-word) stay literal; `code` spans and `pre` blocks render verbatim and never reach the linkifier, so refs inside code stay plain. The clickable span is shared between bare refs and record-shaped links so both look and behave alike. Tests: ClideMarkdown linkifier cases (bare T/D/Q/R tap fires onRecordTap, T-shirt + inline-code refs stay plain, no-callback stays plain); conversation view integration (clicking a bare ref publishes the reader-open selection to the tickets/decisions reader). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -172,6 +172,28 @@ void main() {
|
||||
expect(find.text('Waiting for Claude…'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('clicking a bare T-ref in a message opens the tickets reader (T-279)', (tester) async {
|
||||
Message? opened;
|
||||
final sub = f.services.messages.subscribe(publisher: 'builtin.tickets', channel: 'selection').listen((m) => opened = m);
|
||||
addTearDown(sub.cancel);
|
||||
await pumpWith(tester, [_user('please look at T-281')]);
|
||||
await tester.tap(find.text('T-281'));
|
||||
await tester.pumpAndSettle();
|
||||
expect(opened, isNotNull);
|
||||
expect(opened!.data['id'], 'T-281');
|
||||
});
|
||||
|
||||
testWidgets('clicking a bare D-ref opens the decisions reader (T-279)', (tester) async {
|
||||
Message? opened;
|
||||
final sub = f.services.messages.subscribe(publisher: 'builtin.decisions', channel: 'selection').listen((m) => opened = m);
|
||||
addTearDown(sub.cancel);
|
||||
await pumpWith(tester, [_asst('we resume cleanly per D-77 today')]);
|
||||
await tester.tap(find.text('D-77'));
|
||||
await tester.pumpAndSettle();
|
||||
expect(opened, isNotNull);
|
||||
expect(opened!.data['id'], 'D-77');
|
||||
});
|
||||
|
||||
testWidgets('meta items fold into a collapsed activity card; tap expands (T-230)', (tester) async {
|
||||
await pumpWith(
|
||||
tester,
|
||||
|
||||
Reference in New Issue
Block a user