Conversation
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.
Issue #, if available: n/a
Summary
Major refactoring pass to improve code organization, type safety, and maintainability across the Cesium globe application.
Changes
Project Structure & Tooling
src/util/tosrc/utils/with more descriptive file names (smHelper→sagemakerHelper,mrHelper→modelRunnerHelper)jest.config.js,@types/jest,test/test:watchscripts)cesiumFormatters,config,handleAwsError,logger, and sharedtypesModule Decomposition
cesiumHelper.ts(722 LOC monolith → 4 focused modules):cesiumFeatures.ts— GeoJSON loading & feature click handlingcesiumImagery.ts— Image/tile loading & Docker-based tile creationcesiumFormatters.ts— Feature property formatting for popupscesiumHelper.ts— Barrel re-export preserving existing import pathsFormControls.tsx(506 LOC → 6 files):DarkAutosuggest.tsx,DarkSelect.tsx,DarkMultiselect.tsx,DarkInput.tsx,DarkFormField.tsx,types.tsFormControls.tsxbecomes a barrel re-export for backward compatibilityExpandSectionextracted fromImageRequestModalinto its own componentNew Custom Hooks
useS3Browser— Shared S3 bucket/object browsing logic (replaces duplicated code inLoadImageModal,LoadDataModal,ImageRequestModal)useImageRequestResults— Auto-loads processing results on job success (extracted fromImageRequestModal)Type Safety
src/types.tswith shared types:ImageRequestState,ImageRequestData,ImageRequestOutput(discriminated union),ImageProcessor,FeatureDistillationConfig,PostProcessingStepanytypes across modal props, model runner interfaces, and status handlers with proper typed signatures===) instead of loose (==) in output comparisonsStructured Logging
src/utils/logger.tswith level-aware logging (debug/info/warn/error); suppresses debug in productionconsole.log/console.errorcalls withlogger.*throughout the codebaseCSS & Design Tokens
--z-vignette,--z-tray,--z-popup,--z-modal,--z-dropdown) and scrollbar stylinggap: 12→gap: 12pxbug inImageRequestStatus.cssImagery Pipeline Fix
cesiumImagery.tsnow warps images to EPSG:4326 viagdalwarpbefore tiling, correctly handling projected CRS and rotated rasterscleanupWarpedFile()for temp file cleanupcalculate_extents.pyupdated to use the full GeoTransform formula (handles rotation viagt[2]/gt[4])Config Centralization
VIEWER_INIT_MAX_RETRIES,CAMERA_FLY_DURATION_SECONDS,POPUP_WIDTH,JOB_NAME_PREFIX,FALLBACK_DEV_URL, etc.ResourceContext
zoomToby using the state-setter pattern to read current resourcesresourcesfrom thezoomTodependency arrayChecklist
Before you submit a pull request, please make sure you have the following:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.