diff --git a/.beads/issues.jsonl b/.beads/issues.jsonl index 8653c73..272fd30 100644 --- a/.beads/issues.jsonl +++ b/.beads/issues.jsonl @@ -16,6 +16,7 @@ {"_type":"issue","id":"islandflow-ayo","title":"Drop stale backlog events from live fanout","description":"Follow-up to live freshness rollout: /ws/live was still fanning out stale backlog events for freshness-gated channels, which kept tape panes in Live feed behind despite active synthetic ingest. Gate fanout and cache ingest by freshness for options/nbbo/equities/flow.","status":"closed","priority":1,"issue_type":"bug","assignee":"dirtydishes","owner":"dishes@dpdrm.com","created_at":"2026-04-28T21:26:39Z","created_by":"dirtydishes","updated_at":"2026-04-28T21:26:44Z","started_at":"2026-04-28T21:26:44Z","closed_at":"2026-04-28T21:26:44Z","close_reason":"Completed","dependency_count":0,"dependent_count":0,"comment_count":0} {"_type":"issue","id":"islandflow-0v6","title":"Fix tape freshness, NBBO coverage, pause controls, and filter popup","description":"Implement the tape fixes requested for synthetic options notional sizing, strict live freshness, live-mode pause/resume behavior, stronger NBBO snapshot coverage, and moving flow filters behind a popup. Includes server-side live cache changes, web terminal state/UI changes, and tests for synthetic pricing, live snapshot freshness/NBBO retention, and live pause/filter interactions.","status":"closed","priority":1,"issue_type":"task","assignee":"dirtydishes","owner":"dishes@dpdrm.com","created_at":"2026-04-28T21:02:52Z","created_by":"dirtydishes","updated_at":"2026-04-28T21:13:38Z","started_at":"2026-04-28T21:02:57Z","closed_at":"2026-04-28T21:13:38Z","close_reason":"Completed","dependency_count":0,"dependent_count":0,"comment_count":0} {"_type":"issue","id":"islandflow-e4r","title":"Implement smart-money flow filtering and synthetic firehose modes","description":"Implement the approved multi-surface plan for named synthetic market profiles, options raw-vs-signal filtering, live/API filter contracts, Tape page client-side flow filters, firehose-readiness improvements, tests, and README updates.","status":"closed","priority":1,"issue_type":"feature","assignee":"dirtydishes","owner":"dishes@dpdrm.com","created_at":"2026-04-28T20:10:49Z","created_by":"dirtydishes","updated_at":"2026-04-28T20:29:29Z","started_at":"2026-04-28T20:10:53Z","closed_at":"2026-04-28T20:29:29Z","close_reason":"Implemented synthetic market profiles, options signal-path filtering, signal-aware API/replay contracts, Tape page filters, tests, and README updates. Follow-up tracked in islandflow-biq.","dependency_count":0,"dependent_count":0,"comment_count":0} +{"_type":"issue","id":"islandflow-64s","title":"Fix desktop startup failure from @islandflow/types ESM imports","description":"Electron desktop startup fails with ERR_MODULE_NOT_FOUND because @islandflow/types exports TypeScript source and internal relative imports lacked .ts extensions under Node/Electron ESM resolution. Update type package internal imports and desktop tsconfig so desktop build and runtime can resolve modules consistently.","status":"closed","priority":2,"issue_type":"bug","assignee":"dirtydishes","owner":"dishes@dpdrm.com","created_at":"2026-05-20T22:26:45Z","created_by":"dirtydishes","updated_at":"2026-05-20T22:28:05Z","started_at":"2026-05-20T22:26:50Z","closed_at":"2026-05-20T22:28:05Z","close_reason":"Closed","dependency_count":0,"dependent_count":0,"comment_count":0} {"_type":"issue","id":"islandflow-6tn","title":"Add Codex desktop login and usage bridge","description":"Implement a desktop-only Codex integration for the Islandflow Electron app using the official codex app-server with managed ChatGPT login, native IPC, settings UI, usage tracking, and clean web degradation.","status":"closed","priority":2,"issue_type":"feature","assignee":"dirtydishes","owner":"dishes@dpdrm.com","created_at":"2026-05-20T14:01:36Z","created_by":"dirtydishes","updated_at":"2026-05-20T14:40:49Z","started_at":"2026-05-20T14:01:48Z","closed_at":"2026-05-20T14:40:49Z","close_reason":"Closed","dependency_count":0,"dependent_count":0,"comment_count":0} {"_type":"issue","id":"islandflow-laq","title":"fix native alpaca news deploy and auth","description":"Why this issue exists and what needs to be done:\\n\\nNative Islandflow rollout is incomplete because services/ingest-news is not healthy on the VPS. The checked-in native user units and helper scripts do not fully include ingest-news, and the current service uses bearer-style auth that returns 401 against Alpaca news endpoints.\\n\\nThis task should verify the current Alpaca news auth requirements against official docs, update the repo code and native deployment assets as needed, install and enable the missing VPS unit, verify news events flow end-to-end, and document the work.","status":"closed","priority":2,"issue_type":"bug","assignee":"dirtydishes","owner":"dishes@dpdrm.com","created_at":"2026-05-19T23:47:07Z","created_by":"dirtydishes","updated_at":"2026-05-20T00:05:20Z","started_at":"2026-05-19T23:47:12Z","closed_at":"2026-05-20T00:05:20Z","close_reason":"Closed","dependency_count":0,"dependent_count":0,"comment_count":0} {"_type":"issue","id":"islandflow-fmg","title":"Fix native deploy SSH path and verification cwd assumptions","description":"Native deploys over SSH assumed bun was already on PATH and that remote verification would run from the repository root. On the live VPS, non-login SSH shells omitted /home/delta/.bun/bin and remote native verification could not find deployment/native/check-native-infra.sh because it ran from the home directory. Update the deploy helper to prepend /Users/kell/.bun/bin when present and cd into the repo before native verification checks run.","status":"closed","priority":2,"issue_type":"bug","owner":"dishes@dpdrm.com","created_at":"2026-05-19T23:38:32Z","created_by":"dirtydishes","updated_at":"2026-05-19T23:40:33Z","closed_at":"2026-05-19T23:40:33Z","close_reason":"Updated native SSH deploy flow to prepend Bun's home install path when present and run native verification from the repo root before health scripts.","dependency_count":0,"dependent_count":0,"comment_count":0} diff --git a/apps/desktop/tsconfig.json b/apps/desktop/tsconfig.json index de3fb15..3d8ca72 100644 --- a/apps/desktop/tsconfig.json +++ b/apps/desktop/tsconfig.json @@ -9,6 +9,8 @@ "rootDir": "src", "outDir": "dist", "noEmit": false, + "allowImportingTsExtensions": true, + "rewriteRelativeImportExtensions": true, "sourceMap": true, "declaration": false }, diff --git a/docs/turns/2026-05-20-fix-desktop-types-esm-imports.html b/docs/turns/2026-05-20-fix-desktop-types-esm-imports.html new file mode 100644 index 0000000..1439e4e --- /dev/null +++ b/docs/turns/2026-05-20-fix-desktop-types-esm-imports.html @@ -0,0 +1,148 @@ + + + + + + Turn Doc - Fix desktop types ESM imports + + + +
+
+

