@floless/app 0.167.0 → 0.169.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (277) hide show
  1. package/autostart.mjs +169 -63
  2. package/cli-actions.mjs +8 -1
  3. package/desktop-shell.mjs +335 -0
  4. package/dist/floless-server.cjs +73121 -55759
  5. package/dist/schemas/steel.model.v2.schema.json +2 -1
  6. package/dist/skills/floless-app-onboarding/SKILL.md +13 -4
  7. package/dist/skills/floless-app-onboarding/references/floless-surfaces.md +3 -0
  8. package/dist/skills/floless-app-rfi/SKILL.md +4 -2
  9. package/dist/skills/floless-app-steel-takeoff/SKILL.md +21 -2
  10. package/dist/skills/floless-app-ui/SKILL.md +2 -2
  11. package/dist/skills/floless-app-workflows/SKILL.md +2 -2
  12. package/dist/templates/college-phase-exporter.flo +7 -2
  13. package/dist/templates/trimble-list-projects.flo +10 -2
  14. package/dist/web/agent-steps.js +2 -2
  15. package/dist/web/agents.js +50 -14
  16. package/dist/web/app.css +209 -11
  17. package/dist/web/app.js +99 -16
  18. package/dist/web/aware-update-client.js +14 -6
  19. package/dist/web/aware.js +583 -69
  20. package/dist/web/chat.css +12 -1
  21. package/dist/web/chat.js +627 -96
  22. package/dist/web/commands-drawing-check.js +3 -0
  23. package/dist/web/commands-filter.js +5 -5
  24. package/dist/web/commands-shell.js +283 -14
  25. package/dist/web/commands-steel.js +9 -2
  26. package/dist/web/commands-vector.js +69 -0
  27. package/dist/web/desktop-window.js +435 -0
  28. package/dist/web/drawing-check-editor.html +10 -0
  29. package/dist/web/drawing-check-editor.js +515 -187
  30. package/dist/web/failure-copy.js +33 -2
  31. package/dist/web/flo-3d.js +310 -0
  32. package/dist/web/flo-card.js +72 -0
  33. package/dist/web/guide.js +78 -10
  34. package/dist/web/index.html +90 -10
  35. package/dist/web/instructor.js +4 -1
  36. package/dist/web/leave-guard.js +347 -14
  37. package/dist/web/model-editor-steel-adapter.js +41 -1
  38. package/dist/web/model-viewport-toolbar.js +11 -0
  39. package/dist/web/pages.js +21 -14
  40. package/dist/web/panels.js +5 -2
  41. package/dist/web/pdf-view.js +421 -0
  42. package/dist/web/project-history.js +3 -2
  43. package/dist/web/project-modules.js +5 -3
  44. package/dist/web/project-reconciliation.js +1 -1
  45. package/dist/web/project-rfis.js +4 -2
  46. package/dist/web/project-workflows.js +8 -4
  47. package/dist/web/reference-geometry-worker.js +11 -2
  48. package/dist/web/renderers.js +6 -0
  49. package/dist/web/report-csp.js +68 -0
  50. package/dist/web/revit-editor.html +1 -0
  51. package/dist/web/revit-editor.js +37 -8
  52. package/dist/web/run-history.js +2 -3
  53. package/dist/web/shared-prefs.js +364 -0
  54. package/dist/web/steel-3d-flo.js +309 -0
  55. package/dist/web/steel-3d-view.js +159 -0
  56. package/dist/web/steel-editor.html +329 -47
  57. package/dist/web/steel-filter-flo.js +74 -18
  58. package/dist/web/steel-filter.html +22 -6
  59. package/dist/web/tab-signal.js +36 -1
  60. package/dist/web/tekla-editor.html +1 -0
  61. package/dist/web/terminal-requests.js +78 -0
  62. package/dist/web/tool-updates.js +160 -38
  63. package/dist/web/vector-3d.html +14 -3
  64. package/dist/web/vector-editor.html +60 -10
  65. package/dist/web/vendor/README.md +23 -0
  66. package/dist/web/vendor/pdfjs/LICENSE +177 -0
  67. package/dist/web/vendor/pdfjs/cmaps/78-EUC-H.bcmap +0 -0
  68. package/dist/web/vendor/pdfjs/cmaps/78-EUC-V.bcmap +0 -0
  69. package/dist/web/vendor/pdfjs/cmaps/78-H.bcmap +0 -0
  70. package/dist/web/vendor/pdfjs/cmaps/78-RKSJ-H.bcmap +0 -0
  71. package/dist/web/vendor/pdfjs/cmaps/78-RKSJ-V.bcmap +0 -0
  72. package/dist/web/vendor/pdfjs/cmaps/78-V.bcmap +0 -0
  73. package/dist/web/vendor/pdfjs/cmaps/78ms-RKSJ-H.bcmap +0 -0
  74. package/dist/web/vendor/pdfjs/cmaps/78ms-RKSJ-V.bcmap +0 -0
  75. package/dist/web/vendor/pdfjs/cmaps/83pv-RKSJ-H.bcmap +0 -0
  76. package/dist/web/vendor/pdfjs/cmaps/90ms-RKSJ-H.bcmap +0 -0
  77. package/dist/web/vendor/pdfjs/cmaps/90ms-RKSJ-V.bcmap +0 -0
  78. package/dist/web/vendor/pdfjs/cmaps/90msp-RKSJ-H.bcmap +0 -0
  79. package/dist/web/vendor/pdfjs/cmaps/90msp-RKSJ-V.bcmap +0 -0
  80. package/dist/web/vendor/pdfjs/cmaps/90pv-RKSJ-H.bcmap +0 -0
  81. package/dist/web/vendor/pdfjs/cmaps/90pv-RKSJ-V.bcmap +0 -0
  82. package/dist/web/vendor/pdfjs/cmaps/Add-H.bcmap +0 -0
  83. package/dist/web/vendor/pdfjs/cmaps/Add-RKSJ-H.bcmap +0 -0
  84. package/dist/web/vendor/pdfjs/cmaps/Add-RKSJ-V.bcmap +0 -0
  85. package/dist/web/vendor/pdfjs/cmaps/Add-V.bcmap +0 -0
  86. package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-0.bcmap +0 -0
  87. package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-1.bcmap +0 -0
  88. package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-2.bcmap +0 -0
  89. package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-3.bcmap +0 -0
  90. package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-4.bcmap +0 -0
  91. package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-5.bcmap +0 -0
  92. package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-6.bcmap +0 -0
  93. package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
  94. package/dist/web/vendor/pdfjs/cmaps/Adobe-GB1-0.bcmap +0 -0
  95. package/dist/web/vendor/pdfjs/cmaps/Adobe-GB1-1.bcmap +0 -0
  96. package/dist/web/vendor/pdfjs/cmaps/Adobe-GB1-2.bcmap +0 -0
  97. package/dist/web/vendor/pdfjs/cmaps/Adobe-GB1-3.bcmap +0 -0
  98. package/dist/web/vendor/pdfjs/cmaps/Adobe-GB1-4.bcmap +0 -0
  99. package/dist/web/vendor/pdfjs/cmaps/Adobe-GB1-5.bcmap +0 -0
  100. package/dist/web/vendor/pdfjs/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
  101. package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-0.bcmap +0 -0
  102. package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-1.bcmap +0 -0
  103. package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-2.bcmap +0 -0
  104. package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-3.bcmap +0 -0
  105. package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-4.bcmap +0 -0
  106. package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-5.bcmap +0 -0
  107. package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-6.bcmap +0 -0
  108. package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
  109. package/dist/web/vendor/pdfjs/cmaps/Adobe-Korea1-0.bcmap +0 -0
  110. package/dist/web/vendor/pdfjs/cmaps/Adobe-Korea1-1.bcmap +0 -0
  111. package/dist/web/vendor/pdfjs/cmaps/Adobe-Korea1-2.bcmap +0 -0
  112. package/dist/web/vendor/pdfjs/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
  113. package/dist/web/vendor/pdfjs/cmaps/B5-H.bcmap +0 -0
  114. package/dist/web/vendor/pdfjs/cmaps/B5-V.bcmap +0 -0
  115. package/dist/web/vendor/pdfjs/cmaps/B5pc-H.bcmap +0 -0
  116. package/dist/web/vendor/pdfjs/cmaps/B5pc-V.bcmap +0 -0
  117. package/dist/web/vendor/pdfjs/cmaps/CNS-EUC-H.bcmap +0 -0
  118. package/dist/web/vendor/pdfjs/cmaps/CNS-EUC-V.bcmap +0 -0
  119. package/dist/web/vendor/pdfjs/cmaps/CNS1-H.bcmap +0 -0
  120. package/dist/web/vendor/pdfjs/cmaps/CNS1-V.bcmap +0 -0
  121. package/dist/web/vendor/pdfjs/cmaps/CNS2-H.bcmap +0 -0
  122. package/dist/web/vendor/pdfjs/cmaps/CNS2-V.bcmap +3 -0
  123. package/dist/web/vendor/pdfjs/cmaps/ETHK-B5-H.bcmap +0 -0
  124. package/dist/web/vendor/pdfjs/cmaps/ETHK-B5-V.bcmap +0 -0
  125. package/dist/web/vendor/pdfjs/cmaps/ETen-B5-H.bcmap +0 -0
  126. package/dist/web/vendor/pdfjs/cmaps/ETen-B5-V.bcmap +0 -0
  127. package/dist/web/vendor/pdfjs/cmaps/ETenms-B5-H.bcmap +3 -0
  128. package/dist/web/vendor/pdfjs/cmaps/ETenms-B5-V.bcmap +0 -0
  129. package/dist/web/vendor/pdfjs/cmaps/EUC-H.bcmap +0 -0
  130. package/dist/web/vendor/pdfjs/cmaps/EUC-V.bcmap +0 -0
  131. package/dist/web/vendor/pdfjs/cmaps/Ext-H.bcmap +0 -0
  132. package/dist/web/vendor/pdfjs/cmaps/Ext-RKSJ-H.bcmap +0 -0
  133. package/dist/web/vendor/pdfjs/cmaps/Ext-RKSJ-V.bcmap +0 -0
  134. package/dist/web/vendor/pdfjs/cmaps/Ext-V.bcmap +0 -0
  135. package/dist/web/vendor/pdfjs/cmaps/GB-EUC-H.bcmap +0 -0
  136. package/dist/web/vendor/pdfjs/cmaps/GB-EUC-V.bcmap +0 -0
  137. package/dist/web/vendor/pdfjs/cmaps/GB-H.bcmap +4 -0
  138. package/dist/web/vendor/pdfjs/cmaps/GB-V.bcmap +0 -0
  139. package/dist/web/vendor/pdfjs/cmaps/GBK-EUC-H.bcmap +0 -0
  140. package/dist/web/vendor/pdfjs/cmaps/GBK-EUC-V.bcmap +0 -0
  141. package/dist/web/vendor/pdfjs/cmaps/GBK2K-H.bcmap +0 -0
  142. package/dist/web/vendor/pdfjs/cmaps/GBK2K-V.bcmap +0 -0
  143. package/dist/web/vendor/pdfjs/cmaps/GBKp-EUC-H.bcmap +0 -0
  144. package/dist/web/vendor/pdfjs/cmaps/GBKp-EUC-V.bcmap +0 -0
  145. package/dist/web/vendor/pdfjs/cmaps/GBT-EUC-H.bcmap +0 -0
  146. package/dist/web/vendor/pdfjs/cmaps/GBT-EUC-V.bcmap +0 -0
  147. package/dist/web/vendor/pdfjs/cmaps/GBT-H.bcmap +0 -0
  148. package/dist/web/vendor/pdfjs/cmaps/GBT-V.bcmap +0 -0
  149. package/dist/web/vendor/pdfjs/cmaps/GBTpc-EUC-H.bcmap +0 -0
  150. package/dist/web/vendor/pdfjs/cmaps/GBTpc-EUC-V.bcmap +0 -0
  151. package/dist/web/vendor/pdfjs/cmaps/GBpc-EUC-H.bcmap +0 -0
  152. package/dist/web/vendor/pdfjs/cmaps/GBpc-EUC-V.bcmap +0 -0
  153. package/dist/web/vendor/pdfjs/cmaps/H.bcmap +0 -0
  154. package/dist/web/vendor/pdfjs/cmaps/HKdla-B5-H.bcmap +0 -0
  155. package/dist/web/vendor/pdfjs/cmaps/HKdla-B5-V.bcmap +0 -0
  156. package/dist/web/vendor/pdfjs/cmaps/HKdlb-B5-H.bcmap +0 -0
  157. package/dist/web/vendor/pdfjs/cmaps/HKdlb-B5-V.bcmap +0 -0
  158. package/dist/web/vendor/pdfjs/cmaps/HKgccs-B5-H.bcmap +0 -0
  159. package/dist/web/vendor/pdfjs/cmaps/HKgccs-B5-V.bcmap +0 -0
  160. package/dist/web/vendor/pdfjs/cmaps/HKm314-B5-H.bcmap +0 -0
  161. package/dist/web/vendor/pdfjs/cmaps/HKm314-B5-V.bcmap +0 -0
  162. package/dist/web/vendor/pdfjs/cmaps/HKm471-B5-H.bcmap +0 -0
  163. package/dist/web/vendor/pdfjs/cmaps/HKm471-B5-V.bcmap +0 -0
  164. package/dist/web/vendor/pdfjs/cmaps/HKscs-B5-H.bcmap +0 -0
  165. package/dist/web/vendor/pdfjs/cmaps/HKscs-B5-V.bcmap +0 -0
  166. package/dist/web/vendor/pdfjs/cmaps/Hankaku.bcmap +0 -0
  167. package/dist/web/vendor/pdfjs/cmaps/Hiragana.bcmap +0 -0
  168. package/dist/web/vendor/pdfjs/cmaps/KSC-EUC-H.bcmap +0 -0
  169. package/dist/web/vendor/pdfjs/cmaps/KSC-EUC-V.bcmap +0 -0
  170. package/dist/web/vendor/pdfjs/cmaps/KSC-H.bcmap +0 -0
  171. package/dist/web/vendor/pdfjs/cmaps/KSC-Johab-H.bcmap +0 -0
  172. package/dist/web/vendor/pdfjs/cmaps/KSC-Johab-V.bcmap +0 -0
  173. package/dist/web/vendor/pdfjs/cmaps/KSC-V.bcmap +0 -0
  174. package/dist/web/vendor/pdfjs/cmaps/KSCms-UHC-H.bcmap +0 -0
  175. package/dist/web/vendor/pdfjs/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
  176. package/dist/web/vendor/pdfjs/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
  177. package/dist/web/vendor/pdfjs/cmaps/KSCms-UHC-V.bcmap +0 -0
  178. package/dist/web/vendor/pdfjs/cmaps/KSCpc-EUC-H.bcmap +0 -0
  179. package/dist/web/vendor/pdfjs/cmaps/KSCpc-EUC-V.bcmap +0 -0
  180. package/dist/web/vendor/pdfjs/cmaps/Katakana.bcmap +0 -0
  181. package/dist/web/vendor/pdfjs/cmaps/LICENSE +36 -0
  182. package/dist/web/vendor/pdfjs/cmaps/NWP-H.bcmap +0 -0
  183. package/dist/web/vendor/pdfjs/cmaps/NWP-V.bcmap +0 -0
  184. package/dist/web/vendor/pdfjs/cmaps/RKSJ-H.bcmap +0 -0
  185. package/dist/web/vendor/pdfjs/cmaps/RKSJ-V.bcmap +0 -0
  186. package/dist/web/vendor/pdfjs/cmaps/Roman.bcmap +0 -0
  187. package/dist/web/vendor/pdfjs/cmaps/UniCNS-UCS2-H.bcmap +0 -0
  188. package/dist/web/vendor/pdfjs/cmaps/UniCNS-UCS2-V.bcmap +0 -0
  189. package/dist/web/vendor/pdfjs/cmaps/UniCNS-UTF16-H.bcmap +0 -0
  190. package/dist/web/vendor/pdfjs/cmaps/UniCNS-UTF16-V.bcmap +0 -0
  191. package/dist/web/vendor/pdfjs/cmaps/UniCNS-UTF32-H.bcmap +0 -0
  192. package/dist/web/vendor/pdfjs/cmaps/UniCNS-UTF32-V.bcmap +0 -0
  193. package/dist/web/vendor/pdfjs/cmaps/UniCNS-UTF8-H.bcmap +0 -0
  194. package/dist/web/vendor/pdfjs/cmaps/UniCNS-UTF8-V.bcmap +0 -0
  195. package/dist/web/vendor/pdfjs/cmaps/UniGB-UCS2-H.bcmap +0 -0
  196. package/dist/web/vendor/pdfjs/cmaps/UniGB-UCS2-V.bcmap +0 -0
  197. package/dist/web/vendor/pdfjs/cmaps/UniGB-UTF16-H.bcmap +0 -0
  198. package/dist/web/vendor/pdfjs/cmaps/UniGB-UTF16-V.bcmap +0 -0
  199. package/dist/web/vendor/pdfjs/cmaps/UniGB-UTF32-H.bcmap +0 -0
  200. package/dist/web/vendor/pdfjs/cmaps/UniGB-UTF32-V.bcmap +0 -0
  201. package/dist/web/vendor/pdfjs/cmaps/UniGB-UTF8-H.bcmap +0 -0
  202. package/dist/web/vendor/pdfjs/cmaps/UniGB-UTF8-V.bcmap +0 -0
  203. package/dist/web/vendor/pdfjs/cmaps/UniJIS-UCS2-H.bcmap +0 -0
  204. package/dist/web/vendor/pdfjs/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
  205. package/dist/web/vendor/pdfjs/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
  206. package/dist/web/vendor/pdfjs/cmaps/UniJIS-UCS2-V.bcmap +0 -0
  207. package/dist/web/vendor/pdfjs/cmaps/UniJIS-UTF16-H.bcmap +0 -0
  208. package/dist/web/vendor/pdfjs/cmaps/UniJIS-UTF16-V.bcmap +0 -0
  209. package/dist/web/vendor/pdfjs/cmaps/UniJIS-UTF32-H.bcmap +0 -0
  210. package/dist/web/vendor/pdfjs/cmaps/UniJIS-UTF32-V.bcmap +0 -0
  211. package/dist/web/vendor/pdfjs/cmaps/UniJIS-UTF8-H.bcmap +0 -0
  212. package/dist/web/vendor/pdfjs/cmaps/UniJIS-UTF8-V.bcmap +0 -0
  213. package/dist/web/vendor/pdfjs/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
  214. package/dist/web/vendor/pdfjs/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
  215. package/dist/web/vendor/pdfjs/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
  216. package/dist/web/vendor/pdfjs/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
  217. package/dist/web/vendor/pdfjs/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
  218. package/dist/web/vendor/pdfjs/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
  219. package/dist/web/vendor/pdfjs/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
  220. package/dist/web/vendor/pdfjs/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
  221. package/dist/web/vendor/pdfjs/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
  222. package/dist/web/vendor/pdfjs/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
  223. package/dist/web/vendor/pdfjs/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
  224. package/dist/web/vendor/pdfjs/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
  225. package/dist/web/vendor/pdfjs/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
  226. package/dist/web/vendor/pdfjs/cmaps/UniKS-UCS2-H.bcmap +0 -0
  227. package/dist/web/vendor/pdfjs/cmaps/UniKS-UCS2-V.bcmap +0 -0
  228. package/dist/web/vendor/pdfjs/cmaps/UniKS-UTF16-H.bcmap +0 -0
  229. package/dist/web/vendor/pdfjs/cmaps/UniKS-UTF16-V.bcmap +0 -0
  230. package/dist/web/vendor/pdfjs/cmaps/UniKS-UTF32-H.bcmap +0 -0
  231. package/dist/web/vendor/pdfjs/cmaps/UniKS-UTF32-V.bcmap +0 -0
  232. package/dist/web/vendor/pdfjs/cmaps/UniKS-UTF8-H.bcmap +0 -0
  233. package/dist/web/vendor/pdfjs/cmaps/UniKS-UTF8-V.bcmap +0 -0
  234. package/dist/web/vendor/pdfjs/cmaps/V.bcmap +0 -0
  235. package/dist/web/vendor/pdfjs/cmaps/WP-Symbol.bcmap +0 -0
  236. package/dist/web/vendor/pdfjs/iccs/CGATS001Compat-v2-micro.icc +0 -0
  237. package/dist/web/vendor/pdfjs/iccs/LICENSE +116 -0
  238. package/dist/web/vendor/pdfjs/pdf.min.mjs +28 -0
  239. package/dist/web/vendor/pdfjs/pdf.worker.mjs +64908 -0
  240. package/dist/web/vendor/pdfjs/standard_fonts/FoxitDingbats.pfb +0 -0
  241. package/dist/web/vendor/pdfjs/standard_fonts/FoxitFixed.pfb +0 -0
  242. package/dist/web/vendor/pdfjs/standard_fonts/FoxitFixedBold.pfb +0 -0
  243. package/dist/web/vendor/pdfjs/standard_fonts/FoxitFixedBoldItalic.pfb +0 -0
  244. package/dist/web/vendor/pdfjs/standard_fonts/FoxitFixedItalic.pfb +0 -0
  245. package/dist/web/vendor/pdfjs/standard_fonts/FoxitSerif.pfb +0 -0
  246. package/dist/web/vendor/pdfjs/standard_fonts/FoxitSerifBold.pfb +0 -0
  247. package/dist/web/vendor/pdfjs/standard_fonts/FoxitSerifBoldItalic.pfb +0 -0
  248. package/dist/web/vendor/pdfjs/standard_fonts/FoxitSerifItalic.pfb +0 -0
  249. package/dist/web/vendor/pdfjs/standard_fonts/FoxitSymbol.pfb +0 -0
  250. package/dist/web/vendor/pdfjs/standard_fonts/LICENSE_FOXIT +27 -0
  251. package/dist/web/vendor/pdfjs/standard_fonts/LICENSE_LIBERATION +363 -0
  252. package/dist/web/vendor/pdfjs/standard_fonts/LiberationSans-Bold.ttf +0 -0
  253. package/dist/web/vendor/pdfjs/standard_fonts/LiberationSans-BoldItalic.ttf +0 -0
  254. package/dist/web/vendor/pdfjs/standard_fonts/LiberationSans-Italic.ttf +0 -0
  255. package/dist/web/vendor/pdfjs/standard_fonts/LiberationSans-Regular.ttf +0 -0
  256. package/dist/web/vendor/pdfjs/wasm/LICENSE_JBIG2 +196 -0
  257. package/dist/web/vendor/pdfjs/wasm/LICENSE_OPENJPEG +39 -0
  258. package/dist/web/vendor/pdfjs/wasm/LICENSE_PDFJS_JBIG2 +13 -0
  259. package/dist/web/vendor/pdfjs/wasm/LICENSE_PDFJS_OPENJPEG +22 -0
  260. package/dist/web/vendor/pdfjs/wasm/LICENSE_PDFJS_QCMS +19 -0
  261. package/dist/web/vendor/pdfjs/wasm/LICENSE_QCMS +21 -0
  262. package/dist/web/vendor/pdfjs/wasm/jbig2.wasm +0 -0
  263. package/dist/web/vendor/pdfjs/wasm/jbig2_nowasm_fallback.js +15 -0
  264. package/dist/web/vendor/pdfjs/wasm/openjpeg.wasm +0 -0
  265. package/dist/web/vendor/pdfjs/wasm/openjpeg_nowasm_fallback.js +17 -0
  266. package/dist/web/vendor/pdfjs/wasm/qcms_bg.wasm +0 -0
  267. package/dist/web/workspace-root-management.js +1 -1
  268. package/dist/web/workspaces.js +792 -165
  269. package/home-env.mjs +28 -0
  270. package/install-path.mjs +59 -3
  271. package/launch-starting-page.mjs +35 -15
  272. package/launch.mjs +363 -51
  273. package/package.json +9 -8
  274. package/pin-home.mjs +6 -0
  275. package/post-update-marker.mjs +14 -0
  276. package/preferences-file.mjs +289 -0
  277. package/supervisor-lock.mjs +195 -0
