Problem
Issue A's investigation only audited LifecycleHost, GatewayHost, and ToolStreamHost — the three interfaces that surfaced as broken via gateway-disconnect symptoms. The RemoteClawApp class is also cast (via as unknown as Parameters<typeof X>[0]) to several other host interfaces:
PollingHost (in ui/src/ui/app-polling.ts:6)
ChatHost (in ui/src/ui/app-chat.ts:13)
SettingsHost (in ui/src/ui/app-settings.ts:40)
ScrollHost (in ui/src/ui/app-scroll.ts:4)
CompactionHost (in ui/src/ui/app-tool-stream.ts:263 — extends ToolStreamHost)
Same risk class as Issue A: any required field on these interfaces that's missing on the production class will be undefined at runtime, with no type-error or test failure.
Audit method
For each host interface listed above:
- Read the type definition; enumerate non-optional fields.
- For each non-optional field, grep
ui/src/ui/app.ts for an initializer ({field} = , @state() {field}, private {field}).
- Report any field declared on the interface but missing on the class.
Reproducible script:
# Example for PollingHost
PHOST_FIELDS=$(awk '/^type PollingHost = \{/,/^\};/' ui/src/ui/app-polling.ts | grep -oE '^ [a-z][a-zA-Z]+:' | tr -d ':' | sed 's/^ //')
for field in $PHOST_FIELDS; do
if ! grep -qE "(@state\(\)\s+|private\s+|public\s+|protected\s+)?${field}\s*[!?]?\s*[:=]" ui/src/ui/app.ts; then
echo "MISSING (PollingHost): $field"
fi
done
Repeat per interface; consolidate findings.
Acceptance criteria
Commit message
fix(ui): restore missing host-interface field initializers on RemoteClawApp — PollingHost/ChatHost/SettingsHost/ScrollHost/CompactionHost audit
Notes
Order of operation matters: this audit is more useful after Issue B (cast removal) lands, because at that point TypeScript will surface the missing fields as compile errors instead of requiring a manual audit. If Issue B is merged first, this issue may auto-close (the audit becomes "fix the new tsc errors"). Track both; close H if B's PR resolves all surfaced gaps.
References
- Related: Issue A (3 fields found in initial investigation)
- Related: Issue B (cast removal makes this audit unnecessary)
- Related: Issue D (extend smoke test to cover findings)
Problem
Issue A's investigation only audited
LifecycleHost,GatewayHost, andToolStreamHost— the three interfaces that surfaced as broken via gateway-disconnect symptoms. TheRemoteClawAppclass is also cast (viaas unknown as Parameters<typeof X>[0]) to several other host interfaces:PollingHost(inui/src/ui/app-polling.ts:6)ChatHost(inui/src/ui/app-chat.ts:13)SettingsHost(inui/src/ui/app-settings.ts:40)ScrollHost(inui/src/ui/app-scroll.ts:4)CompactionHost(inui/src/ui/app-tool-stream.ts:263— extendsToolStreamHost)Same risk class as Issue A: any required field on these interfaces that's missing on the production class will be
undefinedat runtime, with no type-error or test failure.Audit method
For each host interface listed above:
ui/src/ui/app.tsfor an initializer ({field} =,@state() {field},private {field}).Reproducible script:
Repeat per interface; consolidate findings.
Acceptance criteria
pnpm tsgo,pnpm test,pnpm checkall green.Commit message
Notes
Order of operation matters: this audit is more useful after Issue B (cast removal) lands, because at that point TypeScript will surface the missing fields as compile errors instead of requiring a manual audit. If Issue B is merged first, this issue may auto-close (the audit becomes "fix the new tsc errors"). Track both; close H if B's PR resolves all surfaced gaps.
References