diff --git a/packages/webui/src/public/assistant.js b/packages/webui/src/public/assistant.js index 9f7db0540..f361f3cfb 100644 --- a/packages/webui/src/public/assistant.js +++ b/packages/webui/src/public/assistant.js @@ -132,6 +132,7 @@
@@ -344,7 +345,9 @@ document.addEventListener('click', e => { if (e.defaultPrevented || e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return; const a = e.target.closest?.('a[href]'); - if (!a || a.hasAttribute('download') || (a.target && a.target !== '_self')) return; + // A link marked data-full-view (a pane's Full view, a requirement's "Open conversation") goes to the + // organization's own thread view, which has Request details, sessions and sharing. + if (!a || a.hasAttribute('download') || a.hasAttribute('data-full-view') || (a.target && a.target !== '_self')) return; const m = THREAD_LINK.exec(a.getAttribute('href') || ''); const org = m && (m[1] || window.MosaicOrg?.id); if (!m || !org || !ORG.test(org)) return; diff --git a/packages/webui/src/public/projects.js b/packages/webui/src/public/projects.js index 9861b1be8..d694f6e37 100644 --- a/packages/webui/src/public/projects.js +++ b/packages/webui/src/public/projects.js @@ -209,7 +209,7 @@ const candidate=d?.candidate, expanded=r && expandedSet.has(project.id+':'+r.id); const docPath=candidate?.prd_path, docLink=project.repo && typeof docPath==='string' && /^docs\/[A-Za-z0-9][A-Za-z0-9._-]{0,127}\.md$/.test(docPath) ? `#/docs/${encodeURIComponent(project.repo)}/${encodeURIComponent(docPath)}` : null; const rows=candidate ? [['PRD version',candidate.prd_version],['Approved snapshot',d.snapshot.id || 'None'],['PRD file',docPath],['PRD blob',candidate.prd_blob],['Records commit',candidate.records_commit],['Confirmed intent commit',candidate.spec_commit],['Mode revision',candidate.mode_revision]].map(([label,value])=>``).join('') : 'Unavailable until a PRD is read.
'; - return `${r?`${clean(r.id)}`} · ${chip(r.state)} · from ${clean(r.thread.name)} Open conversation${window.MosaicRecords.markup(project.repo)}
`:data.northMissing?'No north star yet.
':project.repo?'North star unavailable. Docs could not read this project’s repository.
':`This project has no linked repository. The north star and project documents live in a repository. Linking one to an existing project isn't available yet.
`}${d.snapshot.id?'Approved snapshot '+clean(d.snapshot.id):'This candidate has no active approved snapshot.'}
${clean(req.text)}
Requirement identity: ${clean(candidate.requirements[i]?.path)} · ${clean(candidate.requirements[i]?.blob)}
${(data.failed || data.requests.some(x=>x.materialFailed))?'Request or PRD unavailable. Refresh to try again.':'No current PRD candidate or approved snapshot. Waiting for a PRD submission.'}
`}${d && data.requests.some(x=>x.materialFailed)?'Some request PRDs could not be read. Refresh to try again.
':''}${clean(r.id)}`} · ${chip(r.state)} · from ${clean(r.thread.name)} Open conversation${window.MosaicRecords.markup(project.repo)}
`:data.northMissing?'No north star yet.
':project.repo?'North star unavailable. Docs could not read this project’s repository.
':`This project has no linked repository. The north star and project documents live in a repository. Linking one to an existing project isn't available yet.
`}${d.snapshot.id?'Approved snapshot '+clean(d.snapshot.id):'This candidate has no active approved snapshot.'}
${clean(req.text)}
Requirement identity: ${clean(candidate.requirements[i]?.path)} · ${clean(candidate.requirements[i]?.blob)}
${(data.failed || data.requests.some(x=>x.materialFailed))?'Request or PRD unavailable. Refresh to try again.':'No current PRD candidate or approved snapshot. Waiting for a PRD submission.'}
`}${d && data.requests.some(x=>x.materialFailed)?'Some request PRDs could not be read. Refresh to try again.
':''}