refactor: retire redirected course readers without changing legacy URLs

Aberta
#73 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
48/100
Tipo de issue
Refatoração
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
next.js, react, typescript

Direção de pesquisa

Start by tracing imports from src/app/courses/ and the reader components, then check next.config.ts and the protection helpers to distinguish retired code from shared code. Use e2e/checks.mjs and the reader and redirect browser checks to verify legacy URLs preserve nested paths and query strings, render the dashboard destination, and keep unknown destinations at 404. Done when only unreferenced legacy components are removed, architecture guidance names the canonical reader, and the listed checks pass.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

enhancement help wanted

Problem

next.config.ts permanently redirects /courses and /courses/:path* to /dashboard, but the repository retains a second course-reader route tree and its reader components. This makes it harder for contributors to identify the active implementation.

Scope

  • Inventory the legacy route/component import graph and confirm which files are unreachable through the supported application routes.
  • Remove only duplicate pages/components whose sole consumers belong to that retired tree.
  • Preserve the existing permanent redirects, path segments and query strings.
  • Keep the active dashboard reader, content safety rules and any shared helpers still used elsewhere.
  • Update architecture guidance to identify the canonical reader.
  • Treat this as dead-code cleanup; it does not fix an active reading restriction or change the student reading experience.

Starting files

next.config.ts, src/app/courses/, src/app/components/Reader/, src/app/components/Protected/NoCopyWrapper.tsx, src/hooks/useContentProtection.ts, e2e/checks.mjs and docs/architecture.md.

Done when

Tests verify direct legacy requests redirect to the matching dashboard URL, including nested unit paths and query strings. Browser checks confirm the destination renders the expected content and unknown destinations still return 404. Lint, typecheck, unit tests, production build and reader/redirect browser checks pass. Removed components have no remaining consumers.

Linguagem predominante
TypeScript
Estrelas
1
Forks
1
Merge médio
8h 58min
PRs com merge (30d)
37

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de procoderji-com/procoderji

Todas as issues de procoderji-com/procoderji

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.