Skip to content

Migrate to Vite/TanStack stack and add tests - #14

Merged
cantpr09ram merged 13 commits into
mainfrom
v3
Feb 14, 2026
Merged

Migrate to Vite/TanStack stack and add tests#14
cantpr09ram merged 13 commits into
mainfrom
v3

Conversation

@cantpr09ram

@cantpr09ram cantpr09ram commented Feb 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • finish Plan #11
  • remove the legacy Next.js app scaffold and align the repo with TanStack Start + Vite
  • add GitHub Pages deployment workflow and update project docs/assets for the new base path
  • introduce TanStack Table/Virtual + RHF/Zod filters and set up unit + e2e testing (Vitest, Testing Library, Playwright)

Testing

  • pnpm lint
  • pnpm test
  • pnpm test:e2e

Add AGENTS.md (developer/agent guide) and a test scaffold (tools/tests/test_main.py). Rename tools/.gitconfig to top-level .gitconfig (keep "theirs" merge driver) and consolidate the courses.json merge rule into .gitattributes. Update .gitignore to target TanStack Start/Vite build outputs and remove Next.js-specific ignores. Remove obsolete/large tooling files from tools/ (courses.json, LICENSE, .actrc, .gitattributes) and delete improve.md as part of repository cleanup.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Migrates the app from a legacy Next.js scaffold to a TanStack Start + Vite stack, updates GitHub Pages deployment assumptions (base path/assets), and introduces unit + e2e testing infrastructure.

Changes:

  • Replaces Next.js routing/layout with TanStack Router/Start + React Query data fetching.
  • Adds/updates test tooling (Vitest + Testing Library setup, Playwright smoke test) and CI workflows for app/tools.
  • Updates static assets, base path configuration, and repo docs to reflect GitHub Pages deployment.

Reviewed changes

Copilot reviewed 54 out of 63 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
vitest.config.ts Switches Vitest to jsdom, expands test globs to TSX, adds setup file.
vite.config.ts Adds Vite/TanStack Start config, sets GitHub Pages base path and prerender options.
tsconfig.json Removes Next.js-specific config; updates JSX mode and Vite types.
tools/tests/test_main.py Adds Python unit tests for the tools HTML parsing/merge helpers.
tools/LICENSE Removes tools-specific license file (root LICENSE remains).
tools/.gitignore Removes tools-only gitignore (replaced by root ignores for tools).
tools/.gitattributes Removes tools-only gitattributes (moved to root).
tools/.actrc Removes act config line; leaves container architecture entry.
src/utils/parse-times.ts Minor logic/style tweak in period token parsing loop.
src/test/setup.ts Adds Testing Library jest-dom Vitest setup import.
src/styles/app.css Adds font CSS variables; removes duplicate radius variable.
src/routes/index.tsx Adds TanStack file route; normalizes/serializes selected courses in URL search params.
src/routes/__root.tsx Adds app shell/document + head metadata + React Query provider wiring.
src/router.tsx Adds TanStack Router instance with basepath from import.meta.env.BASE_URL.
src/routeTree.gen.ts Adds TanStack Router auto-generated route tree/types.
src/lib/utils.ts Import ordering tweak for clsx type/value imports.
src/lib/query-client.ts Adds React Query QueryClient factory with default query options.
src/env.d.ts Adds Vite env typings for courses URL variables.
src/components/ui/tooltip.tsx Converts React import to type-only import.
src/components/ui/table.tsx Converts React import to type-only import.
src/components/ui/sidebar.tsx Reorders imports; adds Biome override support for cookie usage/exhaustive deps.
src/components/ui/sheet.tsx Converts React import to type-only import.
src/components/ui/separator.tsx Converts React import to type-only import.
src/components/ui/select.tsx Converts React import to type-only import.
src/components/ui/scroll-area.tsx Converts React import to type-only import.
src/components/ui/popover.tsx Converts React import to type-only import.
src/components/ui/input.tsx Converts React import to type-only import.
src/components/ui/drawer.tsx Converts React import to type-only import.
src/components/ui/dialog.tsx Converts React import to type-only import.
src/components/ui/command.tsx Converts React import to type-only import; adjusts import ordering.
src/components/ui/card.tsx Converts React import to type-only import.
src/components/ui/button.tsx Converts React import to type-only import; keeps value imports.
src/components/course-scheduler-content.tsx Migrates data fetching to React Query; makes selected course state external (router-driven).
src/components/course-list.tsx Adds TanStack Virtual for list virtualization and scroll container ref.
src/components/course-info-table.tsx Migrates filters to RHF + Zod; refactors table rendering to TanStack Table column defs.
src/components/app-sidebar.tsx Replaces Next.js Link with TanStack Router Link.
src/components/tests/course-info-table.test.tsx Adds unit test covering search-term filtering behavior.
src/app/robots.txt Removes Next.js app-scoped robots.txt.
src/app/page.tsx Removes Next.js app page entry point.
src/app/manifest.ts Removes Next.js manifest route implementation (replaced by static manifest).
src/app/layout.tsx Removes Next.js root layout, analytics, and font loader usage.
src/app/api/og/route.tsx Removes Next.js OG image route implementation.
public/robots.txt Adds static robots.txt for the Vite/TanStack app.
public/og.png Adds OpenGraph image asset (PNG).
public/manifest.webmanifest Adds static PWA manifest file.
public/favicon.ico Adds static favicon asset.
playwright.config.ts Adds Playwright config with preview server and baseURL including GitHub Pages base path.
package.json Switches scripts to Vite; adds TanStack + testing deps; sets ESM module type.
next.config.ts Removes Next.js config file.
improve.md Removes legacy improvement checklist tied to Next.js scaffold.
e2e/smoke.spec.ts Adds Playwright smoke test for initial page load and key UI elements.
components.json Updates shadcn/ui config to non-RSC and new CSS entry path.
biome.json Updates ignored paths (TanStack output/gen, large assets, test artifacts) and adds file override.
README.md Updates project docs for new stack, scripts, and GitHub Pages deployment.
AGENTS.md Adds repo contribution guide for tooling, conventions, and commands.
.gitignore Updates ignores for TanStack/Vite outputs and Playwright artifacts; folds tools Python ignores into root.
.github/workflows/test.yml Adds path-filtered CI jobs for app (lint/test/build) and tools (uv + unittest).
.github/workflows/deploy.yml Adds GitHub Pages deployment workflow driven by successful test workflow runs.
.gitconfig Trims/adjusts whitespace in merge driver config entry.
.gitattributes Adds merge driver rule for tools/courses.json.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json
Comment thread src/routes/__root.tsx
Comment on lines +29 to +33
{ property: "og:title", content: "AZQUERYSUCKS" },
{ property: "og:description", content: "so I made one" },
{ property: "og:site_name", content: "AZQUERYSUCKS" },
{ property: "og:image", content: `${BASE_URL}og.svg` },
],

