Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions test/test_work_ledger_board.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,17 @@ async def test_a_report_the_harness_never_delivered_is_on_the_board_without_the_
assert WORKER not in response.body.decode()


@pytest.mark.asyncio
async def test_a_hosted_discussion_reaches_the_board_row():
"""The Board's "discussing" row reads `discussion` from this payload."""
item_id = _item()
_bind(item_id)
_report(item_id, "progress", discussion={"phase": "talking", "round": 2, "agreed": ["ship A"]})
body, _ = await _call(_state({WORKER: _slot(running=True)}), CONDUCTOR)
talk = body["items"][0]["discussion"]
assert (talk["phase"], talk["round"], talk["agreed"]) == ("talking", 2, ["ship A"])


@pytest.mark.asyncio
async def test_a_board_shows_only_its_own_conductor_s_items():
mine = _item(CONDUCTOR, title="mine")
Expand Down
11 changes: 11 additions & 0 deletions website/capture/conductor-mode-discussing.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Conductor mode Board: discussing row</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/capture/conductor-mode-discussing.tsx"></script>
</body>
</html>
64 changes: 64 additions & 0 deletions website/capture/conductor-mode-discussing.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/**
* Capture page: the conductor mode Board with a milestone whose worker hosts a
* discussion. `?open=1` opens its panel, `?lang=zh-CN` (or any shipped locale)
* picks the language, `?theme=light` the light palette. The panel is the real
* component; only the reads are fixtures.
*/
import { createRoot } from 'react-dom/client'
import { Provider } from 'react-redux'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { api } from '../src/api/client'
import { store } from '../src/store'
import { initI18n } from '../src/i18n/all'
import ConductorModeCrewPanel from '../src/pages/chat/command-center/ConductorModeCrewPanel'
import '../src/index.css'

const params = new URLSearchParams(location.search)
document.documentElement.setAttribute('data-theme', params.get('theme') === 'light' ? 'light' : 'dark')

const ago = (min: number) => new Date(Date.now() - min * 60_000).toISOString()
const item = (id: string, title: string, over: Record<string, unknown>) => ({
schema: 1, item_id: id, title, acceptance: { kind: 'human_approval' }, state: 'open', verdict: null, decision: '', round: 1,
fails: 0, status: 'progress', summary: 'Round 2 running.', artifacts: {}, pr: null, last_report_at: ago(3), created_at: ago(40),
closed_at: null, decided_at: null, orphaned: false, stale: false, acceptance_concrete: true, outstanding: false, terminal: false,
alive: 'running', events: [], reason: null, awaits_person: false, ...over,
})
const discussion = {
phase: 'talking', round: 2, minutes: 12, direction: 'Multiline box in the card, attach button beside it',
agreed: ['One click sends text and files together', 'Offline state says so plainly'],
disputed: [{ point: 'Where the attach button goes', sides: 'A: inside the card · B: reuse the chat box' }],
checking: ['Paste size limit for images'],
recent: [{ who: 'A', text: 'The card already owns its own input.' }, { who: 'B', text: 'Two inputs confuse people.' }],
thread: '/chat/worker-grill',
}
const ITEMS = [
item('a', 'Rename the chip', { state: 'accepted', verdict: 'pass', status: 'done', summary: 'Merged.', terminal: true, alive: 'closed', closed_at: ago(10) }),
item('d', 'Pick the card input', { discussion }),
item('b', 'Update the docs', { summary: 'Editing the guide.' }),
]
const conductor = { schema: 1, slot_key: 'root', goal: 'Let people send rich input from the discussion card.', round: 1, depth: 0, parent_item: null, created_at: ago(60) }
Object.assign(api, {
crewWorkers: async () => ({ root: 'root', workers: [] }),
crewBoard: async () => ({ conductor, conductor_alive: 'idle', items: ITEMS, take_over_available: false }),
sessionSummary: async () => ({ enabled: false, stale: false, intents: [], constraints: [], generated_at: null, user_turns: null, last_activity: null }),
})