Desktop ESM Import Resolution Fix

+

Created: 2026-05-20 18:30 EDT ยท Branch: lavender/codex-login-management-electron

+ +

Summary

+

Fixed a desktop startup crash where Electron failed to load @islandflow/types with ERR_MODULE_NOT_FOUND for packages/types/src/events. The types package now uses explicit .ts relative imports, and desktop TypeScript build settings were updated to permit and rewrite those imports during emit.

+ +

Changes Made

+ + +

Context

+

The desktop app launches via Electron (Node ESM behavior), while much of this monorepo is typically run through Bun. Bun accepts extensionless TypeScript relative imports that Node ESM does not. Since @islandflow/types exports source TS (./src/index.ts), Electron loaded those sources directly and failed on extensionless sibling imports.

+ +

Important Implementation Details

+ + +

Relevant Diff Snippets

+

Unified patch snippets below are diffs.com-compatible patch text format.

+
diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts
+-export * from "./events";
++export * from "./events.ts";
+-export * from "./live";
++export * from "./live.ts";
+
+...
+
+diff --git a/apps/desktop/tsconfig.json b/apps/desktop/tsconfig.json
+ "noEmit": false,
++"allowImportingTsExtensions": true,
++"rewriteRelativeImportExtensions": true,
+ "sourceMap": true,
+ +

