Skip to content

Conversation

@atomicgamedeveloper
Copy link
Contributor

@atomicgamedeveloper atomicgamedeveloper commented Sep 19, 2025

Pull Request Template

Title

Finalize Implementation of Concurrent Digital Twin Execution with IndexedDB Integration

Type of Change

  • New feature
  • Bug fix
  • Documentation update
  • Refactoring
  • Security patch
  • UI/UX improvement

Description

This PR finalizes the implementation of the concurrent execution for Digital Twins with IndexedDB integration. Users can now start multiple executions of the same Digital Twin simultaneously, with execution history persisted in the browser's IndexedDB. The implementation includes a new execution history data model, IndexedDB service, and UI components to display and manage execution history.

New is that it merges recent changes of the up-coming version 0.8 of DTaaS such as settings menu and new interface design.

Working on Testing

  • Added unit tests for the IndexedDB service and Redux store
  • Manually tested concurrent execution functionality
  • Verified persistence of execution history across browser sessions
  • Fixed existing tests to accommodate the new functionality

Impact

  • Improves user experience by allowing multiple executions to run in parallel
  • Adds local persistence of execution history using IndexedDB
  • Enhances the UI with execution history list and status indicators

Additional Information

This PR builds on top of #1235 by Microchesst.

Checklist

  • My code adheres to the coding and style guidelines of the project.
  • I have added tests for all the new code and any changes made to existing code.
  • I have made corresponding changes to the documentation.

@codecov
Copy link

codecov bot commented Sep 19, 2025

Codecov Report

❌ Patch coverage is 97.38073% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.26%. Comparing base (baffd68) to head (1aa7d38).

Files with missing lines Patch % Lines
.../src/components/execution/ExecutionHistoryList.tsx 93.69% 7 Missing ⚠️
client/src/database/executionHistoryDB.ts 95.20% 6 Missing ⚠️
client/src/model/backend/digitalTwin.ts 94.91% 3 Missing ⚠️
.../src/model/backend/state/executionHistory.slice.ts 97.77% 3 Missing ⚠️
...preview/route/digitaltwins/manage/DeleteDialog.tsx 87.50% 2 Missing ⚠️
...lient/src/store/selectors/digitalTwin.selectors.ts 66.66% 2 Missing ⚠️
...rc/components/execution/ExecutionHistoryLoader.tsx 92.85% 1 Missing ⚠️
.../model/backend/state/executionHistory.selectors.ts 96.15% 1 Missing ⚠️
client/src/model/backend/util/init.ts 95.00% 1 Missing ⚠️
...ent/src/preview/components/asset/DetailsButton.tsx 85.71% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@                     Coverage Diff                      @@
##           feature/distributed-demo    #1328      +/-   ##
============================================================
+ Coverage                     92.79%   96.26%   +3.46%     
============================================================
  Files                             4      115     +111     
  Lines                           236     3560    +3324     
  Branches                          0      590     +590     
============================================================
+ Hits                            219     3427    +3208     
- Misses                           17      130     +113     
- Partials                          0        3       +3     
Files with missing lines Coverage Δ
client/src/components/LinkButtons.tsx 100.00% <100.00%> (ø)
client/src/components/asset/HistoryButton.tsx 100.00% <100.00%> (ø)
...mponents/logDialog/DeleteAllConfirmationDialog.tsx 100.00% <100.00%> (ø)
client/src/components/logDialog/UnifiedDialog.tsx 100.00% <100.00%> (ø)
client/src/components/route/Snackbar.tsx 100.00% <100.00%> (ø)
client/src/components/tab/TabComponent.tsx 100.00% <100.00%> (ø)
client/src/database/types.ts 100.00% <100.00%> (ø)
client/src/model/backend/DTAssets.ts 76.53% <100.00%> (ø)
client/src/model/backend/LogDialog.tsx 100.00% <100.00%> (ø)
client/src/model/backend/fileHandler.ts 91.02% <ø> (ø)
... and 64 more

... and 45 files with indirect coverage changes

Components Coverage Δ
Website 96.26% <97.38%> (∅)
Lib Microservice ∅ <ø> (∅)
🚀 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.

Copy link
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

