Skip to content

[codex] Fix web WASM loader and dialogs#15

Merged
Friss merged 2 commits into
mainfrom
codex/web-wasm-loader-fixes
Apr 23, 2026
Merged

[codex] Fix web WASM loader and dialogs#15
Friss merged 2 commits into
mainfrom
codex/web-wasm-loader-fixes

Conversation

@Friss
Copy link
Copy Markdown
Owner

@Friss Friss commented Apr 23, 2026

Summary

  • Replace the persistent web loader bar with an initial modal overlay.
  • Let users select .ld and optional .ldx files together with one multi-file picker.
  • Auto-load selected files immediately after selection and remove the redundant load button.
  • Request an egui repaint after direct web session loads so the canvas updates after parsing.
  • Keep the WASM build clean by gating native-only background job helpers.
  • Add an in-dialog close button for Manage Channels so it can be dismissed on web.
  • Bump the app packager version to 0.5.0 for the next build on merge.

Root Cause

The web loader called directly into the running egui app and updated app state, but that path did not request a repaint. The status DOM updated, while the canvas could remain on the stale pre-load frame. The Manage Channels dialog is shown as an egui viewport; on web it does not get a native window close control, so it needed an explicit in-app close affordance.

Validation

  • cargo check -q -p i3rs-app
  • cargo check -q -p i3rs-app --target wasm32-unknown-unknown
  • cargo fmt --check
  • env -u NO_COLOR trunk build --release
  • Browser smoke tests against the local dist server for sample loading and modal behavior.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new loading overlay and modal for the web application, enabling users to select .ld and .ldx files simultaneously. Key UI enhancements include the addition of a favicon, a "Close" button for the channel picker, and explicit repaint requests in the App struct to ensure UI responsiveness. Furthermore, specific background job functions have been conditionally compiled to exclude them from WASM targets. I have no feedback to provide as no review comments were present.

@Friss Friss marked this pull request as ready for review April 23, 2026 15:19
@Friss Friss merged commit a9d1322 into main Apr 23, 2026
8 checks passed
@Friss Friss deleted the codex/web-wasm-loader-fixes branch April 23, 2026 15:22
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5eb954862d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +316 to +319
sessionFilesInput.addEventListener("change", () => {
if (sessionFilesInput.files && sessionFilesInput.files.length > 0) {
void loadSelectedFiles();
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reset file input to allow selecting the same session again

The new auto-load flow only runs on the file input change event, but the input value is never cleared after success or failure. In browsers, choosing the same file list again does not fire change, so after a failed parse/startup attempt users cannot retry the same .ld/.ldx pair from this overlay without first selecting a different file or refreshing.

Useful? React with 👍 / 👎.

Comment on lines +293 to 294
const ldxFile = ldxFiles[0];
let ldxText = null;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reject multiple .ldx files in the combined picker

The combined picker now accepts multiple files, but only .ld count is validated; .ldx uses ldxFiles[0] and silently ignores additional sidecars. If a user selects more than one .ldx, the app may attach the wrong sidecar without warning, leading to incorrect channel metadata for the loaded session.

Useful? React with 👍 / 👎.

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.

1 participant