Skip to content

Conversation

@Miodec
Copy link
Member

@Miodec Miodec commented Jan 17, 2026

No description provided.

Copilot AI review requested due to automatic review settings January 17, 2026 20:55
@monkeytypegeorge monkeytypegeorge added the frontend User interface or web stuff label Jan 17, 2026
@github-actions github-actions bot added the waiting for review Pull requests that require a review before continuing label Jan 17, 2026
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 refactors the background loader from a module-based implementation to a Solid.js component using signals. The main purpose is to modernize the codebase by converting imperative loader control to a reactive signal-based approach, aligning with the Solid.js framework being adopted.

Changes:

  • Deleted the old frontend/src/ts/elements/loader.ts module
  • Created new frontend/src/ts/signals/loader-bar.ts signal module with showLoaderBar() and hideLoaderBar() functions
  • Created new frontend/src/ts/components/common/LoaderBar.tsx Solid component
  • Updated all 30+ files that previously imported and used Loader.show()/hide() to use the new signal-based functions
  • Modified HTML to use the LoaderBar component instead of a static div
  • Updated CSS styling for the loader bar

Reviewed changes

Copilot reviewed 41 out of 41 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
frontend/src/ts/signals/loader-bar.ts New signal module providing showLoaderBar/hideLoaderBar API
frontend/src/ts/components/common/LoaderBar.tsx New Solid component implementing loader bar with reactive signal handling
frontend/src/ts/components/mount.tsx Registered LoaderBar component for mounting
frontend/src/index.html Replaced static div with LoaderBar component reference
frontend/src/styles/core.scss Updated loader bar CSS (added top positioning, changed height)
frontend/src/ts/elements/loader.ts Removed old module-based implementation
frontend/src/ts/utils/misc.ts Updated imports + unrelated async keyword additions to promiseWithResolvers
frontend/src/ts/modals/quote-rate.ts Updated imports, missing showLoaderBar call in submit function
All other files Updated imports from Loader module to loader-bar signal functions

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

Comment on lines +11 to +36
createEffect(() => {
const signal = getLoaderBarSignal();
const element = loaderEl();

if (signal === null || element === undefined) return;

if (signal.action === "show") {
showAnimation = element.animate({
opacity: 1,
duration: 125,
delay: signal.instant ? 0 : 125,
onBegin: () => {
element.removeClass("hidden");
},
});
} else {
showAnimation?.pause();
element.animate({
opacity: 0,
duration: 125,
onComplete: () => {
element.addClass("hidden");
},
});
}
});
Copy link

Copilot AI Jan 17, 2026

Choose a reason for hiding this comment

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

The debounced animation frame mechanism from the original implementation has been removed. The old loader used requestDebouncedAnimationFrame to batch multiple show/hide calls within the same frame. Without this batching, rapid consecutive calls to showLoaderBar()/hideLoaderBar() could trigger multiple animations and cause visual glitches or performance issues. Consider adding batching logic back or using untrack() if the signal updates should not trigger on every change.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend User interface or web stuff waiting for review Pull requests that require a review before continuing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants