Beam Calculator front-end development
For operating instructions, use the Beam Calculator user guide. This reference describes the current workspace architecture, updated November 8, 2026.
Interface and model state
The responsive workspace uses the site's Tailwind styles alongside existing input dialogs. It includes an editable model title, named supports and loads, section tables, a scenario selector, and Properties / Assistant / Activity panels. The beam canvas and input tables update together. On phones, the context panel becomes a drawer.
Beam Calculator workspace, November 2026.
beam-workspace-state.js normalizes and validates the document, applies atomic commands, maintains undo/redo, converts units, and builds the chosen scenario's analysis payload. beam-workspace.js connects existing editors and browser recovery to that state; beam-workspace-view.js handles selection, direct Properties edits, panels, load assignment, and checkpoint controls. Model metadata stays in the saved file's Units row and is removed from the solver payload, preserving compatibility with older beam files.
Load scenarios and results
Cases and combinations retain unfactored input values. All loads, a single case, or a user-defined combination determines the applied loads sent through the existing PHP calculation route to the solver. Geometry, section stiffness, and spring stiffness are not factored. Input, unit, or scenario changes invalidate results and require a new run; changing only the model title preserves results.
The solver returns reactions and diagram data. Existing D3 SVG charts provide interactive values along the beam. The original beam schematic and chart rendering are retained. PDF export uses jsPDF and AutoTable with consistent typography, repeated table headings, and scenario-aware input and result tables. Names beyond the core font’s character set use browser-rendered image fragments, so those fragments are not selectable PDF text. The report diagram uses applied loads; the editing canvas uses original loads.
Shared assistant flow and isolated previews
The Beam assistant uses the shared AI presentation components for formatted replies, question cards, suggested-value previews, and conversation history. Current model, result, and selected-element context accompany requests. Proposed commands pass deterministic validation, with one automatic correction attempt on invalid proposals. Apply commits the batch as one undoable change.
beam-canvas-preview.js renders a separate Current / Proposed comparison. The preview does not replace working model data or the report canvas. New model edits invalidate pending proposals; recovered conversation messages do not reactivate old proposals. The assistant cannot substitute generated numbers for solver results.
Saving, recovery, and versions
Browser recovery stores a bounded local working history separately from account saves. Account version history uses immutable revisions and stale-save protection. Named checkpoints and protected restores are available through Activity when account access and server history allow them. Inline renaming keeps the current account file and folder; Save as creates a separate model. Compatibility fallbacks preserve recovery copies when a verified update cannot be made, and failed saves retain local changes.
See the user guide for case assignment, AI questions and previews, and recovery and versions.