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/228-plain-language.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The normal-user pages — dashboard, console, repository page and settings — now say workspace instead of FlyBot instance, and the start, stop and reinitialize controls are named for the workspace and each carry a one-line hint. The footer brand line and the stage-mode form values are unchanged.
2 changes: 1 addition & 1 deletion src/views/checklist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export function setupChecklist(state: SetupState, t: Translate): SetupChecklist
},
{
key: 'instance',
title: t('启动 FlyBot 实例', 'Start the FlyBot instance'),
title: t('启动工作区', 'Start workspace'),
done: state.instanceReady,
action: { href: repoHref, label: t('打开仓库启动', 'Open the repository') },
blocked: !state.modelConfigured && !state.platformAvailable
Expand Down
52 changes: 26 additions & 26 deletions src/views/pages.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion test/limits.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ test('the repository page shows used / cap for both ceilings', async () => {
} as Parameters<typeof repoPage>[0])
assert.match(html, /data-usage-line/)
assert.match(html, /Repositories used 1\/2/)
assert.match(html, /FlyBot instances 1\/3/)
assert.match(html, /workspaces 1\/3/)
} finally {
store.close()
}
Expand Down
4 changes: 2 additions & 2 deletions test/nextAction.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ test('an open question outranks an alert, because only the user can answer it',
}
const section = nextActionBlock(render('en', { questions: [question], alerts: [criticalAlert] }))
assert.match(section, /data-next-action="questions"/)
assert.match(section, /FlyBot is waiting on 1 answer/)
assert.match(section, /Workspace is waiting on 1 answer/)
assert.deepEqual(targets(section), ['#inbox'], 'the answer form is one tap away')
assert.doesNotMatch(section, /45 minutes/, 'an alert does not displace a question only the user can answer')
})
Expand Down Expand Up @@ -215,7 +215,7 @@ test('platform quota satisfies the model step, so the next action is the instanc
const html = render('en', { setup })
const section = nextActionBlock(html)
assert.match(section, /data-next-action="setup"/)
assert.match(section, /Start the FlyBot instance/, 'the platform-funded first run advances past the model step')
assert.match(section, /Start workspace/, 'the platform-funded first run advances past the model step')
assert.doesNotMatch(section, /Add a model provider/, 'an optional model step is not the primary action')
assert.match(html, /Using platform quota/, 'the checklist still says where the model comes from')
})
Expand Down
20 changes: 10 additions & 10 deletions test/pages.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2107,7 +2107,7 @@ test('both repository lists translate the reviewer badge', () => {
// `Instances.stop()` keeps the previous error and a starting instance has none, so
// every non-ready state must say what it is doing, in both languages, with its own
// action — and only `failed` may report a health failure.
test('every FlyBot instance state names itself, its own action and never calls a non-ready instance healthy', () => {
test('every workspace state names itself, its own action and never calls a non-ready workspace healthy', () => {
const config = testConfig({ flybot: { ...testConfig().flybot, instanceImage: 'image' } })
const store = new Store(':memory:')
try {
Expand Down Expand Up @@ -2136,12 +2136,12 @@ test('every FlyBot instance state names itself, its own action and never calls a
return card.slice(0, end)
}
const cases = [
{ status: 'ready', lastError: null, zhBadge: '就绪', enBadge: 'Ready', zhReason: '健康检查正常', enReason: 'Health check ok', zhAction: '停止 FlyBot', enAction: 'Stop FlyBot', action: 'instance/stop' },
{ status: 'failed', lastError: 'TypeError: fetch failed', zhBadge: '失败', enBadge: 'Failed', zhReason: 'Bridge 无法连接', enReason: 'Bridge unreachable', zhAction: '启动 FlyBot', enAction: 'Start FlyBot', action: 'instance' },
{ status: 'failed', lastError: null, zhBadge: '失败', enBadge: 'Failed', zhReason: '健康检查失败', enReason: 'Health check failed', zhAction: '启动 FlyBot', enAction: 'Start FlyBot', action: 'instance' },
{ status: 'stopped', lastError: 'health check failed: stopped from the console', zhBadge: '已停止', enBadge: 'Stopped', zhReason: '实例已停止,不会接受新任务', enReason: 'The instance is stopped and takes no new jobs', zhAction: '启动 FlyBot', enAction: 'Start FlyBot', action: 'instance' },
{ status: 'starting', lastError: null, zhBadge: '启动中', enBadge: 'Starting', zhReason: '实例正在创建,还未就绪', enReason: 'The instance is being created and is not ready yet', zhAction: '重新初始化 FlyBot', enAction: 'Reinitialize FlyBot', action: 'instance' },
{ status: 'provisioning', lastError: 'TypeError: fetch failed', zhBadge: '初始化中', enBadge: 'Provisioning', zhReason: '实例正在初始化,还未就绪', enReason: 'The instance is being provisioned and is not ready yet', zhAction: '重新初始化 FlyBot', enAction: 'Reinitialize FlyBot', action: 'instance' },
{ status: 'ready', lastError: null, zhBadge: '就绪', enBadge: 'Ready', zhReason: '健康检查正常', enReason: 'Health check ok', zhAction: '停止工作区', enAction: 'Stop workspace', action: 'instance/stop' },
{ status: 'failed', lastError: 'TypeError: fetch failed', zhBadge: '失败', enBadge: 'Failed', zhReason: 'Bridge 无法连接', enReason: 'Bridge unreachable', zhAction: '启动工作区', enAction: 'Start workspace', action: 'instance' },
{ status: 'failed', lastError: null, zhBadge: '失败', enBadge: 'Failed', zhReason: '健康检查失败', enReason: 'Health check failed', zhAction: '启动工作区', enAction: 'Start workspace', action: 'instance' },
{ status: 'stopped', lastError: 'health check failed: stopped from the console', zhBadge: '已停止', enBadge: 'Stopped', zhReason: '实例已停止,不会接受新任务', enReason: 'The instance is stopped and takes no new jobs', zhAction: '启动工作区', enAction: 'Start workspace', action: 'instance' },
{ status: 'starting', lastError: null, zhBadge: '启动中', enBadge: 'Starting', zhReason: '实例正在创建,还未就绪', enReason: 'The instance is being created and is not ready yet', zhAction: '重新初始化工作区', enAction: 'Reinitialize workspace', action: 'instance' },
{ status: 'provisioning', lastError: 'TypeError: fetch failed', zhBadge: '初始化中', enBadge: 'Provisioning', zhReason: '实例正在初始化,还未就绪', enReason: 'The instance is being provisioned and is not ready yet', zhAction: '重新初始化工作区', enAction: 'Reinitialize workspace', action: 'instance' },
]
for (const state of cases) {
saveInstance(state.status, state.lastError)
Expand All @@ -2158,7 +2158,7 @@ test('every FlyBot instance state names itself, its own action and never calls a
assert.ok(instanceCard(zh).includes(`action="/repos/${repo.id}/${state.action}"`), `${name}: the zh action posts its own form`)
assert.ok(instanceCard(en).includes(`action="/repos/${repo.id}/${state.action}"`), `${name}: the en action posts its own form`)
if (state.status === 'ready') {
assert.ok(!en.includes('FlyBot instance:'), 'a ready instance raises no page-level message')
assert.ok(!en.includes('Workspace: '), 'a ready instance raises no page-level message')
assert.ok(!en.includes('Health check failed'), 'a ready instance never reports a failure')
continue
}
Expand All @@ -2167,8 +2167,8 @@ test('every FlyBot instance state names itself, its own action and never calls a
assert.ok(!instanceCard(en).includes('Health check ok'), `${name}: a non-ready instance is never called healthy in en`)
assert.ok(!zh.includes('健康检查正常'), `${name}: the zh page never calls a non-ready instance healthy`)
assert.ok(!en.includes('Health check ok'), `${name}: the en page never calls a non-ready instance healthy`)
assert.ok(zh.includes(`FlyBot 实例:${state.zhBadge} · ${state.zhReason}`), `${name}: the zh page message repeats the status and the reason`)
assert.ok(en.includes(`FlyBot instance: ${state.enBadge} · ${state.enReason}`), `${name}: the en page message repeats the status and the reason`)
assert.ok(zh.includes(`工作区:${state.zhBadge} · ${state.zhReason}`), `${name}: the zh page message repeats the status and the reason`)
assert.ok(en.includes(`Workspace: ${state.enBadge} · ${state.enReason}`), `${name}: the en page message repeats the status and the reason`)
if (state.lastError !== null && state.status !== 'failed') {
assert.ok(!summaryLine(en).includes(state.lastError), `${name}: an old error is not the reason of a non-failed state`)
}
Expand Down
Loading
Loading