DeepSeek Harness macOS panel clicks: focus and anchor
"Is Finder on my Mac broken? Search does not work and the sidebar will not open other folders" — that is how one user originally described it. In reality it was DSH's own directory picker: the panel appeared, but focus was never on it. The same machine also has a different class of menu problem where clicks land but the position is wrong. Both look like broken UI and the fixes are completely different (#10748, #10607).
DeepSeek Harness: Triage table: three kinds of "click does nothing"
First decide whether the whole block is unresponsive, part of it is unresponsive, or it responds but is misplaced — the three point at focus, window layering, and anchors respectively.
| Symptom | Interactive object | Direction |
|---|---|---|
| Sidebar and search both dead | system-level native panel | panel is not the key window |
| Right file list works, left does not | two regions of the same panel | the left is an AppKit table view |
| Menu clicks but shows text through and is offset | in-page web menu | CSS anchors not applied |
Keep the order fixed: confirm "does it click", then "which part clicks", and only then look at visuals.
DSH plugin: Type 1: the panel never gets focus
The panel is shown as an accessory app and the activation call happens before the panel is created; at that point the process has no window, so the system hands focus straight back.
- Symptom: click "add new folder", the panel appears, sidebar clicks do nothing, and typing in the search box produces no caret.
- The community's standalone reproduction: run that JXA directly, and the panel is shown by the
osascriptprocess. - The hosting service is
Open and Save Panel Service (osascript), confirming it is a system-level panel, not a web element. mdfindreturned normally at the same time, ruling out a damaged Spotlight index.- Conclusion:
activateIgnoringOtherApps(true)is called beforeNSOpenPanel.openPanel, so the panel appears visible but not as the key window.
DeepSeek Harness: Type 2: the right side clicks, the left side does not
The sidebar is an AppKit table view whose acceptsFirstMouse returns NO, so the first click is consumed as window activation; the right file list is the file dialog's own out-of-process view and accepts clicks normally.
- Observe the detail: the right side enters and leaves directories fine, while no item on the left responds.
- The sidebar does highlight after changing directories — that is the panel syncing to the current path, not click feedback, and it is easy to misread as "clickable".
- Probe it: use the same script to read
panel.isKeyWindowandNSApp.isActiveunder both timings, activating before panel creation and after. - Community result: the current code had
isKeyWindowfalse in 5 of 6 runs; moving activation after creation gave 6/6 true. - The fix is to move that activation line from before
openPanelto after the panel exists and beforerunModal. - The patch is on local branch
fix/macos-panel-activation(cb461ebb87), with an assertion added innative-picker.spec.tsto pin the call order; 15 tests pass.
DSH Plugin: Type 3: the menu clicks, but position and appearance are wrong
When anchor-name and position-anchor are routed through var(), real Chromium does not apply the substitution, so the backing has no anchor and its size collapses to 0×0.
- Symptom: the menu is only a 45% translucent layer, showing blurred text over page content and a flat bright gray over the transparent window area.
- Sample the color: about (135,135,135) when broken, versus an opaque dark gray around (42,43,46) when the backing works as designed.
- Read the implementation:
MenuSurface.tsxinjects the anchor name as--dsh-menu-anchor, and the CSS side writesanchor-name: var(--dsh-menu-anchor)andposition-anchor: var(--dsh-menu-anchor). - Probe it:
CSS.supportsreturns true foranchor-name,position-anchor, andanchor(), yet layout does not apply them. - Check the size: the backing's
getBoundingClientRect()is 0×0; after changing to a literal anchor name in the same window, backing and surface align perfectly. - Check the fallbacks:
top: anchor(top)andleft: anchor(left)have no fallback and fall back to auto when invalid;anchor-size(width, 0px)takes an explicit fallback of 0. Fixed positioning plus auto offsets plus zero size is exactly the offset you see. - Fix it by inlining both properties in
MenuSurface.tsx—anchor-nameon the surface andposition-anchoron the backing — using the same generated string and dropping the custom-property indirection.
DeepSeek Harness: Two verifications: do not mix the classes
Confirm focus first, then anchors; neither experiment requires changing code.
- Focus experiment: click anywhere on the panel once, then click the sidebar. If the second click works, the first was consumed by activation.
- Alternatively, compare with a directory-picking entry known to work, such as an upload control on a web page, to confirm it is not system-wide.
- Anchor experiment: open the menu and see whether page text shows through; then change the backing's anchor name to a literal in dev tools and see whether it aligns.
- If it aligns, the variable indirection is the problem, not transparency or blur material settings.
DSH plugin: What the patch looks like
The fix is two positional adjustments: move the activation call later, and replace two anchor properties with literals instead of variables.
- For the directory panel, move activation from before panel creation to after creation and before
runModal:
var panel = $.NSOpenPanel.openPanel;
panel.message = argv[0];
// activate only after the panel exists; otherwise an accessory app hands focus straight back
app.activateIgnoringOtherApps(true);
if (panel.runModal !== $.NSModalResponseOK) return '';
- For the menu, write
anchor-nameon the surface andposition-anchoron the backing directly as the same generated string, no longer throughvar(). - Neither change affects other platform branches, and the stylesheet remains a consumer only.
- Run the matching tests after each change: 15 pass for the directory picker; the menu side is visually verifiable by alignment.
Verification after the fix
The criteria are concrete: focus on the panel, anchor on the backing.
- Reopen the directory panel and click any sidebar item; it should switch directories directly.
- Click the search box; a caret should appear and typing should work.
- Open the menu; the background should be opaque dark gray and no longer show page text.
- Resize the window and reopen the menu; direction and position should follow the trigger button.
Cautions
Separate focus problems from layout problems before editing anything.
- Do not treat it as a Finder failure. The panel looks almost identical to Finder; the community suggests noting "this is DSH's directory picker" in the panel or docs.
- Do not use "it highlights" as proof of clickability. The sidebar highlight is a result of syncing the current path.
- Do not just rename the CSS variable. Any variable name still goes through indirection; the problem is the substitution itself.
- Do not expect a restart to fix it. Both classes are code-level ordering and property problems.
- Record the OS version. The community reproduced it on macOS 26.4 and 27.2, so version is not the dividing line.
If your problem is "the panel clicks but nothing happens after choosing a directory", that is neither class — check the workspace creation path and ACLs.See DeepSeek Harness macOS: fullscreen black, lost window for the related case.
FAQ
No, Finder is not broken: this is DSH's native directory picker in DeepSeek Harness, visually almost identical to Finder. The panel appears visible but not as the key window, so sidebar clicks are consumed as window activation, while the right-hand file list works because it is a separate out-of-process view.
The search box has the same root cause in DeepSeek Harness: a non-key window gets no keyboard focus, so clicking the search box shows no caret. The community reproduced it on macOS 26.4 and confirmed mdfind works, ruling out a Spotlight index problem.
Yes, DeepSeek Harness has a community local patch for the dead clicks: move activateIgnoringOtherApps(true) from before NSOpenPanel.openPanel to after the panel is created and before runModal. Probing showed isKeyWindow false in 5 of 6 runs before, and true in 6/6 after. The patch is on a local branch and not merged upstream.
No, it is not a transparency setting: MenuSurface's macOS backing in DeepSeek Harness relies on CSS anchor positioning, and Chromium does not apply anchor-name / position-anchor when passed through var(), leaving the backing at 0×0 and only the 45% translucent layer. Inlining both properties fixes the alignment.
Look at the interactive object in DeepSeek Harness: a system-level dialog (choosing a directory) that does not respond is a focus problem; an in-page menu that clicks but is misplaced or visually wrong is an anchor problem. The first needs activation ordering, the second needs removing the CSS variable indirection.
Related Terms
- key window
- The key window is the macOS window currently receiving keyboard and mouse events. Some controls on a non-key window use the first click to activate the window, making them look visible but unclickable.— https://github.com/deepseek-ai/deepseek-harness/discussions/10748
- NSOpenPanel
- NSOpenPanel is macOS's native open/save panel. DSH's directory picker invokes it through JXA inside osascript, so the panel is hosted by a separate system process.— https://github.com/deepseek-ai/deepseek-harness/discussions/10748
- acceptsFirstMouse
- acceptsFirstMouse is an AppKit control property deciding whether the first click on a non-key window takes effect directly. When it returns NO, the first click only activates the window.— https://github.com/deepseek-ai/deepseek-harness/discussions/10748
- anchor-name
- anchor-name is a CSS anchor positioning property that names an element so others can position relative to it. When routed through a CSS custom property, Chromium may not apply the substitution, breaking positioning entirely.— https://github.com/deepseek-ai/deepseek-harness/discussions/10607
Sources
- #10748 — macOS add workspace: the native directory panel's sidebar cannot be clicked· deepseek-ai (GitHub Discussions)
- #10607 — MenuSurface's macOS backing never took effect in real Chromium· deepseek-ai (GitHub Discussions)
- deepseek-ai/deepseek-harness (source repository)· GitHub