Skip to content

Conversation

jaybhanushali3166
Copy link

Related Issue

resolves #1638

Contributor License Agreement

  • I acknowledge that a contributor license agreement is required and that I have one in place or will seek to put one in place ASAP.

Review Checklist

  • Issue: If a change was made to the FDC3 Standard, was an issue linked above?
  • CHANGELOG: Is a CHANGELOG.md entry included?
  • API changes: Does this PR include changes to any of the FDC3 APIs (DesktopAgent, Channel, PrivateChannel, Listener, Bridging)?
    • Docs & Sources: If yes, were both documentation (/docs) and sources updated?

      JSDoc comments on interfaces and types should be matched to the main documentation in /docs
    • Conformance tests: If yes, are conformance test definitions (/toolbox/fdc3-conformance) still correct and complete?

      Conformance test definitions should cover all required aspects of an FDC3 Desktop Agent implementation, which are usually marked with a MUST keyword, and optional features (SHOULD or MAY) where the format of those features is defined
    • Schemas: If yes, were changes applied to the Bridging and FDC3 for Web protocol schemas?

      The Web Connection protocol and Desktop Agent Communication Protocol schemas must be able to support all necessary aspects of the Desktop Agent API, while Bridging must support those aspects necessary for Desktop Agents to communicate with each other
      • If yes, was code generation (npm run build) run and the results checked in?

        Generated code will be found at /src/api/BrowserTypes.ts and/or /src/bridging/BridgingTypes.ts
  • Context types: Were new Context type schemas created or modified in this PR?
    • Were the field type conventions adhered to?
    • Was the BaseContext schema applied via allOf (as it is in existing types)?
    • Was a title and description provided for all properties defined in the schema?
    • Was at least one example provided?
    • Was code generation (npm run build) run and the results checked in?

      Generated code will be found at /src/context/ContextTypes.ts
  • Intents: Were new Intents created in this PR?

@jaybhanushali3166 jaybhanushali3166 requested a review from a team as a code owner August 7, 2025 14:08
Copy link

linux-foundation-easycla bot commented Aug 7, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: jaybhanushali3166 / name: Jay Bhanushali (cae9ce9, c6841af)

Copy link

netlify bot commented Aug 7, 2025

Deploy Preview for fdc3 ready!

Name Link
🔨 Latest commit cae9ce9
🔍 Latest deploy log https://app.netlify.com/projects/fdc3/deploys/68b1b956f1fc650008d8063a
😎 Deploy Preview https://deploy-preview-1645.preview-fdc3.finos.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

@kriswest kriswest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking good so far, although you still need to bind the functions of IntentResolution at: https://github.com/jaybhanushali3166/FDC3/blob/fix/bind-this-in-api-objects-and-docs-update/packages/fdc3-agent-proxy/src/intents/DefaultIntentResolution.ts

I think it would also be worth defining some tests - try repeating an existing test but with a destructured function instead of the DesktopAgent reference itself. As the destructuring is a MUST, we need both conformance tests and unit tests for the code:

@kriswest
Copy link
Contributor

kriswest commented Aug 11, 2025

Please also add a CHANGELOG.md entry in the unreleased section: https://github.com/jaybhanushali3166/FDC3/blob/fix/bind-this-in-api-objects-and-docs-update/CHANGELOG.md#unreleased

@kriswest
Copy link
Contributor

@jaybhanushali3166 will you be able to make the requested additions to this PR, or would you like someone else to take this on to complete?

@jaybhanushali3166
Copy link
Author

@kriswest, I am working on it. Finishing up the test cases.

@kriswest
Copy link
Contributor

@jaybhanushali3166 Awesome, let us know how you get on - and ignore the failing Report coverage task, we need to fix that.

@jaybhanushali3166
Copy link
Author

Hi @kriswest , for the test cases as we are using existing tests with destructed methods, are we also expecting new step definitions too? Something like this:

When('I destructure method {string} from {string}', function (this: CustomWorld, methodName: string, objectField: string) {
  const object = handleResolve(objectField, this);
  const destructuredMethod = object[methodName].bind(object);
  this.props[`destructured_${methodName}`] = destructuredMethod;
`});

@kriswest
Copy link
Contributor

Hi @kriswest , for the test cases as we are using existing tests with destructed methods, are we also expecting new step definitions too? Something like this:

When('I destructure method {string} from {string}', function (this: CustomWorld, methodName: string, objectField: string) {
  const object = handleResolve(objectField, this);
  const destructuredMethod = object[methodName].bind(object);
  this.props[`destructured_${methodName}`] = destructuredMethod;
`});

Hi @jaybhanushali3166, yes I'd add a new step to do the destructuring - however don't include the bind, as you are trying to test that implementation did it already. Hence:

When('I destructure method {string} from {string}', function (this: CustomWorld, methodName: string, objectField: string) {
  const object = handleResolve(objectField, this);
  const destructuredMethod = object[methodName];
  this.props[`destructured_${methodName}`] = destructuredMethod;
});

…dd method binding for default intent resolution
@jaybhanushali3166
Copy link
Author

Hi @kriswest, I have pushed the updates. let me know if there are any other changes needed. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants