Skip to content

Fix TypeScript build error for blog frontmatter fields - #37

Merged
huangyiirene merged 2 commits into
copilot/fix-homepage-font-colorfrom
copilot/fix-error-in-workflow-step
Jan 20, 2026
Merged

Fix TypeScript build error for blog frontmatter fields#37
huangyiirene merged 2 commits into
copilot/fix-homepage-font-colorfrom
copilot/fix-error-in-workflow-step

Conversation

CopilotAI commented Jan 20, 2026

Copy link
Copy Markdown
Contributor

The CI build was failing because blog posts used custom frontmatter fields (date, author, tags) that weren't typed in the fumadocs-mdx schema. Type casts (as any) masked this until TypeScript compilation.

Changes

source.config.ts

  • Configure blog schema via docs.schema property with extended frontmatter
  • Use z.coerce.string() for date field to handle YAML's auto-parsing to Date objects

source.ts

  • Remove as any casts to enable type inference

page.tsx

  • Add BlogPostData interface and type assertions for custom fields
  • Preserve original page.data.body access for MDX component
// Before: unsafe cast hid the missing schemaexportconstblog=defineDocs({dir: '../../content/blog',})asany;// After: explicit schema configurationconstblogSchema=frontmatterSchema.extend({date: z.coerce.string().optional(),author: z.string().optional(),tags: z.array(z.string()).optional(),});exportconstblog=defineDocs({dir: '../../content/blog',docs: {schema: blogSchema},});
Original prompt

引用: https://github.com/objectstack-ai/spec/actions/runs/21161689880/job/60857524435#step:8:1


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@vercel

vercelBot commented Jan 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentReviewUpdated (UTC)
specReadyReadyPreview, CommentJan 20, 2026 7:28am

Request Review

- Remove `as any` type casts from source.config.ts and source.ts
- Properly configure fumadocs-mdx blog schema with extended frontmatter fields
- Use z.coerce.string() for date field to handle YAML Date objects
- Add BlogPostData interface and type assertions in blog page component
- Build now passes successfully
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
CopilotAI changed the title [WIP] Fix error in workflow step executionFix TypeScript build error for blog frontmatter fieldsJan 20, 2026
CopilotAI requested a review from hotlongJanuary 20, 2026 07:31
@github-actionsgithub-actionsBot added documentation Improvements or additions to documentation size/m labels Jan 20, 2026
@huangyiirene
huangyiirene marked this pull request as ready for review January 20, 2026 07:54
@huangyiirene
huangyiirene merged commit 526ccb0 into copilot/fix-homepage-font-colorJan 20, 2026
5 checks passed
xuyushun441-sys pushed a commit that referenced this pull request May 25, 2026
Adds entries 26-40 covering the gaps that make the helpdesk template
'pretty but not daily-usable' from an end-user perspective:
P0 additions:
- #26 No inline message composer on detail pages
- #27 No external-user portal mechanism
- #28 Attachment/file-list field UI not E2E
P1 additions:
- #29 No 'changed since last visit' indicator
- #30 Bulk operations UI unverified (escalates #17)
- #31 Rich-text editor scoped to comments only
- #32 No first-class canned response / macro
- #33 No collaboration presence indicators
- #34 No keyboard-shortcut API
- #35 No conditional SLA timer (pause on waiting_customer)
- #36 Formula fields can't reference foreign object fields
P2 additions:
- #37 No chart drill-down
- #38 No period-over-period analytics primitive
- #39 No inbound-channel abstraction (email-to-ticket etc.)
- #40 i18n translation namespace validation weak
Includes 'user-pain → platform-gap' mapping table tracing each end-user
complaint to a specific issue number.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationsize/m

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@huangyiirene@hotlong