Skip to content

Make raiseIntent context argument optional - #1983

Open
Roaders wants to merge 1 commit into
mainfrom
raiseIntent-context-optional
Open

Make raiseIntent context argument optional#1983
Roaders wants to merge 1 commit into
mainfrom
raiseIntent-context-optional

Conversation

@Roaders

@Roaders Roaders commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

The context argument of raiseIntent is now optional (context?: Context | null). Apps that only raise an intent to obtain a result no longer need to pass the fdc3.nothing context explicitly.

When context is omitted (or null/undefined is passed) the Desktop Agent proxy substitutes the fdc3.nothing context type, so the wire protocol is unchanged, the IntentHandler is untouched, and intent listeners always receive a concrete context. This is an additive, non-breaking change for TypeScript applications.

  • fdc3-standard: make context optional/null on the DesktopAgent interface and update the JSDoc and examples
  • fdc3-agent-proxy: substitute fdc3.nothing when no context is provided
  • website docs: mirror the interface change
  • tests: add proxy scenarios for the no-context and null-context cases
  • CHANGELOG: add entry under [Unreleased] > Changed

Describe your change

Related Issue

resolves #1708

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?

@Roaders
Roaders requested a review from a team as a code owner July 14, 2026 09:55
@netlify

netlify Bot commented Jul 14, 2026

Copy link
Copy Markdown

Deploy Preview for fdc3 failed. Why did it fail? →

Name Link
🔨 Latest commit 07aaa53
🔍 Latest deploy log https://app.netlify.com/projects/fdc3/deploys/6a61c681745262000741212a

@codecov-commenter

codecov-commenter commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.48%. Comparing base (31f79d4) to head (07aaa53).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1983   +/-   ##
=======================================
  Coverage   95.48%   95.48%           
=======================================
  Files          85       85           
  Lines        6705     6711    +6     
  Branches      818      897   +79     
=======================================
+ Hits         6402     6408    +6     
  Misses        303      303           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Roaders
Roaders requested review from a team and removed request for a team July 15, 2026 08:51
@Roaders Roaders added this to the FDC3 3.1 milestone Jul 16, 2026
The context argument of raiseIntent is now optional
(context?: Context | null). Apps that only raise an intent to obtain a
result no longer need to pass the fdc3.nothing context explicitly.

When context is omitted (or null/undefined is passed) the Desktop Agent
proxy substitutes the fdc3.nothing context type, so the wire protocol is
unchanged, the IntentHandler is untouched, and intent listeners always
receive a concrete context. This is an additive, non-breaking change for
TypeScript applications.

- fdc3-standard: make context optional/null on the DesktopAgent interface
  and update the JSDoc and examples
- fdc3-agent-proxy: substitute fdc3.nothing when no context is provided
- website docs: mirror the interface change
- tests: add proxy scenarios for the no-context and null-context cases
- CHANGELOG: add entry under [Unreleased] > Changed
@Roaders
Roaders force-pushed the raiseIntent-context-optional branch from 277eea1 to 07aaa53 Compare July 23, 2026 07:45
@kriswest kriswest modified the milestones: FDC3 3.1, FDC3 3.0 Jul 23, 2026

@julianna-ciq julianna-ciq left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make raiseIntent context optional

4 participants