@@ -164,7 +164,7 @@
164
164
  [data-theme="light"] #selFly,[data-theme="light"] #m3dBar,[data-theme="light"] #m3dToolBar,
165
165
  [data-theme="light"] #calloutPop,[data-theme="light"] #viewFly,[data-theme="light"] #comboPop.on-stage,
166
166
  [data-theme="light"] #propPop,[data-theme="light"] #snapMenu,[data-theme="light"] #dimEditPop,[data-theme="light"] #cmHud,
167
- [data-theme="light"] #m3dCube,[data-theme="light"] #m3dAxes,[data-theme="light"] #plHint,
167
+ [data-theme="light"] #m3dCube,[data-theme="light"] #m3dFloMin,[data-theme="light"] #m3dFloCard,[data-theme="light"] #m3dAxes,[data-theme="light"] #plHint,
168
168
  [data-theme="light"] #gridReadout,[data-theme="light"] #gridLabelEdit,[data-theme="light"] #m3dReadout,[data-theme="light"] #m3dRubber,
169
169
  [data-theme="light"] #m3dDimLabels,[data-theme="light"] #m3dMemberLabels,[data-theme="light"] #m3dHoverChip,
170
170
  [data-theme="light"] #m3dPropLabelHost,[data-theme="light"] #m3dSelLenLabels,
@@ -1191,6 +1191,10 @@ rect.lblhot:focus-visible{outline:2px solid var(--brand);outline-offset:2px;stro
1191
1191
  line needs ~227px. Laid out flat, the readout was pushed past the panel's own right edge and (in 3D
1192
1192
  at a 1600px window) off the screen with it: the DOM value was right, so it read correct to a probe,
1193
1193
  while the user saw "2" of "26 px". */
1194
+ #m3dViewMenu .mrow{display:flex;flex-wrap:wrap;align-items:center;gap:7px 8px;padding:2px 12px 8px 47px;min-width:150px;box-sizing:border-box} /* Flo size: under the Flo words, like the pl-note; the words and the read-out on one line, the slider full width under them */
1195
+ #m3dViewMenu .mrow .mlbl{color:var(--mut);font-size:11px;flex:1 1 auto}
1196
+ #m3dViewMenu .mrow .mval{color:var(--mut);font-size:11px;flex:none;text-align:right;font-variant-numeric:tabular-nums;order:2}
1197
+ #m3dViewMenu .mrow input[type=range]{flex:0 0 100%;min-width:0;order:3}
1194
1198
  #moreMenu .mrow{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;padding:2px 12px 8px 26px;max-width:100%;box-sizing:border-box}
1195
1199
  #moreMenu .mrow .mlbl{color:var(--mut);font-size:11px;flex:0 0 100%}
1196
1200
  #moreMenu .mrow input[type=range]{flex:1 1 60px;min-width:0}