const qc = new QueryClient({ defaultOptions: { queries: { retry: false } } })
initI18n(params.get('lang') || 'en')
createRoot(document.getElementById('root')!).render(
<Provider store={store}>
<QueryClientProvider client={qc}>
<div style={{ width: 360, height: 720 }} className="bg-bg text-text border border-border" data-testid="capture-frame">
<ConductorModeCrewPanel root="root" viewing="root" active />
</div>
</QueryClientProvider>
</Provider>,
)
if (params.get('open') === '1') {
const click = () => {
const b = document.querySelector<HTMLButtonElement>('[data-testid="conductor-mode-talk-toggle"]')
if (b) b.click()
else setTimeout(click, 100)
}
click()
}
17 changes: 17 additions & 0 deletions website/src/api/crewBoard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,23 @@ export interface WorkBoardItem {
terminal: boolean
alive: AliveState
events: WorkBoardEvent[]
/** Where a discussion this item's worker hosts stands, from its last report
* (`work_vocab.coerce_discussion`). Absent when the worker hosts none. */
discussion?: WorkDiscussion | null
}

/** A worker-hosted discussion, as its last `work_report` carried it. */
export interface WorkDiscussion {
phase: 'talking' | 'checking' | 'asking' | 'done'
round?: number
minutes?: number
direction?: string
/** An http(s) link or an in-app path (`/chat/...`), checked server-side. */
thread?: string
agreed?: string[]
checking?: string[]
disputed?: { point: string; sides?: string }[]
recent?: { who: string; text: string }[]
}

