Skip to content

fix: type ObjectHookDefinition with Projects generic to fix CI build errors#363

Merged
hotlong merged 2 commits intomainfrom
copilot/fix-ci-build-errors
Feb 10, 2026
Merged

fix: type ObjectHookDefinition with Projects generic to fix CI build errors#363
hotlong merged 2 commits intomainfrom
copilot/fix-ci-build-errors

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 10, 2026

All three CI workflows (CI, Type Check, Test Coverage) fail on main due to 4 TypeScript errors in the project-tracker example's hook file.

ObjectHookDefinition was used without a type parameter, leaving data as Partial<Record<string, unknown>> — property access on {} fails for .trim(), .length, and < 0.

  • Parameterize with ObjectHookDefinition<Projects> so data is Partial<Projects>
  • Coerce user.id (string | number) to string for data.owner assignment
-import { ObjectHookDefinition } from '@objectql/types';
+import { ObjectHookDefinition } from '@objectql/types';
+import { Projects } from '../../types/projects';

-const hooks: ObjectHookDefinition = {
+const hooks: ObjectHookDefinition<Projects> = {

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • fastdl.mongodb.org
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/objectql/objectql/node_modules/.bin/../vitest/vitest.mjs run --reporter=verbose n/tsc s origin 2/dist/node-gyp-bin/sh __&#39; ../../../exatsc (dns block)
  • fonts.googleapis.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/objectql/objectql/apps/site/node_modules/.bin/../next/dist/bin/next build (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


✨ 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
Copy link
Copy Markdown

vercel Bot commented Feb 10, 2026

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

Project Deployment Actions Updated (UTC)
objectql Ready Ready Preview, Comment Feb 10, 2026 1:07am

Request Review

… CI build errors

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix all CI build errors and retest fix: type ObjectHookDefinition with Projects generic to fix CI build errors Feb 10, 2026
Copilot AI requested a review from hotlong February 10, 2026 01:07
@hotlong hotlong marked this pull request as ready for review February 10, 2026 01:19
Copilot AI review requested due to automatic review settings February 10, 2026 01:19
@hotlong hotlong merged commit d477a07 into main Feb 10, 2026
3 checks passed
@hotlong hotlong deleted the copilot/fix-ci-build-errors branch February 10, 2026 01:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes TypeScript type errors in the project-tracker example by properly typing the project hooks so hook data is strongly typed and safe for property access.

Changes:

  • Parameterized ObjectHookDefinition with the Projects interface so ctx.data becomes Partial<Projects>.
  • Normalized user.id to a string when assigning to data.owner to match the Projects.owner?: string type.

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.

3 participants