Skip to content

Conversation

@Karakatiza666
Copy link
Contributor

@Karakatiza666 Karakatiza666 commented Oct 28, 2025

  • Configuration caching
    Now the backend configuration (version, telemetry etc.) is cached to render the page initially. Once the page is rendered, the configuration is lazy loaded and related values are updated.

  • Refactor pipeline data loading system
    Now the list of pipelines and the pipeline code is loaded lazily. This avoids longer wait when navigating the pages on slower connections. The behavior where the per-pipeline data is pre-loaded before clicking on the link is preserved. If pipeline list or pipeline code are not yet loaded, placeholders are shown:

image image image image
  • Monolith bundle
    Usually it is recommended to split the web app code in chunks that are loaded as needed. In our case when the customer has a very slow connection / pipeline-manager is bottle-necked, it is faster to load a single large file rather than multiple smaller ones. If the web app is cached properly the bundle size becomes irrelevant in subsequent requests.

  • Update openapi-ts version and re-generate API binding files
    Actualize the dependency that is responsible for generating javascript code to query endpoints defined in OpenAPI spec

  • Prevent leaving pipeline with unsaved changes
    Due to a technical limitation the user is now required to save or discard unsaved changes when leaving pipeline

image image
  • Update .devcontainer
    To make sure the environment is set up successfully when using it on a freshly installed Ubuntu

  • Avoid including unnecessary support for some languages in code editor

image

@Karakatiza666 Karakatiza666 requested a review from gz October 28, 2025 13:30
@Karakatiza666 Karakatiza666 added the Web Console Related to the browser based UI label Oct 28, 2025
Copilot AI review requested due to automatic review settings October 28, 2025 13:30
@Karakatiza666 Karakatiza666 added javascript Pull requests that update Javascript code UX Issues that effect an end-user's experience labels Oct 28, 2025
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

This PR optimizes page loading performance by implementing lazy loading strategies for backend configuration and pipeline data, reducing initial page load times especially on slower connections. The changes introduce configuration caching, refactor data loading patterns to be non-blocking, and improve the user experience with loading placeholders.

Key changes:

  • Backend configuration (version, telemetry) is now cached and lazy-loaded after initial page render
  • Pipeline list and code are loaded asynchronously with placeholder UI
  • Monolithic bundle strategy to reduce HTTP requests on slow connections
  • Updated OpenAPI client generation library with improved type safety
  • New navigation guard to prevent losing unsaved pipeline changes

Reviewed Changes

Copilot reviewed 58 out of 61 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
web-console/src/routes/+layout.ts Implements lazy config loading with caching and background updates
web-console/src/routes/+layout.svelte Triggers lazy config update after initial render
web-console/src/routes/(system)/(authenticated)/+page.svelte Converts demos loading to lazy with placeholders
web-console/src/lib/compositions/configCache.ts New module for caching backend configuration in localStorage
web-console/src/lib/services/pipelineManager.ts Updated to use new OpenAPI client with improved error handling
web-console/src/lib/services/manager/*.gen.ts Regenerated OpenAPI client files with new generator version
web-console/src/lib/components/pipelines/List.svelte Adds placeholder UI for loading pipeline list
web-console/src/lib/compositions/pipelines/usePipelineList.svelte.ts Supports optional pipeline data for lazy loading
web-console/src/lib/components/layout/pipelines/UnsavedPipelineChanges.svelte New component to prevent navigation with unsaved changes
Comments suppressed due to low confidence (1)

web-console/src/routes/+layout.ts:1

  • Calling _lazyUpdateConfig inside an effect block without proper tracking. This should either use $effect explicitly or be called in onMount to ensure proper cleanup and prevent memory leaks.
import { loadAuthConfig } from '$lib/compositions/auth'

Comment on lines 7 to 20
// bodySerializer: JSONbig.stringify,
// responseTransformer: JSONbig.parse as any,
baseUrl: felderaEndpoint,
responseStyle: 'fields',
throwOnError: true
})

// export const setupHttpClient = (config: { fetch: typeof fetch }) =>
// createClient({
// bodySerializer: JSONbig.stringify,
// responseTransformer: JSONbig.parse as any,
// baseUrl: felderaEndpoint,
// fetch: config.fetch
// })
Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

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

Commented-out code for JSONbig serialization suggests incomplete refactoring. If bigint support is no longer needed, remove these comments. If it's still required, this change will break bigint handling.

Suggested change
// bodySerializer: JSONbig.stringify,
// responseTransformer: JSONbig.parse as any,
baseUrl: felderaEndpoint,
responseStyle: 'fields',
throwOnError: true
})
// export const setupHttpClient = (config: { fetch: typeof fetch }) =>
// createClient({
// bodySerializer: JSONbig.stringify,
// responseTransformer: JSONbig.parse as any,
// baseUrl: felderaEndpoint,
// fetch: config.fetch
// })
baseUrl: felderaEndpoint,
responseStyle: 'fields',
throwOnError: true
})

Copilot uses AI. Check for mistakes.
responseTransformer: JSONbig.parse as any,
baseUrl: felderaEndpoint
})
const felderaEndpoint = ''
Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

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

Empty string assignment to felderaEndpoint will cause all API requests to fail. This should import from $lib/functions/configs/felderaEndpoint as done elsewhere in the codebase.

Suggested change
const felderaEndpoint = ''
import { felderaEndpoint } from '$lib/functions/configs/felderaEndpoint'

Copilot uses AI. Check for mistakes.
Update openapi-ts version and re-generate API binding files

Prevent leaving pipeline with unsaved changes

Update .devcontainer

Signed-off-by: Karakatiza666 <bulakh.96@gmail.com>
Copy link
Contributor

@gz gz left a comment

Choose a reason for hiding this comment

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

looks like a big change and the worry is things don't work anymore. make sure to test it well...

@Karakatiza666
Copy link
Contributor Author

The current plan is to merge it at least a week later, in the meantime I will do some more testing. I already discovered some corner case issue that happens only on a slow connection.

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

Labels

javascript Pull requests that update Javascript code UX Issues that effect an end-user's experience Web Console Related to the browser based UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants