test(ui): extend app smoke test to PollingHost/ChatHost/SettingsHost/ScrollHost/CompactionHost (#2496)#2504
Merged
alexey-pelykh merged 1 commit intomainfrom Apr 23, 2026
Conversation
…ScrollHost/CompactionHost — defense-in-depth against sync regressions (#2496) Audit verdict: all required fields of the five additional host interfaces are already present on RemoteClawApp — the class is structurally compliant. Verified by a clean `tsgo` run plus a sanity check (removing chatMessage triggered 30+ tsc errors via app-chat.ts / app-gateway.node.test.ts, and removing nodesPollInterval was caught by the new PollingHost + SettingsHost smoke assertions), confirming the structural checks enforced after #2494 removed the `as unknown as Parameters<typeof X>[0]` casts. No production changes needed. The smoke test in #2495 is extended with five additional cases mirroring the existing pattern: - PollingHost (4 required fields) - ChatHost (11 required fields) - ScrollHost (11 required fields, incl. inherited HTMLElement members) - SettingsHost (composed via spread over Polling/Scroll/Chat + 8 own) - CompactionHost (all own additions optional — reuses ToolStreamHost list) Optional fields (password, agentsList, agentsSelectedId, agentsPanel, pendingGatewayUrl, pendingGatewayToken on SettingsHost; compactionStatus, compactionClearTimer, fallbackStatus, fallbackClearTimer on CompactionHost) are correctly excluded per the issue's cosmetic-deferral guidance. Runtime coverage is redundant with tsc enforcement in the happy path, but catches fixture-based regressions where synthetic plain-object hosts satisfy the interface while the production class diverges — the same failure mode #2493 exposed and #2495 defended against for the first three interfaces. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extends the host-interface smoke test added in #2495 to cover the five
additional interfaces flagged in #2496 — PollingHost, ChatHost, ScrollHost,
SettingsHost, and CompactionHost. No production code changes.
Audit result
All required fields of every audited interface are already present on
RemoteClawApp. The class is structurally compliant — no fieldinitializers needed restoration.
Verification:
./node_modules/.bin/tsgo -p tsconfig.jsonexits 0 with zero output onthe current tree.
@state() chatMessage = "";fromapp.ts:140triggered 30+
tsgoerrors includingProperty 'chatMessage' is missing in type 'RemoteClawApp' but required in type 'ChatHost'across
app-chat.tsandapp-gateway.node.test.ts— confirming thestructural checks enforced after refactor(ui): remove
as unknown as Parameters<typeof X>[0]casts — restore structural type-checking #2494 are active.nodesPollInterval: number | null = null;from
app.ts:312was caught by the newPollingHost+SettingsHostsmoke assertions with clear per-interface labels.
This matches the prediction in #2496's own note:
#2494 (Issue B) merged first. No tsc errors surfaced. The remaining
deliverable is AC #4 — extending the smoke test for defense-in-depth
against fixture-based regressions (the same motivation as #2495).
Findings per interface
?:optional)Optional fields excluded from assertions per issue guidance
(cosmetic-severity deferred):
password,agentsList,agentsSelectedId,agentsPanel,pendingGatewayUrl,pendingGatewayTokenonSettingsHost;compactionStatus,compactionClearTimer,fallbackStatus,fallbackClearTimeronCompactionHost.Changes
Only
ui/src/ui/app.smoke.test.ts:*_HOST_FIELDSconstants:POLLING_HOST_FIELDS,CHAT_HOST_FIELDS,SCROLL_HOST_FIELDS,SETTINGS_HOST_FIELDS,COMPACTION_HOST_REQUIRED_FIELDS.SETTINGS_HOST_FIELDScomposed via spread over Polling/Scroll/Chat +own required members to mirror the interface's
&composition.COMPACTION_HOST_REQUIRED_FIELDSaliasesTOOL_STREAM_HOST_FIELDS(allCompactionHost additions are optional); the separate test case documents
the explicit audit and guards against future required additions.
it(...)cases following the existing pattern.Test count: 3 → 8 passing.
CI gates (local verification)
pnpm check→ ✅ (format, tsgo, lint, script lints all clean)pnpm test→ ✅ 7014 pass / 3 skip across 800 files; UI suite 288 passacross 17 files
pnpm canvas:a2ui:bundle→ ✅ 457 kB chunk generatedTest plan
pnpm tsgogreenpnpm lintgreenpnpm format:checkgreenpnpm checkgreen (includes all of the above plus script lints)pnpm testgreen (full suite, node + ui)tsgo(structural)Closes #2496.
🤖 Generated with Claude Code