@floless/app 0.126.3 → 0.126.5

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.
@@ -159,6 +159,18 @@
159
159
  <button class="find-close" id="find-close" data-tip="Close">×</button>
160
160
  </div>
161
161
  <div class="notes-strip" id="notes-strip" hidden></div>
162
+ <!-- Which of the firm's own knowledge this workflow was built from, and whether it has changed
163
+ since. Deliberately NOT in the header beside the run-state pill: that pill's "Needs refresh"
164
+ state is amber and means Run is blocked, and a second amber chip inches away saying the
165
+ knowledge moved would read as the same kind of problem. Knowledge drift never blocks Run.
166
+ Hidden outright when the workflow was never built against a knowledge base — which is most
167
+ of them, and is a normal state rather than something to render an empty row about. -->
168
+ <div class="kb-informed" id="kb-informed" hidden>
169
+ <span class="kb-informed-label">Informed by</span>
170
+ <span class="kb-informed-pages" id="kb-informed-pages"></span>
171
+ <span class="kb-drift-chip" id="kb-drift-chip" role="status" hidden
172
+ data-tip="Re-approving isn’t required — this workflow still runs as it is. But the Knowledge Base has changed since these pages were read, so double-check any values that came from them.">Knowledge Base updated since this was built</span>
173
+ </div>
162
174
  <div class="topology" id="topology"></div>
163
175
  <div class="canvas-toolbar">
164
176
  <div class="toolbar-group">
@@ -734,6 +746,18 @@
734
746
  <div class="integrations-hint">
735
747
  Tokens are stored encrypted by AWARE under <code>~/.aware/credentials/</code>. To connect or refresh, run <code>aware connect &lt;name&gt;</code> in claude-code (or codex / opencode). FloLess never touches secrets directly.
736
748
  </div>
