question/answer text: server-side file_refs
DashboardEvent::QuestionAdded gains question_refs and QuestionResolved gains answer_refs — both populated via scan_validated_paths at emit time, same helper the broker forwarder uses for Sent/Delivered. cold-load snapshot wraps each OpQuestion in QuestionView with the same fields computed once per /api/state. client threads refs through questionsState rows (pending + history) and passes them to appendLinkified at every render site (live pane, history details). path tokens in question and answer bodies now linkify with the same server-vouched guarantee broker messages already enjoyed.
This commit is contained in:
parent
378e8bf9df
commit
4ec401a6c7
4 changed files with 62 additions and 9 deletions
|
|
@ -262,6 +262,7 @@ impl Coordinator {
|
|||
.ok()
|
||||
.and_then(|d| i64::try_from(d.as_secs()).ok())
|
||||
.unwrap_or(0);
|
||||
let question_refs = crate::dashboard::scan_validated_paths(question);
|
||||
self.emit_dashboard_event(DashboardEvent::QuestionAdded {
|
||||
seq: self.next_seq(),
|
||||
id,
|
||||
|
|
@ -272,6 +273,7 @@ impl Coordinator {
|
|||
asked_at,
|
||||
deadline_at,
|
||||
target: target.map(str::to_owned),
|
||||
question_refs,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -293,6 +295,7 @@ impl Coordinator {
|
|||
.ok()
|
||||
.and_then(|d| i64::try_from(d.as_secs()).ok())
|
||||
.unwrap_or(0);
|
||||
let answer_refs = crate::dashboard::scan_validated_paths(answer);
|
||||
self.emit_dashboard_event(DashboardEvent::QuestionResolved {
|
||||
seq: self.next_seq(),
|
||||
id,
|
||||
|
|
@ -301,6 +304,7 @@ impl Coordinator {
|
|||
answered_at,
|
||||
cancelled,
|
||||
target: target.map(str::to_owned),
|
||||
answer_refs,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue