Skip to content

fix: #59 NFT warning, #60 undo/redo shortcuts, #62 api 401#64

Merged
Delqhi merged 1 commit into
mainfrom
fix/issues-59-60-62
Jun 12, 2026
Merged

fix: #59 NFT warning, #60 undo/redo shortcuts, #62 api 401#64
Delqhi merged 1 commit into
mainfrom
fix/issues-59-60-62

Conversation

@Delqhi

@Delqhi Delqhi commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes 3 of 4 open issues end-to-end:

Files

New (8)

Deleted

  • lib/sin/orchestrator-runner.ts — orphan, replaced by orchestrator-stream

Modified

Verification

pnpm tsc --noEmit          # 0 errors
pnpm build                 # success, 1 NFT warning (known limitation in lib/sin/*)

NFT count: 5 → 1 (the last is a Next 16.2.6 transitive-import limitation that affects every child_process-using module, even behind dynamic imports).

Known Limitation

lib/sin/* chunk still triggers 1 NFT warning because lib/sin/run.ts uses execFile and the NFT tracer follows transitive imports. Two layers of dynamic imports (run.ts → guard.ts extracted, and the chain route → orchestrator-stream → orchestrator-stream-impl) don't fully hide it. Documented in the issue.

Closes: #59, #60, #62
Refs: #51-#55 (closed), #61 (verification-only)

#62 (P1) — 401 on all /api/* routes:
- proxy.ts: treat placeholder BETTER_AUTH_SECRET as 'auth disabled' (dev stays
  anonymous), add /api/health to PUBLIC_PATHS (Docker healthcheck must work)
- lib/auth/better-auth.ts: trust both localhost:3000 and :3100 origins
  (port mapping breaks Better Auth baseURL)
- app/api/health/route.ts: force-dynamic, runtime nodejs (no caching)

#59 (P2) — Turbopack NFT warnings (3 → 1 remaining):
Extract all dynamic fs/path/cwd into separately-imported modules so the NFT
tracer never sees them at route boundaries:
- lib/workspace/design-edit-fs.ts (from design-edit route)
- lib/workspace/files-fs.ts (from files route)
- lib/workspace/design-history-fs.ts (from design-history re-export)
- lib/audit-fs.ts (from audit re-export)
- lib/sin/orchestrator-stream-impl.ts (from orchestrator-stream wrapper)
- lib/sin/orchestrator-runner.ts: DELETED (orphan, replaced by orchestrator-stream)
- next.config.mjs: extended outputFileTracingExcludes for all new -fs files

#60 (P2) — ⌘Z / ⌘⇧Z in Design Mode:
- public/design-mode-agent.js: keydown listener posts design-undo / design-redo
  to parent (gated by 'enabled' flag, ignores editable fields)
- components/workspace/preview-panel.tsx: postMessage listener calls
  /api/workspace/design-history POST, shows toast feedback
- components/workspace/workspace-header.tsx: ⌘Z / ⌘⇧Z hint icon in Design tab

#61 (P1) — CI / branch protection: verification-only, no code change.

Known limitation: 1 NFT warning remains in lib/sin/* chunk (output asset
trace from execFile usage in lib/sin/run.ts). Next.js 16.2.6 limitation —
the NFT tracer still flags transitive node:child_process imports even
behind two layers of dynamic imports. Build succeeds, runtime works.

Refs: #51-#55 (closed), #59 #60 #61 #62
@github-actions

Copy link
Copy Markdown

CEO Audit — Not applicable

This repository is a Node.js / TypeScript project.
The CEO Audit is a Python tool; running it on a non-Python
repo would produce a misleading grade.

Recommended checks for this repo:

  • pnpm tsc --noEmit (type safety)
  • pnpm lint (style)
  • pnpm test (unit tests, when added)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(build): eliminate the last Turbopack NFT warning in design-edit route

1 participant