Expected Impact for End-Users

+

Desktop developers can run bun run dev:desktop without the startup crash. This unblocks local desktop testing and feature work without requiring manual runtime flags or ad hoc environment tweaks.

+ +

Validation

+ + +

Issues, Limitations, and Mitigations

+ + +

Follow-up Work

+ + +

Beads issue: islandflow-64s.

+
+
+ + diff --git a/packages/types/src/desktop-ai.ts b/packages/types/src/desktop-ai.ts index c3e8e9a..ecec773 100644 --- a/packages/types/src/desktop-ai.ts +++ b/packages/types/src/desktop-ai.ts @@ -5,8 +5,8 @@ import { FlowPacketSchema, OptionPrintSchema, SmartMoneyEventSchema -} from "./events"; -import { OptionFlowFiltersSchema } from "./options-flow"; +} from "./events.ts"; +import { OptionFlowFiltersSchema } from "./options-flow.ts"; export const IslandflowAiReasoningEffortSchema = z.enum([ "none", diff --git a/packages/types/src/events.ts b/packages/types/src/events.ts index 0556bd8..b61e88e 100644 --- a/packages/types/src/events.ts +++ b/packages/types/src/events.ts @@ -1,5 +1,5 @@ import { z } from "zod"; -import { OptionNbboSideSchema, OptionTypeSchema, OptionsSignalModeSchema } from "./options-flow"; +import { OptionNbboSideSchema, OptionTypeSchema, OptionsSignalModeSchema } from "./options-flow.ts"; export const EventMetaSchema = z.object({ source_ts: z.number().int().nonnegative(), diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index 2e01011..22b60bc 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -1,6 +1,6 @@ -export * from "./events"; -export * from "./live"; -export * from "./options-flow"; -export * from "./sp500"; -export * from "./synthetic-market"; -export * from "./desktop-ai"; +export * from "./events.ts"; +export * from "./live.ts"; +export * from "./options-flow.ts"; +export * from "./sp500.ts"; +export * from "./synthetic-market.ts"; +export * from "./desktop-ai.ts"; diff --git a/packages/types/src/live.ts b/packages/types/src/live.ts index 10ac486..9b60c34 100644 --- a/packages/types/src/live.ts +++ b/packages/types/src/live.ts @@ -12,11 +12,11 @@ import { OptionNBBOSchema, OptionPrintSchema, SmartMoneyEventSchema -} from "./events"; +} from "./events.ts"; import { OptionFlowFiltersSchema, optionFlowFilterKey -} from "./options-flow"; +} from "./options-flow.ts"; export const CursorSchema = z.object({ ts: z.number().int().nonnegative(), diff --git a/packages/types/src/options-flow.ts b/packages/types/src/options-flow.ts index 75dd581..0530ffd 100644 --- a/packages/types/src/options-flow.ts +++ b/packages/types/src/options-flow.ts @@ -1,5 +1,5 @@ import { z } from "zod"; -import type { FlowPacket, OptionNBBO, OptionPrint } from "./events"; +import type { FlowPacket, OptionNBBO, OptionPrint } from "./events.ts"; export const SyntheticMarketModeSchema = z.enum(["realistic", "active", "firehose"]); export type SyntheticMarketMode = z.infer; diff --git a/packages/types/src/synthetic-market.ts b/packages/types/src/synthetic-market.ts index ea30c86..c46036b 100644 --- a/packages/types/src/synthetic-market.ts +++ b/packages/types/src/synthetic-market.ts @@ -1,7 +1,7 @@ import { z } from "zod"; -import type { SmartMoneyProfileId } from "./events"; -import type { SyntheticMarketMode } from "./options-flow"; -import { SP500_SYMBOLS } from "./sp500"; +import type { SmartMoneyProfileId } from "./events.ts"; +import type { SyntheticMarketMode } from "./options-flow.ts"; +import { SP500_SYMBOLS } from "./sp500.ts"; const SYNTHETIC_PROFILE_WEIGHT_VALUES = [0.6, 1.0, 1.6] as const; const SYNTHETIC_COVERAGE_WINDOW_VALUES = [10, 20, 30] as const;