Skip to content

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

chore: remove three unused modules (#9425)

[._.]/ Adam Eivy25b3c19fef5b
diff --git a/client/src/hooks/README.md b/client/src/hooks/README.md
index ee55081987..0eaa3cb1f3 100644
--- a/client/src/hooks/README.md
+++ b/client/src/hooks/README.md
@@ -111,7 +111,6 @@ grep -i "what you want to do" client/src/hooks/README.md
| Hook | Purpose | Use when |
|---|---|---|
| `useAnchorReveal` | `useAnchorReveal(getTarget, key, { reveal? })` — scroll a freshly-opened element into view + flash a tint over it; re-fires when `key` changes; no-op when `key` is falsy or `getTarget()` is null. | Reveal an editorial finding's anchored manuscript text on open / prev-next step (#1601). |
-| `useArmedAction` | Two-click-arm `[armed, fire]` confirmation. | Destructive button needing a confirm tap. (Project memory: user finds this less discoverable — prefer inline confirm rows for new UI.) |
| `useAutoRefetch` | Poll-based refetch on an interval, single-flight per instance (ticks during a pending fetch are dropped; mid-flight `refetch()` calls share one trailing fetch). `{ pollOnly: true }` skips internal data/loading state for side-effect-only callers (returns `{ refetch }` only). | Only a sanctioned poll — a source that cannot push (hardware telemetry, an external system with no callback). Polling is an anti-pattern: prefer a socket event, adding the server emit if it is missing. |
| `useSystemActivity` | One shared bounded system-activity snapshot. Socket invalidation coalesces to a single read; reconnect and reshow reconcile missed frames. A failed read stays unknown, never idle. | Update banner and the live-activity widget. GPU samples stay on a visible-only poll — they have no event. |
| `useAutoSizeTextarea` | `[ref, resize]` — grows a `<textarea>` to fit its content (no scroll / hand-resize); recomputes before paint on value change. | A textarea that should auto-fit content. Prefer the `AutoSizeTextarea` UI component, which wraps this. |
diff --git a/client/src/hooks/index.js b/client/src/hooks/index.js
index 327be1abcf..5e1757a476 100644
--- a/client/src/hooks/index.js
+++ b/client/src/hooks/index.js
@@ -194,7 +194,6 @@ export * from './useUpdateChecker.jsx';
export * from './useVisibilityEvent.js';
// === UI / interaction ===
-export * from './useArmedAction.js';
export * from './useAutoRefetch.js';
export * from './useSystemActivity.js';
export * from './useCmdKSearch.js';
diff --git a/client/src/hooks/useArmedAction.js b/client/src/hooks/useArmedAction.js
deleted file mode 100644
index 8f7b4b14dd..0000000000
--- a/client/src/hooks/useArmedAction.js
+++ /dev/null
@@ -1,35 +0,0 @@
-import { useCallback, useEffect, useRef, useState } from 'react';
-
-/**
- * Two-click-arm confirmation hook. Returns `[armed, fire]`:
- * - first call to `fire(...args)` flips `armed` to `true` and schedules a
- * disarm after `timeoutMs`.
- * - second call to `fire(...args)` within the timeout runs `onConfirm(...args)`
- * and resets.
- *
- * Use for "wandering click could clobber a record" confirmations where a
- * modal is overkill (delete buttons, regenerate-arc, replace-storyboards).
- */
-export function useArmedAction(onConfirm, { timeoutMs = 5000 } = {}) {
- const [armed, setArmed] = useState(false);
- const timerRef = useRef(null);
-
- useEffect(() => () => {
- if (timerRef.current) clearTimeout(timerRef.current);
- }, []);
-
- const fire = useCallback((...args) => {
- if (!armed) {
- setArmed(true);
- if (timerRef.current) clearTimeout(timerRef.current);
- timerRef.current = setTimeout(() => setArmed(false), timeoutMs);
- return;
- }
- if (timerRef.current) clearTimeout(timerRef.current);
- timerRef.current = null;
- setArmed(false);
- onConfirm(...args);
- }, [armed, timeoutMs, onConfirm]);
-
- return [armed, fire];
-}
diff --git a/client/src/hooks/useConfirmDelete.js b/client/src/hooks/useConfirmDelete.js
index aebc2171cc..27285f3bc3 100644
--- a/client/src/hooks/useConfirmDelete.js
+++ b/client/src/hooks/useConfirmDelete.js
@@ -9,8 +9,7 @@ import { useCallback, useState } from 'react';
* and confirming or cancelling clears it. Only one row is ever armed at once,
* so opening a second confirm closes the first.
*
- * Project memory: the user finds the two-click-arm button (useArmedAction)
- * non-discoverable — prefer this hook with an inline confirm row for new
+ * Project memory: prefer this hook with an inline confirm row for new
* destructive list actions.
*
* Returns:
diff --git a/client/src/lib/README.md b/client/src/lib/README.md
index 03b94e65ea..c7f6aec4f7 100644
--- a/client/src/lib/README.md
+++ b/client/src/lib/README.md
@@ -171,7 +171,6 @@ grep -i "what you want to do" client/src/lib/README.md
| `repoUrl.js` | `parseRepoUrl(url)` / `isRepoUrl(url)` / `repoBrowseUrl(parsed)` / `parseGitHubUrl(url)` / `isGitHubRepoUrl(url)` — re-exported from `server/lib/repoUrl.js`, the authoritative repo-URL rule. |
| `healthProvenance.js` | `PROVENANCE_LEVELS` / `getProvenanceLevel(level)` — the `data-backed`/`inferred`/`experimental`/`speculative` trust taxonomy (label, tone, description, "what would change this?" copy) behind the `ProvenanceChip` source-style chips on MeatSpace / genome / death-clock / longevity views. Pure data; the chip component maps tone→color and id→icon. |
| `healthStyle.js` | Shared health status styles and threshold-aware percentage/bar tones for system health views. |
-| `joinInfluenceList.js` | `joinInfluenceList` re-exported from `server/lib/universeVisualStyle.js`. |
| `kanbanColumns.js` | `bucketTickets` / `ticketInColumn` / `columnConfig` / `FALLBACK_COLUMNS` — pure column logic for the Jira Kanban board (`components/KanbanBoard.jsx`). Buckets tickets into resolved workflow columns (by status name, or statusCategory for the fallback board), assigns each column a stable unique `id` (Jira `name` is not unique — same-named columns map to different statuses), appends an orphan column for any unmatched status, and precomputes per-column Tailwind color config (Blocked→red, Review/QA→purple, else by category). |
| `localLlmBackends.js` | `LOCAL_LLM_BACKENDS` (id/label/lucide icon for Ollama + LM Studio) and `localLlmBackendLabel(id)`. The two backends PortOS keeps a model catalog for, shared by the Runtimes view's backend cards and the Model Library's backend picker so a third backend is added in one place. Exported under qualified names because the barrel is flat and `BACKENDS`/`labelFor` are too generic to claim there. |
| `localLlmTargetKey.js` | `localLlmTargetKey({ backend, modelId })` — stable string key for a local-LLM compare target. Shared by the LocalLlmTab checkbox grid and the LocalLlmPlayground compare URL so a delimiter change can't desync the round-trip. |
diff --git a/client/src/lib/index.js b/client/src/lib/index.js
index 446752a039..4d9b752eaa 100644
--- a/client/src/lib/index.js
+++ b/client/src/lib/index.js
@@ -135,7 +135,6 @@ export * from './genUtils.js';
export * from './repoUrl.js';
export * from './healthProvenance.js';
export * from './healthStyle.js';
-export * from './joinInfluenceList.js';
export * from './kanbanColumns.js';
export * from './localLlmBackends.js';
export * from './localLlmTargetKey.js';
diff --git a/client/src/lib/joinInfluenceList.js b/client/src/lib/joinInfluenceList.js
deleted file mode 100644
index 00bdcd0693..0000000000
--- a/client/src/lib/joinInfluenceList.js
+++ /dev/null
@@ -1,6 +0,0 @@
-// Joins a universe's chip-token list (embrace OR avoid) into the
-// comma-separated string the renderer's composeStyledPrompt consumes. A pure
-// leaf re-exported from server/lib/universeVisualStyle.js — see
-// `universeVisualStyleTokens` there, which applies the same per-token
-// trim/filter to a whole universe (#8442).
-export { joinInfluenceList } from '../../../server/lib/universeVisualStyle.js';
diff --git a/server/lib/README.md b/server/lib/README.md
index 7adb056319..e7cbadb7ac 100644
--- a/server/lib/README.md
+++ b/server/lib/README.md
@@ -507,7 +507,6 @@ The barrel `server/lib/index.js` is a machine-checkable enumeration of every pub
| `scheduledTaskTypes.js` | Registered scheduled task names (`SELF_IMPROVEMENT_TASK_TYPES`), shared by schedule configuration and authoritative skill routing; plus the retired-name map (`TASK_TYPE_RENAMES`, `currentTaskTypeName`, `taskExecutionKey`) for tasks and records written before a task rename. |
| `scheduleRunOrder.js` | Storage rules for a task's advisory `suggestedAfter` list — which OTHER scheduled tasks to run first. `normalizeSuggestedAfter` drops blanks, duplicates and self-references and caps at `SUGGESTED_AFTER_MAX`; the shipped order it defaults to is `auditCatalog.AUDIT_SUGGESTED_AFTER`, layered at read time in `getScheduleStatus`. Advisory only — the ENFORCED dependency field is `runAfter`. Pure — no I/O. |
| `taskReadinessReasons.js` | Stable scheduled-task readiness reason codes, membership set, shared by the server and Schedule UI (pure browser-safe leaf). |
-| `taskReadinessSchema.js` | Server-side Zod enum for the scheduled-task readiness wire reason, derived from `taskReadinessReasons.js`. |
| `taskTargetScope.js` | Target scope for a scheduled task type: `INSTALL_WIDE_TASK_TYPES`, `MANAGED_APP_TARGET_TASK_TYPES`, `PROGRAMMATIC_SCHEDULED_TASK_TYPES`, `isProgrammaticScheduledTaskType`, `requiresManagedAppTarget`, `requiresInstallWideTarget`. Declared here (not in `services/taskScheduleRegistry.js`, which re-exports it) so `quotaBurnValidation.js` can reject a burn reference with the wrong target scope without importing upward into services. |
| `taxonomyTally.js` | Generic taxonomy tally + top-N-line render engine shared by the two Layered Intelligence leaf taxonomies (`services/layeredIntelligenceRejections.js`, `layeredIntelligenceExecutionFailures.js`). `createTaxonomyTally({predicate, select, field, vocabulary, sentinel, glossFn, gapWording})` is the single composed seam — it binds a taxonomy config into `{summarize, format}`, where `summarize(records)` yields the three-bucket `{entries, unknown, unclassified, diagnosed, total}` tally (commonest-first + taxonomy-order tie-break) and `format(records, limit)` renders one prompt line naming every non-zero gap. Also exports the two leaf utilities the classifiers use directly: `normalizeToken(value)` (lowercase + separator-collapse for label/category matching) and `formatTaxonomyToken(token, labels)` (gloss-map render, nullish→'', unglossed passthrough). Pure leaf — imports nothing from the LI graph. |
| `appPromptPlaceholders.js` | `applyAppPlaceholders(text, app)` — expand `{appName}` / `{repoPath}` / `{appId}` / `{appSlug}` in a CoS prompt template. The ONE owner of that chain: four renderers (`cosTaskGenerator.js`'s claim-work router and JIRA per-ticket builder, `cosTaskPreStepBlocks.js`'s scheduled builder, `referenceRepos.js`) each used to spell it themselves and drifted. Function-form replacers throughout, since a name/path/id is free text a `$` can appear in. Callers expand their own injected blocks (`{trackerInstructions}`, `{modeInstructions}`) FIRST — those blocks carry app placeholders of their own. Pure. |
diff --git a/server/lib/index.js b/server/lib/index.js
index fdbc5b8841..fdfb5cbe43 100644
--- a/server/lib/index.js
+++ b/server/lib/index.js
@@ -469,7 +469,6 @@ export * from './claimContinuation.js';
export * from './scheduledTaskTypes.js';
export * from './scheduleRunOrder.js';
export * from './taskReadinessReasons.js';
-export * from './taskReadinessSchema.js';
export * from './taskTargetScope.js';
export * from './taxonomyTally.js';
export * from './worktreeOwnership.js';
diff --git a/server/lib/taskReadinessReasons.test.js b/server/lib/taskReadinessReasons.test.js
index e943453298..19cf8e13fc 100644
--- a/server/lib/taskReadinessReasons.test.js
+++ b/server/lib/taskReadinessReasons.test.js
@@ -1,7 +1,6 @@
import { describe, expect, it } from 'vitest';
import { readFileSync } from 'node:fs';
import { TASK_READINESS_REASON, TASK_READINESS_REASONS, TASK_READINESS_REASON_SET } from './taskReadinessReasons.js';
-import { taskReadinessReasonSchema } from './taskReadinessSchema.js';
const service = readFileSync(new URL('../services/taskSchedule.js', import.meta.url), 'utf8');
const readiness = service.split('async function evaluateTaskReadiness(')[1]?.split('\n/**')[0];
@@ -13,7 +12,5 @@ describe('scheduled-task readiness wire reasons', () => {
const emittedKeys = [...readiness.matchAll(/reason:\s*TASK_READINESS_REASON\.([A-Z_]+)/g)].map(match => match[1]);
expect(new Set(emittedKeys)).toEqual(new Set(Object.keys(TASK_READINESS_REASON)));
expect(new Set(TASK_READINESS_REASONS)).toEqual(TASK_READINESS_REASON_SET);
- for (const reason of TASK_READINESS_REASONS) expect(taskReadinessReasonSchema.parse(reason)).toBe(reason);
- expect(taskReadinessReasonSchema.safeParse('future-unknown-reason').success).toBe(false);
});
});
diff --git a/server/lib/taskReadinessSchema.js b/server/lib/taskReadinessSchema.js
deleted file mode 100644
index d65da057f5..0000000000
--- a/server/lib/taskReadinessSchema.js
+++ /dev/null
@@ -1,6 +0,0 @@
-import { z } from 'zod';
-import { TASK_READINESS_REASONS } from './taskReadinessReasons.js';
-
-// Validation for the server's schedule-status wire value. The shared reason
-// leaf stays importable from the browser without an npm dependency.
-export const taskReadinessReasonSchema = z.enum(TASK_READINESS_REASONS);