style: satisfy the eslint lane on the plan surfaces

Drop the assertions eslint proved unnecessary (getByRole gains the element
type parameter instead, keeping tsc satisfied), declare the injected
setPlanMode as a function property (the seat face is this-free), and narrow
the fixture's command args without String()'s object stringification arm.
This commit is contained in:
imccyu
2026-07-28 22:36:35 +08:00
parent 76796df39b
commit afaa9ad828
5 changed files with 12 additions and 11 deletions
@@ -314,7 +314,8 @@ function foldPlan(log: readonly SessionEvent[]): { active: boolean; pending: boo
for (const event of log) {
const item = event as unknown as { type: string; data?: Record<string, unknown> }
if (item.type === 'command/run' && item.data?.['name'] === 'plan') {
wanted = String(item.data['args'] ?? '').trim() !== 'off'
const args = item.data['args']
wanted = (typeof args === 'string' ? args : '').trim() !== 'off'
} else if (item.type === 'plan/mode') {
active = item.data?.['active'] === true
wanted = null