Description
This assumes we implement the feature using JSON ZObject encoding urls. Some requirements are up for discussion still in the WIP meetings!
Implement the frontend functionality to generate a shareable link to a function call that encodes the entire call as a URL-encoded JSON ZObject (Z7). This allows contributors to share, reproduce, and debug function calls easily.
When someone opens such a link, the frontend should parse the JSON ZObject, prefill the arguments, and (if configured) automatically run the function.
Requirements
- Add a "Share" button in:
- Special:RunFunction , ... TBD by design
- Clicking “Share” should:
- Create a JSON ZObject representing the current function call (type Z7), including:
- Z7K1 – target function ID
- Z7K2, Z7K3, … – argument values
- URL-encode this JSON and append it as a query parameter (e.g. ?call=%7B...%7D).
- Copy the full URL to clipboard and display a “Link copied!” message.
- Create a JSON ZObject representing the current function call (type Z7), including:
- On page load:
- Detect the call= parameter. (name up for discussion)
- Parse the JSON into a ZObject and prefill the function call interface.
Implementation Notes
- JSON ZObject approach replaces plaintext or mixed encoding approaches.
- Considers URL length limits — this approach is designed for longer and more complex function calls. We do nothing about this.
- Must handle invalid JSON gracefully (show error message, don’t crash).
Acceptance Criteria
- “Share” button present on supported pages.
- Generated URL contains a valid Z7 JSON ZObject of the function call.
- Opening the link pre-fills all arguments.
- (Optional) Function auto-runs if configured.
- Robust error handling and accessibility requirements met.


