Skip to content

Rewrite block source imports to match the displayed file tree - #32

Merged
WaylandYang merged 3 commits into
deeplethe:devfrom
Maya-Kid:codex/fix-block-source-imports
Oct 15, 2026
Merged

WaylandYang merged 3 commits into
deeplethe:devfrom
Maya-Kid:codex/fix-block-source-imports

Conversation

@Maya-Kid

@Maya-Kid Maya-Kid commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Why

Copied stock block code imports this site's @/blocks/<name>/... folders even though the code panel shows files at components/..., page.tsx and shared/overview.tsx. sidebar-16 also delivers upstream preview-only iframeHeight and description exports that Next App Router pages reject.

What changes

Rewrite the site-specific block and shared prefixes in the source delivered by each code panel. Remove the two known preview metadata declarations only from delivered page.tsx text. The original preview modules, their metadata exports, displayed paths and rendered examples remain unchanged.

Validation

  • npm run docs, npm run typecheck and npm run build pass. Both themes mount all 389 examples with 0 failures and no page errors.
  • Import the actual Vite-transformed block index: all 12 stock blocks and 62 total delivered files have no remaining @/blocks/ imports. All 203 alias references resolve to delivered local files or existing UI/hook dependencies.
  • Build each of the 12 stock blocks in its own Next 16.4.1 project with the exact delivered sources, recursively supplied UI/hook dependencies, and the repository's installed dependency versions (React 19.2.6, TypeScript 6.0.3, Recharts 3.8.0). All 12 pass webpack, strict TypeScript and prerendering. This includes the copied shared Overview.
  • Both themes verify real code-pane paths and Copy contents. The sidebar-16 copied page omits preview metadata while importing the original Vite module still returns both metadata exports; its preview renders without page errors.
  • No dependency or lockfile changes. All commits carry DCO sign-offs.

The consumer checks use the dependency versions above. A separate probe using Recharts 3.10.1 encountered an existing stock dashboard labelFormatter type incompatibility (new Date(value) with its widened ReactNode label type); that upstream compatibility change is outside this source-delivery fix.

Maya-Kid and others added 3 commits October 15, 2026 18:46
Signed-off-by: Maya Kid <29959320+Maya-Kid@users.noreply.github.com>
Signed-off-by: Maya Kid <29959320+Maya-Kid@users.noreply.github.com>
@WaylandYang
WaylandYang merged commit b685215 into deeplethe:dev Oct 15, 2026
1 check passed
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.

2 participants