Follow-ups from toolchain and local dx work
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
- Ambito
- authentication, ci-cd, developer-experience, frontend, security, testing
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:PrismaPggivesDATABASE_URLtopg.pgignores the Prisma-only parameters, andsslmode=requireacts asverify-full. Set the SSL options for the production database. -
package.json:postinstall: prisma generatefails on a production-only install, becauseprismais a devDependency. Generate the client in the build step, or moveprismato dependencies. -
pages/api/auth/[...nextauth].ts: whenDANGEROUS_ACCOUNT_LINKING_ENABLEDis true, check the Auth0email_verifiedclaim. -
util/env.ts: in production, refuse a shortNEXTAUTH_SECRETand anhttp://NEXTAUTH_URL. - #544
2. Sign in and environment checks
-
pages/api/auth/dev-login.ts: browsers sendSec-Fetch-Siteonly 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. WhenOriginis present, require its host to equalx-forwarded-hostorhost. Test this in Codespaces first. -
pages/api/auth/dev-login.ts: return 400 when the body is not an object, for example atext/plainform. Now such a request signs in as the default teacher. -
util/env.ts: theAUTH0_DOMAINcheck lets?and#through, and its message does not mention ports. Match a host name pattern instead. -
pages/api/create_class_teacher.tsandpages/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. TheEmaillabel 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 runpnpm 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 thepostgres:16and 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.tsandutil/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=truehas no effect in pnpm 12. Remove it, or use the pnpm setting. Done in #646. -
pnpm-workspace.yaml: replacestrictPeerDependencies: falsewithpeerDependencyRules.allowedVersionsfor the known peers. Done in #646. -
.oxlintrc.json:react/unsupported-syntaxand thereact/hooksrules are off. Turn them on, or give the reason. Done in #649. - oxlint
suspicious: warngives about 30 warnings. Fix them, or turn the rules off. #649 fixed 17. Left: 4react/set-state-in-effectand 4jsx-a11ywarnings (they change component behaviour, so they need a review), 3no-array-sortincomponents/ClassModal.tsx(toSorted()needs Firefox 115, and Next.js targets Firefox 111), 1no-shadowinpages/classes/index.tsx(#630 changes that file), and 1vitest/no-conditional-tests. -
.oxfmtrc.json: format-check.github/. Done in #647. -
tsconfig.json: thevitest/globalstypes apply to app code, and editors lose the test globals. Split the types between the two tsconfig files. Already done onmain:tsconfig.jsonhas"types": ["node"], andtsconfig.test.jsonaddsvitest/globals. - Issue forms: remove
value:from required fields. Done in #647.
7. Code cleanup
- Delete
pages/api/hello.ts,components/dashTabs.module.cssandutil/api_proccesor.ts. They have no users. Done in #648. -
pages/dashboard/v2/details/[id]/[studentEmail].tsx: remove theas StudentDashboardDatacast 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_ENVunset. Done in #650. - Encoded redirect values in
safeCallbackPath. Done in #650. - The
instrumentation.tsexit. 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
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di freeCodeCamp/classroom
-
Bug: Classrooms can be created with no certificationsForse già presa @yakupafsin l’ha presa 370 giorni fa. Apertabug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
freeCodeCamp/classroom#551 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Student details page does not check class membershipForse già presa @raisedadead l’ha presa 5 giorni fa. Apertabug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
freeCodeCamp/classroom#633 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Admin access is not consistentForse già presa @raisedadead l’ha presa 5 giorni fa. Apertaenhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
freeCodeCamp/classroom#631 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Feature: Improve teacher feedback for fetch failures and empty classroomsForse di nuovo libera @NewtonLC l’ha presa 118 giorni fa e non c’è nessuna pull request aperta. Aperta
freeCodeCamp/classroom#606 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
feat(UI): Enhancement to the admin dashboard page issue - search barForse già presa @adgator101 l’ha presa 369 giorni fa. Aperta
freeCodeCamp/classroom#550 · 8 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di freeCodeCamp/classroom
Issue simili
-
Create a theming guideApertadocumentation good first issue theming
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
-
feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
drevendev/PatchPitch#2 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
521xueweihan/HelloGitHub#4025 ·