Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Follow-ups from toolchain and local dx work

Aperta
#640 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
Più di una settimana
Idoneità per principianti
15/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
docker-compose, nextjs, playwright, postgresql, react, typescript

Direzione di ricerca

This is a tracking issue, not a single task, so pick one unchecked item with a named file, such as the length checks in util/env.ts or the timeout in util/curriculum/fetchSuperblocksFromGraphQL.ts, and link your pull request to this issue. Read the file and the linked issues (#544, #556) first, then confirm the item is still open. Done means the listed behaviour is fixed or the reason for leaving it is recorded, with tests passing.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Stack #629 (#623 to #628) moved Classroom to pnpm 12, Node 26, Next 16, React 19, Tailwind 4, Prisma 7, Vitest, TypeScript, Playwright, oxlint and oxfmt. The reviews found these items. None of them blocks local development.

The sections are in priority order. Open a pull request for one section or one item, and link this issue.

1. Before production

The app is not deployed from this code yet. Do these before the first deploy.

  • prisma/prisma.ts: PrismaPg gives DATABASE_URL to pg. pg ignores the Prisma-only parameters, and sslmode=require acts as verify-full. Set the SSL options for the production database.
  • package.json: postinstall: prisma generate fails on a production-only install, because prisma is a devDependency. Generate the client in the build step, or move prisma to dependencies.
  • pages/api/auth/[...nextauth].ts: when DANGEROUS_ACCOUNT_LINKING_ENABLED is true, check the Auth0 email_verified claim.
  • util/env.ts: in production, refuse a short NEXTAUTH_SECRET and an http:// NEXTAUTH_URL.
  • #544
2. Sign in and environment checks
  • pages/api/auth/dev-login.ts: browsers send Sec-Fetch-Site only to HTTPS or localhost. On a plain-http dev host, such as a LAN address, a cross-site form POST has no such header and passes. When Origin is present, require its host to equal x-forwarded-host or host. Test this in Codespaces first.
  • pages/api/auth/dev-login.ts: return 400 when the body is not an object, for example a text/plain form. Now such a request signs in as the default teacher.
  • util/env.ts: the AUTH0_DOMAIN check lets ? and # through, and its message does not mention ports. Match a host name pattern instead.
  • pages/api/create_class_teacher.ts and pages/api/editclass.ts: check the name and description length. The form limits them to 100 and 500 characters (components/ClassModal.tsx), but a direct API call can save a longer value. See #556.
3. Team decisions
  • #633
  • #631
  • #632
4. Local development
  • pages/signin.tsx: redesign the development sign in page. It does not say what it is for. The Email label touches an unstyled input that cuts off the address. The button is full width, but the other content is centered. The seeded users show as one centered bullet. Explain that the page is for local development only, and let the user select a seeded user by role (admin, teacher, student).
  • pages/dashboard/v2/[id].tsx: when the mock data server (port 3002) is not running, the page shows "0 students" and asks the user to contact support, and the server writes no log line. In development, log the failure and tell the user to run pnpm run mock-fcc-data. See #606.
  • Local development closer to production: discuss whether Classroom runs against a local freeCodeCamp API by default, in place of the mock data server.
  • docker-compose.yml: pin the postgres:16 and devcontainer images by digest. Done in #651.
5. CI
  • Make "End-to-end tests" a required check when the job is stable.
  • CI: cache the Playwright browser. Dropped: the Playwright docs advise against it, because restoring the cache takes about as long as the download (https://playwright.dev/docs/ci).
  • util/curriculum/fetchSuperblocksFromGraphQL.ts: the curriculum GraphQL call has no timeout. CI and the end-to-end tests depend on it.
  • util/curriculum/fetchSuperblocksFromGraphQL.ts and util/fcc-api.ts: check the shape of the curriculum GraphQL and freeCodeCamp API responses, and show a clear error when it changes. Replaces #410 and #506.
6. Tooling configuration
  • .npmrc: engine-strict=true has no effect in pnpm 12. Remove it, or use the pnpm setting. Done in #646.
  • pnpm-workspace.yaml: replace strictPeerDependencies: false with peerDependencyRules.allowedVersions for the known peers. Done in #646.
  • .oxlintrc.json: react/unsupported-syntax and the react/hooks rules are off. Turn them on, or give the reason. Done in #649.
  • oxlint suspicious: warn gives about 30 warnings. Fix them, or turn the rules off. #649 fixed 17. Left: 4 react/set-state-in-effect and 4 jsx-a11y warnings (they change component behaviour, so they need a review), 3 no-array-sort in components/ClassModal.tsx (toSorted() needs Firefox 115, and Next.js targets Firefox 111), 1 no-shadow in pages/classes/index.tsx (#630 changes that file), and 1 vitest/no-conditional-tests.
  • .oxfmtrc.json: format-check .github/. Done in #647.
  • tsconfig.json: the vitest/globals types apply to app code, and editors lose the test globals. Split the types between the two tsconfig files. Already done on main: tsconfig.json has "types": ["node"], and tsconfig.test.json adds vitest/globals.
  • Issue forms: remove value: from required fields. Done in #647.
7. Code cleanup
  • Delete pages/api/hello.ts, components/dashTabs.module.css and util/api_proccesor.ts. They have no users. Done in #648.
  • pages/dashboard/v2/details/[id]/[studentEmail].tsx: remove the as StudentDashboardData cast on a partial object (mock mode).
  • Old /dashboard/<id> links return 404 after the v1 dashboard removal. Add a redirect, or accept the 404.
8. Missing tests
  • NODE_ENV unset. Done in #650.
  • Encoded redirect values in safeCallbackPath. Done in #650.
  • The instrumentation.ts exit. Done in #650.
  • A reload after "create class". Done in #650.
Lingua principale
JavaScript
Stelle
156
Fork
140
Merge medio
22h 23m
PR unite (30g)
31

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di freeCodeCamp/classroom

Tutte le issue di freeCodeCamp/classroom

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.