749
+ <!-- Headless runs (#571): which terminal AI floless may start for you, and where it runs.
750
+ Its own full-width section rather than a card in the 2-col grid below, because a
751
+ detected CLI is not an OAuth connection: there is no Connect, no expiry, and
752
+ deliberately no "ready" state — a signed-out CLI looks identical to a working one, so
753
+ a green tick two rows under a real "Connected" badge would claim what we can't back.
754
+ Rendered per-open by renderRuntimeSection() in aware.js. -->
755
+ <div class="int-section" id="int-runtimes-section" hidden>
756
+ <div class="int-section-title">Headless runs</div>
757
+ <div class="int-section-sub">floless can start your own terminal AI on a queued request instead of you pasting it. It runs on your machine, with your login — floless never sends your work anywhere.</div>
758
+ <div class="int-runtimes" id="int-runtimes"></div>
759
+ <div class="int-folder" id="int-folder"></div>
760
+ </div>
737
761
  <div class="integrations-list" id="integrations-list"></div>
738
762
  <div class="modal-actions">
739
763
  <button id="integrations-close">Close</button>
@@ -772,11 +796,30 @@
772
796
  <div class="request-help-step"><span>2</span><p>Paste the copied instructions.</p></div>
773
797
  <div class="request-help-step"><span>3</span><p>Return here to track progress in Requests.</p></div>
774
798
  </div>
799
+ <!-- Replaces the three steps above once floless has started the work itself: they describe
800
+ things the user must do, and after "Run it for me" there is nothing left for them to do.
801
+ Swapped wholesale rather than relabelled, or the modal would describe a paste that never
802
+ happened. Deliberately NOT live — this modal is dismissed in seconds and the Requests row
803
+ owns liveness; a second poller for a transient modal is plumbing nobody reads. -->
804
+ <div class="request-help-run-status" id="request-help-run-status" hidden>
805
+ <span class="rtn-spinner" aria-hidden="true"></span>
806
+ <div>
807
+ <p class="rhrs-title" id="request-help-run-title"></p>
808
+ <p class="rhrs-sub">This can take a few minutes, and you don’t need to wait. Keep working — the row in Requests updates as it goes.</p>
809
+ </div>
810
+ </div>
775
811
  <div class="request-help-note" id="request-help-note">The web UI queues the request; your terminal agent applies it and reports progress back here.</div>
776
812
  <div class="modal-actions">
777
813
  <button id="request-help-copy" hidden>Copy instruction</button>
778
814
  <button id="request-help-keep">Keep working</button>
779
- <button id="request-help-open" class="primary">Open Requests</button>
815
+ <button id="request-help-open">Open Requests</button>
816
+ <!-- The §E4 split: ▶ runs with the current default, ▾ opens folder + which terminal AI for
817
+ THIS run only. Hidden outright when no runtime is installed or this request's type
818
+ can't run headless — hide, never disable. -->
819
+ <span class="run-split" id="request-help-run-split" hidden>
820
+ <button id="request-help-run" class="primary run-split-main">▶ Run it for me</button>
821
+ <button id="request-help-run-opts" class="primary run-split-caret" aria-label="Choose folder and terminal AI" data-tip="Choose the folder and which terminal AI to use">▾</button>
822
+ </span>
780
823
  </div>
781
824
  </div>
782
825
  </div>
@@ -430,10 +430,22 @@ function orientMember(mesh, dir, el) {
430
430
  const m = dir.clone().normalize();
431
431
  // el.rot (section roll about the reference line) applies to ANY member — columns AND beams. A member
432
432
  // rendered as an explicit BOX (traced section, no profile) rolls about its length axis (local Y here).
433
+ // For a non-plumb BOX, first align its authored depth axis with world-up; a plumb member has no
434
+ // plan direction and `positionH` is unavailable, so its roll below only establishes display facing.
433
435
  const rollRad = (el && typeof el.rot === 'number' && el.rot) ? el.rot * Math.PI / 180 : 0;
434
436
  if (mesh.geometry.type === 'BoxGeometry') {
435
- mesh.quaternion.setFromUnitVectors(_YA, m); // length on local Y
436
- if (rollRad) mesh.quaternion.premultiply(new THREE.Quaternion().setFromAxisAngle(m, rollRad));
437
+ const q = new THREE.Quaternion().setFromUnitVectors(_YA, m); // length on local Y
438
+ const proj = _ZA.clone().sub(m.clone().multiplyScalar(_ZA.dot(m)));
439
+ if (proj.lengthSq() > 1e-6) {
440
+ proj.normalize();
441
+ const lz = _ZA.clone().applyQuaternion(q); // local depth axis
442
+ const ang = Math.atan2(lz.clone().cross(proj).dot(m), lz.dot(proj));
443
+ q.premultiply(new THREE.Quaternion().setFromAxisAngle(m, ang));
444
+ if (rollRad) q.premultiply(new THREE.Quaternion().setFromAxisAngle(m, rollRad));
445
+ } else if (el && typeof el.rot === 'number') {
446
+ q.premultiply(new THREE.Quaternion().setFromAxisAngle(m, el.rot * Math.PI / 180));
447
+ }
448
+ mesh.quaternion.copy(q);
437
449
  return;
438
450
  }
439
451
  const q = new THREE.Quaternion().setFromUnitVectors(_ZA, m); // member axis = extrude (local Z)
@@ -2689,12 +2689,11 @@ function hasPlanDir(m){
2689
2689
  if(!m||m.role==='column'||!Array.isArray(m.wp)||m.wp.length<2)return false;
2690
2690
  const k=304.8/((P&&P.pt_per_ft>0)?P.pt_per_ft:1);
2691
2691
  return Math.hypot(m.wp[1][0]-m.wp[0][0],m.wp[1][1]-m.wp[0][1])*k>=1;}
2692
- // Can this member be justified left/right? Needs a plan direction AND a resolved designation: a member
2693
- // whose profile does not parse has no section frame to flush a face to (the bake refuses it for the same
2694
- // reason — the 3D orients an unresolved/CUSTOM section by a minimal-arc rotation that does not line its
2695
- // axes up with the plan). profileDimsIn's null/non-null answer is a pure parse, so this agrees with the
2696
- // server whether or not the AISC table has loaded.
2697
- function posHEligible(m){return hasPlanDir(m)&&profileDimsIn(m&&m.profile)!=null;}
2692
+ // Can this member be justified left/right? It needs a plan direction and an authored section frame. A
2693
+ // resolved designation supplies that through profileDimsIn; a CUSTOM/imported section supplies w+d.
2694
+ // The BOX renderer now aligns that frame with the plan before applying Profile Rotation, so this
2695
+ // agrees with the server whether or not the AISC table has loaded.
2696
+ function posHEligible(m){return hasPlanDir(m)&&(profileDimsIn(m&&m.profile)!=null||!!(m&&m.section&&m.section.w>0&&m.section.d>0));}
2698
2697
  // Profile Position copy, in ONE place so the single- and multi-select panels cannot drift (they already
2699
2698
  // described the same control two different ways). Per-button tips, not one heading tip carrying
2700
2699
  // everything: with two axes under one heading the two "Middle" buttons sit adjacent, and each button
@@ -14277,6 +14276,8 @@ if(new URLSearchParams(location.search).get('selftest')==='1'){(function(){
14277
14276
  ok(hasPlanDir(Object.assign(mk(120,'W16X26'),{role:'column'}))===false,'a column never has a plan direction to justify to');
14278
14277
  ok(posHEligible(mk(120,'W16X26'))===true,'a real beam with a resolved profile is eligible');
14279
14278
  ok(posHEligible(mk(120,'MF'))===false,'an unresolved mark has no section to flush a face to');
14279
+ ok(posHEligible(Object.assign(mk(120,''),{section:{w:200,d:100}}))===true,'a sloped custom rectangle with w+d is eligible');
14280
+ ok(posHEligible(Object.assign(mk(0,''),{section:{w:200,d:100}}))===false,'a plumb custom rectangle has no left/right direction');
14280
14281
  ok(posHDefault(mk(120,'W16X26'))==='middle','posHDefault centres a member that never set one');
14281
14282
  ok(posHDefault(Object.assign(mk(120,'W16X26'),{positionH:'left'}))==='left','an explicit positionH wins');
14282
14283
  P.pt_per_ft=sp3;}
@@ -572,6 +572,9 @@
572
572
  const ws = mode === 'workspaces';
573
573
  $app.classList.toggle('mode-workspaces', ws);
574
574
  document.body.classList.toggle('mode-workspaces', ws);
575
+ // The provenance strip is workflow-level data. Workspaces replaces that surface (including its
576
+ // landing), so cancel any late workflow-pin paint before the project UI starts loading.
577
+ if (ws && bridge.clearKbInformed) bridge.clearKbInformed();
575
578
  $switch.querySelectorAll('button').forEach((b) => {
576
579
  const on = b.dataset.mode === mode;
577
580
  b.classList.toggle('active', on);
@@ -8173,6 +8176,26 @@
8173
8176
  if ($projPopover && !$projPopover.hidden && $projCombo && !$projCombo.contains(e.target)) closeProjCombo(false);
8174
8177
  });
8175
8178
 
8176
- window.flolessWorkspaces = { setMode, refresh: loadProjects, findActive: wsFindActive, find: wsFind, clearFind: wsClearFind, openHistory: wsOpenHistory };
8179
+ /**
8180
+ * Open one Knowledge Base page, from outside this module — the "Informed by" row in Workflows mode
8181
+ * is the only caller today. The page viewer is driven by module-private `current` + `viewer` state,
8182
+ * so there is no way in without a seam.
8183
+ *
8184
+ * EVERY await here is load-bearing. `openProject` is async and its `setStep('knowledge')` runs
8185
+ * `kbResetViewer()` → `setViewer({mode:'graph'})`; setting the page viewer before that resolves
8186
+ * would be silently overwritten and drop the user on the graph, looking like the link went to the
8187
+ * wrong place. The `current` re-check afterwards is the ordinary stale-navigation guard — the user
8188
+ * can pick a different project while the open is in flight.
8189
+ */
8190
+ async function openKnowledgePage(projectId, slug) {
8191
+ if (!projectId || !slug) return;
8192
+ await setMode('workspaces');
8193
+ await openProject(projectId, 'knowledge');
8194
+ if (!current || current.id !== projectId) return; // navigated away mid-open
8195
+ setViewer({ mode: 'page', slug, sourceId: null });
8196
+ renderKnowledge();
8197
+ }
8198
+
8199
+ window.flolessWorkspaces = { setMode, refresh: loadProjects, findActive: wsFindActive, find: wsFind, clearFind: wsClearFind, openHistory: wsOpenHistory, openKnowledgePage };
8177
8200
  applyMode(); // restore persisted mode immediately (matches panels.js applyView timing)
8178
8201
  })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floless/app",
3
- "version": "0.126.3",
3
+ "version": "0.126.5",
4
4
  "type": "module",
5
5
  "description": "Thin localhost host for floless.app — serves web/ and shells the aware CLI. No engine, no LLM.",
6
6
  "bin": {