Update chobble-forms and en14960 gems; fix EN14960 wall height bug; symbolize keys in form configs and locales; standardize locale formatting; refactor session management and improve form validation#207
Merged
stefan-burke merged 19 commits intomainfrom Aug 17, 2025
Conversation
…ulation Workaround EN14960 v0.4.0 bug where it returns Integer 0 instead of Float 0.0 when platform_height < 0.6m in build_wall_height_result method. Added rescue for TypeError to return expected response for no walls required scenario. Also updated related tests and adjusted float conversions in slide and structure assessments to ensure consistent numeric types. Additional changes: - Updated gem versions in Gemfile.lock - Fixed symbol conversion in assessment_completion and assessment_block_builder concerns - Adjusted test expectations for wall height display to match new output format. Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.com>
…alues Removed unnecessary safe navigation operators and default fallback values when converting attributes to float in SlideAssessment model. This simplifies the code as the attributes are expected to be present and numeric. Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.com>
… calls Changed all calls to ChobbleForms::FieldUtils.form_field_label to use symbols instead of strings for model and field arguments. This improves consistency and potentially performance by avoiding repeated string to symbol conversions. Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.com>
Removed redundant double quotes from strings in multiple English locale YAML files under config/locales/forms to improve consistency and readability. Added YAML document start markers (---) to these files for proper YAML formatting. Also updated some method signatures in validation_configurable.rb to use Symbol type consistently. Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.com>
- EN14960 v0.4.0 requires Float parameters, not BigDecimal - Convert all database values (BigDecimal) to Float before passing to EN14960 methods - Fix test expectations to match Symbol returns from ChobbleForms v0.7.0 - Update validation configurable test to use Symbols for field and partial values 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Resolved conflicts by taking main's version for all YAML files and flake.nix
…renders Refactored the views for inspections, units, and users to use symbol keys (e.g., :photo, :id) instead of string keys (e.g., 'photo', 'id') in calls to render 'shared/table_column'. This improves consistency and aligns with Ruby conventions for keys. Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.com>
- Updated inspections controller to include all relevant fields (passed, risk_assessment, photos) for results tab prefill. - Adjusted results form to exclude :passed field from prefill to avoid duplication. - Changed chobble-forms gem from local path to versioned gem dependency. This improves clarity and correctness of data handling in the results tab of inspections. Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.com>
stefan-burke
commented
Aug 17, 2025
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.
Summary
chobble-formsgem from 0.5.6 to 0.7.0en14960gem from 0.2.3 to 0.4.0EN14960.calculate_wall_heightwhere it incorrectly returns an Integer 0 instead of Float 0.0 whenplatform_heightis less than 0.6AssessmentCompletionconcern andAssessmentBlockBuilderserviceFormConfigurableconcernValidationConfigurableconcernSessionManagementconcern to handle session creation and terminationSessionsController,UsersController) to use new session management methodsSessionsHelperto use session tokens and handle user sessions securelyUserSessionand updated specs to test session token based authenticationChanges
Gem Updates
chobble-formsto 0.7.0 anden14960to 0.4.0 with required runtime dependenciesBug Fixes
EN14960.calculate_wall_heightcall inSafetyStandardsControllerwith rescue forTypeErrorto handle the gem bug gracefullyCalculatorResponsewith0.0value and descriptive breakdown when no walls are requiredCode Improvements
SlideAssessmentandStructureAssessmentmodelsAnchorageAssessmentand user height related attributes inUserHeightAssessmentbefore validation callsAssessmentCompletionconcern andAssessmentBlockBuilderservice for consistencyFormConfigurableconcernValidationConfigurableconcernChobbleForms::FieldUtils.form_field_labelcalls to use symbol arguments instead of strings in helpers, views, and servicesSessionManagementconcern to handle session creation and terminationSessionsController,UsersController) to use new session management methodsSessionsHelperto use session tokens and handle user sessions securelyLocale Updates
Test Updates
UserSessionand updated specs for session token authenticationTest plan
🌿 Generated by Terry
ℹ️ Tag @terragon-labs to ask questions and address PR feedback
📎 Task: https://www.terragonlabs.com/task/5eb0408b-87d3-468b-82f4-6a3d50ada4bf