fix(ui-web): model picker closes when its own list is scrolled
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 85/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- react, typescript
- Domain
- frontend
Research direction
Start with the capture-phase scroll listener in ui-web/src/components/ModelPicker.tsx and reproduce the model picker in the agent detail dialog. Update it so scrolling .model-picker-right does not dismiss the picker, while scrolling the underlying agent list still does; also compare the scroll handling in features/model/ModelPicker. Verify the behavior in the WebUI on the agents page.
Written by the indexing model from the issue text.
Description
Symptom
In the WebUI, when assigning a model to an already-added agent (the agent detail dialog, e.g. "Pi"), the model picker popover opens correctly. But as soon as the model list inside the picker is scrolled down even slightly, the whole picker panel closes.
Root cause
ui-web/src/components/ModelPicker.tsx registers a capture-phase scroll listener on document (around lines 97-117) whose intent is to close the floating panel when the underlying agent card list scrolls out from under it. The handler closes the panel whenever the anchor's getBoundingClientRect().top moves by more than 1px:
const off = (): void => {
if (Math.abs(anchor.getBoundingClientRect().top - was) > 1) onClose()
}
document.addEventListener('scroll', off, true)
Because the listener is on document in capture phase, it also receives scroll events from the picker's own right-hand model list (.model-picker-right). Scrolling that inner list shifts the anchor row's geometry (the enclosing agent dialog re-centres / layout shifts), the top delta exceeds the threshold, and onClose() fires - so the picker dismisses itself on its own scroll.
The in-code comment already half-acknowledges this ("the model list inside this panel is its own scroller, and the listener below is on the document in capture phase, so choosing a model reaches it") but only handles the resize baseline case, not scrolls originating inside the panel.
Suggested fix
Ignore scroll events whose target is inside the picker itself:
const off = (e: Event): void => {
if (box.current && e.target instanceof Node && box.current.contains(e.target)) return
if (Math.abs(anchor.getBoundingClientRect().top - was) > 1) onClose()
}
Scrolls of the underlying agent list still close the panel (original intent preserved); scrolls of the picker's own model list no longer do.
Notes
- The file header marks this component as DEBT:
features/model/ModelPickeris the rewrite and this copy survives only for the agents page. Worth checking whether the newer implementation has the same capture-phase scroll-dismiss pattern. - Reproduced on the agents page, agent detail dialog, model dropdown, on Windows 11 + Chrome.
- Dominant language
- Python
- Stars
- 4.1k
- Forks
- 94
- Avg merge
- 15h 38m
- Merged PRs (30d)
- 400
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from EverMind-AI/Raven
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
EverMind-AI/Raven#1000 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
EverMind-AI/Raven#998 ·
Maintainers usually reply within 1 day
-
fix: two error hints tell users to install raven by name, which is Sentry's client on PyPIPossibly taken @TheIrvin claimed this 16 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
EverMind-AI/Raven#845 · 2 comments ·
Maintainers usually reply within 1 day
-
security: tool output scrubbing misses raven's own oauth token filesPossibly taken @akushonkamen claimed this 8 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
EverMind-AI/Raven#842 · 2 comments ·
Maintainers usually reply within 1 day
-
WeChat send silently succeeds when iLink returns non-zero ret with errcode=0Possibly taken @akushonkamen claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
EverMind-AI/Raven#210 · 2 comments ·
Maintainers usually reply within 1 day
All issues in EverMind-AI/Raven
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
eclipse-score/inc_someip_gateway#356 ·
Maintainers usually reply within 2 days
-
[BUG]: `GitHubRestAdapter.check_user_permission` and `has_write_access` raise `TypeError` (missing `params`), silently disabling the inactivity lifecyclePossibly taken @tarunagnihotri534 claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
AOSSIE-Org/Gitcord-GithubDiscordBot#167 · 1 comment ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
mihai-vlc/sublime-jsfmt#56 ·
-
comp/cli comp/plugins P2 type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
NousResearch/hermes-agent#141917 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
riscv/riscv-opcodes#441 ·