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
1 change: 1 addition & 0 deletions changelog.d/3114-cut-35-meeting-status.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A meeting that is still open, deliberating or blocked now reads that state in Chinese on the Project board instead of the host ids `open` / `deliberating` / `blocked` ([#3114](https://github.com/ThinkFlowLab/FlyBot/issues/3114)).
7 changes: 6 additions & 1 deletion core/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -1656,6 +1656,11 @@ var ZH = {
// so the ids that read emits are keys of their own (#1813).
running: "运行中",
stalled: "已停滞",
// The pending decision card is still open, deliberating or blocked (#3114): the ids the host
// keys the card by are keys of their own, beside the lease states above.
open: "待讨论",
deliberating: "讨论中",
blocked: "待答复",
"Projects": "项目",
"New Project": "新建项目",
"Project name": "项目名称",
Expand Down Expand Up @@ -12846,7 +12851,7 @@ function ProjectBoardRecord({ record, projectId, call: call4 }) {
recipientText(meeting.recipients) === null ? null : (0, import_react23.createElement)("span", { className: "bt-project-recipients" }, recipientText(meeting.recipients)),
meeting.advance.allowed ? null : (0, import_react23.createElement)("span", { className: "bt-project-paused" }, meeting.advance.reason),
proxyRow(meeting),
(0, import_react23.createElement)("span", { className: "bt-project-status" }, meeting.status)
(0, import_react23.createElement)("span", { className: "bt-project-status" }, t(meeting.status))
));
const moreLine = (hidden, key) => hidden > 0 ? (0, import_react23.createElement)("div", { key, className: "bt-project-more" }, t("{count} more not shown", { count: hidden })) : null;
const emptyLine = (state) => text(state?.host) !== "" ? hostText(state.host) : t(state?.key ?? "", state?.params);
Expand Down
5 changes: 5 additions & 0 deletions core/src/client/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -1613,6 +1613,11 @@ const ZH = {
// so the ids that read emits are keys of their own (#1813).
running: '运行中',
stalled: '已停滞',
// The pending decision card is still open, deliberating or blocked (#3114): the ids the host
// keys the card by are keys of their own, beside the lease states above.
open: '待讨论',
deliberating: '讨论中',
blocked: '待答复',
'Projects': '项目',
'New Project': '新建项目',
'Project name': '项目名称',
Expand Down
2 changes: 1 addition & 1 deletion core/src/client/project-board.js
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ function ProjectBoardRecord({ record, projectId, call }) {
recipientText(meeting.recipients) === null ? null : h('span', { className: 'bt-project-recipients' }, recipientText(meeting.recipients)),
meeting.advance.allowed ? null : h('span', { className: 'bt-project-paused' }, meeting.advance.reason),
proxyRow(meeting),
h('span', { className: 'bt-project-status' }, meeting.status)))
h('span', { className: 'bt-project-status' }, t(meeting.status))))
// #2021: one line under a capped list says how many rows the host left out. A host that sends no
// total, or one that matches the rows drawn, renders nothing at all.
const moreLine = (hidden, key) => (hidden > 0
Expand Down
38 changes: 38 additions & 0 deletions core/test/project-board-view.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1069,3 +1069,41 @@ test('#3114 cut 34: a decided meeting whose file is gone reads in the window lan
off()
}
})

// #3114 cut 35: a meeting still open, deliberating or blocked drew the host id on the Project
// board. The three ids are keys of their own, the same shape `running` / `stalled` already uses.
// Only the drawn state is the page's copy: `data-status`, the question and the level stay the
// host's own, and a status the client cannot name is drawn as it came, never guessed.
const pendingRecord = () => ({
project: { id: 'project-1', name: 'FlyBot' }, rows, canManage: false, decisions: { dir: '/team/flybot', files: [] },
meetings: {
decided: [],
pending: [
{ id: 'meeting-a', date: '2026-10-30', question: 'Which board carries the record?', status: 'open', level: 'ordinary' },
{ id: 'meeting-b', date: '2026-10-31', question: 'Should the board page?', status: 'deliberating', level: 'major' },
{ id: 'meeting-c', date: '2026-11-01', question: 'Which stream carries it?', status: 'blocked', level: 'severe', blockingQuestion: 'Which stream carries it?' },
{ id: 'meeting-d', date: '2026-11-02', question: 'Which board carries the next record?', status: 'on-hold', level: 'ordinary' },
], reason: '',
},
})
// `.bt-project-status` is drawn once per pending row, so the row is found by its key and the span by its class.
const pendingRow = id => all(ProjectBoardPane(pendingRecord())).find(node => node.props?.key === `meeting:${id}`)
const statusOf = id => textOf(all(pendingRow(id)).find(node => node.props?.className === 'bt-project-status'))

