Skip to content

feat: use assets ambient types from app-builder#7

Merged
vladimir-kuba merged 1 commit into
mainfrom
vladimir-kuba/use-ambient-types
Jul 15, 2026
Merged

feat: use assets ambient types from app-builder#7
vladimir-kuba merged 1 commit into
mainfrom
vladimir-kuba/use-ambient-types

Conversation

@vladimir-kuba

@vladimir-kuba vladimir-kuba commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Updated app-builder version
Dropped assets type definitions from templates
Added app-builder ui ambient types in typescript template

Refs: gravity-ui/app-builder#333

Summary by Sourcery

Update app-builder integration to rely on ambient UI types from the app-builder package instead of locally generated asset type declarations.

New Features:

  • Enable TypeScript UI projects to consume ambient types from '@gravity-ui/app-builder/ui' via tsconfig configuration.

Enhancements:

  • Remove template-generated assets type definitions and related generator logic now superseded by app-builder ambient types.

Build:

  • Bump '@gravity-ui/app-builder' dev dependency to version '^0.49.0' and adjust generator tests accordingly.

Documentation:

  • Update README and Handlebars README template to reflect the removal of the 'types/assets.d.ts' file from the generated project layout.

Tests:

  • Extend TypeScript generator tests to validate inclusion of '@gravity-ui/app-builder/ui' in compilerOptions.types.

Updated app-builder version
Dropped assets type definitions from templates
Added app-builder ui ambient types in typescript template

Refs: gravity-ui/app-builder#333
@vladimir-kuba vladimir-kuba requested a review from ogonkov as a code owner July 15, 2026 07:32
@sourcery-ai

sourcery-ai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates the app-builder integration to use ambient UI asset types provided by @gravity-ui/app-builder instead of template-defined asset typings, and bumps the app-builder dev dependency accordingly.

File-Level Changes

Change Details Files
Stop generating local assets TypeScript definitions and rely on app-builder-provided ambient UI types.
  • Removed import and usage of the assets.d.ts template in the appBuilder generator.
  • Deleted the assets.d-ts Handlebars template file from src/ui/types.
  • Ensured React TS projects no longer write src/ui/types/assets.d.ts during generation.
src/generators/appBuilder.ts
src/generators/templates/src/ui/types/assets.d-ts.hbs
Update TypeScript UI tsconfig to consume the app-builder UI ambient types.
  • Extended tsconfig.json compilerOptions for the UI project to include types: ['@gravity-ui/app-builder/ui'].
  • Added a test assertion verifying the types array in the generated UI tsconfig.
src/generators/typescript.ts
src/generators/typescript.test.ts
Bump @gravity-ui/app-builder dev dependency to the version that supplies the new ambient types and adjust tests and docs.
  • Updated the app-builder devDependency version from ^0.48.0 to ^0.49.0 in the generator.
  • Adjusted appBuilder generator tests to assert the new devDependency version.
  • Updated README and readme template file tree to remove the types/assets.d.ts entry now that it is no longer generated.
src/generators/appBuilder.ts
src/generators/appBuilder.test.ts
README.md
scripts/readme/readme.hbs

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • The app-builder version string is duplicated between the generator and tests; consider centralizing it in a single constant to avoid having to update multiple locations on version bumps.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The app-builder version string is duplicated between the generator and tests; consider centralizing it in a single constant to avoid having to update multiple locations on version bumps.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@ogonkov ogonkov changed the title feat: assets ambient types from app-builder feat: use assets ambient types from app-builder Jul 15, 2026
@vladimir-kuba vladimir-kuba merged commit 0b60c10 into main Jul 15, 2026
12 checks passed
@vladimir-kuba vladimir-kuba deleted the vladimir-kuba/use-ambient-types branch July 15, 2026 13:09
@gravity-ui gravity-ui Bot mentioned this pull request Jul 15, 2026
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