Repository navigation
Conversation
Use @usemarble/sdk with a public read key instead of the deprecated workspace-ID API routes. Drop the copied response types and the unused tag, category and author queries, load every posts page, and guard nullable cover and author images.
|
@taqh is attempting to deploy a commit to the Analog Interface Team on Vercel. A member of the Team first needs to authorize it. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
2 issues found across 11 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/web/src/app/(marketing)/blog/[slug]/page.tsx">
<violation number="1" location="apps/web/src/app/(marketing)/blog/[slug]/page.tsx:40">
P2: When `coverImage` is missing, `images: undefined` drops the Analog default share image. The page's `openGraph` and `twitter` objects replace the root layout's, so the post emits no og:image or twitter:image. Fall back to the layout's `ogImage` in both blocks.</violation>
</file>
<file name="apps/web/src/app/(marketing)/blog/page.tsx">
<violation number="1" location="apps/web/src/app/(marketing)/blog/page.tsx:109">
P3: This map can show a later author’s avatar next to the first author’s name when the first author has no image. Preserve the author slot with a fallback, or only render avatars that remain correctly associated with the displayed author.</violation>
</file>
Reply to a comment to ask cubic a question or push back. It learns from your replies.
View guided diff | Re-trigger cubic
| alt: data.post.title, | ||
| }, | ||
| ], | ||
| images: post.coverImage ? [post.coverImage] : undefined, |
There was a problem hiding this comment.
P2: When coverImage is missing, images: undefined drops the Analog default share image. The page's openGraph and twitter objects replace the root layout's, so the post emits no og:image or twitter:image. Fall back to the layout's ogImage in both blocks.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At apps/web/src/app/(marketing)/blog/[slug]/page.tsx, line 40:
<comment>When `coverImage` is missing, `images: undefined` drops the Analog default share image. The page's `openGraph` and `twitter` objects replace the root layout's, so the post emits no og:image or twitter:image. Fall back to the layout's `ogImage` in both blocks.</comment>
<file context>
@@ -29,44 +28,24 @@ export async function generateMetadata({
- alt: data.post.title,
- },
- ],
+ images: post.coverImage ? [post.coverImage] : undefined,
},
openGraph: {
</file context>
| {post.authors | ||
| .slice(0, 2) | ||
| .map((author) => | ||
| author.image ? ( |
There was a problem hiding this comment.
P3: This map can show a later author’s avatar next to the first author’s name when the first author has no image. Preserve the author slot with a fallback, or only render avatars that remain correctly associated with the displayed author.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At apps/web/src/app/(marketing)/blog/page.tsx, line 109:
<comment>This map can show a later author’s avatar next to the first author’s name when the first author has no image. Preserve the author slot with a fallback, or only render avatars that remain correctly associated with the displayed author.</comment>
<file context>
@@ -106,16 +103,20 @@ export default async function BlogPage() {
+ {post.authors
+ .slice(0, 2)
+ .map((author) =>
+ author.image ? (
+ <Image
+ key={author.id}
</file context>
| author.image ? ( | |
| author.image && author.id === post.authors[0]?.id ? ( |
Description
Use
@usemarble/sdkfor the blog instead of the deprecated workspace-ID API routes. The SDK returns typed posts with realDatevalues, so the copied response types and the unused tag, category and author queries are removed (net −146 lines). Every page of posts is now loaded, and missing cover or author images no longer break rendering.MARBLE_WORKSPACE_KEYandMARBLE_API_URLare replaced by an optionalMARBLE_API_KEY(a public key with read access). With no key the blog shows "No blog posts found", as before. An unknown slug returns a 404. Other API errors still surface.The unused attribution block is removed because the Marble API has no attribution field.
Type of Change
Related Areas
Testing
bun run type-check,bun run lintandformat:checkpass. A production build served blog, post, sitemap and 404 routes correctly with both empty and populated (two-page) API fixtures. I had no live key, so no real API call was made. Browser screenshots were unavailable.Checklist
By submitting, I confirm I understand and stand behind this code. If AI was used, I’ve reviewed and verified everything myself.
Summary by cubic
Migrates the blog to
@usemarble/sdk, replacing the deprecated workspace-ID API routes.MARBLE_WORKSPACE_KEYandMARBLE_API_URLare replaced by an optionalMARBLE_API_KEY; with no key the blog shows "No blog posts found", as before, and unknown slugs return a 404.Datevalues replace the copied response types, and the unused tag, category, and author queries are removed (net −146 lines).Written for commit ab332dd. Summary will update on new commits.