Copilot AI Feb 14, 2026

Copy link

Choose a reason for hiding this comment

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

og:image points to ${BASE_URL}og.svg, but there is no public/og.svg in the repo (only public/og.png). Update the reference (or add the missing asset) so OpenGraph previews don’t break.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@copilot open a new pull request to apply changes based on this feedback

Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread AGENTS.md Outdated
Comment thread biome.json
Comment on lines +27 to +35
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- run: pnpm build

Copilot AI Feb 14, 2026

Copy link

Choose a reason for hiding this comment

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

Deploy workflow pins pnpm v9 while the test/build workflow uses pnpm v10. Align the pnpm version across workflows to avoid subtle install/lockfile behavior differences between CI and deploy.

Copilot uses AI. Check for mistakes.
Comment on lines +29 to +30
queryFn: async () => {
const res = await fetch(COURSES_URL);

Copilot AI Feb 14, 2026

Copy link

Choose a reason for hiding this comment

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

React Query can pass an AbortSignal to the queryFn so in-flight fetches are cancelled on unmount/refetch. Consider accepting the query function context and forwarding signal to fetch to avoid unnecessary network work.

Suggested change
queryFn: async () => {
const res = await fetch(COURSES_URL);
queryFn: async ({ signal }) => {
const res = await fetch(COURSES_URL, { signal });

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Copilot AI commented Feb 14, 2026

Copy link
Copy Markdown

@cantpr09ram I've opened a new pull request, #15, to work on those changes. Once the pull request is ready, I'll request review from you.

cantpr09ram and others added 3 commits February 14, 2026 14:46
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@cantpr09ram
cantpr09ram merged commit eecbbee into main Feb 14, 2026
6 of 7 checks passed
@cantpr09ram
cantpr09ram deleted the v3 branch February 14, 2026 07:00
@tkuitocc tkuitocc deleted a comment from vercel Bot Feb 17, 2026
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