dsh-spec-collab 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -0
- package/docs/experience-review-checklist-2026-08-24.md +115 -0
- package/lib/client.js +1391 -388
- package/lib/index.js +408 -50
- package/lib/types/client/SpecWorkbench.d.ts +69 -0
- package/lib/types/client/SpecWorkbench.d.ts.map +1 -1
- package/lib/types/client/mount.d.ts.map +1 -1
- package/lib/types/client/review-anchors.d.ts +21 -0
- package/lib/types/client/review-anchors.d.ts.map +1 -0
- package/lib/types/client/workflow.d.ts +1 -0
- package/lib/types/client/workflow.d.ts.map +1 -1
- package/lib/types/engine.d.ts.map +1 -1
- package/lib/types/index.d.ts +4 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/prompts.d.ts +18 -0
- package/lib/types/prompts.d.ts.map +1 -0
- package/lib/types/protocol.d.ts +7 -0
- package/lib/types/protocol.d.ts.map +1 -1
- package/lib/types/review-context.d.ts +10 -1
- package/lib/types/review-context.d.ts.map +1 -1
- package/lib/types/review-runtime.d.ts +4 -1
- package/lib/types/review-runtime.d.ts.map +1 -1
- package/lib/types/workspace-context.d.ts +2 -0
- package/lib/types/workspace-context.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/client/SpecWorkbench.tsx +456 -47
- package/src/client/mount.tsx +31 -5
- package/src/client/review-anchors.ts +134 -0
- package/src/client/workbench.module.css +234 -45
- package/src/client/workflow.ts +7 -7
- package/src/engine.ts +46 -3
- package/src/index.ts +21 -3
- package/src/prompts.ts +100 -0
- package/src/protocol.ts +4 -2
- package/src/review-context.ts +25 -7
- package/src/review-runtime.ts +53 -34
- package/src/tools.ts +3 -3
- package/src/workspace-context.ts +114 -0
package/src/client/mount.tsx
CHANGED
|
@@ -9,6 +9,14 @@ const ACTIVE = 'data-dsh-spec-collab-active'
|
|
|
9
9
|
const VIEW = '[data-dsh-spec-collab-view]'
|
|
10
10
|
const ACTIVATE_EVENT = 'dsh-panel-activate'
|
|
11
11
|
const CLOSE_EVENT = 'dsh-spec-collab-close'
|
|
12
|
+
const SIDEBAR_COLLAPSED = 'data-sidebar-collapsed'
|
|
13
|
+
|
|
14
|
+
function isSidebarChromeControl(target: Element | undefined): boolean {
|
|
15
|
+
const control = target?.closest<HTMLElement>('button, [role="button"]')
|
|
16
|
+
if (control === undefined || control === null) return false
|
|
17
|
+
const label = [control.getAttribute('aria-label'), control.getAttribute('title'), control.textContent].filter(Boolean).join(' ')
|
|
18
|
+
return /侧边栏|边栏|侧栏|sidebar/i.test(label) && /收起|折叠|展开|隐藏|显示|collapse|expand|toggle/i.test(label)
|
|
19
|
+
}
|
|
12
20
|
|
|
13
21
|
export function mountWorkbench(api: SpecApi): () => void {
|
|
14
22
|
let root: Root | undefined
|
|
@@ -34,12 +42,25 @@ export function mountWorkbench(api: SpecApi): () => void {
|
|
|
34
42
|
|
|
35
43
|
export function mountSidebarEntry(): () => void {
|
|
36
44
|
let row: HTMLButtonElement | undefined
|
|
45
|
+
let resizeObserver: ResizeObserver | undefined
|
|
46
|
+
const syncSidebarState = (): void => {
|
|
47
|
+
if (!row?.isConnected) return
|
|
48
|
+
const rect = row.getBoundingClientRect()
|
|
49
|
+
const hostCollapsed = document.body.hasAttribute('data-dsh-sidebar-collapsed') || Boolean(row.closest('[data-sidebar-collapsed="true"]'))
|
|
50
|
+
row.toggleAttribute('data-dsh-spec-collab-collapsed', rect.width > 0 ? rect.width < 64 : hostCollapsed)
|
|
51
|
+
}
|
|
37
52
|
const close = (): void => { document.documentElement.removeAttribute(ACTIVE); row?.classList.remove(css.entryActive!) }
|
|
38
53
|
const closeOnExternalNavigation = (event: MouseEvent): void => {
|
|
39
54
|
if (!document.documentElement.hasAttribute(ACTIVE)) return
|
|
40
55
|
const target = event.target instanceof Element ? event.target : undefined
|
|
41
56
|
if (target?.closest(VIEW) || target?.closest('[data-dsh-spec-collab-entry]')) return
|
|
42
|
-
|
|
57
|
+
if (isSidebarChromeControl(target)) return
|
|
58
|
+
const sidebarCollapsedBefore = document.documentElement.getAttribute(SIDEBAR_COLLAPSED)
|
|
59
|
+
window.setTimeout(() => {
|
|
60
|
+
if (!document.documentElement.hasAttribute(ACTIVE)) return
|
|
61
|
+
if (document.documentElement.getAttribute(SIDEBAR_COLLAPSED) !== sidebarCollapsedBefore) return
|
|
62
|
+
close()
|
|
63
|
+
}, 0)
|
|
43
64
|
}
|
|
44
65
|
document.addEventListener('click', closeOnExternalNavigation, true)
|
|
45
66
|
document.addEventListener(CLOSE_EVENT, close)
|
|
@@ -53,9 +74,10 @@ export function mountSidebarEntry(): () => void {
|
|
|
53
74
|
document.dispatchEvent(new CustomEvent(ACTIVATE_EVENT, { detail: 'spec-collab' }))
|
|
54
75
|
}
|
|
55
76
|
row?.classList.toggle(css.entryActive!, opening)
|
|
77
|
+
syncSidebarState()
|
|
56
78
|
}
|
|
57
79
|
const ensure = (): void => {
|
|
58
|
-
if (row?.isConnected) return
|
|
80
|
+
if (row?.isConnected) { syncSidebarState(); return }
|
|
59
81
|
const anchor = findSidebarAnchor(document)
|
|
60
82
|
if (anchor === undefined) return
|
|
61
83
|
row = document.createElement('button')
|
|
@@ -67,9 +89,13 @@ export function mountSidebarEntry(): () => void {
|
|
|
67
89
|
row.innerHTML = '<span aria-hidden="true">▤</span><span>需求讨论</span>'
|
|
68
90
|
row.addEventListener('click', toggle)
|
|
69
91
|
anchor.element[anchor.placement](row)
|
|
92
|
+
resizeObserver?.disconnect()
|
|
93
|
+
resizeObserver = typeof ResizeObserver === 'undefined' ? undefined : new ResizeObserver(syncSidebarState)
|
|
94
|
+
resizeObserver?.observe(row)
|
|
95
|
+
window.setTimeout(syncSidebarState, 0)
|
|
70
96
|
}
|
|
71
|
-
const observer = new MutationObserver(ensure)
|
|
72
|
-
observer.observe(document.body, { childList: true, subtree: true })
|
|
97
|
+
const observer = new MutationObserver(() => { ensure(); syncSidebarState() })
|
|
98
|
+
observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['class', 'data-dsh-sidebar-collapsed', 'data-sidebar-collapsed'] })
|
|
73
99
|
ensure()
|
|
74
|
-
return () => { observer.disconnect(); document.removeEventListener('click', closeOnExternalNavigation, true); document.removeEventListener(CLOSE_EVENT, close); close(); row?.remove(); document.querySelector(VIEW)?.remove() }
|
|
100
|
+
return () => { observer.disconnect(); resizeObserver?.disconnect(); document.removeEventListener('click', closeOnExternalNavigation, true); document.removeEventListener(CLOSE_EVENT, close); close(); row?.remove(); document.querySelector(VIEW)?.remove() }
|
|
75
101
|
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import MarkdownIt from 'markdown-it'
|
|
2
|
+
import type { CommentThread, ReviewItem } from '../protocol.ts'
|
|
3
|
+
|
|
4
|
+
const parser = new MarkdownIt({ html: false })
|
|
5
|
+
export const reviewBlockSelector = 'h1, h2, h3, h4, p, li, td, th, blockquote'
|
|
6
|
+
|
|
7
|
+
export interface ReviewSourceSnippet {
|
|
8
|
+
key: string
|
|
9
|
+
targetKey: string
|
|
10
|
+
label: string
|
|
11
|
+
markdown: string
|
|
12
|
+
line?: number
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface ReviewAnchorTerm {
|
|
16
|
+
key: string
|
|
17
|
+
kind: 'quote' | 'acceptance' | 'section'
|
|
18
|
+
label: string
|
|
19
|
+
value: string
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function normalizeReviewText(value: string): string {
|
|
23
|
+
return value.replace(/[`*_>#\[\]()~-]/g, '').replace(/\s+/g, '').toLocaleLowerCase()
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function reviewAnchorTerms(item: ReviewItem): ReviewAnchorTerm[] {
|
|
27
|
+
const terms: ReviewAnchorTerm[] = []
|
|
28
|
+
for (const [index, anchor] of (item.sourceAnchors ?? []).entries()) {
|
|
29
|
+
const quote = anchor.quote.trim()
|
|
30
|
+
if (quote) terms.push({ key: `quote-${index}`, kind: 'quote', label: anchor.heading?.trim() || '正文引用', value: quote })
|
|
31
|
+
}
|
|
32
|
+
for (const [index, id] of item.affectedAcceptanceIds.entries()) {
|
|
33
|
+
const value = id.trim()
|
|
34
|
+
if (value) terms.push({ key: `acceptance-${index}-${value}`, kind: 'acceptance', label: value, value })
|
|
35
|
+
}
|
|
36
|
+
for (const [index, section] of item.affectedSections.entries()) {
|
|
37
|
+
const value = section.trim()
|
|
38
|
+
if (value) terms.push({ key: `section-${index}-${value}`, kind: 'section', label: value, value })
|
|
39
|
+
}
|
|
40
|
+
return terms
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function reviewTargetElements(root: HTMLElement, item: ReviewItem, targetKey?: string): HTMLElement[] {
|
|
44
|
+
const blocks = Array.from(root.querySelectorAll<HTMLElement>(reviewBlockSelector))
|
|
45
|
+
const terms = reviewAnchorTerms(item)
|
|
46
|
+
const targets: HTMLElement[] = []
|
|
47
|
+
const addTermTarget = (term: ReviewAnchorTerm): void => {
|
|
48
|
+
const candidates = (term.kind === 'section' ? blocks.filter(block => /^H[1-4]$/.test(block.tagName)) : blocks)
|
|
49
|
+
.filter(block => normalizeReviewText(block.textContent ?? '').includes(normalizeReviewText(term.value)))
|
|
50
|
+
.sort((left, right) => (left.textContent?.length ?? 0) - (right.textContent?.length ?? 0))
|
|
51
|
+
const target = candidates[0]
|
|
52
|
+
if (target && !targets.includes(target)) targets.push(target)
|
|
53
|
+
}
|
|
54
|
+
if (targetKey) {
|
|
55
|
+
terms.filter(term => term.key === targetKey).forEach(addTermTarget)
|
|
56
|
+
if (targets.length > 0) return targets
|
|
57
|
+
}
|
|
58
|
+
terms.forEach(addTermTarget)
|
|
59
|
+
return targets
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function previousHeadingText(root: HTMLElement, block: HTMLElement): string {
|
|
63
|
+
const headings = Array.from(root.querySelectorAll<HTMLElement>('h1, h2, h3, h4'))
|
|
64
|
+
return headings.filter(heading => Boolean(heading.compareDocumentPosition(block) & Node.DOCUMENT_POSITION_FOLLOWING)).at(-1)?.textContent?.trim() ?? ''
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function commentTargetElements(root: HTMLElement, anchor: CommentThread['anchor']): HTMLElement[] {
|
|
68
|
+
const blocks = Array.from(root.querySelectorAll<HTMLElement>(reviewBlockSelector))
|
|
69
|
+
const quote = anchor.quote.trim()
|
|
70
|
+
const normalizedQuote = normalizeReviewText(quote)
|
|
71
|
+
const heading = normalizeReviewText(anchor.heading ?? '')
|
|
72
|
+
const prefix = normalizeReviewText(anchor.prefix ?? '')
|
|
73
|
+
const suffix = normalizeReviewText(anchor.suffix ?? '')
|
|
74
|
+
const context = normalizeReviewText(`${anchor.prefix ?? ''}${quote}${anchor.suffix ?? ''}`)
|
|
75
|
+
const candidates = normalizedQuote
|
|
76
|
+
? blocks.filter(block => normalizeReviewText(block.textContent ?? '').includes(normalizedQuote))
|
|
77
|
+
: []
|
|
78
|
+
|
|
79
|
+
const score = (block: HTMLElement): number => {
|
|
80
|
+
const text = normalizeReviewText(block.textContent ?? '')
|
|
81
|
+
let value = block.textContent?.length ?? 0
|
|
82
|
+
if (heading) value += normalizeReviewText(previousHeadingText(root, block)).includes(heading) ? -10000 : 2500
|
|
83
|
+
if (context && text.includes(context)) value -= 3000
|
|
84
|
+
if (prefix && text.includes(prefix.slice(Math.max(0, prefix.length - 32)))) value -= 900
|
|
85
|
+
if (suffix && text.includes(suffix.slice(0, 32))) value -= 900
|
|
86
|
+
return value
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const targets = candidates.sort((left, right) => score(left) - score(right))
|
|
90
|
+
if (targets.length > 0) return targets
|
|
91
|
+
if (!heading) return []
|
|
92
|
+
return blocks.filter(block => /^H[1-4]$/.test(block.tagName) && normalizeReviewText(block.textContent ?? '').includes(heading))
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function reviewSourceSnippets(markdown: string, item: ReviewItem): ReviewSourceSnippet[] {
|
|
96
|
+
const lines = markdown.split('\n')
|
|
97
|
+
const tokens = parser.parse(markdown, {})
|
|
98
|
+
const snippets: ReviewSourceSnippet[] = []
|
|
99
|
+
const seen = new Set<string>()
|
|
100
|
+
const add = (snippet: ReviewSourceSnippet): void => {
|
|
101
|
+
const key = normalizeReviewText(snippet.markdown)
|
|
102
|
+
if (!key || seen.has(key) || snippets.length >= 4) return
|
|
103
|
+
seen.add(key)
|
|
104
|
+
snippets.push(snippet)
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
for (const term of reviewAnchorTerms(item).filter(term => term.kind === 'quote')) {
|
|
108
|
+
if (!normalizeReviewText(markdown).includes(normalizeReviewText(term.value))) continue
|
|
109
|
+
const exactLine = lines.findIndex(line => normalizeReviewText(line).includes(normalizeReviewText(term.value)))
|
|
110
|
+
add({ key: term.key, targetKey: term.key, label: term.label, markdown: term.value, ...(exactLine < 0 ? {} : { line: exactLine + 1 }) })
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
for (const term of reviewAnchorTerms(item).filter(term => term.kind === 'acceptance')) {
|
|
114
|
+
const token = tokens.find(candidate => candidate.type === 'inline' && candidate.map && normalizeReviewText(candidate.content).includes(normalizeReviewText(term.value)))
|
|
115
|
+
if (!token?.map) continue
|
|
116
|
+
const [start, end] = token.map
|
|
117
|
+
add({ key: term.key, targetKey: term.key, label: term.label, markdown: lines.slice(start, end).join('\n').trim(), line: start + 1 })
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
if (snippets.length === 0) {
|
|
121
|
+
for (const term of reviewAnchorTerms(item).filter(term => term.kind === 'section')) {
|
|
122
|
+
const headingIndex = tokens.findIndex((token, index) => token.type === 'heading_open' && tokens[index + 1]?.type === 'inline' && normalizeReviewText(tokens[index + 1]!.content).includes(normalizeReviewText(term.value)))
|
|
123
|
+
const heading = tokens[headingIndex]
|
|
124
|
+
if (headingIndex < 0 || !heading?.map) continue
|
|
125
|
+
const level = Number(heading.tag.slice(1))
|
|
126
|
+
const nextHeading = tokens.slice(headingIndex + 1).find(token => token.type === 'heading_open' && Number(token.tag.slice(1)) <= level && token.map)
|
|
127
|
+
const start = heading.map[0]
|
|
128
|
+
const end = Math.min(nextHeading?.map?.[0] ?? lines.length, start + 9)
|
|
129
|
+
add({ key: term.key, targetKey: term.key, label: term.label, markdown: lines.slice(start, end).join('\n').trim(), line: start + 1 })
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
return snippets
|
|
134
|
+
}
|
|
@@ -93,18 +93,47 @@ button:disabled { cursor: default; opacity: .52; }
|
|
|
93
93
|
.editorMeta, .unsaved { color: var(--muted); font-size: 11px; white-space: nowrap; }
|
|
94
94
|
.unsaved { color: var(--amber); font-weight: 650; }
|
|
95
95
|
.saveButton:not(:disabled) { border-color: var(--green); color: var(--green-deep); font-weight: 700; }
|
|
96
|
+
.editorCollabBar { min-width: 0; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #d3ddd8; padding: 7px 12px; background: #f7faf8; }
|
|
97
|
+
.collabBarState { min-width: 0; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; font-weight: 690; }
|
|
98
|
+
.collabStateSaved, .collabStateDirty, .collabStateRunning { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 8px; background: var(--paper); white-space: nowrap; }
|
|
99
|
+
.collabStateSaved { color: var(--green-deep); }
|
|
100
|
+
.collabStateDirty { border-color: #e0bb82; background: var(--amber-soft); color: #834714; }
|
|
101
|
+
.collabStateRunning { border-color: #b5d2dc; background: var(--blue-soft); color: var(--blue); }
|
|
102
|
+
.collabBarActions { min-width: 0; display: flex; align-items: stretch; gap: 5px; overflow-x: auto; scrollbar-width: none; }
|
|
103
|
+
.collabMetric { min-width: 88px; min-height: 34px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0 6px; border-color: transparent; padding: 4px 8px; background: transparent; text-align: left; }
|
|
104
|
+
.collabMetric b { grid-row: 1 / span 2; min-width: 24px; color: var(--ink); font: 720 18px/1 ui-monospace, SFMono-Regular, Menlo, monospace; text-align: right; }
|
|
105
|
+
.collabMetric span { overflow: hidden; color: var(--muted); font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
|
|
106
|
+
.collabMetric small { overflow: hidden; color: var(--amber); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
|
|
107
|
+
.collabMetric:hover, .collabMetricActive { border-color: #bad3ca; background: var(--paper); }
|
|
108
|
+
.collabMetricActive b, .collabMetricActive span { color: var(--green-deep); }
|
|
109
|
+
.collabMetricWarn b { color: var(--amber); }
|
|
96
110
|
.editorContext { min-width: 0; min-height: 42px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; border-bottom: 1px solid #cfe0da; padding: 5px 12px; background: #f1f8f5; }
|
|
97
|
-
.selectionPrompt { min-width: 0; display:
|
|
98
|
-
.selectionPrompt
|
|
99
|
-
.
|
|
100
|
-
.
|
|
101
|
-
.
|
|
111
|
+
.selectionPrompt { position: fixed; z-index: 22; box-sizing: border-box; width: min(360px, calc(100vw - 24px)); min-width: 0; display: grid; gap: 8px; border: 1px solid #8ab3a6; border-radius: 8px; padding: 10px; background: var(--paper); box-shadow: 0 12px 30px rgba(23,33,29,.2); }
|
|
112
|
+
.selectionPrompt::before { content: ''; position: absolute; left: 24px; width: 10px; height: 10px; border: 1px solid #8ab3a6; background: var(--paper); transform: rotate(45deg); }
|
|
113
|
+
.selectionPromptBelow::before { top: -6px; border-right: 0; border-bottom: 0; }
|
|
114
|
+
.selectionPromptAbove::before { bottom: -6px; border-top: 0; border-left: 0; }
|
|
115
|
+
.selectionPromptHead { min-width: 0; display: flex; align-items: flex-start; gap: 8px; }
|
|
116
|
+
.selectionPromptHead > div { min-width: 0; flex: 1; display: grid; gap: 2px; overflow: hidden; }
|
|
117
|
+
.selectionPrompt b { overflow: hidden; color: var(--green-deep); font-size: 10px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
|
|
118
|
+
.selectionPrompt small { color: var(--muted); font-size: 11px; line-height: 1.5; }
|
|
119
|
+
.selectionPromptHead small { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
|
|
120
|
+
.selectionPrompt textarea { box-sizing: border-box; width: 100%; min-height: 74px; max-height: 150px; resize: vertical; border: 1px solid var(--line-strong); border-radius: 6px; padding: 8px; color: var(--ink); line-height: 1.55; }
|
|
121
|
+
.selectionPrompt textarea:focus { border-color: #3f8b72; outline: 0; box-shadow: inset 0 0 0 1px #3f8b72; }
|
|
122
|
+
.selectionPromptClose { flex: 0 0 24px; width: 24px; min-height: 24px !important; border: 0 !important; padding: 0 !important; background: transparent !important; color: var(--muted) !important; font-size: 17px; line-height: 1; }
|
|
123
|
+
.selectionPromptActions { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
|
|
124
|
+
.selectionPromptActions small { min-width: 0; flex: 1; }
|
|
125
|
+
.selectionPromptButtons { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
|
|
126
|
+
.selectionPromptCancel, .selectionPromptSubmit { min-height: 28px; padding: 3px 9px; font-size: 12px; }
|
|
127
|
+
.selectionPromptCancel { border-color: transparent; color: var(--muted); }
|
|
128
|
+
.selectionPromptSubmit { border-color: var(--green); background: var(--green); color: #fff; font-weight: 700; }
|
|
129
|
+
.selectionPromptSubmit:hover { border-color: var(--green-deep); background: var(--green-deep); }
|
|
102
130
|
.editorBody { min-width: 0; min-height: 0; flex: 1; overflow: auto; background: var(--paper); }
|
|
103
131
|
.emptyMain { height: 100%; display: grid; place-items: center; padding: 24px; background: var(--paper); }
|
|
104
132
|
.emptyMain > div { width: min(460px, 100%); text-align: center; }
|
|
105
133
|
.emptyMain span { color: var(--green); font-size: 11px; font-weight: 750; }
|
|
106
134
|
.emptyMain h2 { margin: 8px 0; font: 700 28px/1.25 ui-serif, "Songti SC", serif; }
|
|
107
135
|
.emptyMain p { margin: 0 auto 18px; color: var(--muted); }
|
|
136
|
+
.richEditorShell { position: relative; height: 100%; overflow: hidden; background: var(--paper); }
|
|
108
137
|
.richEditor { height: 100%; background: var(--paper); }
|
|
109
138
|
.richEditor :global(.toastui-editor-defaultUI) { height: 100% !important; border: 0; font-family: Inter, "PingFang SC", ui-sans-serif, system-ui, sans-serif; }
|
|
110
139
|
.richEditor :global(.toastui-editor-toolbar), .richEditor :global(.toastui-editor-mode-switch) { display: none !important; }
|
|
@@ -115,6 +144,24 @@ button:disabled { cursor: default; opacity: .52; }
|
|
|
115
144
|
.richEditor :global(.toastui-editor-contents h2) { margin: 36px 0 14px; border-bottom: 1px solid var(--line); padding-bottom: 8px; color: var(--ink); font-size: 20px; line-height: 1.4; }
|
|
116
145
|
.richEditor :global(.toastui-editor-contents h3) { margin: 26px 0 10px; color: var(--ink); font-size: 16px; line-height: 1.4; }
|
|
117
146
|
.richEditor :global(.toastui-editor-contents p) { margin: 10px 0; }
|
|
147
|
+
.richEditor :global([data-annotation-kind]), .richEditor .reviewSourceSelected, .richEditor .commentSourceSelected { border-radius: 4px; }
|
|
148
|
+
.richEditor :global([data-annotation-kind="review"]) { background: linear-gradient(90deg, rgba(255,243,223,.95), rgba(255,249,239,.72)); box-shadow: -3px 0 rgba(201,121,42,.7); }
|
|
149
|
+
.richEditor :global([data-annotation-kind="comment"]) { background: linear-gradient(90deg, rgba(237,247,251,.96), rgba(245,251,253,.74)); box-shadow: -3px 0 rgba(87,148,168,.7); }
|
|
150
|
+
.richEditor :global([data-annotation-kind="mixed"]) { background: linear-gradient(90deg, rgba(255,243,223,.95), rgba(237,247,251,.86)); box-shadow: -3px 0 #9d9a63; }
|
|
151
|
+
.richEditor .reviewSourceSelected { background: #fff0d6; box-shadow: -5px 0 #c9792a, 0 0 0 1px rgba(201,121,42,.22); }
|
|
152
|
+
.richEditor .commentSourceSelected { background: #e7f4f8; box-shadow: -5px 0 #5794a8, 0 0 0 1px rgba(87,148,168,.22); }
|
|
153
|
+
.reviewAnchorLayer { position: absolute; inset: 0; z-index: 21; overflow: hidden; pointer-events: none; }
|
|
154
|
+
.documentAnchorHighlight { position: absolute; z-index: 0; box-sizing: border-box; border-radius: 5px; pointer-events: none; }
|
|
155
|
+
.documentReviewHighlight { background: rgba(255, 243, 223, .72); box-shadow: inset 3px 0 rgba(201,121,42,.72); }
|
|
156
|
+
.documentCommentHighlight { background: rgba(237,247,251,.78); box-shadow: inset 3px 0 rgba(87,148,168,.72); }
|
|
157
|
+
.documentReviewHighlightBlocking { background: rgba(255, 237, 208, .82); box-shadow: inset 3px 0 #c9792a; }
|
|
158
|
+
.documentAnchorHighlightSelected { outline: 1px solid rgba(23,107,80,.22); background: rgba(255, 239, 214, .9); }
|
|
159
|
+
.documentReviewAnchor, .documentCommentAnchor { position: absolute; box-sizing: border-box; width: 25px; height: 22px; min-height: 22px; display: grid; place-items: center; border: 1px solid #8eaaa0; border-radius: 4px; padding: 0; background: var(--paper); color: var(--green-deep); font: 760 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; pointer-events: auto; box-shadow: 0 2px 6px rgba(23,33,29,.12); }
|
|
160
|
+
.documentReviewAnchor:hover { border-color: var(--green); background: var(--mint); }
|
|
161
|
+
.documentCommentAnchor { border-color: #8fb7c5; background: var(--blue-soft); color: var(--blue); font-family: Inter, "PingFang SC", ui-sans-serif, system-ui, sans-serif; }
|
|
162
|
+
.documentCommentAnchor:hover { border-color: var(--blue); background: #e3f1f5; }
|
|
163
|
+
.documentReviewAnchorBlocking { border-color: #c7863f; background: var(--amber-soft); color: #834714; }
|
|
164
|
+
.documentAnchorSelected, .documentReviewAnchorSelected { border-color: var(--green); background: var(--green); color: #fff; }
|
|
118
165
|
|
|
119
166
|
.primaryNav { flex: 0 0 auto; min-height: 44px; display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--line); padding: 5px 7px; background: var(--paper); }
|
|
120
167
|
.primaryNav > div { min-width: 0; display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; }
|
|
@@ -156,6 +203,12 @@ button:disabled { cursor: default; opacity: .52; }
|
|
|
156
203
|
.panelSummary > div { display: grid; gap: 1px; }
|
|
157
204
|
.panelSummary strong { font-size: 12px; }
|
|
158
205
|
.panelSummary span { color: var(--amber); font-size: 10px; }
|
|
206
|
+
.checklistMeter { flex: 0 0 72px; align-content: center; justify-items: end; gap: 3px !important; }
|
|
207
|
+
.checklistMeter small { color: var(--muted); font: 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
|
|
208
|
+
.checklistMeter progress { width: 72px; height: 4px; overflow: hidden; border: 0; border-radius: 2px; background: #dde4e0; color: var(--green); }
|
|
209
|
+
.checklistMeter progress::-webkit-progress-bar { background: #dde4e0; }
|
|
210
|
+
.checklistMeter progress::-webkit-progress-value { background: var(--green); }
|
|
211
|
+
.checklistMeter progress::-moz-progress-bar { background: var(--green); }
|
|
159
212
|
.runHistory, .historyGroup { border-bottom: 1px solid var(--line); background: #fafbfa; }
|
|
160
213
|
.runHistory > summary, .historyGroup > summary { cursor: pointer; padding: 10px 14px; color: var(--muted); font-size: 11px; font-weight: 650; }
|
|
161
214
|
.runHistory > .run { border-top: 1px solid var(--line); padding: 12px 16px; background: var(--paper); }
|
|
@@ -163,44 +216,34 @@ button:disabled { cursor: default; opacity: .52; }
|
|
|
163
216
|
.run > div:first-child { display: flex; justify-content: space-between; gap: 8px; }
|
|
164
217
|
.run > div:first-child span { color: var(--muted); font-size: 11px; }
|
|
165
218
|
.reviewCard { display: grid; gap: 11px; background: var(--paper); }
|
|
166
|
-
.
|
|
167
|
-
.
|
|
168
|
-
.
|
|
169
|
-
.
|
|
170
|
-
.
|
|
171
|
-
.
|
|
172
|
-
.
|
|
173
|
-
.
|
|
174
|
-
.
|
|
175
|
-
.
|
|
176
|
-
.
|
|
219
|
+
.reviewChecklist { display: grid; background: var(--paper); }
|
|
220
|
+
.reviewChecklistRow { box-sizing: border-box; width: 100%; height: 76px; min-width: 0; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto 12px; align-items: center; gap: 9px; overflow: hidden; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 9px 12px; background: var(--paper); text-align: left; }
|
|
221
|
+
.reviewChecklistRow:hover { background: #f6f9f7; }
|
|
222
|
+
.reviewChecklistRow:focus-visible { position: relative; z-index: 1; outline: 2px solid var(--green); outline-offset: -2px; }
|
|
223
|
+
.reviewChecklistBlocking { box-shadow: inset 3px 0 var(--amber); }
|
|
224
|
+
.reviewChecklistAnswered { background: #f7faf8; }
|
|
225
|
+
.reviewChecklistSettled { background: #fafbfa; color: var(--muted); }
|
|
226
|
+
.reviewChecklistSelected { position: relative; z-index: 1; background: var(--blue-soft); box-shadow: inset 3px 0 var(--green); }
|
|
227
|
+
.reviewCheckBox { box-sizing: border-box; width: 20px; height: 20px; display: grid; place-items: center; border: 1px solid #aab8b2; border-radius: 3px; color: var(--green); font-size: 12px; font-weight: 800; }
|
|
228
|
+
.reviewChecklistBlocking .reviewCheckBox { border-color: #c7863f; background: var(--amber-soft); }
|
|
229
|
+
.reviewChecklistAnswered .reviewCheckBox { border-color: #88ad9f; background: var(--mint); }
|
|
230
|
+
.reviewChecklistSettled .reviewCheckBox { border-color: #88ad9f; background: var(--mint); }
|
|
231
|
+
.reviewCheckCopy { min-width: 0; display: grid; align-content: center; gap: 3px; }
|
|
232
|
+
.reviewCheckMeta { min-width: 0; display: flex; align-items: center; gap: 6px; overflow: hidden; }
|
|
233
|
+
.reviewCheckMeta b { flex: none; color: var(--green-deep); font-size: 9px; font-weight: 760; }
|
|
234
|
+
.reviewCheckMeta small { min-width: 0; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
|
|
235
|
+
.reviewCheckCopy > strong { min-width: 0; max-height: 34px; display: -webkit-box; overflow: hidden; overflow-wrap: anywhere; color: var(--ink); font-size: 12px; font-weight: 620; line-height: 17px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
|
|
236
|
+
.reviewCheckStatus { flex: none; max-width: 66px; overflow: hidden; color: var(--muted); font-size: 9px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
|
|
237
|
+
.reviewCheckArrow { color: var(--muted); font-size: 17px; }
|
|
177
238
|
.reviewTitle { color: var(--ink); font-weight: 650; }
|
|
178
239
|
.reviewTitle > :first-child { margin-top: 0; }
|
|
179
240
|
.reviewTitle > :last-child { margin-bottom: 0; }
|
|
180
|
-
.
|
|
181
|
-
.
|
|
182
|
-
.questionField { border-left: 3px solid var(--amber); padding: 9px 11px; background: var(--amber-soft); }
|
|
183
|
-
.impactDetails, .evidence, .patchDetails { border: 1px solid var(--line); border-radius: 5px; padding: 7px 9px; }
|
|
184
|
-
.impactDetails summary, .evidence summary, .patchDetails summary { cursor: pointer; color: var(--muted); font-size: 11px; font-weight: 650; }
|
|
185
|
-
.evidence > div { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 8px; }
|
|
186
|
-
.evidence code { overflow-wrap: anywhere; color: var(--blue); font-size: 10px; }
|
|
241
|
+
.patchDetails { border: 1px solid var(--line); border-radius: 5px; padding: 7px 9px; }
|
|
242
|
+
.patchDetails summary { cursor: pointer; color: var(--muted); font-size: 11px; font-weight: 650; }
|
|
187
243
|
.badges { display: flex !important; justify-content: flex-start !important; flex-wrap: wrap; gap: 4px !important; }
|
|
188
244
|
.badges > * { border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px 7px; font-size: 10px; }
|
|
189
245
|
.badges > b:first-child { border-color: #dfb77f; background: var(--amber-soft); color: #834714; }
|
|
190
|
-
.humanResponse { display: grid; grid-template-columns: auto 1fr; gap: 2px 7px; border-left: 3px solid var(--green); padding: 9px 10px; background: var(--mint); }
|
|
191
|
-
.humanResponse > span { color: var(--green); font-size: 9px; font-weight: 750; }
|
|
192
|
-
.humanResponse > strong { font-size: 11px; }
|
|
193
|
-
.humanResponse > div { grid-column: 1 / -1; }
|
|
194
|
-
.quickOptions { display: grid; gap: 5px; }
|
|
195
|
-
.quickOptions > span { color: var(--muted); font-size: 10px; font-weight: 700; }
|
|
196
|
-
.quickOptions button { height: auto; min-height: 36px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; border-color: #d5e3de; padding: 7px 9px; background: #f7faf8; text-align: left; white-space: normal; }
|
|
197
|
-
.quickOptions button b { color: var(--green); font-size: 10px; }
|
|
198
|
-
.responseForm { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
|
|
199
|
-
.responseForm label { display: grid; gap: 4px; color: var(--muted); font-size: 11px; }
|
|
200
|
-
.responseForm select, .responseForm textarea { box-sizing: border-box; width: 100%; border: 1px solid var(--line-strong); border-radius: 5px; padding: 8px; color: var(--ink); background: var(--paper); }
|
|
201
|
-
.responseForm textarea { min-height: 96px; resize: vertical; }
|
|
202
246
|
.cardActions { display: flex; flex-wrap: wrap; gap: 6px; border-top: 1px solid var(--line); padding-top: 9px; }
|
|
203
|
-
.answerButton { border-color: var(--green); color: var(--green-deep); font-weight: 700; }
|
|
204
247
|
|
|
205
248
|
.markdownBody { min-width: 0; overflow-wrap: anywhere; color: var(--text); }
|
|
206
249
|
.markdownBody p { margin: 5px 0; }
|
|
@@ -219,8 +262,32 @@ button:disabled { cursor: default; opacity: .52; }
|
|
|
219
262
|
.threadList p, .threadList blockquote, .threadList strong { overflow-wrap: anywhere; }
|
|
220
263
|
.threadList section > small { display: block; margin: 6px 0; color: var(--muted); font-size: 11px; }
|
|
221
264
|
.threadList blockquote { margin: 7px 0; border-left: 3px solid #8fb7c5; padding: 6px 8px; background: var(--blue-soft); }
|
|
222
|
-
.
|
|
223
|
-
.
|
|
265
|
+
.discussionPanel { min-width: 0; display: grid; }
|
|
266
|
+
.discussionSummary { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); padding: 11px 14px; background: #f8faf9; }
|
|
267
|
+
.discussionSummary > div { min-width: 0; display: grid; gap: 1px; }
|
|
268
|
+
.discussionSummary strong { font-size: 12px; }
|
|
269
|
+
.discussionSummary span { overflow: hidden; color: var(--blue); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
|
|
270
|
+
.discussionSummary b { min-width: 26px; border-radius: 999px; padding: 2px 7px; background: var(--blue-soft); color: var(--blue); font: 720 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; text-align: center; }
|
|
271
|
+
.threadStack { display: grid; }
|
|
272
|
+
.commentThread { display: grid; gap: 10px; border-bottom: 1px solid var(--line); padding: 14px 16px; background: var(--paper); }
|
|
273
|
+
.commentThreadClosed { background: #fafbfa; }
|
|
274
|
+
.commentThreadSelected { position: relative; z-index: 1; background: #f6fbfc; box-shadow: inset 3px 0 var(--blue); }
|
|
275
|
+
.commentThreadHead { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
|
|
276
|
+
.commentGlyph { flex: 0 0 23px; width: 23px; height: 23px; display: grid; place-items: center; border: 1px solid #8fb7c5; border-radius: 4px; background: var(--blue-soft); color: var(--blue); font-size: 10px; font-weight: 760; }
|
|
277
|
+
.commentThreadMeta { min-width: 0; flex: 1; display: grid; gap: 5px; }
|
|
278
|
+
.commentThreadMeta strong { color: var(--ink); font-size: 12px; }
|
|
279
|
+
.threadPills { min-width: 0; display: flex; flex-wrap: wrap; gap: 4px; }
|
|
280
|
+
.threadPills span { border: 1px solid var(--line); border-radius: 999px; padding: 1px 6px; color: var(--muted); font-size: 9px; line-height: 1.5; }
|
|
281
|
+
.locateSourceButton { flex: 0 0 auto; min-height: 28px; border-color: transparent; padding: 3px 6px; color: var(--green-deep); font-size: 10px; font-weight: 700; }
|
|
282
|
+
.commentSourceButton { box-sizing: border-box; width: 100%; height: auto; min-height: 0; display: grid; gap: 4px; border-color: transparent; border-left: 3px solid #8fb7c5; border-radius: 0 5px 5px 0; padding: 8px 10px; background: var(--blue-soft); text-align: left; white-space: normal; }
|
|
283
|
+
.commentSourceButton span { color: var(--blue); font-size: 9px; font-weight: 730; }
|
|
284
|
+
.commentSourceButton q { overflow-wrap: anywhere; color: var(--ink); font-size: 12px; line-height: 1.55; quotes: none; }
|
|
285
|
+
.commentSourceButton q::before, .commentSourceButton q::after { content: ''; }
|
|
286
|
+
.commentBody { color: var(--ink); }
|
|
287
|
+
.commentActions { display: flex; flex-wrap: wrap; gap: 6px; border-top: 1px solid var(--line); padding-top: 9px; }
|
|
288
|
+
.commentActions button { min-height: 28px; padding: 3px 8px; font-size: 10px; }
|
|
289
|
+
.replyStack { display: grid; gap: 6px; }
|
|
290
|
+
.reply { padding: 8px; background: var(--blue-soft); }
|
|
224
291
|
.aiConversation { margin-top: 4px; border-top: 1px solid var(--line); padding-top: 7px; }
|
|
225
292
|
.chatToggle { width: 100%; border-color: #a8c4ce; color: var(--blue); }
|
|
226
293
|
.collapseChat { width: 30px; min-height: 26px; justify-self: end; padding: 0; font-size: 16px; }
|
|
@@ -292,14 +359,119 @@ button:disabled { cursor: default; opacity: .52; }
|
|
|
292
359
|
.modal textarea { min-height: 120px; resize: vertical; }
|
|
293
360
|
.modal form > div:last-child { display: flex; justify-content: flex-end; gap: 8px; }
|
|
294
361
|
|
|
362
|
+
.reviewDecisionModal { z-index: 34; padding: 20px; }
|
|
363
|
+
.reviewDecisionDialog { box-sizing: border-box; width: min(1120px, 100%); height: min(760px, calc(100vh - 40px)); min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--paper); box-shadow: 0 18px 48px rgba(23,33,29,.24); }
|
|
364
|
+
.reviewDecisionHeader { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); padding: 17px 20px 16px; }
|
|
365
|
+
.reviewDecisionHeader > div { min-width: 0; }
|
|
366
|
+
.reviewDecisionDialog .reviewDecisionHeader h2 { margin: 8px 0 0; overflow-wrap: anywhere; color: var(--ink); font-size: 18px; font-weight: 680; line-height: 1.45; }
|
|
367
|
+
.reviewDecisionHeader > button { flex: 0 0 32px; width: 32px; height: 32px; border: 0; padding: 0; color: var(--muted); font-size: 21px; }
|
|
368
|
+
.decisionTags { display: flex; flex-wrap: wrap; gap: 5px; }
|
|
369
|
+
.decisionTags > * { border: 1px solid var(--line-strong); border-radius: 3px; padding: 2px 6px; color: var(--muted); font-size: 9px; font-weight: 680; }
|
|
370
|
+
.decisionTags > b { border-color: #dfb77f; background: var(--amber-soft); color: #834714; }
|
|
371
|
+
.reviewDecisionBody { min-width: 0; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .8fr); }
|
|
372
|
+
.reviewDecisionContext { min-width: 0; overflow: auto; padding: 28px 34px 48px; }
|
|
373
|
+
.reviewDecisionAside { min-width: 0; min-height: 0; overflow: auto; border-left: 1px solid var(--line); padding: 24px 22px 28px; background: #f7f9f8; }
|
|
374
|
+
.decisionQuestion { border-left: 4px solid var(--amber); padding: 14px 17px; background: var(--amber-soft); }
|
|
375
|
+
.decisionQuestion > span { display: block; margin-bottom: 5px; color: #834714; font-size: 10px; font-weight: 760; }
|
|
376
|
+
.decisionQuestion .markdownBody { color: var(--ink); font-size: 15px; font-weight: 620; line-height: 1.65; }
|
|
377
|
+
.decisionQuestion .markdownBody p { margin: 0; color: var(--ink); }
|
|
378
|
+
.decisionSection { margin-top: 26px; border-top: 1px solid var(--line); padding-top: 18px; }
|
|
379
|
+
.decisionSection h3 { margin: 0 0 9px; color: var(--ink); font-size: 12px; }
|
|
380
|
+
.decisionSection > p { margin: 0; overflow-wrap: anywhere; color: var(--muted); font-size: 12px; }
|
|
381
|
+
.decisionSectionHead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
|
|
382
|
+
.decisionSectionHead span { color: var(--muted); font-size: 10px; }
|
|
383
|
+
.decisionSectionHead button { min-height: 28px; border-color: transparent; padding: 3px 6px; color: var(--green-deep); font-size: 10px; font-weight: 700; }
|
|
384
|
+
.decisionSourceList { display: grid; gap: 8px; }
|
|
385
|
+
.decisionSource { border-left: 3px solid #7ea7b6; padding: 10px 12px; background: var(--blue-soft); }
|
|
386
|
+
.decisionSourceHead { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
|
|
387
|
+
.decisionSourceHead span { min-width: 0; overflow-wrap: anywhere; color: var(--blue); font-size: 9px; font-weight: 730; }
|
|
388
|
+
.decisionSourceHead button { flex: 0 0 auto; min-height: 26px; border-color: transparent; padding: 3px 6px; color: var(--green-deep); font-size: 10px; font-weight: 700; }
|
|
389
|
+
.decisionSource .markdownBody { color: var(--ink); font-size: 12px; line-height: 1.55; }
|
|
390
|
+
.decisionSource .markdownBody > :first-child { margin-top: 0; }
|
|
391
|
+
.decisionSource .markdownBody > :last-child { margin-bottom: 0; }
|
|
392
|
+
.decisionEvidenceList { display: grid; }
|
|
393
|
+
.decisionEvidence { min-width: 0; padding: 13px 0; }
|
|
394
|
+
.decisionEvidence + .decisionEvidence { border-top: 1px solid var(--line); }
|
|
395
|
+
.decisionEvidence code { display: block; overflow-wrap: anywhere; color: var(--blue); font-size: 10px; }
|
|
396
|
+
.decisionEvidence .markdownBody { margin-top: 4px; }
|
|
397
|
+
.decisionEmpty { border-left: 3px solid var(--line-strong); padding: 8px 10px; background: var(--canvas); }
|
|
398
|
+
.decisionAsideHead { display: grid; gap: 3px; margin-bottom: 18px; }
|
|
399
|
+
.decisionAsideHead span { color: var(--green); font-size: 10px; font-weight: 760; }
|
|
400
|
+
.decisionAsideHead strong { color: var(--ink); font-size: 14px; }
|
|
401
|
+
.decisionOptions { min-width: 0; display: grid; gap: 6px; margin: 0 0 18px; border: 0; padding: 0; }
|
|
402
|
+
.decisionOptions legend { margin-bottom: 7px; color: var(--muted); font-size: 10px; font-weight: 700; }
|
|
403
|
+
.decisionOptions button { box-sizing: border-box; width: 100%; height: auto; min-height: 44px; display: grid; grid-template-columns: minmax(0, 1fr) 22px; align-items: center; gap: 9px; border-color: #cdd9d4; padding: 9px 10px; background: var(--paper); text-align: left; white-space: normal; }
|
|
404
|
+
.decisionOptions button span { overflow-wrap: anywhere; font-size: 11px; line-height: 1.45; }
|
|
405
|
+
.decisionOptions button b { color: var(--muted); font: 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; text-align: right; }
|
|
406
|
+
.decisionOptions .selectedDecisionOption { border-color: var(--green); background: var(--mint); }
|
|
407
|
+
.decisionOptions .selectedDecisionOption b { color: var(--green); }
|
|
408
|
+
.decisionForm { display: grid; gap: 12px; }
|
|
409
|
+
.decisionForm label { display: grid; gap: 5px; margin: 0; color: var(--muted); font-size: 10px; font-weight: 680; }
|
|
410
|
+
.decisionForm input, .decisionForm select, .decisionForm textarea { color: var(--ink); background: var(--paper); }
|
|
411
|
+
.decisionForm textarea { min-height: 190px; line-height: 1.6; resize: vertical; }
|
|
412
|
+
.decisionModeHint { margin: -6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
|
|
413
|
+
.decisionActions { position: sticky; bottom: -28px; display: flex; justify-content: space-between; gap: 8px; margin: 20px -22px -28px; border-top: 1px solid var(--line); padding: 13px 22px; background: #f7f9f8; }
|
|
414
|
+
.decisionActions > div { display: flex; justify-content: flex-end; gap: 7px; }
|
|
415
|
+
.decisionResponse { display: grid; gap: 8px; border-left: 4px solid var(--green); padding: 14px 16px; background: var(--mint); }
|
|
416
|
+
.decisionResponse > span { color: var(--green); font-size: 10px; font-weight: 760; }
|
|
417
|
+
.decisionResponse > strong { color: var(--ink); font-size: 14px; }
|
|
418
|
+
.decisionResponse > small { color: var(--muted); font-size: 10px; }
|
|
419
|
+
.decisionResponse > p { margin: 0; }
|
|
420
|
+
.inlineReviewPrompt { position: fixed; z-index: 24; box-sizing: border-box; width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: auto; display: grid; gap: 12px; border: 1px solid #c58d53; border-radius: 8px; padding: 13px; background: var(--paper); box-shadow: 0 14px 34px rgba(23,33,29,.22); font-size: 13px; }
|
|
421
|
+
.inlineReviewPrompt::before { content: ''; position: absolute; left: 26px; width: 10px; height: 10px; border: 1px solid #c58d53; background: var(--paper); transform: rotate(45deg); }
|
|
422
|
+
.inlineReviewPrompt.selectionPromptBelow::before { top: -6px; border-right: 0; border-bottom: 0; }
|
|
423
|
+
.inlineReviewPrompt.selectionPromptAbove::before { bottom: -6px; border-top: 0; border-left: 0; }
|
|
424
|
+
.inlineReviewHead { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
|
|
425
|
+
.inlineReviewHead > div { min-width: 0; display: grid; gap: 7px; }
|
|
426
|
+
.inlineReviewHead .decisionTags > * { font-size: 11px; }
|
|
427
|
+
.inlineReviewHead strong { overflow-wrap: anywhere; color: var(--ink); font-size: 15px; line-height: 1.55; }
|
|
428
|
+
.inlineReviewHead > button { flex: 0 0 24px; width: 24px; min-height: 24px; border: 0; padding: 0; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; }
|
|
429
|
+
.inlineReviewQuestion { display: grid; gap: 5px; border-left: 3px solid var(--amber); padding: 10px 12px; background: var(--amber-soft); }
|
|
430
|
+
.inlineReviewQuestion > span { color: #834714; font-size: 11px; font-weight: 760; }
|
|
431
|
+
.inlineReviewQuestion .markdownBody { color: var(--ink); font-size: 14px; font-weight: 650; line-height: 1.65; }
|
|
432
|
+
.inlineReviewQuestion .markdownBody p { margin: 0; color: var(--ink); }
|
|
433
|
+
.inlineReviewSource { box-sizing: border-box; width: 100%; height: auto; min-height: 0; display: grid; gap: 5px; border-color: transparent; border-left: 3px solid #8fb7c5; border-radius: 0 5px 5px 0; padding: 9px 11px; background: var(--blue-soft); text-align: left; white-space: normal; }
|
|
434
|
+
.inlineReviewSource span { color: var(--blue); font-size: 11px; font-weight: 730; }
|
|
435
|
+
.inlineReviewSource q { overflow-wrap: anywhere; color: var(--ink); font-size: 13px; line-height: 1.55; quotes: none; }
|
|
436
|
+
.inlineReviewSource q::before, .inlineReviewSource q::after { content: ''; }
|
|
437
|
+
.inlineDecisionOptions { gap: 7px; margin-bottom: 0; }
|
|
438
|
+
.inlineDecisionOptions legend { margin-bottom: 5px; font-size: 12px; }
|
|
439
|
+
.inlineDecisionOptions button { grid-template-columns: minmax(0, 1fr) auto; min-height: 44px; gap: 12px; padding: 9px 11px; }
|
|
440
|
+
.inlineDecisionOptions button span { font-size: 13px; line-height: 1.5; }
|
|
441
|
+
.inlineDecisionOptions button b { min-width: 32px; white-space: nowrap; font-size: 11px; text-align: right; }
|
|
442
|
+
.inlineDecisionOptions .selectedDecisionOption b { min-width: 46px; border-radius: 999px; padding: 3px 7px; background: rgba(23,107,80,.12); color: var(--green-deep); text-align: center; }
|
|
443
|
+
.inlineDecisionForm { gap: 10px; padding: 0; }
|
|
444
|
+
.inlineDecisionForm label { gap: 6px; font-size: 12px; }
|
|
445
|
+
.inlineDecisionForm select, .inlineDecisionForm textarea { font-size: 13px; }
|
|
446
|
+
.inlineDecisionForm textarea { min-height: 112px; max-height: 210px; resize: vertical; }
|
|
447
|
+
.inlineDecisionForm .decisionModeHint { font-size: 12px; }
|
|
448
|
+
.inlineReviewDetails { border-top: 1px solid var(--line); padding-top: 9px; color: var(--muted); font-size: 12px; }
|
|
449
|
+
.inlineReviewDetails summary { cursor: pointer; font-weight: 700; }
|
|
450
|
+
.inlineReviewDetails section { display: grid; gap: 6px; margin-top: 10px; }
|
|
451
|
+
.inlineReviewDetails h3 { margin: 0; color: var(--ink); font-size: 12px; }
|
|
452
|
+
.inlineReviewDetails p { margin: 0; overflow-wrap: anywhere; }
|
|
453
|
+
.inlineReviewActions { position: sticky; bottom: -13px; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 2px -13px -13px; border-top: 1px solid var(--line); padding: 10px 13px; background: #f7f9f8; }
|
|
454
|
+
.inlineReviewActions > div { display: flex; justify-content: flex-end; gap: 6px; }
|
|
455
|
+
.inlineReviewActions button { min-height: 32px; padding: 5px 11px; font-size: 13px; }
|
|
456
|
+
|
|
295
457
|
.footer { grid-row: 5; display: flex; align-items: center; justify-content: space-between; gap: 10px; overflow: hidden; border-top: 1px solid var(--line); padding: 0 10px; background: var(--paper); color: var(--muted); font-size: 10px; white-space: nowrap; }
|
|
296
458
|
.footer span { overflow: hidden; text-overflow: ellipsis; }
|
|
297
|
-
.entry { box-sizing: border-box; width: 100%; overflow: hidden; }
|
|
459
|
+
.entry { box-sizing: border-box; width: 100%; display: flex !important; align-items: center !important; justify-content: flex-start !important; gap: 6px !important; overflow: hidden; }
|
|
298
460
|
.entryActive { background: rgba(23,107,80,.1) !important; color: var(--green, #176b50) !important; }
|
|
299
|
-
.entry span:first-child { flex: 0 0
|
|
300
|
-
.entry span:last-child { flex: none; white-space: nowrap; }
|
|
301
|
-
|
|
302
|
-
|
|
461
|
+
.entry span:first-child { width: 14px; flex: 0 0 14px; display: inline-flex; align-items: center; justify-content: center; margin: 0 !important; text-align: center; }
|
|
462
|
+
.entry span:last-child { flex: none; margin: 0 !important; white-space: nowrap; }
|
|
463
|
+
.entry[data-dsh-spec-collab-collapsed] {
|
|
464
|
+
justify-content: center !important;
|
|
465
|
+
gap: 0 !important;
|
|
466
|
+
border-radius: 7px !important;
|
|
467
|
+
padding-inline: 0 !important;
|
|
468
|
+
text-align: center !important;
|
|
469
|
+
}
|
|
470
|
+
.entry[data-dsh-spec-collab-collapsed] span:first-child {
|
|
471
|
+
width: 100% !important;
|
|
472
|
+
flex-basis: 100% !important;
|
|
473
|
+
}
|
|
474
|
+
.entry[data-dsh-spec-collab-collapsed] span:last-child { display: none !important; }
|
|
303
475
|
|
|
304
476
|
@media (max-width: 1080px) {
|
|
305
477
|
.header { grid-template-columns: minmax(200px, 1fr) auto; }
|
|
@@ -310,9 +482,11 @@ button:disabled { cursor: default; opacity: .52; }
|
|
|
310
482
|
.workbench { grid-template-rows: auto auto auto minmax(0, 1fr) 28px; }
|
|
311
483
|
.toolbar { align-items: flex-start; flex-direction: column; }
|
|
312
484
|
.toolbar > div:last-child { width: 100%; justify-content: flex-start; }
|
|
485
|
+
.editorCollabBar { align-items: flex-start; flex-direction: column; gap: 7px; }
|
|
486
|
+
.collabBarActions { width: 100%; }
|
|
487
|
+
.collabMetric { min-width: 96px; }
|
|
313
488
|
.summaryInput { flex: 1 1 120px; width: auto; }
|
|
314
|
-
.selectionPrompt { width:
|
|
315
|
-
.selectionPrompt span { flex: 1; max-width: none; }
|
|
489
|
+
.selectionPrompt { max-width: calc(100vw - 24px); }
|
|
316
490
|
}
|
|
317
491
|
@media (max-width: 680px) {
|
|
318
492
|
.header { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 9px 10px; }
|
|
@@ -331,10 +505,25 @@ button:disabled { cursor: default; opacity: .52; }
|
|
|
331
505
|
.mobileCollab .editorPane { display: none; }
|
|
332
506
|
.review { border-left: 0; }
|
|
333
507
|
.richEditor :global(.toastui-editor-contents) { padding: 28px 20px 90px; }
|
|
508
|
+
.selectionPromptActions { align-items: stretch; flex-direction: column; }
|
|
509
|
+
.selectionPromptButtons { width: 100%; justify-content: flex-end; }
|
|
510
|
+
.inlineReviewPrompt { width: calc(100vw - 24px); }
|
|
511
|
+
.inlineReviewActions { align-items: stretch; flex-direction: column; }
|
|
512
|
+
.inlineReviewActions > div { width: 100%; flex-wrap: wrap; justify-content: flex-end; }
|
|
334
513
|
.footer span:first-child { display: none; }
|
|
335
514
|
.conflictDialog { height: 100%; overflow: auto; grid-template-rows: auto auto auto auto; }
|
|
336
515
|
.conflictColumns, .conflictDiffs, .compareColumns { grid-template-columns: 1fr; }
|
|
337
516
|
.conflictColumns textarea { min-height: 220px; }
|
|
517
|
+
.reviewDecisionModal { padding: 0; }
|
|
518
|
+
.reviewDecisionDialog { width: 100%; height: 100%; border: 0; border-radius: 0; }
|
|
519
|
+
.reviewDecisionHeader { padding: 13px 14px; }
|
|
520
|
+
.reviewDecisionDialog .reviewDecisionHeader h2 { font-size: 15px; }
|
|
521
|
+
.reviewDecisionBody { display: block; overflow: auto; }
|
|
522
|
+
.reviewDecisionContext, .reviewDecisionAside { overflow: visible; }
|
|
523
|
+
.reviewDecisionContext { padding: 20px 16px 34px; }
|
|
524
|
+
.reviewDecisionAside { border-top: 1px solid var(--line); border-left: 0; padding: 20px 16px 24px; }
|
|
525
|
+
.decisionActions { bottom: -24px; margin: 20px -16px -24px; padding: 12px 16px; }
|
|
526
|
+
.decisionActions, .decisionActions > div { flex-wrap: wrap; }
|
|
338
527
|
}
|
|
339
528
|
@media (prefers-reduced-motion: reduce) {
|
|
340
529
|
*, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
|
package/src/client/workflow.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { ParticipantRole, RequirementView, ReviewKind } from '../protocol.t
|
|
|
2
2
|
|
|
3
3
|
export type TaskView = 'review' | 'patches' | 'ready'
|
|
4
4
|
export type WorkflowCommand =
|
|
5
|
-
| { kind: 'open'; view: TaskView }
|
|
5
|
+
| { kind: 'open'; view: TaskView; objectId?: string }
|
|
6
6
|
| { kind: 'bind-workspace' }
|
|
7
7
|
| { kind: 'request-review'; reviewKind: ReviewKind }
|
|
8
8
|
| { kind: 'advance' }
|
|
@@ -51,16 +51,16 @@ export function workflowState(requirement: RequirementView, participantRole: Par
|
|
|
51
51
|
actionLabel: '开始需求检查', command: { kind: 'request-review', reviewKind: 'product-first' },
|
|
52
52
|
}
|
|
53
53
|
if (unanswered.length > 0) return {
|
|
54
|
-
eyebrow: '需要你的判断', title: `回答 ${unanswered.length} 个关键问题`, detail: '
|
|
55
|
-
actionLabel: '
|
|
54
|
+
eyebrow: '需要你的判断', title: `回答 ${unanswered.length} 个关键问题`, detail: '可以连续回答;完成最后一项后,再让 AI 回读全部结论并整理正文。',
|
|
55
|
+
actionLabel: '回答下一题', command: { kind: 'open', view: 'review', objectId: unanswered[0]!.id },
|
|
56
56
|
}
|
|
57
57
|
if (currentPatches.length > 0) return {
|
|
58
58
|
eyebrow: 'AI 已整理改动', title: `审核 ${currentPatches.length} 份正文修改`, detail: '确认改动符合你的判断后,再写入正式需求版本。',
|
|
59
59
|
actionLabel: '查看改动', command: { kind: 'open', view: 'patches' },
|
|
60
60
|
}
|
|
61
61
|
if (productBlockers.length > 0 || !completed('product-second')) return {
|
|
62
|
-
eyebrow: '
|
|
63
|
-
actionLabel: '
|
|
62
|
+
eyebrow: '人工回答已完成', title: '下一步:让 AI 回读全部回答', detail: '点击下方按钮后,AI 会重新检查正文与回答,并生成可逐项审核的正文修改。此步骤不会自动开始。',
|
|
63
|
+
actionLabel: '让 AI 回读并生成修改', command: { kind: 'request-review', reviewKind: 'product-second' },
|
|
64
64
|
}
|
|
65
65
|
return {
|
|
66
66
|
eyebrow: '产品澄清完成', title: '进入产品确认', detail: '当前版本没有产品侧阻塞问题,下一步由产品负责人确认内容。',
|
|
@@ -87,7 +87,7 @@ export function workflowState(requirement: RequirementView, participantRole: Par
|
|
|
87
87
|
}
|
|
88
88
|
if (unanswered.length > 0) return {
|
|
89
89
|
eyebrow: '研发发现待确认项', title: `处理 ${unanswered.length} 个阻塞问题`, detail: '这些问题会影响实现或验收,需要在交付研发前明确。',
|
|
90
|
-
actionLabel: '
|
|
90
|
+
actionLabel: '处理下一题', command: { kind: 'open', view: 'review', objectId: unanswered[0]!.id },
|
|
91
91
|
}
|
|
92
92
|
if (currentPatches.length > 0) return {
|
|
93
93
|
eyebrow: '研发建议了改动', title: `审核 ${currentPatches.length} 份正文修改`, detail: '确认实现约束和测试条件已准确写回需求。',
|
|
@@ -95,7 +95,7 @@ export function workflowState(requirement: RequirementView, participantRole: Par
|
|
|
95
95
|
}
|
|
96
96
|
if (blockers.length > 0) return {
|
|
97
97
|
eyebrow: '仍有待收敛内容', title: '复核已回复的问题', detail: '已有回复尚未消除阻塞,请重新检查或让 AI 根据结论更新正文。',
|
|
98
|
-
actionLabel: '查看问题', command: { kind: 'open', view: 'review' },
|
|
98
|
+
actionLabel: '查看问题', command: { kind: 'open', view: 'review', objectId: blockers[0]!.id },
|
|
99
99
|
}
|
|
100
100
|
if (failedChecks.length > 0) return {
|
|
101
101
|
eyebrow: '交付条件未齐', title: `补齐 ${failedChecks.length} 项需求内容`, detail: '完成条件会指出正文缺少的目标、范围、验收标准或测试约束。',
|