@@ -1988,6 +1992,10 @@ text.mlentx{fill:#e2e8f0;text-anchor:middle;dominant-baseline:central;font-famil
1988
1992
  #panel .mp-done:focus:not(:focus-visible){outline:none}
1989
1993
  #panel .mp-done .hint{margin-top:4px}
1990
1994
  #quickStat.is-unknown{text-decoration:underline dashed;text-underline-offset:3px}
1995
+ /* #2554 slice 2: which drawing files the model did not read. Muted, not amber (that is the Quick label's), and short: the
1996
+ full list is in its tip. */
1997
+ #coverageStat{white-space:nowrap;color:var(--mut);max-width:16ch;overflow:hidden;text-overflow:ellipsis}
1998
+ #coverageStat.is-unknown{text-decoration:underline dashed;text-underline-offset:3px}
1991
1999
  .conf-quick{margin:0 0 8px;padding:6px 10px;border:1px solid var(--warn-edge);border-radius:6px;color:var(--mut);font-size:12px;line-height:1.45}
1992
2000
  .conf-quick b{color:var(--warn)}
1993
2001
  #srcStat b{display:inline-block;max-width:130px;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}
@@ -2950,6 +2958,36 @@ text.mlentx{fill:#e2e8f0;text-anchor:middle;dominant-baseline:central;font-famil
2950
2958
  cube was dropped 44px for a collision that cannot happen and sat 56 from the top against 12 from
2951
2959
  the right. Equal insets put it in the corner. */
2952
2960
  #m3dCube{position:absolute;right:12px;top:12px;width:84px;height:84px;display:none;z-index:6;cursor:pointer;filter:drop-shadow(0 6px 14px rgba(0,0,0,.5))}
2961
+ /* Flo's button sits centred under the cube, in the canvas bar's icon-button idiom. */
2962
+ /* Minimize, beside Flo while the pointer is on it (steel-3d-view.js places it). Hidden with visibility too, so
2963
+ a faded chip is never a tab stop. */
2964
+ #m3dFloMin{position:fixed;z-index:7;width:24px;height:24px;min-width:0;min-height:0;margin:0;padding:0;display:flex;align-items:center;justify-content:center;background:var(--panel);border:1px solid var(--line);border-radius:5px;box-shadow:0 4px 10px rgba(0,0,0,.35);color:var(--mut);cursor:pointer;opacity:0;visibility:hidden;transition:opacity .16s ease,visibility 0s linear .16s}
2965
+ #m3dFloMin.show{opacity:1;visibility:visible;transition:opacity .16s ease}
2966
+ #m3dFloMin:hover{background:var(--btn-hover);color:var(--text)}
2967
+ #m3dFloMin:focus-visible{outline:2px solid var(--brand);outline-offset:1px}
2968
+ #m3dFloMin svg{width:14px;height:14px;display:block;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
2969
+ @media (prefers-reduced-motion:reduce){#m3dFloMin,#m3dFloMin.show{transition:none}}
2970
+ /* Flo's card: what the member Flo stands on is, beside Flo's head (steel-3d-view.js places it every frame). It is
2971
+ on the 3D stage, which is always dark, so it stays dark in the light theme too. Never in the way: it takes no
2972
+ pointer, so orbit and pick go straight through it. */
2973
+ #m3dFloCard{--fc-s:1;position:fixed;z-index:6;min-width:calc(150px * var(--fc-s));max-width:calc(220px * var(--fc-s));padding:calc(8px * var(--fc-s)) calc(11px * var(--fc-s)) calc(9px * var(--fc-s));background:var(--panel);border:1px solid var(--line);border-radius:10px;box-shadow:0 8px 22px rgba(0,0,0,.45);color:var(--text);pointer-events:none;display:none}
2974
+ #m3dFloCard.show{display:block;animation:fcIn .15s ease}
2975
+ @keyframes fcIn{from{opacity:0}to{opacity:1}}
2976
+ #m3dFloCard::before{content:"";position:absolute;top:var(--fc-tail,14px);width:9px;height:9px;background:var(--panel);border:1px solid var(--line);transform:rotate(45deg)}
2977
+ #m3dFloCard[data-side="right"]::before{left:-5.5px;border-top:0;border-right:0}
2978
+ #m3dFloCard[data-side="left"]::before{right:-5.5px;border-bottom:0;border-left:0}
2979
+ #m3dFloCard .fc-cap{font:500 calc(10px * var(--fc-s))/1.3 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.06em;text-transform:uppercase;color:var(--mut);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
2980
+ #m3dFloCard .fc-head{font-size:calc(17px * var(--fc-s));font-weight:700;line-height:1.25;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
2981
+ #m3dFloCard .fc-head:first-child{margin-top:0}
2982
+ #m3dFloCard .fc-rows{display:grid;grid-template-columns:auto 1fr;column-gap:calc(12px * var(--fc-s));row-gap:2px;margin-top:calc(6px * var(--fc-s));font-size:calc(11.5px * var(--fc-s));line-height:1.35}
2983
+ #m3dFloCard .fc-rows:first-child{margin-top:0}
2984
+ #m3dFloCard .fc-k{color:var(--mut);font-size:calc(10px * var(--fc-s));letter-spacing:.04em;text-transform:uppercase;align-self:center;white-space:nowrap}
2985
+ #m3dFloCard .fc-v{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
2986
+ #m3dFloCard .fc-varies{font-style:italic;font-weight:500;color:var(--mut)} /* several selected and they differ: read as "not one value", like Properties' Varies */
2987
+ #floCardScope .fc-reset{display:block;width:auto;text-align:left;margin:2px 0 4px 47px;padding:3px 4px;background:none;border:0;color:var(--brand);font-size:11px;cursor:pointer}
2988
+ #floCardScope .fc-reset:hover{text-decoration:underline}
2989
+ #floCardScope .fc-reset:focus-visible{outline:2px solid var(--brand);outline-offset:1px}
2990
+ @media (prefers-reduced-motion:reduce){#m3dFloCard.show{animation:none}}
2953
2991
  /* Tekla-style world-axis triad, bottom-right (where the cube used to sit). Passive readout
2954
2992
  (pointer-events:none) — orientation is the ViewCube's job; this only SHOWS where world X/Y/Z point. */
2955
2993
  #m3dAxesDock{position:absolute;right:15px;bottom:12px;display:none;flex-direction:column;align-items:center;gap:4px;z-index:5;pointer-events:none}
@@ -3001,10 +3039,15 @@ text.mlentx{fill:#e2e8f0;text-anchor:middle;dominant-baseline:central;font-famil
3001
3039
  Metadata only — no state, no DOM. The armed flags these describe live inside main()
3002
3040
  and are read by the reporter that sits beside them; see the note in commands-steel.js
3003
3041
  for why the same declarations also load in the shell. -->
3042
+ <!-- #3097: the shared failure sentence (failureCopy / failureParts), so no message on this page builds an HTTP
3043
+ status, an error code or an exception's text into what a person reads. Pure: no DOM, no fetch. -->
3044
+ <script src="failure-copy.js"></script>
3004
3045
  <script src="commands.js"></script>
3005
3046
  <script src="commands-steel.js"></script>
3006
3047
  <!-- An Esc this editor leaves unused closes the shell's editor overlay (#1571); mounted after the keydown ladder. -->
3007
3048
  <script src="overlay-escape.js"></script>
3049
+ <script src="flo.js"></script>
3050
+ <script src="flo-card.js"></script>
3008
3051
  <script type="importmap">{"imports":{"three":"./vendor/three.module.js","three/addons/":"./vendor/","three-bvh-csg":"./vendor/three-bvh-csg.module.js"}}</script>
3009
3052
  <script type="module" src="./steel-3d-view.js"></script>
3010
3053
  <!-- grid-core is an ES module; the editor's classic script reaches it via window.GridCore (set before
@@ -3116,6 +3159,7 @@ text.mlentx{fill:#e2e8f0;text-anchor:middle;dominant-baseline:central;font-famil
3116
3159
  <span class=stat id=saveStat data-tip="Edits auto-save in this browser (localStorage)">Saved</span>
3117
3160
  <span class=stat id=srcStat style="display:none"></span>
3118
3161
  <span class=stat id=quickStat data-command-id="steel.quick-model-chip" tabindex=0 style="display:none"></span>
3162
+ <span class=stat id=coverageStat data-command-id="steel.read-coverage-chip" tabindex=0 style="display:none"></span>
3119
3163
  <span class=tb-sep></span>
3120
3164
  <button data-command-id="steel.undo" id=undoB data-tip="Undo (Ctrl+Z)">↶</button>
3121
3165
  <button data-command-id="steel.redo" id=redoB data-tip="Redo (Ctrl+Y / Ctrl+Shift+Z)">↷</button>
@@ -4391,7 +4435,7 @@ function handleContractChanged(m){
4391
4435
  const parked=parkDraftForExternalChange();
4392
4436
  const lead=(typeof m.reason==='string'&&CHANGE_LEAD[m.reason])||'This model was changed';
4393
4437
  showAiUpdateBanner(parked?lead+'. Reload to see the newest version. Your unsaved edits are kept on this computer.':lead+', but your unsaved edits could not be kept on this computer, so reloading now would lose them. Write down or take a screenshot of what you changed first.',parked?{onSeeChanges:seeChangesFromOpenTab}:{noReload:true,onSeeChanges:seeChangesFromOpenTab});
4394
- }else location.reload();
4438
+ }else{if(window.flolessModelFloRemember)window.flolessModelFloRemember();location.reload();} /* Flo visits what changed once the model is back */
4395
4439
  }
4396
4440
  function bufferContractEvent(m){
4397
4441
  if(!Number.isSafeInteger(m.storeRevision)||m.storeRevision<0||typeof m.etag!=='string'){console.warn('steel-editor: ignored an unorderable contract event');return;}
@@ -4539,6 +4583,19 @@ function handleReviewChanged(m){
4539
4583
  el.style.display='';
4540
4584
  if(typeof renderConfQuick==='function')renderConfQuick();
4541
4585
  }
4586
+ /* #2554 slice 2: which drawing files the loaded model did not read, beside the Quick chip and never inside it. Server-owned:
4587
+ no edit here changes it, so it is painted from each load. Absent (null) = the whole set was read; undefined = an
4588
+ unreadable reply, which leaves the chip as it was. */
4589
+ function paintCoverageStat(c){
4590
+ if(c===undefined)return;
4591
+ const el=document.getElementById('coverageStat');if(!el)return;
4592
+ const shown=c&&(c.state==='part'||c.state==='unknown')&&typeof c.short==='string'&&c.short?c:null;
4593
+ if(!shown){el.style.display='none';el.textContent='';el.removeAttribute('data-tip');return;}
4594
+ el.textContent=shown.short;
4595
+ el.classList.toggle('is-unknown',shown.state==='unknown');
4596
+ el.setAttribute('data-tip',(shown.text||shown.short)+' Shown as last loaded.');
4597
+ el.style.display='';
4598
+ }
4542
4599
  /* The confidence report's line: scoped to the last saved model, and it says so when the report shows unsaved edits. */
4543
4600
  function renderConfQuick(){
4544
4601
  const el=document.getElementById('confQuick');if(!el)return;
@@ -4815,10 +4872,43 @@ function contractFailureState(status, code, serverError, projectScoped) {
4815
4872
  detail: 'Error ' + status + ' · ' + code,
4816
4873
  };
4817
4874
  }
4818
- return {
4819
- headline: 'Couldn’t load this model',
4820
- body: serverError || ('The server returned error ' + status + '. Reopen the editor and try again.'),
4821
- };
4875
+ // The server's own sentence still leads when it wrote one. Without one, the shared sentence says why in FloLess
4876
+ // words and what to do — never the status number (#3097). A read, so a plain retry is safe to offer.
4877
+ if (serverError) return { headline: 'Couldn’t load this model', body: serverError };
4878
+ const parts = failureParts({ status, body: code ? { code } : null }, { action: 'load this model', retrySafe: true });
4879
+ return { headline: parts.headline.replace(/\.$/, ''), body: parts.detail };
4880
+ }
4881
+
4882
+ /**
4883
+ * #3097: the sentence a person reads for a failed request on this page. The server's own sentence is shown as
4884
+ * written when it wrote one for the person (`personText`: never raw exception text it marked `diagnostic`);
4885
+ * anything else gets the shared failure-copy.js sentence, never "(500)" or "HTTP 403".
4886
+ * `ctx` is failureCopy's: `action` completes "Couldn’t …", `retrySafe` only for a request that just reads.
4887
+ */
4888
+ function replyFailureText(status, body, ctx) {
4889
+ return personText(body) || failureCopy({ status, body: body && typeof body === 'object' ? body : null }, ctx).text;
4890
+ }
4891
+
4892
+ /**
4893
+ * #3097: the sentence for a caught error. An error this page threw FOR a person (`forPerson`, its message already a
4894
+ * sentence) is said as written; anything else — the browser's "Failed to fetch", a check that threw, a save's own
4895
+ * bookkeeping message — is a developer's text, so it goes to the console and the person gets the shared sentence.
4896
+ */
4897
+ function personErrorText(e, ctx) {
4898
+ if (e && e.forPerson && typeof e.message === 'string' && e.message.trim()) return e.message;
4899
+ console.warn('steel-editor: ' + ((ctx && ctx.action) || 'a step') + ' failed', e);
4900
+ return failureCopy(e, ctx).text;
4901
+ }
4902
+
4903
+ /**
4904
+ * #3097: what a failed switch to the 3D view says. The scene route's own sentence keeps its old lead ("Could not
4905
+ * open 3D view: …"); anything else — an unreadable reply, a refusal with nothing said, no answer, a renderer that
4906
+ * threw while loading — is the shared sentence. Opening the view only reads, so a retry is safe to offer.
4907
+ */
4908
+ function threeDOpenFailureText(e) {
4909
+ if (e && e.forPerson && typeof e.message === 'string' && e.message.trim()) return 'Could not open 3D view: ' + e.message;
4910
+ console.error('steel-editor: the 3D view did not open', e);
4911
+ return failureCopy(e, { action: 'open the 3D view', retrySafe: true }).text;
4822
4912
  }
4823
4913
 
4824
4914
  /* WHY A SECOND COUNTER AND NOT JUST `modelEditGeneration`.
@@ -4929,6 +5019,7 @@ async function boot() {
4929
5019
  // live, and observable to anything that runs in between. Validate, then publish.
4930
5020
  const snapshotPayload = await res.json();
4931
5021
  paintQuickStat(snapshotPayload && typeof snapshotPayload === 'object' ? (snapshotPayload.quick ?? null) : undefined);
5022
+ paintCoverageStat(snapshotPayload && typeof snapshotPayload === 'object' ? (snapshotPayload.coverage ?? null) : undefined);
4932
5023
  lastAiReviews = snapshotPayload && typeof snapshotPayload === 'object' && snapshotPayload.aiReviews && typeof snapshotPayload.aiReviews === 'object' ? snapshotPayload.aiReviews : null; // #2521 row 8a
4933
5024
  const loaded = snapshotPayload && snapshotPayload.contract;
4934
5025
  // Shape first, then type. A body that is null, an array or a scalar has no `type` to test, so a
@@ -6316,11 +6407,17 @@ function reconcileDecisions(){
6316
6407
  if(JSON.stringify(decidedMembers(C.members))===JSON.stringify(serverDecided))return;
6317
6408
  V2_SESSION.adoptWorkPointDecisions(serverDecided);render();sync3D();
6318
6409
  }
6410
+ // #3097: what "Couldn’t …" says for each member-end request. Only the scan just reads, so only it may be retried
6411
+ // blindly; for a change the outcome of an unexplained failure is unknown, and the next check shows what the model holds.
6412
+ const MEMBER_END_ACTIONS={scan:'check member ends',apply:'extend those member ends','keep-short':'keep this member end short',restore:'restore the traced endpoint',undo:'update member-end history'};
6319
6413
  async function memberEndRequest(path,body){
6320
- if(!PROJECT)throw new Error('Member-end review is available inside a project.');
6414
+ if(!PROJECT)throw Object.assign(new Error('Member-end review is available inside a project.'),{forPerson:true});
6415
+ const ctx={action:MEMBER_END_ACTIONS[path]||'finish that member-end step',retrySafe:path==='scan',unsure:'Check member ends again to see what the model holds now.'};
6416
+ // Every message this throws is a sentence for a person: the callers show it in the review's live line and a toast.
6417
+ // A fetch that got no answer is the browser's "Failed to fetch", so it is said in FloLess words; the cause stays on it.
6321
6418
  const mutating=path!=='scan',mid=mutating?newMutationId():null,headers={'content-type':'application/json'};if(mutating){headers['x-floless-mutation-id']=mid;if(serverEtag)headers['if-match']=serverEtag;claimMutation(mid);}
6322
- let res;try{res=await fetch('/api/projects/'+encodeURIComponent(PROJECT)+'/member-ends/'+path,{method:'POST',headers,body:JSON.stringify(body)});}catch(e){if(mid)releaseMutation(mid);throw e;}
6323
- const d=await res.json().catch(()=>({}));if(!res.ok){if(mid)releaseMutation(mid);const error=new Error(d.error||('Member-end request failed ('+res.status+')'));error.code=d.code;error.status=res.status;throw error;}if(d&&d.contract)paintQuickStat(d.quick??null); /* #2521 row 5: a reply carrying the model repaints its label; none means precise */
6419
+ let res;try{res=await fetch('/api/projects/'+encodeURIComponent(PROJECT)+'/member-ends/'+path,{method:'POST',headers,body:JSON.stringify(body)});}catch(e){if(mid)releaseMutation(mid);console.warn('member-ends: '+path+' got no answer',e);throw Object.assign(new Error(failureCopy(e,ctx).text),{cause:e,forPerson:true});}
6420
+ const d=await res.json().catch(()=>({}));if(!res.ok){if(mid)releaseMutation(mid);console.warn('member-ends: '+path+' refused',{status:res.status,code:d.code});const error=new Error(replyFailureText(res.status,d,ctx));error.code=d.code;error.status=res.status;error.forPerson=true;throw error;}if(d&&d.contract)paintQuickStat(d.quick??null); /* #2521 row 5: a reply carrying the model repaints its label; none means precise */
6324
6421
  return d;
6325
6422
  }
6326
6423
  async function scanMemberEnds(liveMessage,pinnedScope){ // pinnedScope: re-check the scope an open review was scanned with (Undo/Redo, a stale apply) instead of the view you are on; only the explicit "Check this sheet/3D model" rescan omits it
@@ -6333,7 +6430,7 @@ async function scanMemberEnds(liveMessage,pinnedScope){ // pinnedScope: re-che
6333
6430
  if(!d.report.findings.length){memberEndReview=null;memberEndGhostSync();memberEndScan={busy:false,error:false,live:'No member ends are short of support centerlines.'};document.body.classList.remove('member-end-review');updateMemberEndStatus();panel();const settled=memberEndScan;if(b){b.classList.add('ok');b.textContent='No short member ends ✓';}setTimeout(()=>{if(memberEndScan===settled){memberEndScan=null;panel();}if(b)b.classList.remove('ok');updateMemberEndStatus();},1500);return;}
6334
6431
  const chosen=memberEndChoicesForReport(d.report,prior&&prior.chosen),selected=new Set();for(const f of d.report.findings){const key=memberEndKey(f);if(prior){if(prior.selected.has(key)&&f.classification==='needs-review'&&chosen.get(key)&&memberEndTargetEqual(chosen.get(key),prior.chosen.get(key)))selected.add(key);}else if(f.classification==='needs-review'&&f.targets&&f.targets.length===1&&!f.geometryOnly)selected.add(key);}
6335
6432
  memberEndScan=null;memberEndReview={report:d.report,scope,chosen,selected,focus:0,query:prior?prior.query||'':'',anchor:null,busy:false,undoToken:d.undo&&d.undo.token||null,undoDirection:d.undo&&d.undo.direction||null,live:typeof liveMessage==='string'?liveMessage:'Check each endpoint against its drawing or model evidence.'};document.body.classList.add('member-end-review');modelSelection.clearMembers();focusMemberEnd(0);memberEndGhostSync();updateMemberEndStatus();
6336
- }catch(e){memberEndReview=null;memberEndGhostSync();memberEndStatus={known:false,count:null,etag:null,revision:null,scopeSig:null};document.body.classList.remove('member-end-review');modelSelection.clearMembers();memberEndScan={busy:false,error:true,live:e&&e.message?e.message:'Could not check member ends.'};updateMemberEndStatus();panel();toast(memberEndScan.live);}
6433
+ }catch(e){memberEndReview=null;memberEndGhostSync();memberEndStatus={known:false,count:null,etag:null,revision:null,scopeSig:null};document.body.classList.remove('member-end-review');modelSelection.clearMembers();memberEndScan={busy:false,error:true,live:personErrorText(e,{action:'check member ends',retrySafe:true})};updateMemberEndStatus();panel();toast(memberEndScan.live);}
6337
6434
  }
6338
6435
  function closeMemberEndReview(){if(memberEndReview&&memberEndReview.busy){memberEndReview.live='Finish the current member-end action before closing.';panel();return;}memberEndReview=null;document.body.classList.remove('member-end-review');modelSelection.clearMembers();memberEndGhostSync();render();moreBtn.focus();}
6339
6436
  // Ends Apply would extend right now: ticked, still needing review, with a chosen support. The one thing closing the
@@ -6387,10 +6484,10 @@ function focusMemberEnd(index,opts){
6387
6484
  }
6388
6485
  function chooseMemberEndTarget(key,index){if(!memberEndReview||memberEndReview.busy)return;const f=memberEndReview.report.findings.find(x=>memberEndKey(x)===key);const t=f&&f.targets&&f.targets[index];if(!f||!t)return;memberEndReview.chosen.set(key,t);memberEndReview.selected.add(key);memberEndReview.live='Selected '+memberEndTargetName(t)+' for '+f.memberId+' end '+(f.end+1)+'.';panel();memberEndRepaint();}
6389
6486
  async function applyMemberEndSelection(){if(!memberEndReview||memberEndReview.busy)return;const selections=[];for(const f of memberEndReview.report.findings){const key=memberEndKey(f),target=memberEndReview.chosen.get(key);if(f.classification==='needs-review'&&memberEndReview.selected.has(key)&&target)selections.push({findingId:f.findingId,contextHash:f.contextHash,memberId:f.memberId,end:f.end,target});}if(!selections.length)return;
6390
- const review=memberEndReview;review.busy=true;review.live='Extending selected member ends…';panel();try{const d=await memberEndRequest('apply',{scope:review.scope,selections});installMemberEndContract(d.contract,d.etag,d.storeRevision);if(memberEndReview!==review)return scanMemberEnds(undefined,review.scope);const previousChosen=review.chosen;review.report=d.report;review.undoToken=d.undoToken;review.undoDirection='undo';review.selected.clear();review.chosen=memberEndChoicesForReport(d.report,previousChosen);review.busy=false;review.live='Extended '+selections.length+' member end'+(selections.length===1?'':'s')+' to support centerlines.';memberEndStatus={known:true,count:memberEndUnresolved(d.report),etag:d.etag,revision:d.storeRevision,scopeSig:memberEndScopeSig(review.scope)};updateMemberEndStatus();panel();undoToast(review.live,()=>undoMemberEndResolution());}catch(e){if(memberEndReview===review){review.busy=false;review.live=e.message||'The model changed — check member ends again.';panel();}toast(e.message||'Could not extend member ends.');}}
6391
- async function keepMemberEnd(f){if(!memberEndReview||memberEndReview.busy)return;const review=memberEndReview;review.busy=true;panel();try{const d=await memberEndRequest('keep-short',{scope:review.scope,findingId:f.findingId,contextHash:f.contextHash,memberId:f.memberId,end:f.end,reason:'other-reviewed'});installMemberEndContract(d.contract,d.etag,d.storeRevision);if(memberEndReview!==review)return scanMemberEnds(undefined,review.scope);review.report=d.report;review.undoToken=d.undoToken;review.undoDirection='undo';review.selected.delete(memberEndKey(f));review.busy=false;review.live='Kept '+f.memberId+' end '+(f.end+1)+' short.';memberEndStatus={known:true,count:memberEndUnresolved(d.report),etag:d.etag,revision:d.storeRevision,scopeSig:memberEndScopeSig(review.scope)};updateMemberEndStatus();panel();}catch(e){if(memberEndReview===review){review.busy=false;review.live=e.message||'Could not keep this member end short.';panel();}}}
6392
- async function restoreMemberEnd(f){if(!memberEndReview||memberEndReview.busy)return;const review=memberEndReview;review.busy=true;panel();try{const d=await memberEndRequest('restore',{scope:review.scope,findingId:f.findingId,contextHash:f.contextHash,memberId:f.memberId,end:f.end});installMemberEndContract(d.contract,d.etag,d.storeRevision);if(memberEndReview!==review)return scanMemberEnds(undefined,review.scope);review.report=d.report;review.undoToken=d.undoToken;review.undoDirection='undo';review.busy=false;review.live='Restored the traced endpoint for '+f.memberId+'.';memberEndStatus={known:true,count:memberEndUnresolved(d.report),etag:d.etag,revision:d.storeRevision,scopeSig:memberEndScopeSig(review.scope)};updateMemberEndStatus();panel();}catch(e){if(memberEndReview===review){review.busy=false;review.live=e.message||'Could not restore the traced endpoint.';panel();}}}
6393
- async function undoMemberEndResolution(){if(!memberEndReview||memberEndReview.busy||!memberEndReview.undoToken)return;const review=memberEndReview,token=review.undoToken;review.busy=true;review.live='Updating member-end history…';panel();try{const d=await memberEndRequest('undo',{token});installMemberEndContract(d.contract,d.etag,d.storeRevision);const next=memberEndHistoryAction(d.direction),completed=d.direction==='redo'?'Undid member-end changes':'Redid member-end changes';review.busy=false;await scanMemberEnds(completed+' · '+next.label+' is available',review.scope);}catch(e){if(memberEndReview===review){review.busy=false;if(e.code==='member-end-undo-unavailable'){review.undoToken=null;review.undoDirection=null;review.live='This history action is no longer available. Check member ends again.';}else review.live='Could not confirm the history action. Check member ends again before retrying.';panel();}toast(e.message||'Could not update member-end history.');}}
6487
+ const review=memberEndReview;review.busy=true;review.live='Extending selected member ends…';panel();try{const d=await memberEndRequest('apply',{scope:review.scope,selections});installMemberEndContract(d.contract,d.etag,d.storeRevision);if(memberEndReview!==review)return scanMemberEnds(undefined,review.scope);const previousChosen=review.chosen;review.report=d.report;review.undoToken=d.undoToken;review.undoDirection='undo';review.selected.clear();review.chosen=memberEndChoicesForReport(d.report,previousChosen);review.busy=false;review.live='Extended '+selections.length+' member end'+(selections.length===1?'':'s')+' to support centerlines.';memberEndStatus={known:true,count:memberEndUnresolved(d.report),etag:d.etag,revision:d.storeRevision,scopeSig:memberEndScopeSig(review.scope)};updateMemberEndStatus();panel();undoToast(review.live,()=>undoMemberEndResolution());}catch(e){const said=personErrorText(e,{action:'extend those member ends',unsure:'Check member ends again to see what the model holds now.'});if(memberEndReview===review){review.busy=false;review.live=said;panel();}toast(said);}}
6488
+ async function keepMemberEnd(f){if(!memberEndReview||memberEndReview.busy)return;const review=memberEndReview;review.busy=true;panel();try{const d=await memberEndRequest('keep-short',{scope:review.scope,findingId:f.findingId,contextHash:f.contextHash,memberId:f.memberId,end:f.end,reason:'other-reviewed'});installMemberEndContract(d.contract,d.etag,d.storeRevision);if(memberEndReview!==review)return scanMemberEnds(undefined,review.scope);review.report=d.report;review.undoToken=d.undoToken;review.undoDirection='undo';review.selected.delete(memberEndKey(f));review.busy=false;review.live='Kept '+f.memberId+' end '+(f.end+1)+' short.';memberEndStatus={known:true,count:memberEndUnresolved(d.report),etag:d.etag,revision:d.storeRevision,scopeSig:memberEndScopeSig(review.scope)};updateMemberEndStatus();panel();}catch(e){if(memberEndReview===review){review.busy=false;review.live=personErrorText(e,{action:'keep this member end short',unsure:'Check member ends again to see what the model holds now.'});panel();}}}
6489
+ async function restoreMemberEnd(f){if(!memberEndReview||memberEndReview.busy)return;const review=memberEndReview;review.busy=true;panel();try{const d=await memberEndRequest('restore',{scope:review.scope,findingId:f.findingId,contextHash:f.contextHash,memberId:f.memberId,end:f.end});installMemberEndContract(d.contract,d.etag,d.storeRevision);if(memberEndReview!==review)return scanMemberEnds(undefined,review.scope);review.report=d.report;review.undoToken=d.undoToken;review.undoDirection='undo';review.busy=false;review.live='Restored the traced endpoint for '+f.memberId+'.';memberEndStatus={known:true,count:memberEndUnresolved(d.report),etag:d.etag,revision:d.storeRevision,scopeSig:memberEndScopeSig(review.scope)};updateMemberEndStatus();panel();}catch(e){if(memberEndReview===review){review.busy=false;review.live=personErrorText(e,{action:'restore the traced endpoint',unsure:'Check member ends again to see what the model holds now.'});panel();}}}
6490
+ async function undoMemberEndResolution(){if(!memberEndReview||memberEndReview.busy||!memberEndReview.undoToken)return;const review=memberEndReview,token=review.undoToken;review.busy=true;review.live='Updating member-end history…';panel();try{const d=await memberEndRequest('undo',{token});installMemberEndContract(d.contract,d.etag,d.storeRevision);const next=memberEndHistoryAction(d.direction),completed=d.direction==='redo'?'Undid member-end changes':'Redid member-end changes';review.busy=false;await scanMemberEnds(completed+' · '+next.label+' is available',review.scope);}catch(e){if(memberEndReview===review){review.busy=false;if(e.code==='member-end-undo-unavailable'){review.undoToken=null;review.undoDirection=null;review.live='This history action is no longer available. Check member ends again.';}else review.live='Could not confirm the history action. Check member ends again before retrying.';panel();}toast(personErrorText(e,{action:'update member-end history',unsure:'Check member ends again before retrying.'}));}}
6394
6491
  // Selection is MODEL-WIDE, not per-sheet: the 3D shows every plan, so a pick / box-select / Ctrl-click can
6395
6492
  // span sheets. byId + selArr therefore search ALL plans (not just the active P) so the inspector + edits see
6396
6493
  // the whole selection — else selecting a roof (S-203) member while S-202 is active shows nothing, and a
@@ -8128,7 +8225,8 @@ async function flushContractWith(token, signal) {
8128
8225
  console.error('flush refused 428 — a first-party writer sent no precondition; this is a FloLess bug');
8129
8226
  if (seq === saveSeq) setSaved('err');
8130
8227
  showSaveRefusedBanner();
8131
- throw new Error('save refused: no precondition sent');
8228
+ // #3097: the banner explains it; a step that waited on this save says so instead of "couldn’t tell why".
8229
+ throw Object.assign(new Error('Your latest edits weren’t saved because of a problem inside FloLess. Use Report an issue at the bottom of the window.'), { forPerson: true, code: 'save-refused' });
8132
8230
  }
8133
8231
  if (res.status === 412) {
8134
8232
  // Approve must abort (the throw below), and the user needs to know WHY — a bare "save failed" toast
@@ -8137,7 +8235,7 @@ async function flushContractWith(token, signal) {
8137
8235
  conflicted = true;
8138
8236
  if (seq === saveSeq) setSaved('conflict');
8139
8237
  showConflictBanner();
8140
- throw new Error('save conflict');
8238
+ throw Object.assign(new Error('Your latest edits weren’t saved because this model was changed somewhere else. Choose Reload or Overwrite in the message about that change.'), { forPerson: true, code: 'save-conflict' });
8141
8239
  }
8142
8240
  if (res.ok) { let d = {}, bodyReadable = true; try { d = await res.json(); } catch (_) { bodyReadable = false; } paintQuickStat(bodyReadable ? (d.quick ?? null) : undefined); if(signal&&signal.aborted)quarantineMutation(mid, seq); const t = d.etag || res.headers.get('ETag'); adoptedTag = t || null; if (d.contract && t && Number.isSafeInteger(d.storeRevision)) { const generationBefore = modelEditGeneration; adoptSaveReply(d.contract, t, d.storeRevision, seq); /* #1936 - installing the reply re-bumps the generation although nothing the person looked at changed; report the post-install generation, but ONLY when nothing visible moved between the PUT and the install (a genuine concurrent edit still shows as a mismatch) */ if (generationBefore === publishedGeneration && modelEditGeneration === generationBefore + 1) publishedGeneration = modelEditGeneration; } else { if (t) { const pv = serverEtag; serverEtag = t; restampDraftBase(pv, t); } if (Number.isSafeInteger(d.storeRevision)) serverRevision = Math.max(serverRevision, d.storeRevision); serverDecided = sentDecided; if (seq !== saveSeq) reconcileDecisions(); } conflicted = false; lastSeenCommitOwnSave(t, d, bodyReadable, sentCopy);
8143
8241
  // The flush committed. Same rule as persistServer: apply the report only when the body was readable and
@@ -8147,7 +8245,14 @@ async function flushContractWith(token, signal) {
8147
8245
  if (bodyReadable && usable && seq === saveSeq) applyRevalidation(d.revalidation); if (!bodyReadable) { const generationBefore = modelEditGeneration; /* the sign-off reads the generation this returns, so the recovery lands before it, and a whole-document install is followed exactly like the reply install above */ const recovered = await recoverStoredDecisions(seq); if (recovered === 'failed') publishedGeneration = -1; /* the stored document was never confirmed, so no sign-off may match it: the person is asked to check again */ else if (recovered === true && generationBefore === publishedGeneration && modelEditGeneration === generationBefore + 1) publishedGeneration = modelEditGeneration; } }
8148
8246
  else releaseMutation(mid);
8149
8247
  if (seq === saveSeq) setSaved(res.ok ? 'ok' : 'err'); // only the latest save owns the pill
8150
- if (!res.ok) throw new Error('save failed (' + res.status + ')');
8248
+ // #3097: callers show this message (the member-end check's live line, a toast), so it is a sentence for a person,
8249
+ // never "save failed (500)". The status rides on the error for any caller that branches on it.
8250
+ if (!res.ok) {
8251
+ const body = await res.json().catch(() => null);
8252
+ console.error('steel-editor: flush save refused', { status: res.status, code: body && body.code });
8253
+ throw Object.assign(new Error(replyFailureText(res.status, body, { action: 'save your latest edits', unsure: 'The save status in the editor’s header shows whether they were kept.' })),
8254
+ { status: res.status, body, forPerson: true });
8255
+ }
8151
8256
  return { etag: adoptedTag, generation: publishedGeneration };
8152
8257
  }, token).finally(()=>{saveWritesInFlight--;publishContractSaveState();});
8153
8258
  }
