Merged
Conversation
Implement permanent plugin architecture and update API
Implement permanent plugin architecture and update API
This reverts commit c6b5bd8.
Add rust-toolchain.toml to pin toolchain to 1.93 (cargo, rustfmt, clippy) and include wasm32-unknown-unknown target. Update .claude/settings.local.json to add a "WebSearch" command. Refresh Cargo.lock to reflect dependency updates and checksum changes (dependency bumps and added plain crate).
Update the gpui-ce workspace dependency to git rev 8a5ff747c49087211459cb51a4d8ac45867b9b65 in Cargo.toml and sync the change to Cargo.lock. Also apply formatting/line-ending normalization to composed_shader_debug.wgsl (no intended functional changes to shader logic).
Add five new item_detail UI modules (format_tags.rs, gallery.rs, header.rs, license_section.rs, meta_bar.rs) providing reusable components: FormatTagsSection, GalleryStrip (and GalleryImage), DetailHeader, LicenseSection (and LicenseEntry), and MetaBar (with RatingInfo). These render asset metadata, gallery previews, format/tag badges, licensing rows, and the sticky detail header. Update lib.rs to introduce a simple in-memory FabCache (OnceLock + Mutex) with capacity and TTL, plus helpers to check/store cached listings and item details in fetch_fab_listings and fetch_fab_item_detail (logs cache hits and caches successful responses).
Add FAB marketplace search UI and integrate
Introduce a new ui_fab_search crate (UI + parser) providing FabSearchWindow and serde types for the Fab marketplace API. Add WindowRequest::FabSearch and a new window_config module to centralize window metadata. Wire the FAB search into the app: workspace Cargo.toml and engine Cargo.toml updated, engine main adds a callback to open the FAB window, entry screen gains a FabSearchRequested event, the sidebar gets a FAB button emitting that event, and the entry component subscribes to open the FAB window. Cargo.lock updated to include the new dependencies required by the feature.
Add Fab item detail view and fetching
Introduce an item detail view for Fab listings: add UI state (selected_item_uid, item_detail, detail_loading, detail_error), navigation helpers (go_back, open_item_detail), and wire card clicks to open details. Implement fetch_fab_item_detail which performs a GET /i/listings/{uid} using rquest + a Tokio runtime on an OS thread and communicates results back via a smol channel/task. Extend parser with FabItemDetail and related structs (tags, changelogs, licenses, media, etc.) and a strip_html helper. Update rendering to show loading, error, or detailed item UI (metadata, gallery, licenses, formats, tags, description, changelogs). Changes in ui-crates/ui_fab_search/src/lib.rs and ui-crates/ui_fab_search/src/parser.rs.
Update parser.rs
Extract the item detail UI into a new item_detail module and replace the large inline renderer in lib.rs with ItemDetailView. New components added: header, meta_bar, gallery, license_section, format_tags, description, and changelog (new files and mod). Updated components to use StyledExt and small UI/behavior tweaks: improved gallery image URL handling and conditional children, changed text clipping to truncate, removed uppercase/tracking styling in several labels, and simplified format tag display logic. lib.rs now wires up ItemDetailView and passes a go_back handler instead of rendering the detail panel inline.
Introduce an image_loader module that downloads images using rquest (Chrome impersonation), infers file extensions from magic bytes, and caches files under {TEMP}/pulsar-fab-cache using a stable hash-based filename; download_to_cache returns a PathBuf and skips re-downloading existing files. Wire the cache into the UI: export image_loader in lib, add image_cache (HashMap<String, Option<PathBuf>>) to FabSearchWindow, and implement ensure_image_loaded to kick off background downloads and update the cache when complete. Start downloads for listing thumbnails, gallery images and seller avatars when results/details arrive. Propagate cached file paths into ItemDetailView and GalleryImage (new image: Option<PathBuf>) so img elements use local files when available and show placeholders while loading.
Replace the previous disk-backed byte cache with pre-decoded gpui::RenderImage instances. Added image and smallvec deps and implemented fetch_and_decode that downloads bytes, decodes to RGBA8, swaps R/B to BGRA, wraps in image::Frame(s) and returns Arc<RenderImage>. Propagate the change through the UI: image cache maps now store Option<Arc<RenderImage>>, channels carry Arc<RenderImage>, gallery/item_detail types accept Arc<RenderImage>, and rendering uses ImageSource::Render(...) instead of file paths. This makes image rendering synchronous on the GPUI path and removes the need to load files from disk during render.
Pass predecoded avatar images into MetaBar so the seller avatar can be rendered synchronously from the image cache. Replaces seller_avatar_url: Option<SharedString> with seller_avatar: Option<Arc<gpui::RenderImage>> and updates the MetaBar constructor and Avatar src handling. ItemDetailView now looks up the avatar in the loaded images map and forwards the Arc if present. FabSearchWindow collects a mutable loaded_images map from the image cache and explicitly includes the seller avatar entry so it is available to the detail view.
WGPUIUI/fab integration
Integrate Scrollbar/ScrollbarState and ScrollHandle across the search UI to enable visible, trackable scrollbars and correct scrolling behavior. Added imports, new scroll_handle/scroll_state fields on FabSearchWindow and ItemDetailView, initialized defaults, and passed the detail scroll handle/state into ItemDetailView. Applied min_h_0 to relevant flex containers, added .track_scroll(&handle) to scrollable divs, and rendered Scrollbar::vertical overlays (absolute inset) for log, results and detail panes to display and control scrolling.
Replace the previous image grid with a horizontally-scrolling GalleryStrip that shows 16:9 thumbnails and opens a fullscreen modal lightbox on click. Add ScrollHandle/ScrollbarState fields for the gallery and wire them through ItemDetailView and FabSearchWindow. Convert several scroll containers to an overflow_hidden + size_full inner scroll pattern and attach track_scroll for correct scrollbar behavior. Add modal layer rendering via Root::render_modal_layer and adjust imports/types (Arc, ContextModal, Scrollbar, ScrollbarState).
Replace Fab-specific code and rquest with Sketchfab-oriented logic and reqwest networking. Key changes: - Switch dependency from `rquest` to `reqwest` (Cargo.toml) and update Cargo.lock entries accordingly. - Rewrite image_loader to use reqwest (with timeout and user-agent), decoding into RenderImage. - Migrate item/detail types and flow from FabItemDetail/FabListing to SketchfabModel/SketchfabModelDetail: update endpoints, payload handling, gallery URL extraction, and preloading logic (now uses thumbnail lists and v3 model endpoint). - Refactor UI sections: changelog -> ModelStatsSection (shows views/likes/downloads, geometry/stats), LicenseSection adapted to Sketchfab viewer/download semantics, MetaBar simplified to show views/likes and published date (removed rating UI), header button relabeled to "View on Sketchfab". - Add search/window features: new sort and license filter enums and state, refine search placeholder and request logging, expand result/state fields (next/prev URLs), and adjust image cache handling. - Various UI tweaks: labels, button IDs, layout/gap/border changes, and removal of Fab-specific strings. Overall this commit migrates the UI and networking layers from Fab-specific integrations to Sketchfab, consolidates image loading with reqwest, and updates the item detail and listing UI to match the Sketchfab model data.
Replace the previous scrollable results grid with a v_virtual_list-backed virtualized grid to improve rendering/performance for large result sets. Added Rc and VirtualListScrollHandle, and an entity Option<Entity<Self>> field so the virtual list can capture the component entity. Initialize the entity in new() and switch results_scroll_handle to VirtualListScrollHandle. Compute item sizes and row/column layout (3 columns, fixed row height), render real card rows, skeleton rows while loading more, and an end-of-results row. Load-more detection is moved to the virtual list visible range logic. Existing image cache and card click/detail logic are preserved.
Introduce download UI components and Sketchfab auth/download integration.
- Add new UI components: DownloadItem (per-download row), DownloadManagerDrawer (right-anchored drawer), and SpeedGraph (sparkline bar chart) under crates/ui. Re-export these from the ui crate.
- Integrate Sketchfab token persistence and API helpers in ui_fab_search: auth.rs saves/loads/deletes token from the platform config dir; fetch_me, download info resolution, like/unlike, and blocking HTTP client helpers added.
- Implement download flow in ui_fab_search: DownloadState, background downloading via blocking reqwest (streamed to file), progress/messages sent back to UI, UI hooks to start downloads from item detail and show status (including Open Folder action).
- Add image fetch concurrency controls and queueing to reduce parallel requests; show spinner for loading thumbs.
- Update ui_fab_search UI: item_detail gains download button/status region; results grid adapts column count to available width; like button and auth/account UI added.
- Cargo.toml: enable reqwest blocking feature and add dirs dependency; Cargo.lock updated to include dirs 5.0.1.
Files added/modified include crates/ui/{download_item.rs,download_manager.rs,speed_graph.rs,lib.rs} and ui-crates/ui_fab_search (auth.rs, many UI changes and download/auth logic).
Sketchfab updates
Split the old GalleryStrip into a large GalleryHero and a GalleryThumbnailRow with per-thumbnail callbacks and selection state. ItemDetailView was adapted to the new components, reworked into a two-column layout (main scrollable column + right sidebar), and now holds selected_image_idx and an on_select_image callback. FabSearchWindow now tracks selected_gallery_idx, resets it on detail loads, preloads up to 12 thumbnails (was 8), and wires selection changes back into the window state. Misc: updated sidebar/download UI, added avatar/author rendering and a sidebar_stat helper.
- Create new crates/pulsar_graph crate with src/lib.rs and src/type_system.rs extracted from crates/ui/src/graph/ - Dependencies: serde, serde_json, chrono, tracing (no workspace deps) - Replace crates/ui/src/graph/mod.rs with pub use pulsar_graph::*; shim - Add pulsar_graph as path dependency to crates/ui and workspace Cargo.toml - All existing consumers (ui::graph, engine pub use ui::graph) continue to work Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Introduce pulsar_lsp (LSP service layer) and pulsar_diagnostics (shared diagnostic types) to the workspace. pulsar_lsp includes a RustAnalyzerManager (process lifecycle, LSP JSON-RPC loop, progress/diagnostics handling, request helpers) and public traits for LSP backends; pulsar_diagnostics exposes Diagnostic, CodeAction, TextEdit, DiagnosticSeverity, DiagnosticSource and a DiagnosticSink trait so non-UI crates can consume diagnostics without pulling in UI. Update workspace Cargo.toml and engine_backend to depend on and re-export LSP types (AnalyzerEvent, AnalyzerStatus, path_to_uri). Add new UI fab search crate and remove the ui_project_launcher crate. Cargo.lock updated to reflect the new packages.
Remove the ui_common open_window helper and its export, and register LevelEditorPanel as a PulsarWindow (impl in ui_level_editor) so it can be opened via the WindowManager. Update the loading screen to open the LevelEditorPanel instead of using the removed helper. Also add workspace entries so ui_level_editor and window_manager are available to the UI crates and update dependency metadata accordingly.
Introduce open_pulsar_window to ui_common: add a new open_window module and re-export the helper from lib.rs. The function opens any PulsarWindow directly via cx.open_window (wrapping the built window in ui::Root) so callers don't depend on the WindowManager global being registered and avoid related panics. Includes a brief example in the docs and keeps window opening simple and reliable.
Drop the window_handle field and its initialization from LoadingScreen and remove the async background task that closed the loading window and unregistered it. When initial tasks complete the code now only opens the editor and marks opened_editor; actual window removal/unregistering should be handled elsewhere. This simplifies the loading screen lifecycle by eliminating in-place auto-close behavior.
Drop the window_handle field and its initialization from LoadingScreen and remove the async background task that closed the loading window and unregistered it. When initial tasks complete the code now only opens the editor and marks opened_editor; actual window removal/unregistering should be handled elsewhere. This simplifies the loading screen lifecycle by eliminating in-place auto-close behavior.
Decouple the loading screen from a hard dependency on the level editor by adding an injectable on_complete callback. Introduces an Arc<dyn Fn(PathBuf, &mut gpui::App) + Send + Sync> field and constructors (new_with_on_complete, new_internal), makes new_with_window_id use a no-op default callback, and calls the provided callback when initial tasks complete instead of opening ui_level_editor directly. Updates PulsarWindow::Params and build to accept and forward the callback, and removes the ui_level_editor workspace entry from the loading screen Cargo.toml so the crate no longer depends on that editor.
Introduce AppMenusCache global to cache OwnedMenu instances for platforms where cx.get_menus() returns None (e.g. Windows cross-platform backend). Split menu construction in ui_common into build_app_menus and update init_app_menus to both set native menus and store an OwnedMenu cache via ui::AppMenusCache. Update AppMenuBar to read menus from cx.get_menus() or fall back to the cached AppMenusCache and add new_with_menus(...) to construct a bar from a provided Vec<OwnedMenu>. Export AppMenusCache from the menu module.
Set window_decorations to Some(gpui::WindowDecorations::Client) for components and tab-panel drag/drop windows. Also remove the linux-only window_background appearance cfg in the drag_drop code so decoration handling is consistent across platforms.
Update gpui-ce dependency rev and tweak window border behavior: introduce RESIZE_HANDLE_SIZE (5px) and use it for resize hit testing instead of SHADOW_SIZE, and make BORDER_RADIUS platform-specific (0px on Windows, 8px elsewhere) so Windows keeps native rounded corners. Also update Cargo.toml and Cargo.lock to point to the new gpui-ce revision.
Introduce a backend-agnostic virtual filesystem and HTTP-backed remote provider to support cloud projects. Adds FsProvider trait with LocalFsProvider, RemoteFsProvider (ureq, base64, urlencoding) and a process-wide virtual_fs singleton with pass-through helpers and provider switching. Expose new pulsar-host file API (multiuser_host/src/api/files.rs) with list/read/write/rename/delete/mkdir/manifest endpoints and path safety checks; broadcast file-change events to sessions. Add MultiuserContext fields for auth_token and project_id and small engine_fs API exports (including is_cloud_path). Update crate Cargo.toml files to add required dependencies (serde, parking_lot, ureq, base64, urlencoding) and wire up the new modules.
Pass the menu folder path into the NewFolder action and update the handler to prefer that path when creating a new folder. The change ensures the folder is created in the context-menu target (not a potentially stale selection), updates selected_folder, refreshes the folder tree, and enters inline rename mode for the new folder. Also adds a short-living path_str from the menu builder for the action payload.
Normalize Windows backslashes for cloud paths and introduce cloud_join helper used across the file manager to preserve forward-slash URIs. RemoteFsProvider::to_rel now replaces backslashes early to avoid empty relative paths on Windows. The file manager UI was updated to use cloud_join for all path construction (create/rename/copy/paste/duplicate/new-folder/new-file) and the remote directory listing was refactored to build FileItem objects directly from FsEntry data (avoids N+1 remote stat calls and applies filtering earlier). Also ensure workspace directory exists in multiuser host list_dir by auto-creating the root if missing. These changes fix Windows path/URI bugs and improve remote listing performance.
When starting a window move via left-click drag, toggle fullscreen off first to allow moving (rename unused `cx` to `_cx` to avoid warnings). Remove legacy debug artifacts: delete composed_shader_debug.wgsl and the split_state.py helper script.
Upgrade deps & adapt to helio-render-v2 Update workspace dependencies and migrate to the new helio-render-v2/helio-live-portal packages. Cargo.toml and Cargo.lock updated for various crate upgrades (wgpu, axum, tokio-tungstenite/tungstenite, petgraph, pollster, etc.). Apply API changes throughout engine_backend (gpu_renderer, helio_renderer core/types/renderer) and UI crates (bevy_viewport, ui lib, level editor panels/viewport) to be compatible with the v2 renderer and updated dependency APIs. Add pipeline time getter and fix adapter enum Add GpuRenderer::get_pipeline_time_us() to return the last GPU pipeline execution time in microseconds (falls back to 0 if no renderer). This provides a simple total-frame timing convenience for helio-render-v2 where detailed timings live in GpuProfilerData. In ui_log_viewer, make enumerate_adapters synchronous via smol::block_on to obtain a Vec<wgpu::Adapter> and add an explicit adapter type in the max_by_key closure to ensure correct type inference when selecting the preferred GPU (discrete > integrated > virtual). Remove DXGI/blade modules and adapt Helio API Drop obsolete DXGI/blade interop and related modules (gpu_interop, dxgi_shared_texture) and mark removed helio submodules (gizmos, scene_builder) as disabled. Update helio_render_v2 imports to use the features submodule and adjust renderer usage to the new add_object signature (&mesh, Option, transform). These changes clean up removed backend paths and align code with the updated helio_render_v2 API.
1033351 to
f19a30c
Compare
This reverts commit f19a30c.
Extract decode_image_bytes helper to load image bytes into an image::RgbaImage (RGBA8) and update docs accordingly. Remove the previous in-place swap that converted RGBA->BGRA. Create RenderImage frames from the decoded RGBA image. Add a unit test to ensure decoded bytes preserve RGBA channel order. Also tidy imports slightly.
Refactor `engine_fs` for sanity reasons
Member
Author
|
While some of the windows in the engine are not yet updated to open with the new windowing system I will merge this for now as all bugs on Windows seem to have been worked out. Work will continue on porting remaining windows and screens to the new framework! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request makes significant updates to the project's dependency management and release automation. The main changes include switching the core UI dependency to a new fork (
gpui-ce), updating and reorganizing workspace dependencies inCargo.toml, and making the release workflow much more flexible and configurable. The workflow now supports building and packaging multiple crates and example binaries, with improved conditional logic and environment variable usage.The most important changes are:
Dependency and Workspace Updates:
gpuiand related crates with a single dependency ongpui-ce(the WGPUI fork) in both the workspace andcrates/engine/Cargo.toml. This consolidates and modernizes the UI backend. [1] [2][workspace.dependencies]section inCargo.toml, grouping engine and UI crates more clearly, adding new crates likepulsar_graph,pulsar_replication, andui_fab_search, and switching thewindowsdependency to a single line. [1] [2] [3]crates/engine/Cargo.tomlto use the newgpui-cedependency and addsui_fab_searchto the dependencies. [1] [2]Release Workflow Improvements:
.github/workflows/release.ymlto make crate and example builds configurable via environment variables (CRATES_TO_BUILD,CRATES_WITH_EXAMPLES,BUILD_CRATES,BUILD_EXAMPLES). This allows building and releasing multiple crates and example binaries per platform.Miscellaneous:
.claude/settings.local.json, likely for improved developer tooling or automation.These changes modernize the project's dependency tree, streamline the release process, and make it easier to maintain and extend the build and release pipeline.