hermes-agent/nix
xxxigm 743c55efa3
fix(desktop): stop file tree throwing "Cannot have two HTML5 backends" on remount (#43541)
* fix(desktop): stop file tree throwing "two HTML5 backends" on remount

The Agent Workspace file tree (react-arborist) shows a permanent "TREE ERROR"
with `[error-boundary:file-tree] Cannot have two HTML5 backends at the same
time.` react-arborist mounts its own react-dnd DndProvider + HTML5Backend per
<Tree>. react-dnd v14 keeps that manager on a global, ref-counted singleton
context and nulls it when the count reaches 0. The tree is keyed on
`${cwd}:${collapseNonce}`, so changing folder / collapsing forces a fresh
<Tree>; during the remount the singleton can be torn down and recreated while
the previous HTML5Backend still owns `window.__isReactDndHtml5Backend`, so the
new backend's setup() throws. The error boundary then sticks, because "Try
again" just remounts into the same race.

Pass arborist a stable, app-lifetime `dndManager` (new getFileTreeDndManager
singleton) so it reuses one backend for the life of the app and never
double-claims the window flag. Drag/drop is already disabled on this tree;
this only changes how the (unused) dnd backend is provisioned.

Promotes dnd-core and react-dnd-html5-backend to explicit deps (already present
transitively via react-arborist's react-dnd 14.x line, so they dedupe to one
instance).

* fix(nix): bump npmDepsHash for desktop dnd deps

Adding dnd-core / react-dnd-html5-backend changed the workspace
package-lock.json, so the single workspace-root npmDepsHash in
nix/lib.nix was stale and the nix build failed. Regenerate it
(hash from the failing nix CI job's 'got:' value).

* fix(nix): update npmDepsHash for merged lockfile

After merging main, the workspace lockfile combined main's dep
changes with the desktop dnd additions, so the npmDepsHash needed
recomputing again. Hash from the nix lockfile-check job.

* fix(nix): use fetchNpmDeps hash for desktop dnd lockfile

prefetch-npm-deps reported sha256-lVnybH9RE/... but fetchNpmDeps
wants sha256-mYgKXE/FL4hnkrEvpVv+ULM/oeyIfO2AM9Ol8OrfWm0= for the
merged workspace lockfile. Use the nix build 'got:' hash so CI passes.

---------

Co-authored-by: Brooklyn Nicholson <brooklyn.bb.nicholson@gmail.com>
2026-06-11 11:47:34 -07:00
..
checks.nix fix(packaging): ship locales/ i18n catalogs in wheel, sdist, and Nix (#38383) 2026-06-03 12:00:27 -07:00
configMergeScript.nix feat: nix flake — uv2nix build, NixOS module, persistent container mode (#20) 2026-03-26 01:08:02 +05:30
desktop.nix fix(node/nix): consolidate workspace lockfile + update all consumers 2026-06-02 20:28:18 -04:00
devShell.nix fix(node/nix): consolidate workspace lockfile + update all consumers 2026-06-02 20:28:18 -04:00
hermes-agent.nix fix(packaging): ship locales/ i18n catalogs in wheel, sdist, and Nix (#38383) 2026-06-03 12:00:27 -07:00
lib.nix fix(desktop): stop file tree throwing "Cannot have two HTML5 backends" on remount (#43541) 2026-06-11 11:47:34 -07:00
nixosModules.nix fix(nix): make config.yaml group-writable under addToSystemPackages (#41940) 2026-06-08 20:10:47 +05:30
overlays.nix fix(banner): show correct update status on nix-built hermes (#17550) 2026-04-30 07:03:00 +05:30
packages.nix fix(node/nix): consolidate workspace lockfile + update all consumers 2026-06-02 20:28:18 -04:00
python.nix feat(nix): declarative plugin installation for NixOS module (#15953) 2026-04-28 00:18:32 +05:30
tui.nix fix(node/nix): consolidate workspace lockfile + update all consumers 2026-06-02 20:28:18 -04:00
web.nix fix(node/nix): consolidate workspace lockfile + update all consumers 2026-06-02 20:28:18 -04:00