- **Current state:** `app.py:156-160`, `frontend/src/utils/api.js:170-172`, `frontend/src/components/HomePage.js:307-311`, `FileExplorer.js:327`. - **Proposed implementation:** 1. Expose `Node.from_dict(data)` (already defined) at the route layer; stop double-encoding. 2. Change the frontend to send `{ target, node: <object> }` unconditionally. 3. Remove the `typeof node === 'string' ? node : JSON.stringify(node)` branch. 4. Have the server reject non-dict `node` with a 400. - **Files affected:** `app.py`, `frontend/src/utils/api.js`, `frontend/src/components/HomePage.js`, `frontend/src/components/FileExplorer.js`. - **Acceptance criteria:** - `/share` returns 400 for a JSON-string `node`. - All callers send an object. - No `JSONDecodeError` handler remains in the route.
app.py:156-160,frontend/src/utils/api.js:170-172,frontend/src/components/HomePage.js:307-311,FileExplorer.js:327.Node.from_dict(data)(already defined) at the route layer; stop double-encoding.{ target, node: <object> }unconditionally.typeof node === 'string' ? node : JSON.stringify(node)branch.nodewith a 400.app.py,frontend/src/utils/api.js,frontend/src/components/HomePage.js,frontend/src/components/FileExplorer.js./sharereturns 400 for a JSON-stringnode.JSONDecodeErrorhandler remains in the route.