Skip to content

RDKEMW-9355: Add Support to run app widgets in different contexts wit…#90

Merged
vjain008 merged 5 commits into
developfrom
topic/RDKEMW-9355
Dec 11, 2025
Merged

RDKEMW-9355: Add Support to run app widgets in different contexts wit…#90
vjain008 merged 5 commits into
developfrom
topic/RDKEMW-9355

Conversation

@gurpreet319
Copy link
Copy Markdown
Contributor

@gurpreet319 gurpreet319 commented Dec 5, 2025

…hin a single process

Reason for change: Changes related to client/server
Test Procedure: build should be successful.
Risks: low
Priority: P2

@gurpreet319 gurpreet319 requested a review from a team as a code owner December 5, 2025 12:35
@gurpreet319 gurpreet319 force-pushed the topic/RDKEMW-9355 branch 3 times, most recently from 8d02025 to f5caf6e Compare December 8, 2025 06:12
@trupthi1403
Copy link
Copy Markdown
Contributor

LCOV - code coverage report

Current view: top level Coverage Total Hit
Test: rdkNativeScript L1 Coverage Lines: 20.5 % 4650 953
Test Date: 2025-12-10 13:45:28 Functions: 34.8 % 405 141

Directory Line Coverage (%) Line Coverage (Total) Line Coverage (Hit) Functions (%) Functions (Total) Functions (Hit)
src 40.6 % 1127 457 60.5 % 129 78
src/jsc 16.5 % 2668 441 26.8 % 220 59
src/jsc/jsc_lib 0.0 % 379 0.0 % 52
src/linux 11.6 % 476 55 100.0 % 4 4

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for running application widgets in different contexts within a single process by introducing a client/server architecture for container namespace management. The changes enable the runtime to launch HTML-based applications in external containers while maintaining JavaScript applications in the main process, allowing for better resource isolation and multi-context support.

Key Changes:

  • Introduced IExternalApplicationHandler interface and container namespace utilities for managing applications across different execution contexts
  • Enhanced JSRuntimeServer to route HTML applications to external handlers while keeping JavaScript apps in the main renderer
  • Changed WebSocket server port from 9112 to 5000

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 17 comments.

Show a summary per file
File Description
include/JSRuntimeServer.h Added IExternalApplicationHandler member and updated initialize method signature to accept external handler
include/JSRuntimeContainer.h New header defining container namespace management utilities (network, mount, IPC namespaces) and WebSocket client functions
src/jsruntime.cpp Updated server initialization call to pass nullptr for external handler parameter
src/JSRuntimeServer.cpp Added runExternalApplication RPC method, HTML detection logic in launchApplication, fixed if-else chain, and external handler integration
src/JSRuntimeContainer.cpp New implementation providing namespace entry, container PID discovery, IP address retrieval, WebSocket client, and app config parsing
src/JSRuntimeClientContainer.cpp New client executable demonstrating container-based application launching
CMakeLists.txt Changed WebSocket port to 5000, fixed JSRuntimeServer.cpp inclusion, added container library and executable build targets

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/JSRuntimeServer.cpp
Comment thread src/JSRuntimeContainer.cpp
Comment thread src/JSRuntimeContainer.cpp
Comment thread CMakeLists.txt
Comment thread CMakeLists.txt
Comment thread src/JSRuntimeClientContainer.cpp
Comment thread src/JSRuntimeContainer.cpp
Comment thread src/JSRuntimeContainer.cpp
Comment thread src/JSRuntimeClientContainer.cpp Outdated
Comment thread src/JSRuntimeClientContainer.cpp
Comment thread src/JSRuntimeClientContainer.cpp Outdated
Copy link
Copy Markdown
Contributor

@madanagopalt madanagopalt left a comment

Choose a reason for hiding this comment

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

please look at one minor comment

…hin a single process

Reason for change: Changes related to client/server
Test Procedure: build should be successful.
Risks: low
Priority: P2
vjain008
vjain008 previously approved these changes Dec 11, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 33 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/JSRuntimeServer.cpp Outdated
Comment thread src/JSRuntimeServer.cpp
Comment thread src/JSRuntimeServer.cpp
Comment thread src/JSRuntimeContainer.cpp
Comment thread src/JSRuntimeContainer.cpp
Comment thread src/JSRuntimeServer.cpp
Comment thread src/JSRuntimeContainer.cpp
Comment thread src/JSRuntimeContainer.cpp
Comment thread src/JSRuntimeServer.cpp
Comment thread src/JSRuntimeServer.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
vjain008 and others added 3 commits December 10, 2025 23:12
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@vjain008 vjain008 merged commit 9513535 into develop Dec 11, 2025
8 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants