Skip to content

fix: baseline typecheck stabilization for ui exports#100

Merged
jscraik merged 1 commit intomainfrom
codex/baseline-typecheck-stabilization
Feb 24, 2026
Merged

fix: baseline typecheck stabilization for ui exports#100
jscraik merged 1 commit intomainfrom
codex/baseline-typecheck-stabilization

Conversation

@jscraik
Copy link
Owner

@jscraik jscraik commented Feb 24, 2026

Summary

  • restore packages/ui public export barrels to canonical integrations/apps-sdk + integrations/figma modules
  • remove broken apps-sdk-wrapper sources and duplicate icon barrel exports that caused missing symbol + duplicate identifier failures
  • fix workspace install blockers (@design-studio/icons -> @design-studio/astudio-icons) and refresh lockfile
  • remove direct @design-studio/runtime / @design-studio/tokens source path aliases from tsconfig.base.json and restore packages/ui/tsconfig.json exclusions to stop cross-project TS6307 failures
  • apply coverage-matrix path/casing/status fixes and regenerate matrix artifacts so policy checks stay green

Validation

  • pnpm install --frozen-lockfile --prod=false
  • pnpm -C packages/ui type-check
  • pnpm -C packages/runtime type-check
  • pnpm -C packages/tokens type-check
  • pnpm ds:matrix:check
  • pnpm lint
  • pnpm format:check
  • pnpm test:policy

Summary by cubic

Stabilizes TypeScript across the UI package by making exports canonical and removing duplicate/broken icon barrels. Replaces the Apps SDK wrapper with direct vendor re-exports and fixes path alias issues so installs, type checks, and policy checks stay green.

  • Bug Fixes

    • Restored canonical export barrels for UI and icons; removed broken sources and duplicate icon barrels to resolve missing symbol/duplicate identifier errors.
    • Removed direct source path aliases and restored tsconfig exclusions to stop cross-project TS6307 issues.
    • Fixed workspace dependency rename in the template package (@design-studio/icons → @design-studio/astudio-icons) and refreshed the lockfile.
    • Coverage matrix: corrected paths/casing/status, added stable component name selection, and regenerated artifacts to keep policy checks passing.
  • Refactors

    • Replaced apps-sdk-wrapper with direct re-exports under integrations/apps-sdk (with a vendor barrel) to reduce API drift and typecheck noise.
    • Added ImageWithFallback for Figma integration with Storybook examples.

Written for commit d647c88. Summary will update on new commits.

@jscraik jscraik added the codex label Feb 24, 2026
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

2 issues found across 21 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="packages/ui/src/integrations/apps-sdk/index.ts">

<violation number="1" location="packages/ui/src/integrations/apps-sdk/index.ts:1">
P2: Duplicate barrel: `integrations/index.ts` contains the exact same 10 exports as this new canonical `apps-sdk/index.ts`. Consider having `integrations/index.ts` re-export from `./apps-sdk` (e.g. `export * from "./apps-sdk"`) to keep a single source of truth and avoid drift when exports are added or removed.</violation>
</file>

<file name="packages/ui/src/integrations/figma/ImageWithFallback/ImageWithFallback.tsx">

<violation number="1" location="packages/ui/src/integrations/figma/ImageWithFallback/ImageWithFallback.tsx:27">
P2: The required `alt` prop is discarded in the error fallback branch, replacing the meaningful accessible label with a generic "Error loading image" string. This undermines the accessibility intent stated in the interface's JSDoc. Consider incorporating the original `alt` so assistive technology users still know what the image was meant to convey.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@@ -0,0 +1,10 @@
export { AppsSDKUIProvider } from "@openai/apps-sdk-ui/components/AppsSDKUIProvider";
Copy link

@cubic-dev-ai cubic-dev-ai bot Feb 24, 2026

Choose a reason for hiding this comment

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

P2: Duplicate barrel: integrations/index.ts contains the exact same 10 exports as this new canonical apps-sdk/index.ts. Consider having integrations/index.ts re-export from ./apps-sdk (e.g. export * from "./apps-sdk") to keep a single source of truth and avoid drift when exports are added or removed.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/ui/src/integrations/apps-sdk/index.ts, line 1:

<comment>Duplicate barrel: `integrations/index.ts` contains the exact same 10 exports as this new canonical `apps-sdk/index.ts`. Consider having `integrations/index.ts` re-export from `./apps-sdk` (e.g. `export * from "./apps-sdk"`) to keep a single source of truth and avoid drift when exports are added or removed.</comment>

<file context>
@@ -0,0 +1,10 @@
+export { AppsSDKUIProvider } from "@openai/apps-sdk-ui/components/AppsSDKUIProvider";
+export { Badge } from "@openai/apps-sdk-ui/components/Badge";
+export { Button } from "@openai/apps-sdk-ui/components/Button";
</file context>
Fix with Cubic

style={style}
>
<div className="flex items-center justify-center w-full h-full">
<img src={ERROR_IMG_SRC} alt="Error loading image" {...rest} data-original-url={src} />
Copy link

@cubic-dev-ai cubic-dev-ai bot Feb 24, 2026

Choose a reason for hiding this comment

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

P2: The required alt prop is discarded in the error fallback branch, replacing the meaningful accessible label with a generic "Error loading image" string. This undermines the accessibility intent stated in the interface's JSDoc. Consider incorporating the original alt so assistive technology users still know what the image was meant to convey.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/ui/src/integrations/figma/ImageWithFallback/ImageWithFallback.tsx, line 27:

<comment>The required `alt` prop is discarded in the error fallback branch, replacing the meaningful accessible label with a generic "Error loading image" string. This undermines the accessibility intent stated in the interface's JSDoc. Consider incorporating the original `alt` so assistive technology users still know what the image was meant to convey.</comment>

<file context>
@@ -0,0 +1,33 @@
+      style={style}
+    >
+      <div className="flex items-center justify-center w-full h-full">
+        <img src={ERROR_IMG_SRC} alt="Error loading image" {...rest} data-original-url={src} />
+      </div>
+    </div>
</file context>
Fix with Cubic

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d647c88790

ℹ️ 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".

}

export function ImageWithFallback(props: ImageWithFallbackProps) {
const [didError, setDidError] = useState(false);

Choose a reason for hiding this comment

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

P2 Badge Reset fallback state when src prop changes

Once didError is set to true, this component always renders the fallback branch and never attempts to load a new image URL, because the error state is not tied to src. In views where src can change (e.g., list virtualization, carousels, or async retries), a single transient failure permanently locks the instance to the error placeholder even after a valid URL is provided.

Useful? React with 👍 / 👎.

@jscraik jscraik merged commit fea1059 into main Feb 24, 2026
9 of 10 checks passed
@jscraik jscraik deleted the codex/baseline-typecheck-stabilization branch February 24, 2026 17:12
@argos-ci
Copy link

argos-ci bot commented Feb 24, 2026

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) 🔵 Orphan build 49 failures Feb 24, 2026, 5:23 PM

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant