From 91ea71b9316fe87672354a1c1db4b2e1ad57851e Mon Sep 17 00:00:00 2001 From: codex-scheduled Date: Thu, 13 Aug 2026 06:28:46 -0700 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=8E=A8=20Palette=20&=20Bolt=20Suite:?= =?UTF-8?q?=20Form=20Submission,=20Accessibility,=20SVG=20&=20CSV=20Optimi?= =?UTF-8?q?zations=20(#4429)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cross-repo-python-integration.yml | 11 +- .jules/bolt.md | 3 + .jules/palette.md | 3 + SPEC.md | 4 + launch.py | 4 +- scripts/bump_vendor_pin.py | 6 +- scripts/runner_capacity_check.py | 42 ++-- .../benchmarks/performance_benchmark.py | 30 +-- .../python/data_processor/core/data_loader.py | 4 +- .../python/tests/test_nn_training_worker.py | 6 +- ...test_vectorized_filter_engine_contracts.py | 18 +- .../tests/test_flow_rate_converter_gui.py | 12 +- .../tests/test_humanoid_builder_gui.py | 6 +- src/lower_body_model/launch_pyqt6.py | 4 +- .../python/video_processor_src/constants.py | 4 +- src/movement_optimizer/cli.py | 28 ++- src/movement_optimizer/constants.py | 4 +- src/movement_optimizer/exercises/_common.py | 4 +- src/movement_optimizer/exercises/clean.py | 4 +- src/movement_optimizer/exercises/gait.py | 4 +- .../exercises/sit_to_stand.py | 4 +- src/movement_optimizer/exercises/snatch.py | 4 +- src/movement_optimizer/export.py | 4 +- src/movement_optimizer/export_excel.py | 9 +- .../gui/_sidebar_builders.py | 56 ++++-- src/movement_optimizer/gui/_sidebar_state.py | 18 +- .../gui/bilateral_3d_renderer.py | 4 +- src/movement_optimizer/gui/commands.py | 16 +- .../gui/comparison_dialog.py | 4 +- src/movement_optimizer/gui/exercise_tab.py | 6 +- src/movement_optimizer/gui/file_operations.py | 14 +- src/movement_optimizer/gui/help_dialog.py | 20 +- src/movement_optimizer/gui/labelled_slider.py | 10 +- src/movement_optimizer/gui/main_window.py | 20 +- .../gui/motion_analysis_panel.py | 4 +- src/movement_optimizer/gui/motion_controls.py | 10 +- src/movement_optimizer/gui/motion_tabs.py | 113 ++++++++--- .../gui/motion_tabs_chain.py | 67 ++++-- .../gui/optimization_mixin.py | 27 ++- .../gui/parameter_sidebar.py | 28 ++- .../gui/playback_controls.py | 29 ++- src/movement_optimizer/gui/plot_renderer.py | 88 ++++++-- .../gui/policy_trace_canvas.py | 25 ++- src/movement_optimizer/gui/session_state.py | 4 +- src/movement_optimizer/gui/vector_overlay.py | 8 +- src/movement_optimizer/import_results.py | 8 +- src/movement_optimizer/models/__init__.py | 4 +- src/movement_optimizer/models/bilateral_3d.py | 5 +- .../models/chain_dynamics.py | 18 +- src/movement_optimizer/models/chain_forces.py | 8 +- .../models/lagrangian_balance.py | 4 +- .../models/lagrangian_dynamics.py | 8 +- .../models/lagrangian_kinematics.py | 25 ++- src/movement_optimizer/models/swingset.py | 67 ++++-- .../models/swingset_forces.py | 4 +- src/movement_optimizer/persistence.py | 24 ++- src/movement_optimizer/rendering.py | 4 +- src/movement_optimizer/result_analysis.py | 12 +- src/movement_optimizer/strength.py | 16 +- .../tests/test_anim_renderer.py | 4 +- .../tests/test_bench_press.py | 12 +- .../tests/test_benchmarks.py | 52 +++-- .../tests/test_bilateral_3d.py | 20 +- .../tests/test_chain_forces.py | 7 +- src/movement_optimizer/tests/test_cli.py | 20 +- .../tests/test_edge_cases.py | 33 ++- .../tests/test_exercise_tab.py | 4 +- .../tests/test_exercises.py | 32 ++- src/movement_optimizer/tests/test_export.py | 8 +- .../tests/test_export_excel.py | 14 +- src/movement_optimizer/tests/test_gait_sts.py | 4 +- .../tests/test_help_dialog.py | 19 +- .../tests/test_hypothesis.py | 56 ++++-- src/movement_optimizer/tests/test_import.py | 4 +- .../tests/test_install_nightly_system_deps.py | 4 +- .../tests/test_issue_217_decompose.py | 4 +- .../tests/test_issue_222_decompose.py | 8 +- .../tests/test_issue_247_split_optimizer.py | 23 ++- .../tests/test_joint_limits.py | 16 +- .../tests/test_main_window.py | 50 ++++- src/movement_optimizer/tests/test_models.py | 64 +++--- .../tests/test_motion_analysis_panel.py | 8 +- .../test_motion_analysis_panel_legends.py | 27 ++- .../tests/test_motion_tabs.py | 65 ++++-- .../tests/test_optimization_mixin.py | 8 +- .../tests/test_parameter_sidebar.py | 4 +- .../tests/test_plot_renderer.py | 12 +- .../tests/test_rust_parity_com_x.py | 4 +- .../tests/test_scipy_dependency_contract.py | 8 +- .../tests/test_shared_theme_dependency.py | 10 +- .../tests/test_spine_loads.py | 45 ++++- .../tests/test_subprocess_usage.py | 18 +- .../tests/test_swingset_chain_models.py | 66 ++++-- .../tests/test_swingset_forces.py | 4 +- .../tests/test_thread_safety.py | 6 +- .../tests/test_trajectory_generation.py | 12 +- .../tests/test_trajectory_optimization.py | 22 +- .../tests/test_vector_overlay.py | 38 +++- src/movement_optimizer/theme_bridge.py | 8 +- src/movement_optimizer/tool_pack.py | 4 +- .../trajectory/optimizer.py | 31 ++- .../trajectory/optimizer_cost.py | 4 +- .../trajectory/optimizer_parallel.py | 4 +- .../src/components/ODESolverCalculator.tsx | 14 +- .../backend/modbus_client.py | 32 ++- .../desktop/plot_compat.py | 4 +- src/p1am_control_system/desktop/sidebar.py | 12 +- .../data_explorer/plots/LinePlot.tsx | 8 +- .../data_explorer/plots/ScatterPlot.tsx | 8 +- .../data_explorer/plots/SpectrumPlot.tsx | 8 +- .../frontend/src/lib/chartSnapshot.ts | 22 +- .../frontend/src/lib/explorer/csv.ts | 7 +- .../pendulum-core/python/physics_native.py | 16 +- .../src/double_pendulum_golf/__main__.py | 4 +- .../double_pendulum_golf/constraint_solver.py | 16 +- .../double_pendulum_golf/counterfactual.py | 4 +- .../double_pendulum_golf/data_extractor.py | 8 +- .../dynamics_quantities.py | 4 +- .../double_pendulum_golf/golfer_dynamics.py | 16 +- .../double_pendulum_golf/golfer_kinematics.py | 4 +- .../double_pendulum_golf/gui/analysis_tab.py | 12 +- .../gui/base_pendulum_widget.py | 18 +- .../gui/clipboard_utils.py | 4 +- .../gui/controls_utils.py | 7 +- .../gui/controls_widget.py | 20 +- .../gui/controls_widget_base.py | 19 +- .../gui/controls_widget_golfer.py | 16 +- .../gui/controls_widget_triple.py | 40 +++- .../double_pendulum_golf/gui/diagnostics.py | 8 +- .../gui/golfer_pendulum_widget.py | 18 +- .../double_pendulum_golf/gui/main_window.py | 22 +- .../gui/matrix_widget_base.py | 4 +- .../gui/optimization_widget.py | 50 +++-- .../double_pendulum_golf/gui/overlay_state.py | 4 +- .../gui/panel_builders.py | 36 +++- .../gui/pendulum_widget.py | 19 +- .../gui/side_panel_tabs.py | 8 +- .../gui/simulation_panel.py | 16 +- .../gui/simulation_panel/_lifecycle_mixin.py | 12 +- .../gui/simulation_panel/_simulation_panel.py | 4 +- .../gui/theme_defaults.py | 4 +- .../gui/toolstrip_widget.py | 22 +- .../gui/torque_history_widget.py | 4 +- .../gui/torque_preview_widget.py | 27 ++- .../double_pendulum_golf/jacobians_golfer.py | 4 +- .../src/double_pendulum_golf/joint_moments.py | 8 +- .../double_pendulum_golf/model_registry.py | 4 +- .../double_pendulum_golf/native_backend.py | 24 ++- .../src/double_pendulum_golf/optimizer_gpu.py | 14 +- .../perturbation_analysis.py | 14 +- .../src/double_pendulum_golf/physics.py | 35 +++- .../physics_golfer_jax.py | 90 +++++++-- .../double_pendulum_golf/physics_triple.py | 16 +- .../src/double_pendulum_golf/simulation.py | 4 +- .../double_pendulum_golf/simulation_golfer.py | 8 +- .../simulation_result_base.py | 8 +- .../src/double_pendulum_golf/torque_utils.py | 4 +- .../tests/test_analysis_tab.py | 12 +- .../tests/test_analytical_jacobians.py | 92 +++++---- .../tests/test_club_forces.py | 16 +- .../tests/test_club_forces_extended.py | 52 +++-- .../tests/test_constraint_solver.py | 50 +++-- .../tests/test_counterfactual.py | 40 ++-- ...est_default_dark_theme_and_button_width.py | 18 +- .../tests/test_diagnostics.py | 12 +- .../tests/test_dynamics_quantities.py | 18 +- .../tests/test_ellipsoid_scale_and_emoji.py | 12 +- src/pendulum_simulator/tests/test_friction.py | 48 +++-- .../tests/test_friction_triple.py | 44 ++-- .../tests/test_golfer_dynamics_extended.py | 28 ++- .../tests/test_golfer_ellipsoids.py | 6 +- .../tests/test_golfer_kinematics.py | 18 +- .../tests/test_golfer_model.py | 12 +- .../tests/test_golfer_moments.py | 6 +- .../tests/test_golfer_topology.py | 38 ++-- .../tests/test_gui_utilities.py | 4 +- .../tests/test_hub_and_geometry.py | 8 +- .../tests/test_hypothesis_physics.py | 24 ++- .../tests/test_issue_fixes.py | 18 +- .../tests/test_jacobians.py | 30 +-- .../tests/test_jacobians_extended.py | 16 +- .../tests/test_jacobians_golfer.py | 28 +-- .../tests/test_joint_moments.py | 12 +- .../tests/test_main_window.py | 8 +- .../tests/test_model_registry_gaps.py | 12 +- .../tests/test_native_backend.py | 16 +- .../tests/test_native_backend_gaps.py | 4 +- .../tests/test_optimizer_advanced.py | 8 +- .../tests/test_optimizer_gpu.py | 16 +- .../tests/test_overlay_state_sync.py | 4 +- .../tests/test_panel_builders.py | 4 +- .../tests/test_perturbation_analysis.py | 16 +- src/pendulum_simulator/tests/test_physics.py | 64 ++++-- .../tests/test_physics_extended.py | 28 ++- .../tests/test_physics_golfer.py | 6 +- .../tests/test_physics_golfer_jax.py | 4 +- .../tests/test_physics_native_dbc.py | 8 +- .../tests/test_physics_triple.py | 32 ++- .../tests/test_physics_triple_extended.py | 20 +- .../tests/test_physics_triple_gaps.py | 16 +- .../tests/test_side_panel_tabs.py | 10 +- .../tests/test_simulation.py | 15 +- .../tests/test_simulation_gaps.py | 8 +- .../tests/test_simulation_golfer.py | 26 ++- .../tests/test_simulation_golfer_drift.py | 12 +- .../tests/test_simulation_golfer_extended.py | 8 +- .../tests/test_simulation_panel.py | 16 +- .../tests/test_simulation_triple.py | 4 +- .../tests/test_simulation_triple_extended.py | 4 +- .../tests/test_swing_comparison_dialog.py | 8 +- .../tests/test_toolstrip_elements.py | 34 ++-- .../tests/test_torque_utils.py | 4 +- .../tests/test_ui_enhancements.py | 22 +- .../tests/test_ui_polish_fixes.py | 6 +- .../tests/test_unit_converter.py | 4 +- .../tests/test_v2_comprehensive.py | 10 +- src/python/src/utils/error_handling.py | 4 +- src/python/tests/test_python_dbc_lod.py | 4 +- .../ui/pyqt6/main_window.py | 24 ++- .../ui/pyqt6/reference_frame_tab.py | 4 +- .../web/src/components/RotationConverter.tsx | 32 +-- .../python/src/star_wars_rrt.py | 4 +- .../python/chat/_chat_dock_widget_qt.py | 12 +- src/shared/python/chat/_qt/ai_dropdowns.py | 12 +- src/shared/python/chat/_qt/styling.py | 4 +- .../python/chat/condensation/condenser.py | 6 +- .../humanoid_character_builder/core/model.py | 4 +- .../model_generation/library/model_library.py | 4 +- .../tests/test_unified_loader.py | 6 +- .../plot_theme/tests/test_plot_theme.py | 6 +- src/shared/python/scripting/scripting_env.py | 5 +- .../calculators/mechanical/trc_geometry.py | 12 +- .../psa_package/psa_gui.py | 35 +++- .../python/sidekick/standalone/preferences.py | 18 +- .../python/sidekick/standalone/runner.py | 6 +- .../process_calculators/test_psa_model.py | 12 +- .../test_syngas_compression_dedup.py | 6 +- .../tests/test_json_io_boundary_3333.py | 6 +- .../sidekick/ui/tools_sidebar/registry.py | 4 +- .../sidekick/ui/tools_sidebar/sidebar.py | 4 +- .../python/tests/test_god_class_guard.py | 19 +- src/shared/python/theme/zoom.py | 4 +- .../urdf_viewer/tests/test_urdf_viewer.py | 4 +- tests/architecture/test_gh1696_god_modules.py | 30 +-- .../test_sidekick_external_imports_3316.py | 6 +- .../test_wgs_reactor_headless_import_3317.py | 6 +- tests/conftest.py | 1 + .../test_script_generator_hardening.py | 6 +- .../heavy_integration/test_tools_contracts.py | 18 +- .../integration/test_cross_repo_contracts.py | 48 ++--- tests/ode_solver/test_ode_solver_timeout.py | 24 +-- tests/ops/test_detect_secrets_baseline.py | 12 +- .../test_backend_security.py | 6 +- .../test_backend_security_import_guard.py | 6 +- .../test_event_logger_filter_error_logging.py | 6 +- tests/programmatic_pid/test_equipment.py | 6 +- tests/programmatic_pid/test_profiles_extra.py | 6 +- .../test_build_exe_lod.py | 12 +- tests/project_packer_fixes/test_build_lod.py | 30 +-- .../test_folder_packer_gui_lod.py | 18 +- .../test_math_primitives_bindings.py | 12 +- tests/scripts/test_generate_tools_json.py | 12 +- .../ai/integrations/test_linear_client.py | 8 +- .../shared/python/ai/test_adapter_contract.py | 12 +- .../shared/python/ai/test_adapter_factory.py | 30 +-- .../python/ai/test_cli_provider_setup.py | 18 +- tests/shared/python/ai/test_onnx_preflight.py | 6 +- .../ai/test_provider_config_registry.py | 6 +- .../python/ai/test_rust_adapter_fallback.py | 6 +- .../calculators/conversion/test_service.py | 6 +- .../python/chat/test_chat_agent_label.py | 4 +- .../python/chat/test_chat_session_helpers.py | 6 +- tests/shared/python/chat/test_quick_bar.py | 14 +- .../python/chat/test_router_error_logging.py | 4 +- .../python/chat/test_terminal_runtime.py | 6 +- .../test_gh1694_xml_security.py | 6 +- .../python/theme/test_fallback_drift.py | 12 +- .../shared/python/ui/test_headless_import.py | 12 +- tests/test_gh1655_print_to_logging.py | 12 +- tests/test_gh1732_logging_consistency.py | 24 +-- tests/test_no_urdf_builder_root_duplicates.py | 6 +- tests/test_review_fixes_2026_03_09.py | 6 +- tests/test_sidekick_public_api_stability.py | 12 +- tests/test_src_package_import_contract.py | 6 +- tests/tools/test_logger_shim.py | 6 +- tests/unit/ai/gui/test_chat_export.py | 6 +- .../github_mcp/test_tool_descriptors.py | 12 +- .../ai/mcp/test_notebooklm_server_phase2.py | 6 +- tests/unit/ai/test_peer_review.py | 12 +- tests/unit/chat/test_adapter_capabilities.py | 18 +- tests/unit/codemap/test_codemap_db.py | 6 +- tests/unit/lower_body_model/test_builder.py | 12 +- .../test_hip_rotation_target.py | 6 +- tests/unit/lower_body_model/test_simulator.py | 6 +- tests/unit/rust/test_ai_backend_workspace.py | 36 ++-- .../unit/sidekick/agent/test_action_audit.py | 4 +- .../sidekick/agent/test_feature_catalog.py | 8 +- tests/unit/sidekick/test_chat_redock.py | 6 +- .../test_sidekick_f4_collaborators.py | 36 ++-- .../sidekick/test_sidekick_ux_hardening.py | 190 ++++++++++-------- tests/unit/sidekick/test_tab_context_menu.py | 6 +- tests/unit/test_check_coverage_policy.py | 4 +- tests/unit/test_check_sidekick_coverage.py | 7 +- .../test_epic_2661_children_verification.py | 54 ++--- .../unit/test_sidekick_import_deprecation.py | 16 +- tests/unit/test_sidekick_package_rename.py | 18 +- 306 files changed, 3360 insertions(+), 1662 deletions(-) diff --git a/.github/workflows/cross-repo-python-integration.yml b/.github/workflows/cross-repo-python-integration.yml index 718f87458e..fc5e887834 100644 --- a/.github/workflows/cross-repo-python-integration.yml +++ b/.github/workflows/cross-repo-python-integration.yml @@ -82,12 +82,11 @@ jobs: test_command: xvfb-run --auto-servernum pytest tests/shared_contracts/ --timeout=60 --timeout-method=thread -v --tb=short env_name: REQUIRE_REAL_TOOLS_REPO sparse_checkout: | - chat - contracts.py - python/src/utils - shared - sidekick - src/shared/python + src/chat + src/contracts.py + src/python/src/utils + src/shared + src/sidekick tests/shared_contracts tests/support diff --git a/.jules/bolt.md b/.jules/bolt.md index 6858e01b49..07ec1b9d76 100644 --- a/.jules/bolt.md +++ b/.jules/bolt.md @@ -89,3 +89,6 @@ ## 2025-05-18 - Avoid array methods for small static arrays in frequently called initializers **Learning:** Using `.reduce()` or `.map()` on static arrays like tabs definitions inside frequently called functions (e.g. state initializers or local storage hydration) incurs unnecessary closure and function call overhead. **Action:** Replace `.reduce()` and `.map()` with single-pass `for` loops in simple data transformation functions (like `defaultTabVisibility`) to eliminate closure allocations. +## 2026-08-13 - Replace chained .map().join() in CSV generation +**Learning:** Using chained array methods like `.map().join()` for large data serialization (like CSV exports) allocates intermediate arrays for every row, putting immense pressure on the garbage collector and stalling the main thread. +**Action:** Replace chained array map/join operations in data serialization hot paths with single-pass `for` loops and string concatenation to eliminate intermediate allocations. diff --git a/.jules/palette.md b/.jules/palette.md index f32fbc5e57..b827de251a 100644 --- a/.jules/palette.md +++ b/.jules/palette.md @@ -49,3 +49,6 @@ ## 2024-05-31 - Tab Roles vs aria-pressed **Learning:** When implementing custom tab components in React, use `role="tab"` paired strictly with `aria-selected` (not `aria-pressed`, which is intended for toggle buttons) and ensure `aria-controls` points to a valid `role="tabpanel"` container whose `aria-labelledby` points back to the tab. **Action:** When adding accessible properties to custom tabs, replace `aria-pressed` with `aria-selected`, ensure a `role="tablist"` wrapper is present, and correctly cross-reference `aria-controls` with the tab panel IDs. +## 2024-05-31 - React `useId()` for Input Labels +**Learning:** When improving accessibility for React form inputs where explicit IDs are missing, using hardcoded IDs can cause conflicts if components render multiple times. +**Action:** When improving accessibility for React form inputs where explicit IDs are missing, use the `useId()` hook to safely generate unique, deterministic identifiers for reliably mapping `