test('#3114 cut 35: a meeting still open, deliberating or blocked reads its state in the window language', () => {
assert.equal(statusOf('meeting-c'), 'blocked', 'an English window is unchanged')
const off = installLocale(fakeLocale('zh'))
try {
assert.equal(statusOf('meeting-a'), '待讨论', 'an open meeting reads its state in Chinese')
assert.equal(statusOf('meeting-b'), '讨论中', 'a deliberating meeting reads its state in Chinese')
assert.equal(statusOf('meeting-c'), '待答复', 'a blocked meeting reads its state in Chinese')
assert.equal(statusOf('meeting-d'), 'on-hold', 'a status the client cannot name is drawn as it came')
const statuses = ['meeting-a', 'meeting-b', 'meeting-c', 'meeting-d'].map(id => pendingRow(id).props['data-status'])
assert.deepEqual(statuses, ['open', 'deliberating', 'blocked', 'on-hold'], 'the attribute stays the host id')
const blocked = pendingRow('meeting-c')
assert.match(textOf(blocked), /Which stream carries it\?/, 'the host blocking question stays as it came')
assert.match(textOf(blocked), /严重/, 'the level still reads in the window language')
} finally {
off()
}
})
7 changes: 6 additions & 1 deletion patches/ds-bot/0001-core-fixes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -1946,7 +1946,7 @@ diff --git a/src/client/i18n.js b/src/client/i18n.js
'Working folder': '工作文件夹',
'Working folder: {folder}': '工作文件夹:{folder}',
Folder: '文件夹',
@@ -838,6 +838,94 @@ const ZH = {
@@ -838,6 +838,99 @@ const ZH = {
'Up one level': '上一级',
'No folders inside.': '里面没有文件夹。',
'Some folders are not shown.': '还有一些文件夹没有显示。',
Expand All @@ -1971,6 +1971,11 @@ diff --git a/src/client/i18n.js b/src/client/i18n.js
+ // so the ids that read emits are keys of their own (#1813).
+ running: '运行中',
+ stalled: '已停滞',
+ // The pending decision card is still open, deliberating or blocked (#3114): the ids the host
+ // keys the card by are keys of their own, beside the lease states above.
+ open: '待讨论',
+ deliberating: '讨论中',
+ blocked: '待答复',
+ 'Projects': '项目',
+ 'New Project': '新建项目',
+ 'Project name': '项目名称',
Expand Down
9 changes: 7 additions & 2 deletions patches/ds-bot/0008-client-bundle.patch
Original file line number Diff line number Diff line change
Expand Up @@ -1199,7 +1199,7 @@ diff --git a/client.js b/client.js
"Working folder": "工作文件夹",
"Working folder: {folder}": "工作文件夹:{folder}",
Folder: "文件夹",
@@ -887,7 +887,95 @@ var ZH = {
@@ -887,7 +887,100 @@ var ZH = {
"Use this folder": "使用这个文件夹",
"Up one level": "上一级",
"No folders inside.": "里面没有文件夹。",
Expand All @@ -1226,6 +1226,11 @@ diff --git a/client.js b/client.js
+ // so the ids that read emits are keys of their own (#1813).
+ running: "运行中",
+ stalled: "已停滞",
+ // The pending decision card is still open, deliberating or blocked (#3114): the ids the host
+ // keys the card by are keys of their own, beside the lease states above.
+ open: "待讨论",
+ deliberating: "讨论中",
+ blocked: "待答复",
+ "Projects": "项目",
+ "New Project": "新建项目",
+ "Project name": "项目名称",
Expand Down Expand Up @@ -16314,7 +16319,7 @@ diff --git a/client.js b/client.js
+ recipientText(meeting.recipients) === null ? null : (0, import_react23.createElement)("span", { className: "bt-project-recipients" }, recipientText(meeting.recipients)),
+ meeting.advance.allowed ? null : (0, import_react23.createElement)("span", { className: "bt-project-paused" }, meeting.advance.reason),
+ proxyRow(meeting),
+ (0, import_react23.createElement)("span", { className: "bt-project-status" }, meeting.status)
+ (0, import_react23.createElement)("span", { className: "bt-project-status" }, t(meeting.status))
+ ));
+ const moreLine = (hidden, key) => hidden > 0 ? (0, import_react23.createElement)("div", { key, className: "bt-project-more" }, t("{count} more not shown", { count: hidden })) : null;
+ const emptyLine = (state) => text(state?.host) !== "" ? hostText(state.host) : t(state?.key ?? "", state?.params);
Expand Down
2 changes: 1 addition & 1 deletion patches/ds-bot/files/src/client/project-board.js
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ function ProjectBoardRecord({ record, projectId, call }) {
recipientText(meeting.recipients) === null ? null : h('span', { className: 'bt-project-recipients' }, recipientText(meeting.recipients)),
meeting.advance.allowed ? null : h('span', { className: 'bt-project-paused' }, meeting.advance.reason),
proxyRow(meeting),
h('span', { className: 'bt-project-status' }, meeting.status)))
h('span', { className: 'bt-project-status' }, t(meeting.status))))
// #2021: one line under a capped list says how many rows the host left out. A host that sends no
// total, or one that matches the rows drawn, renders nothing at all.
const moreLine = (hidden, key) => (hidden > 0
Expand Down
38 changes: 38 additions & 0 deletions patches/ds-bot/files/test/project-board-view.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1069,3 +1069,41 @@ test('#3114 cut 34: a decided meeting whose file is gone reads in the window lan
off()
}
})

