#22808: test(ui): split baseline browser-test fixes from webchat feature
app: web-ui
size: XS
## Summary
Split out baseline UI test fixes that are not specific to the multi-chat feature.
## Changes
- `ui/src/ui/test-helpers/app-mount.ts`
- ensure app registration side-effects are loaded in browser tests:
- `import "../app.ts";`
- `import type { OpenClawApp } from "../app.ts";`
- `ui/src/ui/navigation.test.ts`
- align expected tab-group labels with current `TAB_GROUPS` values (lowercase labels).
## Why
These failures reproduce on `main` and are unrelated to the webchat multi-session feature itself.
## Validation
- `pnpm -C ui test src/ui/navigation.browser.test.ts src/ui/navigation.test.ts`
- Result: **2 files passed, 40 tests passed**
---
**AI-generated contribution:** This PR was primarily generated with AI assistance and then validated with local tests.
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Fixes two pre-existing test failures on `main`:
- **`navigation.test.ts`**: Updates `TAB_GROUPS` label expectations from capitalized (`"Chat"`, `"Control"`, etc.) to lowercase (`"chat"`, `"control"`, etc.), matching the actual values changed in commit `4b17ce7` (i18n feature) where labels were lowercased but tests were not updated.
- **`app-mount.ts`**: Splits the `OpenClawApp` import into a bare side-effect import (`import "../app.ts"`) to ensure the `@customElement("openclaw-app")` decorator registers the custom element, plus a `type`-only import for the type cast. This makes the side-effect dependency explicit rather than relying on a value import to trigger module evaluation.
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge — it only fixes test expectations and import style with no production code changes.
- Both changes are minimal, test-only fixes that align test expectations with existing source code. The TAB_GROUPS label change is verified against the actual `navigation.ts` source. The import refactor in `app-mount.ts` correctly separates the side-effect import from the type-only import, which is a best practice for custom element registration. No production code is modified.
- No files require special attention.
<sub>Last reviewed commit: a57e2ec</sub>
<!-- greptile_other_comments_section -->
<sub>(3/5) Reply to the agent's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#3721: fix(ui): webchat not displaying chat responses
by maxmaxrouge-rgb · 2026-01-29
82.0%
#22798: feat(webchat): ChatGPT-style multi-chat threads with generated titles
by opnsec · 2026-02-21
80.7%
#14309: fix(ui): resolve chat event session key mismatch
by justonlyforyou · 2026-02-11
80.2%
#23073: fix(ui): strip reply directive tags from assistant messages in WebC...
by x4v13r1120 · 2026-02-22
79.9%
#9218: Fix Control UI chat resync on gaps and terminal events
by figitaki · 2026-02-05
79.3%
#16733: fix(ui): avoid injected newlines when tool output is hidden
by jp117 · 2026-02-15
78.9%
#15110: fix: enable auto-scroll during assistant response streaming
by jwchmodx · 2026-02-13
77.7%
#18694: fix(ui): reset session key to main after /new in webchat
by Phineas1500 · 2026-02-17
77.5%
#4567: Webchat: canonicalize main session key for /new (fix #4446)
by selfboot · 2026-01-30
76.9%
#13548: feat(control-ui): Add quote reply and send message to session features
by Annaxiebot · 2026-02-10
76.9%