Prompt rail: the Thread map container carries the cmux.agent.threadMap identifier
Follow-up from manaflow-ai/cmuxterm-hq#7103 (capture tooling review of the rail sweep).
A capture of a release build couldn't measure the session rail's ("Thread map") container rect: the rail didn't show up in the AX tree the capture read, and release builds have no page debug hook. Leo asked for the rail at one fixed max height that nothing changes (#34666: "the height of the left scroll rail should never be affected by anything"), so the capture needs a stable handle to check that height.
Change
- The rail's
<nav>gets the DOM idcmux.agent.threadMap(RAIL_ACCESSIBILITY_IDinthreadMinimap/railSide.ts). macOS accessibility exposes a web element's DOM id as itsAXDOMIdentifier. Both rails get it: the compactThreadMinimapand the fullScrollMap. A page draws only one of them, so the id is unique. - The name follows the native
cmux.<area>.<control>scheme (plans/cmux-next/agent-interop-ax.md) and is API: add new ids, never rename this one. - No layout, default or visual change. The
aria-label("Thread map") stays as it is. No CSS matches#cmux.agent.threadMap; the dots would make it a class selector anyway.
Tests
bun test test/thread-minimap-side.test.tsx (in webviews/): the new case, for the compact and full arms, checks that exactly one element has the id, that it is the rail nav, and that the literal is pinned.
- Without the id: 2 fail (
Expected length: 1, Received length: 0), 6 pass. - With it: 8 pass.
Observed / Not run
- Observed: the red/green run above.
vp fmt --checkandvp lintpass on the four changed files. The pre-push hooks passed withCMUX_LOCAL_HEAVY_CHECKS=0. - Not run: the type-aware lint and the full type check (
vp check) didn't finish locally in time, so CI'sweb lintjob covers them. The change adds one string attribute. - Not run: a release-build AX read. Whether CuaDriver's
get_window_statereports the DOM id in itsidentifierfield (AXDOMIdentifier rather than AXIdentifier) gets checked on the rail lane's next capture.
Changelog
none
risk: low (one attribute on one element, plus a test)
🤖 Generated with Claude Code
Agent session: agent session
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Gives the "Thread map" rail container a stable DOM id so a release-build capture can find the rail and measure its fixed height, even though release builds have no page debug hook.
- Adds
id="cmux.agent.threadMap"to the rail's<nav>in both the compactThreadMinimapand the fullScrollMap; macOS accessibility exposes it asAXDOMIdentifier, and a page draws only one rail so the id stays unique. - The id follows the
cmux.<area>.<control>naming scheme and is API: add new ids, never rename this one. - No layout, default, or visual change; the
aria-labelstays "Thread map" and no CSS targets the id. - Tests cover both arms and pin the literal: 8 pass with the id, 2 fail without it.