// #3114 cut 35: a meeting still open, deliberating or blocked drew the host id on the Project
// board. The three ids are keys of their own, the same shape `running` / `stalled` already uses.
// Only the drawn state is the page's copy: `data-status`, the question and the level stay the
// host's own, and a status the client cannot name is drawn as it came, never guessed.
const pendingRecord = () => ({
project: { id: 'project-1', name: 'FlyBot' }, rows, canManage: false, decisions: { dir: '/team/flybot', files: [] },
meetings: {
decided: [],
pending: [
{ id: 'meeting-a', date: '2026-10-30', question: 'Which board carries the record?', status: 'open', level: 'ordinary' },
{ id: 'meeting-b', date: '2026-10-31', question: 'Should the board page?', status: 'deliberating', level: 'major' },
{ id: 'meeting-c', date: '2026-11-01', question: 'Which stream carries it?', status: 'blocked', level: 'severe', blockingQuestion: 'Which stream carries it?' },
{ id: 'meeting-d', date: '2026-11-02', question: 'Which board carries the next record?', status: 'on-hold', level: 'ordinary' },
], reason: '',
},
})
// `.bt-project-status` is drawn once per pending row, so the row is found by its key and the span by its class.
const pendingRow = id => all(ProjectBoardPane(pendingRecord())).find(node => node.props?.key === `meeting:${id}`)
const statusOf = id => textOf(all(pendingRow(id)).find(node => node.props?.className === 'bt-project-status'))

test('#3114 cut 35: a meeting still open, deliberating or blocked reads its state in the window language', () => {
assert.equal(statusOf('meeting-c'), 'blocked', 'an English window is unchanged')
const off = installLocale(fakeLocale('zh'))
try {
assert.equal(statusOf('meeting-a'), '待讨论', 'an open meeting reads its state in Chinese')
assert.equal(statusOf('meeting-b'), '讨论中', 'a deliberating meeting reads its state in Chinese')
assert.equal(statusOf('meeting-c'), '待答复', 'a blocked meeting reads its state in Chinese')
assert.equal(statusOf('meeting-d'), 'on-hold', 'a status the client cannot name is drawn as it came')
const statuses = ['meeting-a', 'meeting-b', 'meeting-c', 'meeting-d'].map(id => pendingRow(id).props['data-status'])
assert.deepEqual(statuses, ['open', 'deliberating', 'blocked', 'on-hold'], 'the attribute stays the host id')
const blocked = pendingRow('meeting-c')
assert.match(textOf(blocked), /Which stream carries it\?/, 'the host blocking question stays as it came')
assert.match(textOf(blocked), /严重/, 'the level still reads in the window language')
} finally {
off()
}
})
Loading