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-34-decision-file-gone.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A decided meeting whose decision file is gone now says so in a Chinese window instead of drawing the English words `decision file gone` ([#3114](https://github.com/ThinkFlowLab/FlyBot/issues/3114)).
2 changes: 1 addition & 1 deletion core/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -12835,7 +12835,7 @@ function ProjectBoardRecord({ record, projectId, call: call4 }) {
proxyRow(meeting),
// A decided meeting whose file is gone still reads as decided; the missing path says so
// instead of the row disappearing with the file.
meeting.path === "" ? (0, import_react23.createElement)("span", { className: "bt-project-missing" }, "decision file gone") : (0, import_react23.createElement)("span", { className: "bt-project-path" }, meeting.path)
meeting.path === "" ? (0, import_react23.createElement)("span", { className: "bt-project-missing" }, t("decision file gone")) : (0, import_react23.createElement)("span", { className: "bt-project-path" }, meeting.path)
));
const pendingRows = meetings.pending.map((meeting) => (0, import_react23.createElement)(
"div",
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 @@ -648,7 +648,7 @@ function ProjectBoardRecord({ record, projectId, call }) {
// A decided meeting whose file is gone still reads as decided; the missing path says so
// instead of the row disappearing with the file.
meeting.path === ''
? h('span', { className: 'bt-project-missing' }, 'decision file gone')
? h('span', { className: 'bt-project-missing' }, t('decision file gone'))
: h('span', { className: 'bt-project-path' }, meeting.path)))
// #1831: a pending decision card carries its level, who it is addressed to, and — for a severe
// card — the host's own refusal to advance it. The words are the host's; the badge only says
Expand Down
34 changes: 34 additions & 0 deletions core/test/project-board-view.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1035,3 +1035,37 @@ test('#2041: the overlay hands the board its own read, so a row opens through it
assert.deepEqual(plain(asked), [{ name: 'project-decision', payload: { id: 'project-1', path } }], 'the overlay own read carried the ask')
assert.match(textIn(redraw()), /Opened through the overlay/, 'the answer is drawn under the row')
})

// #3114 cut 34: a decided meeting whose decision file is gone says so in the window's language. The
// question, the speaker and a present path are host data; only the page's own line is a dictionary key.
const goneRecord = () => ({
project: { id: 'project-1', name: 'FlyBot' }, rows, canManage: false, decisions: { dir: '/team/flybot', files: [] },
meetings: {
decided: [
{ id: 'meeting-d', date: '2026-10-30', question: 'Which board carries the record?', owner: 'Chief', path: '' },
{ id: 'meeting-e', date: '2026-10-31', question: 'Which board carries the next record?', owner: 'Chief', path: 'decisions/2026-10-31-next.md' },
],
pending: [], reason: '',
},
})
// `.bt-project-missing` is drawn on the team block too (`Not set`), so the row is found by its status.
const spanIn = (id, className) => {
const row = all(ProjectBoardPane(goneRecord())).find(node => node.props?.['data-status'] === 'decided' && node.props?.key === `meeting:${id}`)
return all(row).find(node => node.props?.className === className)
}

test('#3114 cut 34: a decided meeting whose file is gone reads in the window language', () => {
assert.equal(textOf(spanIn('meeting-d', 'bt-project-missing')), 'decision file gone', 'an English window is unchanged')
const off = installLocale(fakeLocale('zh'))
try {
assert.equal(textOf(spanIn('meeting-d', 'bt-project-missing')), '决策文件已不在', 'a zh window reads the line in Chinese')
assert.equal(textOf(spanIn('meeting-e', 'bt-project-path')), 'decisions/2026-10-31-next.md', 'a zh window never translates a path')
const row = all(ProjectBoardPane(goneRecord())).find(node => node.props?.['data-status'] === 'decided')
assert.equal(row.props['data-status'], 'decided', 'the row still reads decided')
assert.match(textOf(row), /Which board carries the record\?/, 'the question is host data and stays')
assert.match(textOf(row), /@Chief/, 'the speaker stays as the host named it')
assert.match(textOf(row), /决策文件已不在/)
} finally {
off()
}
})
2 changes: 1 addition & 1 deletion patches/ds-bot/0008-client-bundle.patch
Original file line number Diff line number Diff line change
Expand Up @@ -16303,7 +16303,7 @@ diff --git a/client.js b/client.js
+ proxyRow(meeting),
+ // A decided meeting whose file is gone still reads as decided; the missing path says so
+ // instead of the row disappearing with the file.
+ meeting.path === "" ? (0, import_react23.createElement)("span", { className: "bt-project-missing" }, "decision file gone") : (0, import_react23.createElement)("span", { className: "bt-project-path" }, meeting.path)
+ meeting.path === "" ? (0, import_react23.createElement)("span", { className: "bt-project-missing" }, t("decision file gone")) : (0, import_react23.createElement)("span", { className: "bt-project-path" }, meeting.path)
+ ));
+ const pendingRows = meetings.pending.map((meeting) => (0, import_react23.createElement)(
+ "div",
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 @@ -648,7 +648,7 @@ function ProjectBoardRecord({ record, projectId, call }) {
// A decided meeting whose file is gone still reads as decided; the missing path says so
// instead of the row disappearing with the file.
meeting.path === ''
? h('span', { className: 'bt-project-missing' }, 'decision file gone')
? h('span', { className: 'bt-project-missing' }, t('decision file gone'))
: h('span', { className: 'bt-project-path' }, meeting.path)))
// #1831: a pending decision card carries its level, who it is addressed to, and — for a severe
// card — the host's own refusal to advance it. The words are the host's; the badge only says
Expand Down
34 changes: 34 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 @@ -1035,3 +1035,37 @@ test('#2041: the overlay hands the board its own read, so a row opens through it
assert.deepEqual(plain(asked), [{ name: 'project-decision', payload: { id: 'project-1', path } }], 'the overlay own read carried the ask')
assert.match(textIn(redraw()), /Opened through the overlay/, 'the answer is drawn under the row')
})

