fix(cli): make docs-agent template TypeScript clean - #3074
Merged
Merged
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 26c240b414
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The docs-agent app router routes are imported directly by the Deno runtime before any bundler can rewrite relative specifiers, so their shared store import must include the .ts extension. The template TypeScript config now declares the no-emit extension-import contract that keeps consumer type checking compatible with that Deno-first runtime requirement. Constraint: App-router route modules are loaded through native Deno import(file://...) at request time Rejected: Keep extensionless route imports | breaks Deno-native route loading before bundling Rejected: Remove the route import regression | would leave the runtime boundary untested Confidence: high Scope-risk: narrow Directive: Do not remove .ts from docs-agent route-local imports without testing native Deno route imports Tested: deno test --no-check --allow-all cli/templates/index.test.ts Tested: deno run -A scripts/build/generate-templates-manifest.ts --check Tested: deno fmt --check cli/templates/index.test.ts cli/templates/files/docs-agent/app/api/ag-ui/route.ts cli/templates/files/docs-agent/app/api/ingest/route.ts cli/templates/files/docs-agent/app/api/uploads/route.ts cli/templates/files/docs-agent/tsconfig.json cli/templates/manifest.json Tested: deno lint cli/templates/index.test.ts cli/templates/files/docs-agent/app/api/ag-ui/route.ts cli/templates/files/docs-agent/app/api/ingest/route.ts cli/templates/files/docs-agent/app/api/uploads/route.ts Tested: deno check cli/templates/index.test.ts Not-tested: Full repository test suite
kwakayama
enabled auto-merge
July 24, 2026 18:29
kojiwakayama
previously approved these changes
Jul 24, 2026
…template-typescript
The current main branch already published v0.1.1127, so the docs-agent scaffold fix needs the next unused package version for the release workflow to publish consumable artifacts.\n\nConstraint: Framework releases require deno.json and the shared version constant to stay synchronized.\n\nTested: deno test --allow-read src/utils/version.test.ts\nTested: deno test --no-check --allow-all cli/templates/index.test.ts\nTested: template manifest, format, check, and diff validation
kojiwakayama
approved these changes
Jul 24, 2026
kojiwakayama
added a commit
that referenced
this pull request
Aug 11, 2026
An untouched scaffold failed its own type check on a framework-authored
line. `app/layout.tsx` opens with `import "../globals.css";`, and the
scaffold shipped no ambient declaration for `*.css`, so the first
`tsc --noEmit` a developer runs on a brand-new project is red:
app/layout.tsx(1,8): error TS2882: Cannot find module or type
declarations for side-effect import of '../globals.css'.
`docs-agent` already carried `globals.d.ts` from #3074; the other five
styled starters (ai-agent, agentic-workflow, coding-agent,
multi-agent-system, saas-starter) never got it. Ship the same one-line
declaration with each of them and regenerate the template manifest.
The regression lives in cli/templates/index.test.ts because that is where
the scaffolded file set is asserted, and it reads through `getTemplate`
rather than off disk: a declaration that exists in `files/` but never
reaches manifest.json leaves the developer with the same red compiler.
It discovers the starters that import a stylesheet instead of listing
them, so a starter that adopts one later is covered too.
Found on a DX dogfood walk of the create-project quickstart.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why the tsconfig change is required
The app router imports API route modules directly through native Deno before bundling. Those route modules therefore need explicit .ts specifiers for their shared store import. TypeScript accepts those specifiers only when allowImportingTsExtensions is enabled, and that option requires a no-emit type-checking contract. The template now declares both allowImportingTsExtensions and noEmit instead of breaking Deno route loading.
The generated globals.d.ts is independently required so strict TypeScript accepts the layout side-effect import of globals.css.
Reproduction
The published docs-agent template produced three TS5097 errors for route-local .ts imports, TS2882 for globals.css, and TS7006 for the Tabs callback when running tsc --noEmit. The framework build could still pass because it did not exercise the standalone consumer TypeScript contract.
Verification
Release
0.1.1127 is already published. This PR synchronizes deno.json and src/utils/version-constant.ts at the next unused version, 0.1.1128.