The three Settings pickers' buttons are labelled by the label and their
own value (aria-labelledby="lblScene optScene"), so they read "Scene
Office" again as the <select> did. .picker-list gets
overscroll-behavior: contain, so wheeling past a list's end no longer
scrolls #settings and closes it, and a #settings scroll in the frame a
picker opens repositions the list instead of closing it. The page's
scrollbars take magpie's thin thumb (8px, --faint, --muted on hover,
the same as magpie's Mac rule for pages), with --faint read from the
host's --magpie-faint token. Fixes#773. By frederick-wang.
Run on mote at c7ecc7a6 (Bun 1.4.2, HOME=mktemp -d):
packages/agent-office bun test 183 pass, 0 fail; bun scripts/check.mjs
exit 0; packages/agent-office stamp-page.mjs --check exit 0.
A Playwright script of the reviewer's own against the standalone page
(bin/agent-office.mjs --no-open, 600x520, chromium and webkit, light
and dark), run 4 times: the three accessible names are "Language
Auto", "Scene Office", "Quality Medium"; focus+Enter on #optQuality
keeps its list open; four 600px wheels over #optSceneList keep it open;
setting #settings' scrollTop still closes the picker; the list's
scrollbar is 8px with a #b9b9c2 thumb, #56565f under data-theme=dark;
no page errors.
Broken by hand: the same script at the base 10a61c2e fails the three
names in every engine and theme, and focus+Enter closed the Quality
list in 2 of 4 runs (the #773 race); the thumb is transparent there.
Not tried: test/browser.mjs inside a real magpie host window (needs a
magpie web URL); the wheel check also passes at the base in headless
Chromium and WebKit, so it does not prove the overscroll fix.
agent-office's Settings menu drew Language, Scene and Quality as native
<select>s (#744). Each is now a button (aria-haspopup=listbox) that opens
an in-page role=listbox menu, fixed-positioned and clamped to the
viewport, flipping above the button when there is less room below.
Arrow keys, Home, End, Enter, Space, Tab and Escape work; Escape closes
the picker before Settings; an outside pointerdown, a Settings scroll
or a resize closes it. Values go through the same view.scene,
view.quality and manualLang and the same save() as before, so saved
options keep their shape. Asset stamps re-stamped. By frederick-wang.
Run at the reviewed head 790a8f21 on mote (Bun 1.4.2, HOME=mktemp -d):
- packages/agent-office bun test: 183 pass, 0 fail
- repo bun test: 6184 pass, 20 skip, 0 fail
- bun scripts/check.mjs: exit 0; stamp-page.mjs --check: 0
- a Playwright harness (Chromium + WebKit, light + dark, 1200x820 and
600x620) serving the page inside a host frame that answers magpie's
real pagebridge.js: no <select>; Scene list opens in view with all 11
options hit-testable on top; click pick, keyboard pick
(Enter/ArrowDown/ArrowUp/Home/End/Escape/Space/Tab), outside click,
Settings toggle; picking Japanese relabels page and pickers; values
reach options.set as lang/scene/quality strings and survive a reload;
an unknown saved quality is not written over by opening the picker.
72/72 checks, twice. Screenshots looked at in both themes.
- Broken by hand: the old index.html, and app.js without role=option,
each turn the PR's new unit test red.
Not tried: the PR's test/browser.mjs against a live magpie web host
(it needs one); a screen reader. Follow-ups filed separately: the
button's accessible name leaves out the current value.
Adds five scenes to agent-office: library, cyberlab, greenhouse, arctic and rainy night. Each has themed 3D decorations and an ISO/2D canvas palette, and its name is in all 9 languages. Bumps the package to 0.3.0, and the registry summary now says eleven scenes in en and zh. The six existing scenes keep their ISO/2D palette: `scene2.theme` is set only for the five new ids. By kongtou20070406.
Run at the reviewed head 8986d2f on macOS (mote, Bun 1.4.2, Playwright 1.62.0):
- `bun test` in packages/agent-office: 180 pass, 1 fail. The fail is jump.test.mjs's host-restart jumpRequest test: herdr.log was never written at load ~70. It passes 6 of 6 alone at this head and 3 of 3 on main 48d0cec, and this PR doesn't touch jump.mjs or office.hooks.mjs. Filed as #642.
- `bun scripts/check.mjs agent-office`: ok.
- Scene names, loaded from page/model.js: every one of the 9 languages has all 11 names and the same key set as en.
- Playwright, Chromium and WebKit, on the CLI's standalone page with sample agents: all 11 scenes in 3D/ISO/2D at 1440x900, plus 3D at 420x760. There were no page errors and no requests to other origins. The picker selects every scene and stays on screen at 420px.
- Office and Castle in ISO/2D, compared with main 48d0cec in both engines: the dominant colours are the same (31 of 32 top colours shared). The 0.03–3% of pixels that differ are the moving sample workers. At a42cef4, 2D had shared only 2 to 4 of 12.
Not tried: the plugin inside a real magpie window. The pages were run through the standalone CLI page only.
The incremental session scanner frames only fragments still unfinished at
EOF, instead of passing every 64 KiB fragment of a complete cross-chunk
record through the character framer. A framed-part index stops a later
tick from walking text it already framed. Adds regressions for the four
mutation gaps named on #551 and a WebKit CSP diagnostic script.
Reviewed at 5f564b034df26e12b60c40f683922ce0389abdd1 on main 7714b61.
Run on the Mac mini test box (mote, Bun 1.4.2):
- packages/agent-office: HOME=$(mktemp -d) bun test: 167 pass, 0 fail;
bun scripts/stamp-page.mjs --check: exit 0.
- Full repo: HOME=$(mktemp -d) bun test: 4321 pass, 9 skip, 0 fail
(338 files); bun scripts/check.mjs: exit 0.
- Broken by hand: eager framing restored -> both cold-scan tests red;
framed index not advanced -> 2 red (cold-scan EOF, unfinished quoted
brace never reparses); ExtendedTail disabled -> extended-EOF test red.
Each restored -> 167 pass.
- bench-scan.mjs 100 1 1, initial scan: ~29-32 ms at this head vs
~294-319 ms at main.
- Host probe: office.hooks.mjs imported without
MAGPIE_AGENT_OFFICE_PAGE in a sandbox HOME with one Claude session;
snapshot() ok and page/live.js written.
Not tried: a real magpie install of the page.
Agent Office 0.2.0 (QingJ01, #551): a real 3D office, the workbench, and the earlier review's fixes. The session scanner now reads growing JSONL logs incrementally. It keeps a saved offset with 128 guard bytes, carries UTF-8 and partial JSON across ticks, applies a record complete at EOF once, and resets on truncation, inode or birthtime change and same-size rewrites. Readers update per kind (Claude response usage replaced, Grok sidecar daily totals replaced, metadata refreshed apart from logs).
Run at the reviewed head 3bf522f, merged on main 622f950, on mote under HOME=$(mktemp -d):
- agent-office bun test: 163 pass, 0 fail. Full bun test: 4310 pass, 9 skip, 0 fail. check.mjs agent-office and stamp-page --check: exit 0.
- 100MB log: append scan ~50ms -> 0.04-0.2ms (4x100MB: ~240ms -> 0.13-0.29ms). Through office.hooks: first scan 82ms, then 0.11-0.24ms per append.
- Fuzz with real Claude, Codex and Grok logs in random appends vs a fresh scanner: 0 mismatches.
- Broken by hand: 9 mutations of the cursor and readers go red. Gaps left as follow-ups: the inode check alone, ExtendedTail, the Codex title cursor and summary.json re-reads. Also follow-up: the first scan of an image-heavy log (336ms vs 42ms, framePart).
The package is new on npm: the owner publishes 0.2.0 by hand the first time.