Skip to content

fix(module): keep app config ui optional when augmenting nuxt/schema - #6793

Open
lazerg wants to merge 1 commit into
nuxt:v4from
lazerg:fix/6791-app-config-input-optional
Open

fix(module): keep app config ui optional when augmenting nuxt/schema#6793
lazerg wants to merge 1 commit into
nuxt:v4from
lazerg:fix/6791-app-config-input-optional

Conversation

@lazerg

@lazerg lazerg commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

🔗 Linked issue

Resolves #6791

❓ Type of change

  • 🐞 Bug fix (a non-breaking change that fixes an issue)

📚 Description

Adding a .d.ts that augments nuxt/schema with an AppConfigInput interface makes the ui key in app.config.ts required instead of optional.

nuxt/schema re-exports @nuxt/schema and bridges CustomAppConfig back into its own module identity, but not AppConfigInput. Once a user declares AppConfigInput on nuxt/schema, our optional ui? override (declared on @nuxt/schema) no longer reaches that surface, and the required ui inherited from CustomAppConfig shows through instead. Augmenting nuxt/schema too keeps ui optional on the surface defineAppConfig reads.

📝 Checklist

  • I have linked an issue or discussion.

@lazerg
lazerg requested a review from benjamincanac as a code owner August 3, 2026 08:22
@github-actions github-actions Bot added the v4 #4488 label Aug 3, 2026
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 762fc986-e2de-4589-b981-4452fc8c0ba3

📥 Commits

Reviewing files that changed from the base of the PR and between a592f8e and 6b19ade.

📒 Files selected for processing (1)
  • src/templates.ts

📝 Walkthrough

Walkthrough

The generated types/ui.d.ts template now augments nuxt/schema. The augmentation declares an optional AppConfigInput.ui property typed as AppConfigUI.

Estimated code review effort: 2 (Simple) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the fix that keeps the app config ui property optional during nuxt/schema augmentation.
Description check ✅ Passed The description explains the type regression, the cause, and the augmentation-based fix.
Linked Issues check ✅ Passed The change directly addresses issue #6791 by preserving an optional ui property on the nuxt/schema surface.
Out of Scope Changes check ✅ Passed The change is limited to the declaration template required to fix the linked issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codspeed-hq

codspeed-hq Bot commented Aug 3, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing lazerg:fix/6791-app-config-input-optional (6b19ade) with v4 (a592f8e)

Open in CodSpeed

@pkg-pr-new

pkg-pr-new Bot commented Aug 3, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/@nuxt/ui@6793

commit: 6b19ade

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

Labels

v4 #4488

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Declaring module 'nuxt/schema' makes 'ui' property required instead of optional

1 participant