/** The conductor's own record. No `worker_session_key` anywhere in it. */
Expand Down
11 changes: 11 additions & 0 deletions website/src/i18n/locales/bn.json
Original file line number Diff line number Diff line change
Expand Up @@ -10858,6 +10858,17 @@
"conductor_mode_quiet": "চুপ",
"conductor_mode_recap_title": "সংক্ষেপ",
"conductor_mode_ms_running": "চলছে",
"conductor_mode_ms_discussing": "আলোচনা চলছে",
"conductor_mode_ms_discussing_round": "রাউন্ড {{round}}",
"conductor_mode_talk_counts": "একমত {{agreed}} · মতভেদ {{disputed}} · যাচাই চলছে {{checking}}",
"conductor_mode_talk_show": "আলোচনা দেখাও",
"conductor_mode_talk_hide": "আলোচনা লুকাও",
"conductor_mode_talk_direction": "দিক",
"conductor_mode_talk_agreed": "একমত",
"conductor_mode_talk_disputed": "মতভেদ",
"conductor_mode_talk_checking": "যাচাই চলছে",
"conductor_mode_talk_recent": "সাম্প্রতিক কথা",
"conductor_mode_talk_thread": "পুরো আলোচনা দেখো ↗",
"conductor_mode_ms_not_started": "শুরু হয়নি",
"conductor_mode_ms_next": "পরবর্তী",
"conductor_mode_ms_waiting_approval": "উপরে তোমার অনুমোদনের অপেক্ষায়",
Expand Down
11 changes: 11 additions & 0 deletions website/src/i18n/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -10858,6 +10858,17 @@
"conductor_mode_quiet": "ruhig",
"conductor_mode_recap_title": "Zusammenfassung",
"conductor_mode_ms_running": "In Arbeit",
"conductor_mode_ms_discussing": "In Diskussion",
"conductor_mode_ms_discussing_round": "Runde {{round}}",
"conductor_mode_talk_counts": "Einig {{agreed}} · Strittig {{disputed}} · In Prüfung {{checking}}",
"conductor_mode_talk_show": "Diskussion anzeigen",
"conductor_mode_talk_hide": "Diskussion ausblenden",
"conductor_mode_talk_direction": "Richtung",
"conductor_mode_talk_agreed": "Einig",
"conductor_mode_talk_disputed": "Strittig",
"conductor_mode_talk_checking": "In Prüfung",
"conductor_mode_talk_recent": "Letzte Beiträge",
"conductor_mode_talk_thread": "Ganzen Verlauf ansehen ↗",
"conductor_mode_ms_not_started": "Nicht begonnen",
"conductor_mode_ms_next": "als Nächstes",
"conductor_mode_ms_waiting_approval": "Wartet oben auf deine Freigabe",
Expand Down
11 changes: 11 additions & 0 deletions website/src/i18n/locales/en-XA.json
Original file line number Diff line number Diff line change
Expand Up @@ -10669,6 +10669,17 @@
"conductor_mode_quiet": "[ǫùìèţ ········]",
"conductor_mode_recap_title": "[Ŕèçàþ ········]",
"conductor_mode_ms_running": "[Ìñ þŕøğŕèşş ··········]",
"conductor_mode_ms_discussing": "[Ðìşçùşşìñğ ···············]",
"conductor_mode_ms_discussing_round": "[Ŕøùñð {{round}} ·········]",
"conductor_mode_talk_counts": "[Àğŕèèð {{agreed}} · Ðìşþùţèð {{disputed}} · Ɓèìñğ çĥèçķèð {{checking}} ··················]",
"conductor_mode_talk_show": "[Şĥøẁ ţĥè ðìşçùşşìøñ ·················]",
"conductor_mode_talk_hide": "[Ĥìðè ţĥè ðìşçùşşìøñ ·················]",
"conductor_mode_talk_direction": "[Ðìŕèçţìøñ ··············]",
"conductor_mode_talk_agreed": "[Àğŕèèð ·········]",
"conductor_mode_talk_disputed": "[Ðìşþùţèð ············]",
"conductor_mode_talk_checking": "[Ɓèìñğ çĥèçķèð ············]",
"conductor_mode_talk_recent": "[Ĺàţèşţ ĺìñèş ···········]",
"conductor_mode_talk_thread": "[Şèè ţĥè ƀàçķ-àñð-ƒøŕţĥ ↗ ·················]",
"conductor_mode_ms_not_started": "[Ñøţ şţàŕţèð ··········]",
"conductor_mode_ms_next": "[ñèẋţ ······]",
"conductor_mode_ms_waiting_approval": "[Ẁàìţìñğ øñ ýøùŕ àþþŕøṽàĺ àƀøṽè ·····················]",
Expand Down
11 changes: 11 additions & 0 deletions website/src/i18n/locales/en.manual.json
Original file line number Diff line number Diff line change
Expand Up @@ -4563,6 +4563,17 @@
"conductor_mode_quiet": "quiet",
"conductor_mode_recap_title": "Recap",
"conductor_mode_ms_running": "In progress",
"conductor_mode_ms_discussing": "Discussing",
"conductor_mode_ms_discussing_round": "Round {{round}}",
"conductor_mode_talk_counts": "Agreed {{agreed}} · Disputed {{disputed}} · Being checked {{checking}}",
"conductor_mode_talk_show": "Show the discussion",
"conductor_mode_talk_hide": "Hide the discussion",
"conductor_mode_talk_direction": "Direction",
"conductor_mode_talk_agreed": "Agreed",
"conductor_mode_talk_disputed": "Disputed",
"conductor_mode_talk_checking": "Being checked",
"conductor_mode_talk_recent": "Latest lines",
"conductor_mode_talk_thread": "See the back-and-forth ↗",
"conductor_mode_ms_not_started": "Not started",
"conductor_mode_ms_next": "next",
"conductor_mode_ms_waiting_approval": "Waiting on your approval above",
Expand Down
11 changes: 11 additions & 0 deletions website/src/i18n/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -11106,6 +11106,17 @@
"conductor_mode_quiet": "inactivo",
"conductor_mode_recap_title": "Resumen",
"conductor_mode_ms_running": "En curso",
"conductor_mode_ms_discussing": "En debate",
"conductor_mode_ms_discussing_round": "Ronda {{round}}",
"conductor_mode_talk_counts": "Acordados {{agreed}} · En disputa {{disputed}} · En revisión {{checking}}",
"conductor_mode_talk_show": "Ver el debate",
"conductor_mode_talk_hide": "Ocultar el debate",
"conductor_mode_talk_direction": "Dirección",
"conductor_mode_talk_agreed": "Acordado",
"conductor_mode_talk_disputed": "En disputa",
"conductor_mode_talk_checking": "En revisión",
"conductor_mode_talk_recent": "Últimas frases",
"conductor_mode_talk_thread": "Ver el intercambio ↗",
"conductor_mode_ms_not_started": "Sin empezar",
"conductor_mode_ms_next": "siguiente",
"conductor_mode_ms_waiting_approval": "Esperando tu aprobación arriba",
Expand Down
11 changes: 11 additions & 0 deletions website/src/i18n/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -11106,6 +11106,17 @@
"conductor_mode_quiet": "silencieux",
"conductor_mode_recap_title": "Récapitulatif",
"conductor_mode_ms_running": "En cours",
"conductor_mode_ms_discussing": "En discussion",
"conductor_mode_ms_discussing_round": "Tour {{round}}",
"conductor_mode_talk_counts": "D’accord {{agreed}} · En désaccord {{disputed}} · En vérification {{checking}}",
"conductor_mode_talk_show": "Afficher la discussion",
"conductor_mode_talk_hide": "Masquer la discussion",
"conductor_mode_talk_direction": "Direction",
"conductor_mode_talk_agreed": "Accords",
"conductor_mode_talk_disputed": "Désaccords",
"conductor_mode_talk_checking": "En vérification",
"conductor_mode_talk_recent": "Dernières répliques",
"conductor_mode_talk_thread": "Voir les échanges ↗",
"conductor_mode_ms_not_started": "Pas commencé",
"conductor_mode_ms_next": "suivant",
"conductor_mode_ms_waiting_approval": "En attente de ton approbation ci-dessus",
Expand Down
11 changes: 11 additions & 0 deletions website/src/i18n/locales/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -10858,6 +10858,17 @@
"conductor_mode_quiet": "शांत",
"conductor_mode_recap_title": "सारांश",
"conductor_mode_ms_running": "जारी",
"conductor_mode_ms_discussing": "चर्चा जारी",
"conductor_mode_ms_discussing_round": "दौर {{round}}",
"conductor_mode_talk_counts": "सहमत {{agreed}} · असहमत {{disputed}} · जाँच में {{checking}}",
"conductor_mode_talk_show": "चर्चा दिखाएँ",
"conductor_mode_talk_hide": "चर्चा छिपाएँ",
"conductor_mode_talk_direction": "दिशा",
"conductor_mode_talk_agreed": "सहमत",
"conductor_mode_talk_disputed": "असहमत",
"conductor_mode_talk_checking": "जाँच में",
"conductor_mode_talk_recent": "हाल की बातें",
"conductor_mode_talk_thread": "पूरी बातचीत देखो ↗",
"conductor_mode_ms_not_started": "शुरू नहीं हुआ",
"conductor_mode_ms_next": "अगला",
"conductor_mode_ms_waiting_approval": "ऊपर तुम्हारी मंज़ूरी का इंतज़ार",
Expand Down
11 changes: 11 additions & 0 deletions website/src/i18n/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -11106,6 +11106,17 @@
"conductor_mode_quiet": "inattivo",
"conductor_mode_recap_title": "Riepilogo",
"conductor_mode_ms_running": "In corso",
"conductor_mode_ms_discussing": "In discussione",
"conductor_mode_ms_discussing_round": "Round {{round}}",
"conductor_mode_talk_counts": "Concordati {{agreed}} · In disaccordo {{disputed}} · In verifica {{checking}}",
"conductor_mode_talk_show": "Mostra la discussione",
"conductor_mode_talk_hide": "Nascondi la discussione",
"conductor_mode_talk_direction": "Direzione",
"conductor_mode_talk_agreed": "Concordato",
"conductor_mode_talk_disputed": "In disaccordo",
"conductor_mode_talk_checking": "In verifica",
"conductor_mode_talk_recent": "Ultimi interventi",
"conductor_mode_talk_thread": "Vedi lo scambio ↗",
"conductor_mode_ms_not_started": "Non iniziato",
"conductor_mode_ms_next": "prossimo",
"conductor_mode_ms_waiting_approval": "In attesa della tua approvazione qui sopra",
Expand Down
11 changes: 11 additions & 0 deletions website/src/i18n/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -10610,6 +10610,17 @@
"conductor_mode_quiet": "停止中",
"conductor_mode_recap_title": "まとめ",
"conductor_mode_ms_running": "進行中",
"conductor_mode_ms_discussing": "議論中",
"conductor_mode_ms_discussing_round": "第 {{round}} ラウンド",
"conductor_mode_talk_counts": "合意 {{agreed}} · 相違 {{disputed}} · 確認中 {{checking}}",
"conductor_mode_talk_show": "議論を開く",
"conductor_mode_talk_hide": "議論を閉じる",
"conductor_mode_talk_direction": "方向性",
"conductor_mode_talk_agreed": "合意",
"conductor_mode_talk_disputed": "相違",
"conductor_mode_talk_checking": "確認中",
"conductor_mode_talk_recent": "最近の発言",
"conductor_mode_talk_thread": "やり取りを見る ↗",
"conductor_mode_ms_not_started": "未開始",
"conductor_mode_ms_next": "次",
"conductor_mode_ms_waiting_approval": "上で承認を待っています",
Expand Down
11 changes: 11 additions & 0 deletions website/src/i18n/locales/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -10610,6 +10610,17 @@
"conductor_mode_quiet": "조용함",
"conductor_mode_recap_title": "요약",
"conductor_mode_ms_running": "진행 중",
"conductor_mode_ms_discussing": "논의 중",
"conductor_mode_ms_discussing_round": "{{round}}라운드",
"conductor_mode_talk_counts": "합의 {{agreed}} · 이견 {{disputed}} · 확인 중 {{checking}}",
"conductor_mode_talk_show": "논의 펼치기",
"conductor_mode_talk_hide": "논의 접기",
"conductor_mode_talk_direction": "방향",
"conductor_mode_talk_agreed": "합의",
"conductor_mode_talk_disputed": "이견",
"conductor_mode_talk_checking": "확인 중",
"conductor_mode_talk_recent": "최근 발언",
"conductor_mode_talk_thread": "전체 대화 보기 ↗",
"conductor_mode_ms_not_started": "시작 전",
"conductor_mode_ms_next": "다음",
"conductor_mode_ms_waiting_approval": "위에서 승인을 기다리는 중",
Expand Down
11 changes: 11 additions & 0 deletions website/src/i18n/locales/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -11106,6 +11106,17 @@
"conductor_mode_quiet": "inativo",
"conductor_mode_recap_title": "Resumo",
"conductor_mode_ms_running": "Em andamento",
"conductor_mode_ms_discussing": "Em discussão",
"conductor_mode_ms_discussing_round": "Rodada {{round}}",
"conductor_mode_talk_counts": "Acordados {{agreed}} · Em disputa {{disputed}} · Em verificação {{checking}}",
"conductor_mode_talk_show": "Mostrar a discussão",
"conductor_mode_talk_hide": "Ocultar a discussão",
"conductor_mode_talk_direction": "Direção",
"conductor_mode_talk_agreed": "Acordado",
"conductor_mode_talk_disputed": "Em disputa",
"conductor_mode_talk_checking": "Em verificação",
"conductor_mode_talk_recent": "Últimas falas",
"conductor_mode_talk_thread": "Ver a conversa ↗",
"conductor_mode_ms_not_started": "Não iniciado",
"conductor_mode_ms_next": "próximo",
"conductor_mode_ms_waiting_approval": "Aguardando sua aprovação acima",
Expand Down
11 changes: 11 additions & 0 deletions website/src/i18n/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -11329,6 +11329,17 @@
"conductor_mode_quiet": "затихло",
"conductor_mode_recap_title": "Сводка",
"conductor_mode_ms_running": "Выполняется",
"conductor_mode_ms_discussing": "Обсуждение",
"conductor_mode_ms_discussing_round": "Раунд {{round}}",
"conductor_mode_talk_counts": "Согласовано {{agreed}} · Спорно {{disputed}} · Проверяется {{checking}}",
"conductor_mode_talk_show": "Показать обсуждение",
"conductor_mode_talk_hide": "Скрыть обсуждение",
"conductor_mode_talk_direction": "Направление",
"conductor_mode_talk_agreed": "Согласовано",
"conductor_mode_talk_disputed": "Спорно",
"conductor_mode_talk_checking": "Проверяется",
"conductor_mode_talk_recent": "Последние реплики",
"conductor_mode_talk_thread": "Открыть всю переписку ↗",
"conductor_mode_ms_not_started": "Не начато",
"conductor_mode_ms_next": "далее",
"conductor_mode_ms_waiting_approval": "Ждёт твоего одобрения выше",
Expand Down
11 changes: 11 additions & 0 deletions website/src/i18n/locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -10610,6 +10610,17 @@
"conductor_mode_quiet": "无动静",
"conductor_mode_recap_title": "回顾",
"conductor_mode_ms_running": "进行中",
"conductor_mode_ms_discussing": "讨论中",
"conductor_mode_ms_discussing_round": "第 {{round}} 轮",
"conductor_mode_talk_counts": "已一致 {{agreed}} · 分歧 {{disputed}} · 正在查 {{checking}}",
"conductor_mode_talk_show": "展开讨论",
"conductor_mode_talk_hide": "收起讨论",
"conductor_mode_talk_direction": "方向",
"conductor_mode_talk_agreed": "已一致",
"conductor_mode_talk_disputed": "分歧",
"conductor_mode_talk_checking": "正在查",
"conductor_mode_talk_recent": "最近几句",
"conductor_mode_talk_thread": "看来回 ↗",
"conductor_mode_ms_not_started": "未开始",
"conductor_mode_ms_next": "下一个",
"conductor_mode_ms_waiting_approval": "等你在上方批准",
Expand Down
Loading
Loading