Skip to content

Standardize /share payload on a structured node object #13

@devangb3

Description

@devangb3
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions