issennknight (macOS, trackpad): every page scrolled again, but a saved profile opened on the Agents page and then scrolled through often stayed where it was. macOS 13's WebKit scrolls a view under wheels it never dispatches, so the view guard puts each such scroll back and takes three put back the same way within a second as the reader's run (30d3001a0). That rule skipped every put-back while a click held what it clicked, and a click holds for 4s: a profile opened and wheeled through at once was put back on every scroll and the page stood still ("sometimes" = within 4s of a click). A wheel the page hears was fine. Now a held view's put-back is the hold's only when the page was redrawn since the hold last held it (the view's height, or where the first held parts sit, moved from what hold() left in h.lay). A scroll with the page laid out as the hold left it counts as at rest, so the reader's run is given back a click before it too. One scroll by code after a click is still put back: view-wheel-unheard's last case now checks that (its old per-frame code scroll is a run, given back by design). Other inner scrollers checked: the panel's Profiles popover (overflow auto, overscroll-behavior contain) is outside any .view and the guard; the provider editor's .mchips keeps contain except under 640px tall, an earlier deliberate call, left alone. Tests: - New view-wheel-after-click.test.cjs: wheels (unheard and heard) over the long profile's details right after the click, to the foot, past it and back up; the short one's too; nothing but the view scrolls. en, zh, zh-TW, ja, de at 420 and 1000 wide, Chromium and WebKit. Red on origin/main's assets (MAGPIE_AFTER_CLICK_ASSETS) in 20 of 24 subtests, "ten wheels of 30px right after the click scroll the page: from 153 to 153"; the heard cases pass there. Green with the change. - Before the rebase, 59 GUI files the change can reach (every scroll/wheel/view-/click/ hold/held/keep/profile/unroll/jump/stay/still file, old-webkit, text-size, sidebar*, last-page, routing-days-fit, routing-failed-open, update-auto, i18n-keys, gui-de/ja/zh-tw), both engines, at --test-concurrency=4 on a box at load 130-160: 810 of 816 pass. Reds, each red alone on origin/main865df2472too: menu-input-scroll (#3402), old-webkit Safari 15.0 (#3403), quota-holds WebKit (#3777, new); routing-scroll-end 440x620 "stage's columns 3 !== 2" under load, 22/22 alone on both (#3778, new). The whole GUI suite was not run: other sessions' GUI suites held the machine. - go test -tags nogui ./internal/gui ok before the rebase. At the pushed head (rebased onca9b5048e, which touched app.js): the budget tests ok (app.js 1,314,407 bytes of 1,321,319, not raised), and view-wheel-after-click, view-wheel-unheard and click-scroll pass 54/54 in both engines. The 59-file run above was at the basede54b4ff9. Broken by hand: putting back the old gate (any put-back under a hold skipped) turns the new test red as above. Removing the new redraw gate (h = false) is not caught by a test: in both engines a redraw under a click is held by heldSizes before the guard hears a scroll (logged: no put-back during a 30-frame shrink at the foot), and the synthetic redraw fixtures I tried passed with the hold removed too, so none is shipped. Not tried: real macOS 13 / WebKit 16.6 and a real trackpad; the unheard wheel is a capture listener stopping the wheel event.
Subsystem design references
These pages describe current responsibilities, runtime paths, state, and contracts. Start with the subsystem relevant to your task, then follow its source links to verify the implementation you change.
| Subsystem | Reference |
|---|---|
| Built-in subscriptions moving to plugins | Provider and plugin ownership |
| Built-in plugins: registry, lifecycle, plugins.yml, presets, settings schemas, the window's kernel (slots, error boundary, kit) | Plugin runtime |
| Plugins that run on the gateway's requests and replies | Gateway middleware |
| Tools that plugins give, offered to every agent as an MCP server | Plugin tools |
| Plugins that await context recall and observe completed replies | Asynchronous gateway request hooks |
| Claude subscription turns across Claude Code runs | Claude subscription bridge |
| How the gateway picks a provider, key or account, and falls back | Gateway routing and fallback |
| Gateway Session Aggregation | Gateway Session Aggregation |
| Connecting an agent's config to the gateway, drift, disconnect, WSL twins | Agent wiring |
| Providers, keys, subscription accounts, refresh and allowance | Providers and accounts |
| Instructions, MCP servers, skills and RTK written into agents | Library |
Tray, panel, window, magpie web and the page's JSON API |
GUI app shell |
| Encrypted backups and setup synchronization over WebDAV, S3 or GitHub | Sync and backup |
A subsystem can span several packages or repositories. Its reference describes the behavior those parts provide together; it does not need to list every function.
Maintain a reference
Update the owning reference in the same PR when a change alters a documented responsibility, interface, state transition, runtime path, compatibility rule, or failure behavior. An internal refactor that preserves these contracts does not require a prose change.
Keep each fact in one reference and link to it from agent instructions or other pages. Link to source files and named symbols rather than copying implementation details that change frequently. Explain field meanings and constraints that signatures alone do not express.
For a new reference, include the responsibilities and boundaries, source of truth, main runtime paths, state transitions, important constraints, and existing verification commands. Include failure and compatibility behavior where relevant. Document current behavior separately from proposed changes; the proposal belongs in its issue or PR.
Describe a PR's semantic changes
For each affected subsystem, explain the observable change with its trigger and before/after behavior. Include changes to interfaces, state, compatibility, and failure behavior when relevant. Link the affected reference, implementation, and verification evidence. State when a refactor preserves the documented behavior.
For example, a change to plugin adoption should explain which migration state and account condition trigger it, which implementation handles requests before and after adoption, and which test exercises that transition.
This is an author-provided explanation that a reviewer verifies against the diff and surrounding code. It is not an automatically proven compatibility verdict.
Review a change
- Identify the affected subsystem and the actual runtime path, including plugin or built-in ownership.
- Compare the claimed before/after behavior with the base and head implementation. Trace relevant callers and state transitions beyond the changed lines.
- Check that changed contracts appear in the owning reference and that source links still resolve.
- Check that the cited tests or runtime evidence exercise the claimed behavior. Report checks that were not run.
A documentation update alone does not prove the implementation. Existing tests and runtime evidence remain necessary for behavior changes.