Verify + extend DOM-SETTINGS/SEARCH/NOTIFICATIONS (2026-10-04, 3 nodes)

Session: sidechat/dom-settings
This commit is contained in:
dom-inspector-4
2026-10-04 04:31:11 +00:00
parent 7d0ccba64c
commit ef453ccb26
3 changed files with 164 additions and 54 deletions
+36 -5
View File
@@ -3,6 +3,7 @@
Muse.ai global search (quick-search / command palette). Inspected live on bl via CDP
against the opm browser (warp-opm netns, CDP 127.0.0.1:9440) on 2026-10-04.
All selectors verified against the live DOM.
Re-verified end-to-end 2026-10-04 (open → type → results → empty state → Escape).
Related: `docs/DOM-CHAT-PANEL.md` (chat panel), `docs/DOM-MESSAGES.md`,
`docs/DOM-PAGE-STRUCTURE.md`.
@@ -153,14 +154,40 @@ document.querySelectorAll('[data-testid="hatch-quick-search-frame"] [data-testid
|---|---|---|
| `chat:main` | Main chat | `chat:main` |
| `chat:thread:<uuid>` | Sidechat thread — **the thread UUID is embedded** | `chat:thread:2e2c90a1-4b17-4590-b8ba-fb17d8018d36` |
| `chat:message:<msg-id>:<n>` | Individual message match inside a thread | `chat:message:assistant-msg-b2a4e27d-4970-8b1e-8863-a96ed0aa1401:20420` |
| `chat:message:assistant-msg-<uuid>:<n>` | Individual assistant message match inside a thread | `chat:message:assistant-msg-b2a4e27d-4970-8b1e-8863-a96ed0aa1401:20420` |
| `chat:message:<uuid>:<n>` | Individual message match (non-assistant id form) | `chat:message:08a44cdd-91a7-408e-9073-743e7e15d50f:20890` |
Search matches **both threads and individual messages**. A query like `"heartbeat"`
returned 12 results mixing `chat:thread:*` and `chat:message:*` values.
returned 12 results on 2026-10-04 re-verify: 6 `chat:thread:*` + 6 `chat:message:*`,
mixing both message id forms.
This is a ready-made thread-lookup mechanism: search for a sidechat name, read
`data-value`, extract the UUID — no title-matching or URL polling needed.
### Full result-item markup (verified 2026-10-04)
```html
<div data-slot="command-item"
data-testid="command-palette-item"
id="radix-_r_1e9_" <!-- random per item per render — do not match -->
cmdk-item=""
role="option"
aria-disabled="false" aria-selected="true"
data-disabled="false" data-selected="true"
data-value="chat:thread:778fbbfa-3bf8-4163-bfe6-92c0f88657e8"
class="... h-12 items-center gap-2 p-1.5 ...">
<span class="bg-fill-secondary flex size-9 ...rounded-full">…svg icon…</span>
<span class="flex min-w-0">…title + snippet + relative time…</span>
</div>
```
Notes:
- The **first result is auto-highlighted** on render (`aria-selected="true"` /
`data-selected="true"`); the input's `aria-activedescendant` points at it.
Enter would activate it (navigation not tested).
- `data-value` is the stable automation hook; `id` is random per render.
---
## 5. Groups
@@ -247,9 +274,13 @@ Detection: `querySelector('[cmdk-empty]')` non-null, or item count `=== 0`.
// CDP: Input.dispatchMouseEvent mousePressed + mouseReleased at (r.x + r.width/2, r.y + r.height/2)
```
JS `.click()` on the trigger is unreliable (Radix wants trusted events).
2. **Never JS-touch the input.** `focus()`, `click()`, or the native value setter
on `command-palette-search-input` closes the dialog. The input auto-focuses on
open — just send trusted key events (`rawKeyDown` → `char` → `keyUp`).
2. **Type with CDP `Input.insertText`** (verified 2026-10-04 — simplest reliable
path). The raw `rawKeyDown` → `char` → `keyUp` sequence also works but is
unnecessary. **Never JS-touch the input** (`focus()`, `click()`, native value
setter): synthetic interaction on the input **closes the dialog** (verified
twice). One exception observed once: `input.select()` on the already-open
dialog did *not* close it — usable for clearing, but Escape-and-reopen
remains the safest clear.
3. **Closed === absent.** After Escape the dialog node is gone; check
`querySelector(...) === null`, with optional chaining (`?.offsetParent`) —
without `?.` a missing node throws and a truthy error string can false-positive