@@ -9747,7 +9852,7 @@ function gridReadFromDrawing(keep){
9747
9852
  // metric job in inches. Swallowing that one turns the loudness into a LIE: the sheet's grid read
9748
9853
  // fine, and the user is told to start blank. So a `grid-core:` error is reported as itself.
9749
9854
  let r=null;try{r=gc.gridFromDrawing(els,(P.mm_per_px>0)?P.mm_per_px:FT_TO_MM,displayUnits());}
9750
- catch(err){if(String((err&&err.message)||'').startsWith('grid-core:')){console.error('[steel] grid read refused',err);toast('Could not read the grid: '+err.message);return;}r=null;}
9855
+ catch(err){if(String((err&&err.message)||'').startsWith('grid-core:')){console.error('[steel] grid read refused',err);toast('Couldn’t read the grid, because of a problem inside FloLess rather than in your drawing. Use Start blank to draw it, and use Report an issue at the bottom of the window.');return;}r=null;} // #3097: grid-core's own words are for a developer; they stay in the console
9751
9856
  if(!r){toast('No grid found in this sheet’s linework — draw one with Start blank instead');return;}
9752
9857
  const g=r.grid;
9753
9858
  if(keep){g.z=keep.z; // the user's levels always survive a re-read; their hand-set labels beat detected ones (the tooltip promises it)
@@ -15629,6 +15734,54 @@ function updDimToggle(){const b=document.getElementById('dimToggleB');if(!b)retu
15629
15734
  document.getElementById('dimToggleB').onclick=e=>{e.stopPropagation();dimsVisible=!dimsVisible;updDimToggle();render();};
15630
15735
 
15631
15736
  function updPosGizmoToggle(){const b=document.getElementById('posGizmoToggleB');if(!b)return;b.disabled=false;b.classList.toggle('on',showPosGizmo);b.setAttribute('aria-checked',String(showPosGizmo));}
15737
+ /* Show Flo is OFF until the person turns it on in the 3D Labels menu: Flo is an extra (owner, 2026-11-04). The key is
15738
+ read by steel-3d-view.js when 3D starts; the "–" beside Flo turns it off the same way. */
15739
+ /* Flo's settings live here, in memory, seeded once from storage and written back to it best-effort: storage can be
15740
+ blocked (a locked-down browser), and then every switch still works for this page, it is just not kept. A var read
15741
+ lazily, because syncDisplayRows can run before this line does. */
15742
+ var floSettings;
15743
+ function floSt(){if(!floSettings){let on=false,size=100;
15744
+ try{on=localStorage.getItem('steel:flo3d:v2')==='on';const v=Number(localStorage.getItem('steel:floSize:v2'));if(v>=60&&v<=200)size=Math.round(v);}catch(_){}
15745
+ floSettings={on,size,fields:FloCard.readFloCardFields(floCardStore())};}
15746
+ return floSettings;}
15747
+ function floShown(){return floSt().on;}
15748
+ let floShellMood='idle';
15749
+ function updFloToggle(){const on=floShown();
15750
+ const b=document.getElementById('floToggleB');if(b){b.classList.toggle('on',on);b.setAttribute('aria-checked',String(on));}
15751
+ updateLabelsBandMarks();}
15752
+ function rememberFloShown(on){floSt().on=!!on;try{localStorage.setItem('steel:flo3d:v2',on?'on':'off');}catch(_){}}
15753
+ /* The key is written here, so the switch holds before the 3D view exists. */
15754
+ function setFloShownFromPage(on){rememberFloShown(on);modelEditor.steel.setFlo(on);updFloToggle();}
15755
+ /* The chip beside Flo hides it from inside the 3D view: the key follows, so it stays off until switched back on in Labels. */
15756
+ window.addEventListener('floless:flo3d-shown',e=>{const via=e.detail&&e.detail.via;if(via==='chip')rememberFloShown(false);updFloToggle();});
15757
+ /* Flo's card: which details it shows (web/flo-card.js keeps the list and its order; stored per browser, like Show Flo). */
15758
+ function floCardStore(){try{return localStorage;}catch(_){return null;}}
15759
+ function floCardFields(){return floSt().fields;}
15760
+ function updFloCardRows(){const want=floCardFields();
15761
+ for(const r of document.querySelectorAll('#floCardScope [data-key]')){const on=want.includes(r.dataset.key);r.classList.toggle('on',on);r.setAttribute('aria-checked',String(on));}}
15762
+ function setFloCardFields(fields){floSt().fields=FloCard.sanitizeFloCardFields(fields);FloCard.writeFloCardFields(floCardStore(),fields);updFloCardRows();if(view3dReady)modelEditor.steel.refreshFloCard();}
15763
+ /* The section is drawn into the 3D Labels menu from the adapter's spec (model-editor-steel-adapter.js), and drawn
15764
+ again whenever the 3D toolbar is, so it is wired after every render (render3DToolbarShell). */
15765
+ function wireFloSection(){const section=document.getElementById('floSection'),d=document.getElementById('floCardDisc'),body=document.getElementById('floCardScope');
15766
+ if(!section||!d||!body)throw new Error('Flo controls are missing from the 3D Labels menu');
15767
+ section.onclick=e=>e.stopPropagation();
15768
+ section.onkeydown=e=>{if((e.key==='Enter'||e.key===' ')&&e.target.tagName==='BUTTON'){e.preventDefault();e.stopPropagation();if(!e.repeat)e.target.click();}};
15769
+ d.onclick=()=>{const open=d.getAttribute('aria-expanded')!=='true';d.setAttribute('aria-expanded',String(open));body.hidden=!open;d.querySelector('.pl-chevron').textContent=open?'▾':'▸';if(!open)d.focus();};
15770
+ document.getElementById('floToggleB').onclick=()=>setFloShownFromPage(!floShown());
15771
+ document.getElementById('floCardNote').textContent='Shown on Flo’s card. Several selected: a shared value, or Varies.';
15772
+ for(const r of body.querySelectorAll('[data-key]'))r.onclick=()=>{const k=r.dataset.key,want=floCardFields();setFloCardFields(want.includes(k)?want.filter(x=>x!==k):want.concat(k));};
15773
+ document.getElementById('floCardReset').onclick=()=>setFloCardFields(FloCard.FLO_CARD_DEFAULT);
15774
+ const size=document.getElementById('floSize'),sizeV=document.getElementById('floSizeV'),pct=floSizePct();
15775
+ size.value=pct;sizeV.textContent=pct+'%';
15776
+ size.addEventListener('input',()=>{const p=Math.round(Number(size.value));sizeV.textContent=p+'%';floSt().size=p;try{localStorage.setItem('steel:floSize:v2',String(p));}catch(_){}if(view3dReady)modelEditor.steel.setFloSize(p/100);});
15777
+ updFloCardRows();updFloToggle();}
15778
+ /* Flo size, in percent (Labels → Flo size): one setting for Flo and its card, stored per browser like Show Flo. The 3D view
15779
+ reads the same key when it starts (steel-3d-view.js floStoredSize), and the same range: anything else is 100%. */
15780
+ function floSizePct(){return floSt().size;}
15781
+ /* The shell pushes AI Chat's mood for this project (workspaces.js syncModelFlo): thinking, working, yourcall or idle. */
15782
+ window.flolessModelFlo=(state)=>{floShellMood=(state&&state.mood)||'idle';updFloToggle();try{modelEditor.steel.setFloMood(state&&state.mood);}catch(_){}};
15783
+ /* handleContractChanged lives outside this block and cannot see modelEditor: it reaches Flo through this. */
15784
+ window.flolessModelFloRemember=()=>{try{modelEditor.steel.floRemember();}catch(_){}};
15632
15785
  document.getElementById('aiMarksToggleB').onclick=e=>{e.stopPropagation();showAiMarks=!showAiMarks;try{localStorage.setItem('steel:aiMarks:v2',showAiMarks?'1':'0');}catch(_){}updAiMarksToggle();render();}; // #2521 row 6: hides the 2D and 3D marks only; the strip and Inspect stay (owner ruling 2026-10-29)
15633
15786
  document.getElementById('posGizmoToggleB').onclick=e=>{e.stopPropagation();showPosGizmo=!showPosGizmo;try{localStorage.setItem('steel:posGizmo:v2',showPosGizmo?'1':'0');}catch(_){}updPosGizmoToggle();if(view3dReady&&window.Steel3DView&&window.Steel3DView.setPositionGizmoVisible)window.Steel3DView.setPositionGizmoVisible(showPosGizmo);}; // the gizmo is a 3D overlay — push straight to the view (.stopPropagation keeps the menu open, like every .dtog)
15634
15787
  // ⋯ Display → Grid label size. One setting, both views: 2D re-places its bubbles from the anchors baked
@@ -15704,7 +15857,7 @@ function updPlToggle(){const pl=C.prop_labels;if(!pl)return;reconcileActiveView(
15704
15857
  // switches the menus show, so it cannot disagree with them: the 3D button follows Ref line + the 3D property-label
15705
15858
  // switch, the 2D button follows the 2D plan's property-label switch only, whichever pane is active.
15706
15859
  function updateLabelsBandMarks(){
15707
- for(const [btnId,switchIds] of [['m3dView',['m3dRef','m3dPropLabels']],['pl2dBtn',['pl2dPropLabels']]]){
15860
+ for(const [btnId,switchIds] of [['m3dView',['m3dRef','m3dPropLabels','floToggleB']],['pl2dBtn',['pl2dPropLabels']]]){
15708
15861
  // The 2D button is wired after the 3D shell at boot, so it is skipped until it is registered. Once registered it is
15709
15862
  // required: a missing button then means the menu was wired against markup that was never drawn.
15710
15863
  if(btnId==='pl2dBtn'&&!propLabelMenus.has('pl2d'))continue;
@@ -15738,6 +15891,7 @@ function render3DToolbarShell(){
15738
15891
  bar.innerHTML=ViewportToolbar.renderToolbarMarkup(ModelEditor.steelRenderPlan());
15739
15892
  wirePropLabelSection('m3dPl','m3dPropLabels','m3dPlDisclosure','m3dPlScope','3d');
15740
15893
  updPlToggle();
15894
+ wireFloSection();
15741
15895
  return bar;
15742
15896
  }
15743
15897
  render3DToolbarShell();
@@ -16411,7 +16565,11 @@ function applyConnectionBakeTruth(j,announce=true){
16411
16565
  }
16412
16566
  async function fetchScenePayload(contract=C){
16413
16567
  const r=await fetch('/api/contract/'+encodeURIComponent(APP_ID)+'/scene'+PROJECT_QS,{method:'POST',headers:{'content-type':'application/json'},body:JSON.stringify({contract})});
16414
- const j=await r.json();if(!j.ok)throw new Error(j.error||'scene render failed');return j;
16568
+ // #3097: what this throws can reach a toast ("Could not open 3D view: …"). The server's own sentence is marked as
16569
+ // one; an unreadable body or a refusal with nothing said keeps its facts (status, body) for the shared sentence.
16570
+ let j;try{j=await r.json();}catch(e){throw Object.assign(new Error('the scene reply was not readable JSON'),{status:r.status,body:{code:'response-unreadable'},cause:e});}
16571
+ if(!j||!j.ok){const said=j&&typeof j.error==='string'&&j.error.trim();throw Object.assign(new Error(said||'scene render failed'),{status:r.status,body:j,forPerson:!!said});}
16572
+ return j;
16415
16573
  }
16416
16574
  function connectionTruthRequest(){
16417
16575
  const contract=JSON.parse(JSON.stringify(C)),previewByEnd=new WeakMap();
@@ -16591,7 +16749,7 @@ async function sendSelectionToHost(host,ids,hostPid){
16591
16749
  if(!pre.ok||!review.ok){
16592
16750
  if(review&&review.code==='host-bake-empty'){await showSelectionHostBakeReview(review,NAME,true,false);return;}
16593
16751
  if(review&&review.code==='stale-selection'){await showSelectionHostBakeReview(review,NAME,true,false,true);toast('The selection changed. Reload the model, review your selection, and try again.');return;}
16594
- throw Object.assign(new Error(review.error||('send review failed ('+pre.status+')')),{body:review});
16752
+ throw Object.assign(new Error(replyFailureText(pre.status,review,{action:'review what would be sent to '+NAME,retrySafe:true})),{body:review});
16595
16753
  }
16596
16754
  activeSelectionHostBakeConsents.set(review.consent,PROJECT?('/api/projects/'+encodeURIComponent(PROJECT)+'/host-bake-consent?appId='+encodeURIComponent(APP_ID)):('/api/apps/'+encodeURIComponent(APP_ID)+'/host-bake-consent'));
16597
16755
  let confirmed=review.kind==='clean'&&!changedClean;
@@ -16606,7 +16764,7 @@ async function sendSelectionToHost(host,ids,hostPid){
16606
16764
  hostDispatchMayHaveStarted=false;
16607
16765
  if(sent.ok&&j.ok){await acknowledgeSelectionHostBake(review.consent);break;}
16608
16766
  if(attempt===0&&j&&['host-bake-confirmation-stale','host-bake-preflight-required','stale-selection'].includes(j.code)){await cancelSelectionHostBake(review.consent);changedClean=true;toast('The selection changed. Checking the latest version…');continue;}
16609
- activeSelectionHostBakeConsents.delete(review.consent);throw Object.assign(new Error(j.error||('send failed ('+sent.status+')')),{body:j});
16767
+ activeSelectionHostBakeConsents.delete(review.consent);throw Object.assign(new Error(replyFailureText(sent.status,j,{action:'send to '+NAME,unsure:'Check the open model in '+NAME+' before sending again.'})),{body:j});
16610
16768
  }
16611
16769
  if(!j||!j.ok)return;
16612
16770
  // Report what TEKLA received, never what we asked for: the server legitimately drops members it
@@ -16976,9 +17134,12 @@ const view3dApi={
16976
17134
  if(!current||current.objects!==objects)return; // a newer read already superseded this failed upload
16977
17135
  const previous=refRenderedGeom.get(id);
16978
17136
  if(previous)refGeom.set(id,previous);else refGeom.delete(id);
16979
- refFailed.set(id,reason||'the graphics device could not upload this reference');
17137
+ // #3097: the renderer's reason is an exception message (an allocation RangeError, a WebGL error); it goes to the
17138
+ // console, and the row tooltip and measure toast say what happened in words.
17139
+ if(reason)console.warn('steel-editor: reference geometry upload failed',id,reason);
17140
+ refFailed.set(id,'this computer’s graphics couldn’t draw it');
16980
17141
  pushReferences();if(legendTab==='refs')renderRefsTab();if(refSelectedObjIdx!==null)panel();
16981
- toast('Could not draw the new geometry for “'+((refById(id)||{}).name||id)+'” — keeping the previous view');
17142
+ toast('Couldn’t draw the new geometry for “'+((refById(id)||{}).name||id)+'”, so the previous view is kept');
16982
17143
  },
16983
17144
  onConnMemberPickChange:()=>{}, // the chosen set shows as the 3D selection + the chip's live count; nothing else to reflect
16984
17145
  onConnMemberPickAbandon:(jointId,reason)=>{ // left the pick without answering it (focus moved, left 3D, pane went inactive)
@@ -17127,6 +17288,18 @@ const view3dApi={
17127
17288
  detailRequest('create',place,undefined,armedItems);},
17128
17289
  onIsolateChange:()=>{updateIsolateBtn();refresh3DLegend();}, // every object-visibility change (isolate, group/part/selection hide, Show all) → refresh recovery control + legend rows
17129
17290
  onWorkAreaChange:()=>updateWorkBtn(), // work area set / toggled → refresh the button + its checkbox
17291
+ // Flo's card (web/flo-card.js): the property registry's own values, so the card says exactly what Properties and the
17292
+ // property labels say. With several members selected and Flo on one of them, the card speaks for all of them by the
17293
+ // Properties pane's rule (shared value, Varies, or left out). Null when the member is gone or nothing chosen has a value.
17294
+ // Show Flo and Flo size as this page holds them (Labels menu), read when the 3D view is built.
17295
+ floSettings:()=>{const t=floSt();return {on:t.on,size:t.size};},
17296
+ floCardFor:id=>{if(!allMembers().some(x=>x.id===id))return null;
17297
+ const sel=propLabelSelection(),group=sel.length>1&&sel.some(x=>x.id===id)?sel:allMembers().filter(x=>x.id===id),look=projectedMemberLookup(),v={};
17298
+ const ms=group.map(b=>look(b.id)||b);
17299
+ for(const def of PROP_DEFS){if(!FloCard.FLO_CARD_FIELDS.includes(def.key))continue;
17300
+ const texts=ms.map(m=>{const raw=def.needsPlan&&!m.wp?(def.canonicalGet?def.canonicalGet(m):undefined):(def.labelGet||def.get)(m);return raw===undefined?undefined:def.fmt(raw);});
17301
+ const t=FloCard.aggregateFloCardValue(texts);if(t!==undefined)v[def.key]={label:def.label,text:t,varies:t===FloCard.VARIES&&ms.length>1};}
17302
+ return FloCard.floCardModel(v,floCardFields(),{count:ms.length});},
17130
17303
  };
17131
17304
  /*
17132
17305
  * THE COMMON TOOLBAR'S FACADE over the 3D view (shared 3D editor, Task 1). Mounted HERE because this
@@ -17532,8 +17705,10 @@ async function reviewVerb(verb,jointId,opts){
17532
17705
  catch(e){const err=new Error('the server could not be reached');err.transport=true;throw err;}
17533
17706
  const d=await res.json().catch(()=>{console.warn('steel-editor: a review reply was not readable JSON',{verb,status:res.status});return {};});
17534
17707
  if(!res.ok){
17535
- const err=new Error(d.error||('the review action failed ('+res.status+')'));
17536
- err.code=d.code;err.status=res.status;throw err;
17708
+ /* #3097: no status number in the message. `authored` records whether the server wrote a sentence at all, so
17709
+ the caller only ever speaks the server's prose, never a fallback that stands in for it. */
17710
+ const err=new Error(typeof d.error==='string'&&d.error.trim()?d.error.trim():'the review action was refused');
17711
+ err.code=d.code;err.status=res.status;err.body=d;err.authored=typeof d.error==='string'&&!!d.error.trim();throw err;
17537
17712
  }
17538
17713
  return d;
17539
17714
  }
@@ -17572,9 +17747,14 @@ function reviewVerbFailed(e,fallback){
17572
17747
  /* The server's own 4xx prose is written FOR the user and names what to do; anything else — a transport
17573
17748
  failure, a 5xx behind an HTML error page — is not, so the caller's sentence wins, because it is the
17574
17749
  only one that names the connection. */
17575
- const speakable=e&&!e.transport&&e.status>=400&&e.status<500&&e.message;
17576
- toast(speakable?String(e.message)
17577
- :(fallback+' — '+((e&&e.transport)?'the server could not be reached':'try again in a moment')));
17750
+ const speakable=e&&!e.transport&&e.status>=400&&e.status<500&&e.authored!==false&&e.message;
17751
+ if(speakable){toast(String(e.message));return;}
17752
+ /* #3097: the why and the next step come from the shared sentence, after the caller's own words (which name the
17753
+ connection). A review change whose answer was lost or unexplained may have landed, so it is never told to "try
17754
+ again" blindly: the review status refreshes on its own and shows what the server holds. */
17755
+ const parts=failureParts(e&&e.transport?{name:'TypeError',message:'Failed to fetch'}:{status:e&&e.status,body:e&&e.body},
17756
+ {action:'change this connection’s review',unsure:'The connection’s review status updates on its own; check it before trying again.'});
17757
+ toast(String(fallback).replace(/[.!?]?$/,'.')+(parts.detail?' '+parts.detail:''));
17578
17758
  }
17579
17759
  /* Is the document on screen still the one that flush published? THREE tripwires, each answering a
17580
17760
  different question, because no one of them is total on its own - see `modelEditGeneration`. */
@@ -18781,7 +18961,7 @@ function referenceWorker(){
18781
18961
  const reason=(event&&event.message)||'the geometry worker stopped';
18782
18962
  const failed=refGeometryWorker;refGeometryWorker=null;
18783
18963
  try{failed&&failed.terminate();}catch(_){}
18784
- for(const pending of refGeometryPending.values())pending.reject(new Error(reason));
18964
+ for(const pending of refGeometryPending.values())pending.reject(Object.assign(new Error(reason),{referenceFailure:'worker-stopped'}));
18785
18965
  refGeometryPending.clear();
18786
18966
  };
18787
18967
  return refGeometryWorker;
@@ -18792,7 +18972,7 @@ function fetchReferenceGeometry(url){
18792
18972
  // A crashed/OOM-stalled worker may raise no `error` event. Bound the request so one bad reference
18793
18973
  // cannot leave its row spinning forever and block every later reference in the sequential opener.
18794
18974
  const timer=setTimeout(()=>{
18795
- const reason=new Error('reference geometry timed out');
18975
+ const reason=Object.assign(new Error('reference geometry timed out'),{referenceFailure:'timeout'});
18796
18976
  const stalled=refGeometryWorker;refGeometryWorker=null;
18797
18977
  try{stalled&&stalled.terminate();}catch(_){}
18798
18978
  // Decode is CPU-bound after the body arrives, so an AbortController cannot rescue this worker.
@@ -18805,6 +18985,42 @@ function fetchReferenceGeometry(url){
18805
18985
  });
18806
18986
  }
18807
18987
  const refFailed=new Map(); // id -> why its geometry could not be fetched (see loadReferenceGeometry)
18988
+ /**
18989
+ * #3097: WHY a reference's geometry could not be read, as the clause the row's tooltip and the measure toast put
18990
+ * after "Couldn’t read this reference’s geometry:". Built from facts — the status, the server's JSON, the worker's `failure`
18991
+ * kind (the worker cannot load failure-copy.js, so it never writes a sentence), or a rejection's `referenceFailure`
18992
+ * — and never a status number or an exception's text; those go to the console. The server's own `error` is said
18993
+ * as written where it wrote one, as it always has been.
18994
+ */
18995
+ // Reloading cannot help this one (FloLess already rebuilt it once), so the measure toast offers Report an issue instead.
18996
+ const REF_CORRUPT_REASON='the stored geometry came back damaged, even after FloLess rebuilt it';
18997
+ function referenceFailureReason(status,d,rejected){
18998
+ if(rejected){
18999
+ console.warn('steel-editor: reference geometry read stopped',rejected);
19000
+ if(rejected.referenceFailure==='timeout')return 'reading it took too long';
19001
+ if(rejected.referenceFailure==='worker-stopped')return 'the part of FloLess that reads it stopped';
19002
+ return 'FloLess ran into a problem it couldn’t identify';
19003
+ }
19004
+ const body=d&&typeof d==='object'?d:{};
19005
+ if(typeof body.error==='string'&&body.error.trim())return body.error.trim();
19006
+ if(body.diagnostic)console.warn('steel-editor: reference geometry unreadable',{status,diagnostic:body.diagnostic});
19007
+ else console.warn('steel-editor: reference geometry refused',{status,code:body.code});
19008
+ if(body.failure==='corrupt'||body.code==='reference-binary-corrupt')return REF_CORRUPT_REASON;
19009
+ if(body.failure==='connection')return 'FloLess stopped answering before it finished';
19010
+ if(body.failure==='unreadable')return 'FloLess sent an answer this window couldn’t read';
19011
+ const kind=failureKind({status,body});
19012
+ if(kind==='connection')return 'FloLess stopped answering before it finished';
19013
+ if(kind==='access')return status===403?'FloLess doesn’t allow this from here':'your FloLess sign-in needs attention';
19014
+ if(kind==='missing')return 'FloLess no longer has it; it may have been removed in another window';
19015
+ if(kind==='busy')return 'FloLess is busy with other work on this project';
19016
+ return 'FloLess ran into a problem it couldn’t identify';
19017
+ }
19018
+ // The measure toast for a reference whose geometry failed: the reason as one clause (a server sentence's own full stop
19019
+ // dropped, so it never reads ".."), then the step that can help.
19020
+ function referenceFailureToast(reason){
19021
+ return 'Couldn’t read this reference’s geometry: '+String(reason||'').replace(/[.!?\s]+$/,'')+'. '
19022
+ +(reason===REF_CORRUPT_REASON?'Use Report an issue at the bottom of the window.':'Use ⋯ ▸ Reload its geometry to try again.');
19023
+ }
18808
19024
  const refEmpty=new Set(); // ids the reader answered for, with nothing drawable in the answer
18809
19025
  let refSelectedId=null; // the reference the panel has expanded (and the 3D layer has selected)
18810
19026
  /**
@@ -19111,7 +19327,7 @@ async function loadReferenceGeometry(id,opts){
19111
19327
  else if(d.code==='reference-empty'){only(refEmpty);refEmpty.add(id);}
19112
19328
  // An `else` is mandatory here: a 500 whose body is not JSON parses to `{}`, so without one a failed
19113
19329
  // fetch produced no toast, no state and no log — the row simply looked fine.
19114
- else {only(refFailed);refFailed.set(id,d.error||('the server answered '+res.status));}
19330
+ else {only(refFailed);refFailed.set(id,referenceFailureReason(res.status,d));}
19115
19331
  }catch(e){
19116
19332
  // FAILURE IS ROW STATE, not a swallow. The first cut had an empty catch whose comment claimed the row
19117
19333
  // would stay "loading…" — and the `finally` below falsified it on the very next line: it clears
@@ -19121,7 +19337,7 @@ async function loadReferenceGeometry(id,opts){
19121
19337
  // whole feature must avoid.
19122
19338
  if(refById(id)){
19123
19339
  for(const st of [refUnresolved,refEmpty])st.delete(id);
19124
- refFailed.set(id,(e&&e.message)||'could not reach the server');
19340
+ refFailed.set(id,referenceFailureReason(0,null,e||{}));
19125
19341
  }
19126
19342
  console.error('[reference] geometry fetch failed',id,e);
19127
19343
  }
@@ -19287,7 +19503,7 @@ function refMeasureArm(id){
19287
19503
  // whose file failed to load exactly what a user whose file is legitimately empty is told.
19288
19504
  if(!refGeom.has(id)){
19289
19505
  toast(refLoading.has(id)?'Still reading its geometry — try again in a moment'
19290
- :refFailed.has(id)?('Its geometry could not be read — '+refFailed.get(id))
19506
+ :refFailed.has(id)?referenceFailureToast(refFailed.get(id))
19291
19507
  :refEmpty.has(id)?'This file has nothing drawable in it to measure'
19292
19508
  :'There is no geometry to measure yet');
19293
19509
  return;}
@@ -23908,7 +24124,7 @@ async function setView(on,{remember=true}={}){
23908
24124
  // the success path above — a staleness check on only one of the two exits is not a check.
23909
24125
  if(seq!==viewSeq)return;
23910
24126
  applyViewState('2d');if(window.Steel3DView)window.Steel3DView.hide();
23911
- toast('Could not open 3D view: '+((e&&e.message)||e));
24127
+ toast(threeDOpenFailureText(e));
23912
24128
  // FALL THROUGH, do not return. The failure path must not persist the mode that failed — that is what
23913
24129
  // `failed` below is for — but it still needs the shared tail. An earlier revision returned here and
23914
24130
  // skipped panel(), refreshPropLabels3d() and updCS(): the success path calls updCS()/csSyncF3d()
@@ -25648,7 +25864,7 @@ async function refreshRfiRecords(opts){
25648
25864
  // KEYED ON THE HTTP STATUS, not on `code`: the three refusals `resolveProject` answers with — an
25649
25865
  // unknown project, a malformed id, a project with no incarnation yet — carry no code at all, so an
25650
25866
  // arm that switched on one would fall through for a state a real project can reach.
25651
- rfiState={status:'fail',records:live,sizeTruth:'known',liveTruth:j.liveTruth==='unavailable'?'unavailable':'known',detail:'',
25867
+ rfiState={status:'fail',records:live,sizeTruth:'known',liveTruth:j.liveTruth==='unavailable'?'unavailable':'known',detail:'',drawnHeightCheck:rfiDrawnHeightCheckOf(j),
25652
25868
  liveDetail:String(j.liveTruthDetail||''),http:r.status||0,error:String((j&&j.error)||''),
25653
25869
  // #2521 row 3b-2: a Quick version's unfiled questions live in the version, so they show even now.
25654
25870
  quickFiling:Array.isArray(j&&j.quickFiling)?j.quickFiling:[],
@@ -25670,6 +25886,7 @@ async function refreshRfiRecords(opts){
25670
25886
  sizeTruth:j.sizeTruth==='known'?'known':'unavailable',
25671
25887
  liveTruth:j.liveTruth==='known'?'known':'unavailable',
25672
25888
  detail:String(j.sizeTruthDetail||''),liveDetail:String(j.liveTruthDetail||''),http:200,error:'',
25889
+ drawnHeightCheck:rfiDrawnHeightCheckOf(j),
25673
25890
  quickFiling:Array.isArray(j.quickFiling)?j.quickFiling:[],
25674
25891
  readQuestions:j.readQuestions&&typeof j.readQuestions==='object'?j.readQuestions:null,
25675
25892
  readQuestionsUnavailable:!!j.readQuestionsUnavailable};
@@ -26732,7 +26949,8 @@ async function rfiDispatch(snap,retried,deadline){
26732
26949
  }
26733
26950
  }
26734
26951
  if(rfiFormFor&&rfiFormFor.opKey===snap.opKey)rfiFormFor={...rfiFormFor,busy:false};
26735
- const said=String(j.error||'')||('FloLess could not record that (HTTP '+res.status+'), and did not say why.');
26952
+ // #3097: the server's own sentence as always; without one, the shared sentence, never "(HTTP 500)".
26953
+ const said=replyFailureText(res.status,j,{action:'record that',unsure:'Check the RFI list before trying again.'});
26736
26954
  // `rfi-not-found` removes its own subject, so it never has a row to live in.
26737
26955
  if(code==='rfi-not-found')rfiSetOutcome(null,code,said,'attempt');
26738
26956
  else report(code||'rfi-refused',said);
@@ -27575,6 +27793,38 @@ function rfiEndUnresolved(memberId,end){
27575
27793
  }
27576
27794
  const rfiEndWords=(end,m)=>m&&m.role==='column'?(end===0?'bottom':'top'):(end===0?'start':'end');
27577
27795
  /** The server's own sentences for a height row, as notes. Never re-derived here. */
27796
+ /* #2628 slice A: a filed question the model now raises as a DRAWING CONFLICT (the drawings state a different height
27797
+ than the model holds) keeps its historical words and gains one line with the current question, "Now: …". ONE helper
27798
+ for the record, each grouped occurrence (collapsed and expanded) and the copied text, so the three cannot drift.
27799
+ Any `drawnHeights` the server sent counts, readable or not: the safe side is to show the current question. */
27800
+ const rfiDrawnConflict=g=>!!(g&&g.kind==='unknown-elevation'&&g.drawnHeights!==undefined&&typeof g.question==='string'&&g.question);
27801
+ const rfiNowText=g=>rfiDrawnConflict(g)?'Now: '+g.question:'';
27802
+ const rfiNowHtml=g=>rfiDrawnConflict(g)?'<div class="rfinote rfinow" data-rfi-now><b>Now:</b> '+esc(g.question)+'</div>':'';
27803
+ /** The grouped occurrences the model now raises as drawing conflicts, in occurrence order. */
27804
+ const rfiNowOccurrences=r=>(r&&r.grouped&&Array.isArray(r.occurrences)?r.occurrences:[])
27805
+ .filter(occ=>occ&&rfiDrawnConflict(occ.liveGap)).sort((a,b)=>a.occurrenceIndex-b.occurrenceIndex);
27806
+ const RFI_NOW_COLLAPSED=3;
27807
+ /** The whole RFI as copied: the server's text, then each current conflict line. */
27808
+ function rfiCopyText(r){
27809
+ if(!r||!r.text)return '';
27810
+ const count=r.grouped&&Array.isArray(r.occurrences)?r.occurrences.length:0;
27811
+ const lines=r.grouped
27812
+ ?rfiNowOccurrences(r).map(occ=>'Now, occurrence '+(occ.occurrenceIndex+1)+' of '+count+': '+occ.liveGap.question)
27813
+ :r.liveOnly?[]:[rfiNowText(r.liveGap)].filter(Boolean);
27814
+ return lines.length?r.text+'\n\n'+lines.join('\n'):r.text;
27815
+ }
27816
+ /* #2628 (R8-2): the drawn-height check could not read every end. Its OWN state beside liveTruth, never folded into
27817
+ it: it changes no action's eligibility and only adds this sentence to the banner. */
27818
+ function rfiDrawnHeightCheckOf(j){
27819
+ const c=j&&j.drawnHeightCheck;
27820
+ // Incomplete is always said; a count the server did not send readably is left out, never read as "0" or as clear.
27821
+ if(!c||c.state!=='incomplete')return null;
27822
+ return {state:'incomplete',ends:Number.isSafeInteger(c.ends)&&c.ends>0?c.ends:0};
27823
+ }
27824
+ // The server's drawnHeightIncompleteText in server/drawn-height-conflict.ts says the same words; keep the two in step.
27825
+ const rfiDrawnHeightCheckText=c=>c.ends>0
27826
+ ?'FloLess could not check every end’s drawn height against the model ('+c.ends+' '+(c.ends===1?'end':'ends')+' unchecked).'
27827
+ :'FloLess could not check the ends’ drawn heights against the model.';
27578
27828
  function rfiElevationNotes(g){
27579
27829
  if(!g||g.kind!=='unknown-elevation')return [];
27580
27830
  const notes=[];
@@ -27721,6 +27971,12 @@ function paintRfiBanner(){
27721
27971
  +'unavailable on every row below until it does. Reload the page to try again.';
27722
27972
  html=html?html+'<br>'+clause:clause;
27723
27973
  }
27974
+ // #2628: independent too, and appended for the same reason. Shown above an empty list as well, so "No current model
27975
+ // questions were found" is never the only thing said while some ends were not checked.
27976
+ if(rfiState.drawnHeightCheck){
27977
+ const line='<span data-rfi-drawn-check>'+esc(rfiDrawnHeightCheckText(rfiState.drawnHeightCheck))+'</span>';
27978
+ html=html?html+'<br>'+line:line;
27979
+ }
27724
27980
  banner.innerHTML=html;
27725
27981
  banner.hidden=!html;
27726
27982
  const retry=document.getElementById('rfiRetry');
@@ -28351,6 +28607,7 @@ function rfiGroupedRecordRowHtml(r){
28351
28607
  const error=rfiTargetErrors.get(key);
28352
28608
  return '<li class=rfioccurrence data-rfi-occurrence="'+index+'"><article aria-labelledby="rfi-occ-'+r.seq+'-'+index+'"><div class=rfioccurrence-head><span class="rfioccurrence-title rfimeta"><h4 id="rfi-occ-'+r.seq+'-'+index+'" tabindex="-1">Occurrence '+(index+1)+' of '+count+' — '+esc(rfiGroupedOccurrenceSubject(occ))+'</h4>'+rfiAiMark(occ.latestBy)+'</span><span class="rfikind '+rfiStatusTone(occ)+'">'+esc(rfiStatusWords(occ))+'</span></div>'
28353
28609
  +'<div class=rfinote>'+esc(occ.question)+(sheets?' · '+esc(sheets):'')+'</div>'
28610
+ +rfiNowHtml(occ.liveGap)
28354
28611
  +(occ.reopened?'<div class=rfinote>Reopened '+rfiDated(occ.reopened.at)+(occ.reopened.why?': '+esc(occ.reopened.why):'.')+'</div>':'')
28355
28612
  +rfiRoundsHtml(r,occ.earlierRounds,index)
28356
28613
  +(error?'<div class=rfifail role=alert>'+esc(error.message)+'</div>':'')
@@ -28361,7 +28618,7 @@ function rfiGroupedRecordRowHtml(r){
28361
28618
  :'<ol id="'+panelId+'" class=rfioccurrences aria-label="Occurrences in '+esc(r.id)+'" hidden></ol>';
28362
28619
  const sheetSummary=rfiScope==='sheet'?matching.length+' of '+count+' occurrences on this sheet · ':'';
28363
28620
  return '<div class="rfirow'+(formOpen?' editing':'')+'" data-rfi-row="'+esc(rowKey)+'"'+(rowBusy?' aria-busy="true"':'')+'><span class="rfikind '+rfiStatusTone(r)+'">'+esc(kind)+'</span><div class=rfitx>'
28364
- +esc(r.question||'This grouped RFI records no question.')+'<div class=rfimeta><span>'+esc(r.id)+'</span>'+rfiFiledByYou(r)+'<span>'+esc(rfiStatusWords(r))+'</span><span>'+sheetSummary+count+' occurrences · '+r.counts.sheets+' sheets · '+r.counts.entities+' members/connections</span></div>'
28621
+ +esc(r.question||'This grouped RFI records no question.')+(expanded?'':rfiGroupedNowHtml(r,count))+'<div class=rfimeta><span>'+esc(r.id)+'</span>'+rfiFiledByYou(r)+'<span>'+esc(rfiStatusWords(r))+'</span><span>'+sheetSummary+count+' occurrences · '+r.counts.sheets+' sheets · '+r.counts.entities+' members/connections</span></div>'
28365
28622
  +deliveryNote+rfiSettleHtml(r,rowKey)+(groupForm?rfiFormHtml(r,'all '+count+' occurrences',rowKey):(formOpen?'':recovering?rfiRecoveryHtml(rowKey)+(copy?'<div class=rfiacts>'+copy+'</div>':''):'<div class=rfiacts>'+gmail+send+allAnswer+allClose+allReopen+copy+deliveryActs+'</div>'))
28366
28623
  +'<button class="ghost rfigroup-toggle" data-command-id="steel.rfi-group-toggle#'+esc(r.id)+'" data-command-instance-label="'+esc(r.id)+'" data-rfi-expand="'+esc(r.id)+'" data-rfi-ctl=expand aria-expanded="'+expanded+'" aria-controls="'+panelId+'"><span>'+(expanded?'Hide':'Show')+' '+count+' occurrences</span><span aria-hidden=true>'+(expanded?'▴':'▾')+'</span></button>'
28367
28624
  +(formOpen?'':rfiOutcomeHtml(rowKey))+occurrences+'</div></div>';
@@ -28426,7 +28683,13 @@ async function rfiQuickRefile(versionN){
28426
28683
  const filed=(body.outcomes||[]).filter(o=>['created','reused','reopened','successor'].includes(o.result)).length;
28427
28684
  const notFiled=(body.outcomes||[]).filter(o=>o.result==='over-capacity'||o.result==='unplaceable').length;
28428
28685
  toast(filed?filed+' question'+(filed===1?'':'s')+' filed as the AI\'s'+(notFiled?'; '+notFiled+' still could not be filed':'')+'.':notFiled?'Nothing more could be filed: '+notFiled+' still do not fit.':'Nothing was left to file.');
28429
- }else toast('These questions could not be filed: '+((body&&body.error)||'the RFI file could not be written')+'. Nothing was changed.');
28686
+ }else{
28687
+ // #3097: the server's sentence when it wrote one for the person; an unexplained 5xx may have written some of them.
28688
+ const said=personText(body);
28689
+ toast(said?'These questions could not be filed: '+said+'. Nothing was changed.'
28690
+ :res.status>=500?'These questions could not be filed, and FloLess couldn’t tell whether any were written. Check the RFIs before filing them again.'
28691
+ :'These questions could not be filed: the RFI file could not be written. Nothing was changed.');
28692
+ }
28430
28693
  }catch(e){console.error('[steel] could not retry filing the AI questions',e);toast('These questions could not be filed, because FloLess could not be reached. Nothing was changed.');}
28431
28694
  // The button the pointer is over is replaced by the repaint, so no pointer-out ever hides its tip.
28432
28695
  finally{rfiQuickRefileBusy=null;await refreshRfiRecords();if(rfiOpen())renderRfiList();if(window.__tip)window.__tip.hide();}
@@ -28560,6 +28823,14 @@ async function rfiReadRaise(gapKeys,asOne,busyKey){
28560
28823
  }
28561
28824
  }
28562
28825
 
28826
+ /** Collapsed, a grouped RFI names its occurrences the drawings now contradict, so folding it never hides them. */
28827
+ function rfiGroupedNowHtml(r,count){
28828
+ const now=rfiNowOccurrences(r);
28829
+ if(!now.length)return '';
28830
+ const more=now.length-RFI_NOW_COLLAPSED;
28831
+ return now.slice(0,RFI_NOW_COLLAPSED).map(occ=>'<div class="rfinote rfinow" data-rfi-now><b>Now, occurrence '+(occ.occurrenceIndex+1)+' of '+count+':</b> '+esc(occ.liveGap.question)+'</div>').join('')
28832
+ +(more>0?'<div class="rfinote rfinow" data-rfi-now-more>…and '+more+' more '+(more===1?'occurrence':'occurrences')+' the drawings now contradict. Show the occurrences to read them.</div>':'');
28833
+ }
28563
28834
  function rfiRecordRowHtml(r){
28564
28835
  if(r&&r.grouped)return rfiGroupedRecordRowHtml(r);
28565
28836
  const rowKey=rfiRowKey('record',r.id);
@@ -28687,6 +28958,7 @@ function rfiRecordRowHtml(r){
28687
28958
  const acts=gmailBtn+(resolve||'')+verbBtns+deliveryActs+copy+locate+targetControls;
28688
28959
  return '<div class="rfirow'+(formOpen?' editing':'')+'" data-rfi-row="'+esc(rowKey)+'"'+(saving||deliveryBusy?' aria-busy="true"':'')+'><span class="rfikind '+rfiStatusTone(r)+'">'+esc(kind)+'</span><div class=rfitx>'
28689
28960
  +esc(r.question||'This RFI records no question.')
28961
+ +rfiNowHtml(r.liveGap)
28690
28962
  +'<div class=rfimeta>'+meta+'</div>'
28691
28963
  +(notes.length?'<div class=rfinote>'+notes.join(' ')+'</div>':'')
28692
28964
  +rfiRoundsHtml(r,r.earlierRounds,null)
@@ -28695,7 +28967,7 @@ function rfiRecordRowHtml(r){
28695
28967
  +(receiptMismatch&&!profileMismatch?'<div class=rfinote role="note" data-rfi-receipt-truth>'+esc(rfiSentence(receiptMismatch.fact))+' Refresh the model view before closing this RFI as resolved.</div>':'')
28696
28968
  +(settling?'<div class=rfinote role="note" data-rfi-profile-settle>'+esc(settling.message)+'</div>':'')
28697
28969
  +deliveryHtml+rfiSettleHtml(r,rowKey)
28698
- +(rfiCopyFallbackId===r.id&&r.text?'<div class=rfinote style="white-space:pre-wrap;user-select:text">'+esc(r.text)+'</div>':'')
28970
+ +(rfiCopyFallbackId===r.id&&r.text?'<div class=rfinote style="white-space:pre-wrap;user-select:text">'+esc(rfiCopyText(r))+'</div>':'')
28699
28971
  +(elevGap&&!formOpen&&!recovering?rfiElevationControls(rowKey,r.id,elevGap):'')
28700
28972
  // The outcome renders INSIDE the form when one is open (directly above Submit, where focus lands);
28701
28973
  // at row level only when there is no form to put it in.
@@ -29082,11 +29354,12 @@ function wireRfiList(){
29082
29354
  // The list may have been re-read since this markup was painted (the repaint is suppressed while
29083
29355
  // focus is inside the list), so the record can be gone. Say so rather than clicking into silence.
29084
29356
  if(!r||!r.text){toast('The filed RFIs were re-read and this one is no longer listed — reopen the list.');return;}
29357
+ const text=rfiCopyText(r);
29085
29358
  // Promise.resolve().then(...) so the CATCH BELOW IS REACHABLE. In an insecure context
29086
29359
  // `navigator.clipboard` is undefined, and `navigator.clipboard.writeText(...)` then throws
29087
29360
  // SYNCHRONOUSLY — before any promise exists — so a bare `.catch` never fires and the button does
29088
29361
  // nothing at all. `web/aware.js` and `web/workspaces.js` both guard the same hazard.
29089
- Promise.resolve().then(()=>navigator.clipboard.writeText(r.text)).then(()=>{
29362
+ Promise.resolve().then(()=>navigator.clipboard.writeText(text)).then(()=>{
29090
29363
  const was=b.textContent;b.textContent='Copied';setTimeout(()=>{b.textContent=was;},1600);
29091
29364
  }).catch(err=>{
29092
29365
  // Bind and log it: an insecure context and a denied permission are different problems and a bug
@@ -32454,7 +32727,9 @@ async function askAiCreateRequest(draft){
32454
32727
  try {
32455
32728
  flushed=await window.flushContract();
32456
32729
  } catch (err) {
32457
- askAiSetStatus('Could not save the contract — check the server and try again.', 'var(--err)');
32730
+ // #3097: nothing has been sent yet, so sending again is safe; the save's own message goes to the console.
32731
+ console.error('[steel] Ask AI: the model could not be saved before sending', err);
32732
+ askAiSetStatus('Nothing was sent to your AI, because your latest edits couldn’t be saved first. Make sure FloLess is still running and the model shows as saved, then send again.', 'var(--err)');
32458
32733
  return null;
32459
32734
  }
32460
32735
  askAiSetStatus('Sending…', 'var(--mut)');
@@ -32474,13 +32749,17 @@ async function askAiCreateRequest(draft){
32474
32749
  if (res.ok) {
32475
32750
  const body=await res.json();return body.request||null;
32476
32751
  } else {
32477
- let errText = 'Request failed (' + res.status + ')';
32478
- try { const body = await res.json(); if (body && body.error) errText = body.error; } catch (_) {}
32479
- askAiSetStatus(errText, 'var(--err)');
32752
+ // #3097: the server's own sentence when it wrote one, else the shared sentence — never "Request failed (500)".
32753
+ let body = null;
32754
+ try { body = await res.json(); } catch (_) {}
32755
+ console.error('[steel] Ask AI request refused', { status: res.status, code: body && body.code });
32756
+ askAiSetStatus(replyFailureText(res.status, body, { action: 'send this to your AI' }), 'var(--err)');
32480
32757
  return null;
32481
32758
  }
32482
32759
  } catch (err) {
32483
- askAiSetStatus('Network error — check the server and try again.', 'var(--err)');
32760
+ // No answer, or an answer this page couldn't read: the request may have been queued, so it is not sent again blindly.
32761
+ console.error('[steel] Ask AI request got no usable answer', err);
32762
+ askAiSetStatus(failureCopy(err, { action: 'send this to your AI', unsure: 'Check your queued requests before sending again.' }).text, 'var(--err)');
32484
32763
  return null;
32485
32764
  }
32486
32765
  }
@@ -32626,7 +32905,10 @@ rfiPostShell({type:'floless:editor-ready'});
32626
32905
  refresh();
32627
32906
  })();
32628
32907
 
32629
- boot().catch(err => { EditorFocus.fail('The model did not open, so the connection was not shown. The Model step says why.'); document.body.replaceChildren(Object.assign(document.createElement('p'), { textContent: 'Failed to load: ' + err.message, style: 'padding:24px;color:var(--err)' })); });
32908
+ // #3097: a boot that threw replaces the page with this. The exception's own text ("Cannot read properties of …") is a
32909
+ // developer's, so it goes to the console; the person reads what happened and what to do.
32910
+ const BOOT_FAILED_TEXT = 'Couldn’t open this model. Something in the editor stopped while it was loading. Close the editor and open the model again; if it keeps happening, use Report an issue at the bottom of the window.';
32911
+ boot().catch(err => { EditorFocus.fail('The model did not open, so the connection was not shown. The Model step says why.'); console.error('steel-editor: boot failed', err); document.body.replaceChildren(Object.assign(document.createElement('p'), { textContent: BOOT_FAILED_TEXT, style: 'padding:24px;color:var(--err)' })); });
32630
32912
 
32631
32913
  // Themed tooltips (replaces native title=) for the 3D toolbar — one shared element, shown on
32632
32914
  // data-tip hover after a short delay, positioned below the control and clamped to the viewport. A function of