Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix: show Pixal3D's failed CUDA extensions as a styled card line, not buried in help prose (#4741)
[._.]/ Adam Eivyf79a53161701
diff --git a/server/services/imageTo3d/adapters.degraded.test.js b/server/services/imageTo3d/adapters.degraded.test.jsindex 4561613cf2..5d57858b48 100644--- a/server/services/imageTo3d/adapters.degraded.test.js+++ b/server/services/imageTo3d/adapters.degraded.test.js@@ -28,15 +28,30 @@ describe('pixal3dCuda degraded-state projection', () => {// that reads plain "Ready" until the first render dies in the GLB exporter.probePixal3dModules.mockResolvedValueOnce({ naf: 'available', missing: ['o_voxel'] });const state = await describeState();- expect(state.fields.degraded).toMatchObject({ label: 'incomplete install', repairable: true });- expect(state.fields.degraded.help).toContain('o_voxel');+ expect(state.fields.degraded).toEqual({+ label: 'incomplete install',+ help: expect.stringContaining('Repair install rebuilds the CUDA extensions'),+ repairable: true,+ detail: 'Missing: o_voxel',+ });+ // The culprit belongs to `detail` alone — repeating it in the remedy prose is the+ // split this projection exists to keep (#4741).+ expect(state.fields.degraded.help).not.toContain('o_voxel');expect(state.warnings).toHaveLength(1);});it('names every missing extension, not just the first', async () => {probePixal3dModules.mockResolvedValueOnce({ naf: 'available', missing: ['o_voxel', 'flex_gemm'] });const state = await describeState();- expect(state.fields.degraded.help).toContain('o_voxel and flex_gemm');+ expect(state.fields.degraded.detail).toBe('Missing: o_voxel, flex_gemm');+ });++ it('keeps the module names in the prose warning the install verify frame replays', async () => {+ // The card has a second line for `detail`; that stage has one string, so dropping the+ // names from `help` must not drop them from the frame the user actually reads there.+ probePixal3dModules.mockResolvedValueOnce({ naf: 'available', missing: ['o_voxel'] });+ const state = await describeState();+ expect(state.warnings).toEqual([expect.stringContaining('Missing: o_voxel.')]);});it('lets an incomplete install outrank a NAF fallback', async () => {diff --git a/server/services/imageTo3d/adapters.js b/server/services/imageTo3d/adapters.jsindex 87411bfb85..f804285777 100644--- a/server/services/imageTo3d/adapters.js+++ b/server/services/imageTo3d/adapters.js@@ -74,6 +74,7 @@ import {runPixal3dCudaGenerate,probePixal3dModules,} from './pixal3dCuda.js';+import { missingModulesLabel, appendMissingModules } from './missingModules.js';import { detectCudaComputeCapability } from '../../lib/cudaCapability.js';export const TARGET_ADAPTERS = Object.freeze({@@ -206,12 +207,22 @@ export const TARGET_ADAPTERS = Object.freeze({const degraded = incomplete? {label: 'incomplete install',- help: `Pixal3D is installed but ${incomplete.join(' and ')} did not build, so renders `+ // `help` is the remedy ONLY. Which extensions failed goes in `detail`, the same+ // split `trellis2` uses (#4741) — the card renders that as its own line, so+ // interpolating the names into this sentence too would bury the one actionable+ // half in prose for one target and style it for the other.+ help: 'Pixal3D is installed but a required CUDA extension did not build, so renders '+ 'will fail in the mesh exporter. Repair install rebuilds the CUDA extensions; '+ 'your downloaded models are kept.',repairable: true,+ // Shares one formatter with the MPS lane so the two cannot word the same+ // condition differently. No emptiness guard is needed: `incomplete` is the+ // non-empty-or-null narrowing above, so this branch always has names.+ detail: missingModulesLabel(incomplete),}: nafFallback+ // No module list to name — NAF is absent as a whole, not half-built — so this+ // branch stays `detail`-less rather than emitting an empty label.? { label: 'NAF fallback', help: probe.help, repairable: true }: null;return {@@ -222,7 +233,10 @@ export const TARGET_ADAPTERS = Object.freeze({// The normalized shape the client renders — see the adapter contract above....(degraded ? { degraded } : {}),},- warnings: degraded?.help ? [degraded.help] : [],+ // Replayed into the install route's `verify` stage on the already-installed+ // short-circuit, which has one prose string and no second line — so the module+ // names are appended here instead of dropped with the `help` interpolation.+ warnings: degraded?.help ? [appendMissingModules(degraded.help, incomplete)] : [],};},}),diff --git a/server/services/imageTo3d/missingModules.js b/server/services/imageTo3d/missingModules.jsnew file mode 100644index 0000000000..5e05d742d3--- /dev/null+++ b/server/services/imageTo3d/missingModules.js@@ -0,0 +1,45 @@+/**+ * Image-to-3D — the one wording for "these compiled modules did not build".+ *+ * Two lanes report a half-built install: TRELLIS.2's texture-bake backends+ * (`.metal` sources that `setup.sh` compiles while still exiting 0) and Pixal3D's+ * CUDA extensions (same failure mode, different toolchain). Both surface the culprit+ * module names, in the card's `degraded.detail` line AND in the prose the install's+ * `verify` frame prints — so the string lives here rather than in either lane, and+ * one condition cannot read two different ways depending on which target hit it.+ *+ * Pure, and deliberately shaped around a plain `string[]` rather than either lane's+ * probe result: the caller does the `.missing` lookup, so a probe growing a second+ * list of names can format it through the same helper.+ */++/**+ * A standalone card line naming the modules (`Missing: o_voxel, flex_gemm`).+ *+ * Punctuation-free — a card line wants none, so the terminal period is+ * `appendMissingModules`'s job.+ *+ * Returning `''` rather than a bare "Missing:" is defensive depth, not the thing that+ * keeps an indeterminate probe quiet: every caller gates on its own degraded signal+ * first, and a real probe reports that exactly when the list is non-empty.+ *+ * @param {string[]|undefined} missing module names the probe found absent+ * @returns {string}+ */+export function missingModulesLabel(missing) {+ return missing?.length ? `Missing: ${missing.join(', ')}` : '';+}++/**+ * Remedy prose with the culprit modules appended as a closing sentence+ * (`… models are kept. Missing: o_voxel.`), for the lanes that can only emit one+ * string and have no second line to put `detail` on.+ *+ * @param {string} help the remedy prose (already ends in its own punctuation)+ * @param {string[]|undefined} missing module names the probe found absent+ * @returns {string}+ */+export function appendMissingModules(help, missing) {+ const label = missingModulesLabel(missing);+ return [help, label && `${label}.`].filter(Boolean).join(' ');+}diff --git a/server/services/imageTo3d/missingModules.test.js b/server/services/imageTo3d/missingModules.test.jsnew file mode 100644index 0000000000..dbfc8114ef--- /dev/null+++ b/server/services/imageTo3d/missingModules.test.js@@ -0,0 +1,32 @@+import { describe, expect, it } from 'vitest';+import { missingModulesLabel, appendMissingModules } from './missingModules.js';++// Both image-to-3D install lanes report "these compiled modules did not build" — the MPS+// texture-bake backends and the Pixal3D CUDA extensions — so one wording lives here and+// neither lane re-assembles it (#4741).+describe('missingModulesLabel', () => {+ it('names every module, comma-separated and punctuation-free', () => {+ // Punctuation-free on purpose: this is `degraded.detail`, a standalone card line.+ expect(missingModulesLabel(['o_voxel', 'flex_gemm'])).toBe('Missing: o_voxel, flex_gemm');+ });++ it('yields nothing to render for an empty or absent list', () => {+ // A bare "Missing:" would read as a determined verdict with the culprit lost.+ expect(missingModulesLabel([])).toBe('');+ expect(missingModulesLabel(undefined)).toBe('');+ expect(missingModulesLabel(null)).toBe('');+ });+});++describe('appendMissingModules', () => {+ it('closes the remedy prose with the module sentence', () => {+ expect(appendMissingModules('Repair install rebuilds them.', ['o_voxel']))+ .toBe('Repair install rebuilds them. Missing: o_voxel.');+ });++ it('returns the prose untouched when there is nothing to name', () => {+ // The NAF-fallback lane has no module list; it must not gain a dangling sentence.+ expect(appendMissingModules('NATTEN is missing.', [])).toBe('NATTEN is missing.');+ expect(appendMissingModules('NATTEN is missing.', undefined)).toBe('NATTEN is missing.');+ });+});diff --git a/server/services/imageTo3d/trellis2.js b/server/services/imageTo3d/trellis2.jsindex dd4013e980..b8abf50e31 100644--- a/server/services/imageTo3d/trellis2.js+++ b/server/services/imageTo3d/trellis2.js@@ -32,6 +32,7 @@ import {probePythonModules,} from './laneRunner.js';import { renderOptionArgs } from './renderOptions.js';+import { missingModulesLabel, appendMissingModules } from './missingModules.js';import {selectTrellis2DecimationTarget,trellis2MeshQualityArgs,@@ -193,23 +194,20 @@ export async function probeTrellis2TextureBake({* (`Missing: o_voxel, mtlbvh`) — or `''` when there is nothing to name.** The `degraded.detail` field is exactly this label, and the prose lanes get it through- * `appendMissingBakeModules` below rather than re-assembling the sentence — the label is- * punctuation-free because a standalone card line wants none, so the terminal period is- * the appending helper's job.+ * `appendMissingBakeModules` below rather than re-assembling the sentence. The wording+ * itself lives in `missingModules.js`, shared with the Pixal3D CUDA lane, which reports+ * the same "these compiled modules did not build" condition (#4741) — this wrapper only+ * binds it to a bake probe's shape.*- * Returning `''` rather than a bare "Missing:" is defensive depth, not the thing that- * silences a `quality: 'unknown'` probe — both callers gate on `'fallback'` first, and a- * real probe reports that exactly when `missing` is non-empty, so an empty list never- * arrives here. `degradedQuality` is deliberately NOT included: `flex_gemm` lowers bake- * quality without forcing the fallback baker, so naming it here would read as a cause of- * the confetti surface when it isn't.+ * `degradedQuality` is deliberately NOT passed through: `flex_gemm` lowers bake quality+ * without forcing the fallback baker, so naming it here would read as a cause of the+ * confetti surface when it isn't.** @param {{missing?: string[]}} bake a result from `probeTrellis2TextureBake`* @returns {string}*/export function missingBakeModulesLabel(bake) {- const missing = bake?.missing;- return missing?.length ? `Missing: ${missing.join(', ')}` : '';+ return missingModulesLabel(bake?.missing);}/**@@ -227,8 +225,7 @@ export function missingBakeModulesLabel(bake) {* @returns {string}*/export function appendMissingBakeModules(help, bake) {- const label = missingBakeModulesLabel(bake);- return [help, label && `${label}.`].filter(Boolean).join(' ');+ return appendMissingModules(help, bake?.missing);}/**