Skip to content

fix: repair the typecheck CI gate and three related hygiene bugs - #16

Open
sreekar2403 wants to merge 1 commit into
mainfrom
fix/ci-typecheck-and-gitignore
Open

fix: repair the typecheck CI gate and three related hygiene bugs#16
sreekar2403 wants to merge 1 commit into
mainfrom
fix/ci-typecheck-and-gitignore

Conversation

@sreekar2403

Copy link
Copy Markdown
Owner

The commit that added the quality gates ships with one of those gates red. This fixes that, plus three hygiene bugs found alongside it.

The headline bug

pnpm typecheck fails on every clean checkout with 100+ TypeScript errors, which means the new lint-typecheck CI job is red on every push and PR.

The cause is the script, not the code. Running tsc --noEmit on shared means packages/shared/dist/*.d.ts is never produced — but server declares a project reference to shared, so TS demands the built declarations and emits TS6305, cascading into TS2339, TS2353 and friends. None of them are real type errors: the tree is type-clean once shared is built.

The fix is to let tsc --build handle the referenced projects and keep the standalone --noEmit pass for the client (which is not part of the reference graph).

Also fixed

  • Kanban board silently dropped cards. GET /api/tasks now defaults to LIMIT 50, but KanbanPage.tsx still called it with no limit/offset and never read the new total, so any project with more than 50 cards lost the rest off the board. It now pages through total at the server's 100-row cap.
  • Stale .gitignore build-artifact rules. They still named the pre-rename vitest.config.js/.d.ts; since the rename to .mts, pnpm build emits vitest.config.mjs, vitest.config.d.mts and two .map files that nothing ignored — four untracked files in the repo root awaiting the next git add -A.
  • hive.config.json was tracked and gitignored. Because it was already in the index the ignore rule did nothing, so every contributor gets a permanently dirty tree and can commit their local machine config over someone else's. Untracked, with hive.config.example.json as the tracked copy and a README note.

Verification

  • pnpm typecheck — exit 0 from a wiped state (both dist/ dirs and every tsbuildinfo deleted); previously 100+ errors
  • pnpm lint — clean
  • pnpm format:check — clean
  • vitest run — 38 files, 458 tests passing
  • git check-ignore -v confirms all four post-build artifacts and hive.config.json now match

🤖 Generated with Claude Code

The commit that added quality gates shipped with one of them red.

- `pnpm typecheck` failed on every clean checkout with 100+ errors. Running
  `tsc --noEmit` on `shared` never produced `packages/shared/dist/*.d.ts`, but
  `server` declares a project reference to it, so TS emitted TS6305 and a large
  TS2339/TS2353 cascade. None were real type errors. Use `tsc --build` for the
  referenced projects and keep the standalone `noEmit` pass for the client.

- `GET /api/tasks` now defaults to `LIMIT 50`, but the Kanban board still
  fetched without `limit`/`offset` and ignored `total`, so any project with
  more than 50 cards silently lost cards off the board. Page through `total`.

- The `.gitignore` rules for the root build artifacts still named the
  pre-rename `vitest.config.js`/`.d.ts`; since the rename to `.mts`,
  `pnpm build` emitted four untracked files that nothing ignored.

- `hive.config.json` was both tracked and gitignored, so the ignore rule did
  nothing and every contributor got a dirty tree and could commit their local
  machine config. Untrack it and ship `hive.config.example.json` instead.

Verified: typecheck exit 0 from a wiped dist/tsbuildinfo state, lint clean,
prettier clean, 458 tests passing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.

1 participant