Finalizes the implementation of concurrent Digital Twin execution with IndexedDB integration for local persistence. Users can now start multiple executions simultaneously, view execution history, and manage executions through new UI components. This builds on version 0.8 changes including settings menu and interface design updates.

Key Changes

  • Adds IndexedDB service for execution history persistence
  • Implements concurrent execution support with execution status tracking
  • Adds new execution history UI components with log viewing capabilities

Reviewed Changes

Copilot reviewed 120 out of 125 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
servers/lib/test/integration/files.service.integration.spec.ts Removes afterEach hook to fix test configuration
client/test/unit/route/digitaltwins/execution/ExecutionUIHandlers.test.ts Adds comprehensive tests for execution UI handlers
client/test/unit/route/digitaltwins/execution/ExecutionStatusManager.test.ts Updates import paths and adds type safety improvements
client/test/unit/route/digitaltwins/execution/ExecutionButtonHandlers.test.ts Updates imports and adds execution ID parameter support
client/test/unit/model/backend/gitlab/execution/statusChecking.test.ts Comments out null/undefined parameter tests
client/test/unit/model/backend/gitlab/execution/logFetching.test.ts Removes null project ID test case
client/test/unit/database/digitalTwins.test.ts Adds comprehensive IndexedDB service tests
client/test/unit/components/PrivateRoute.test.tsx Adds mocks for new execution history components
client/test/preview/unit/util/*.test.ts Updates import paths from preview/util to model/backend
client/test/unit/components/execution/ExecutionHistoryList.test.tsx Adds comprehensive tests for execution history UI component
client/test/unit/components/asset/*.test.tsx Updates component tests for new execution history functionality
client/test/preview/unit/store/executionHistory.slice.test.ts Adds comprehensive Redux slice tests
client/test/preview/unit/store/Store.test.ts Updates for new Redux state structure
client/test/preview/unit/routes/digitaltwins/manage/*.test.tsx Updates for new adapter pattern
client/test/preview/unit/routes/digitaltwins/execute/*.test.tsx Updates imports and adds execution history tests
client/test/preview/integration/**/*.test.tsx Updates integration tests for new execution patterns
client/test/e2e/tests/*.test.ts Adds end-to-end tests for concurrent execution
client/src/util/digitalTwinAdapter.ts Adds adapter pattern for bridging Redux state and business logic
client/src/store/store.ts Adds execution history slice to Redux store
client/src/store/snackbar.slice.ts Simplifies snackbar hide logic
client/src/store/selectors/*.ts Adds selectors for execution history and digital twin state
client/src/route/digitaltwins/Snackbar.tsx Updates import path for snackbar slice
client/src/preview/store/cart.slice.ts Updates import path for LibraryAsset
Comments suppressed due to low confidence (2)

servers/lib/test/integration/files.service.integration.spec.ts:1

  • The removal of afterEach hook may cause test isolation issues if mocks are not properly reset between tests. Consider adding this back or ensuring mock cleanup is handled elsewhere.
import { describe, it, expect, jest } from '@jest/globals';

client/test/unit/model/backend/gitlab/execution/logFetching.test.ts:1

  • Removing the null projectId test case reduces coverage for error handling scenarios. This test case helps ensure the function gracefully handles missing project IDs.
import {

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@prasadtalasila
Copy link
Contributor

@atomicgamedeveloper please add the following lines at the end of .gitignore file (this file exists at the top-level of the project)


.qlty
!.qlty/qlty.toml

Copy link
Contributor

@prasadtalasila prasadtalasila left a comment

Choose a reason for hiding this comment

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

@atomicgamedeveloper thanks for the huge PR. Please see the comments. General suggestions.

  1. Please remove relative paths in imports.
  2. Where possible, move code to model/. For example, new code added in util can probably go into model/util.

thanks

/**
* Represents the schema for the IndexedDB database
*/
export interface IndexedDBSchema {
Copy link
Contributor

Choose a reason for hiding this comment

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

this does not seem to have been used anywhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just deleted it. I hope that is fine.

@prasadtalasila
Copy link
Contributor

This PR resolves issue #1232 and #1314

@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 7, 2025

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

Labels

None yet

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

3 participants