// #3114 cut 34: a decided meeting whose decision file is gone says so in the window's language. The
// question, the speaker and a present path are host data; only the page's own line is a dictionary key.
const goneRecord = () => ({
project: { id: 'project-1', name: 'FlyBot' }, rows, canManage: false, decisions: { dir: '/team/flybot', files: [] },
meetings: {
decided: [
{ id: 'meeting-d', date: '2026-10-30', question: 'Which board carries the record?', owner: 'Chief', path: '' },
{ id: 'meeting-e', date: '2026-10-31', question: 'Which board carries the next record?', owner: 'Chief', path: 'decisions/2026-10-31-next.md' },
],
pending: [], reason: '',
},
})
// `.bt-project-missing` is drawn on the team block too (`Not set`), so the row is found by its status.
const spanIn = (id, className) => {
const row = all(ProjectBoardPane(goneRecord())).find(node => node.props?.['data-status'] === 'decided' && node.props?.key === `meeting:${id}`)
return all(row).find(node => node.props?.className === className)
}

test('#3114 cut 34: a decided meeting whose file is gone reads in the window language', () => {
assert.equal(textOf(spanIn('meeting-d', 'bt-project-missing')), 'decision file gone', 'an English window is unchanged')
const off = installLocale(fakeLocale('zh'))
try {
assert.equal(textOf(spanIn('meeting-d', 'bt-project-missing')), '决策文件已不在', 'a zh window reads the line in Chinese')
assert.equal(textOf(spanIn('meeting-e', 'bt-project-path')), 'decisions/2026-10-31-next.md', 'a zh window never translates a path')
const row = all(ProjectBoardPane(goneRecord())).find(node => node.props?.['data-status'] === 'decided')
assert.equal(row.props['data-status'], 'decided', 'the row still reads decided')
assert.match(textOf(row), /Which board carries the record\?/, 'the question is host data and stays')
assert.match(textOf(row), /@Chief/, 'the speaker stays as the host named it')
assert.match(textOf(row), /决策文件已不在/)
} finally {
off()
}
})
Loading