Skip to content

fix: TanStack apps get no Next.js views from make:resource - #17

Merged
fadymondy merged 3 commits into
mainfrom
fix/shorts-bugs
Oct 13, 2026
Merged

fadymondy merged 3 commits into
mainfrom
fix/shorts-bugs

Conversation

@fadymondy

@fadymondy fadymondy commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

A bug from the v0.2.33 shorts recording: make:resource writes a Next.js page into a TanStack app.

  • New generator.TanStackFrontend detects the TanStack/Vite frontend (web/src/router.tsx or web/vite.config.ts).
  • In a TanStack app:
    • make:resource drops the view layer (web/app/<table>/page.tsx, swr hooks and API client under web/lib) and prints page: /admin/<table>, which the generic admin renders.
    • make:view and make:page skip with an info line.
  • Next.js apps are unchanged.
  • Tests: TestMakeResourceViewsFollowFrontend (tanstack + nextjs) and TestTanStackFrontend.
  • Checked on a fresh togo new --frontend tanstack app: no web/app or web/lib, and the REST handler is still generated.

The npm install mechanism is deliberately left unchanged (decision 8cc7eb28).

@fadymondy fadymondy changed the title fix: TanStack apps get no Next.js views; npm shim installs when postinstall is skipped fix: TanStack apps get no Next.js views from make:resource Oct 13, 2026
…nstall is skipped

- make:resource wrote web/app/<table>/page.tsx and swr hooks under web/lib into TanStack Router apps, which render resources through the generic /admin/<table> route. When the web app is TanStack (src/router.tsx or vite.config.ts), make:resource skips the view layer and points at /admin/<table>; make:view and make:page say so instead of writing files. Next.js apps are unchanged.
- The npm shim downloads the binary on first run when the postinstall never ran (npm --ignore-scripts or an allow-scripts gate that blocks), instead of exiting with "binary not found".
@fadymondy
fadymondy merged commit 419a1f8 into main Oct 13, 2026
3 checks 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.

1 participant