Skip to content

fix: remove the "Times" screen, which managed a 2017 table nothing reads (#99) - #111

Merged
matbrgz merged 1 commit into
masterfrom
fix/99-remove-legacy-teams-screen
Sep 13, 2026
Merged

matbrgz merged 1 commit into
masterfrom
fix/99-remove-legacy-teams-screen

Conversation

@matbrgz

@matbrgz matbrgz commented Sep 13, 2026

Copy link
Copy Markdown
Member

Fecha a #99.

O /backend/teams estava no menu lateral principal e lia DB::table('teams') — a tabela Helium de 2017, com team_id, teamName, score. As equipes de verdade são linhas em users com user_type='team', que é o que o SubmitController, o Leaderboard, o Score, o BocaWebcastZipBuilder e o relatório ICPC usam.

Depois que a #107 tirou os outros dois leitores, a auditoria ficou sem ambiguidade:

$ grep -rn "table('exercises')"  → nada
$ grep -rn "table('teams')"      → só o TeamController (get, insert, delete)

Não era uma tela desatualizada. Era um circuito fechado: lia, escrevia e apagava a própria tabela, e nada mais jamais olhava o que ela escreveu.

As duas referências modelam igual — e nenhuma do jeito que essa tela fazia

BOCA tem uma usertable e um admin/user.php. Equipe é usuário com type='team'. Não existe tabela de times nem tela de times.

CD-MOJ tem como fonte da verdade contests/<id>/users/<login>/, um diretório por conta. Ele tem uma tela "Times" — mas veja o que ela é:

"Identidade de cada conta no placar: nome do time, país/bandeira, sede, universidade, brasão e foto. Carga por CSV."

Metadado de apresentação pendurado nas contas, com o roster numa tela separada ("Inscrições").

Ou seja: a vaga no menu vale a pena existir um dia — para identidade de placar, bandeira, brasão, foto. O que ocupava ela não era isso. E a #105 já deu à edição de conta um lugar de verdade em /backend/users, enquanto o /site/teams já lista as equipes reais de uma sede.

As tabelas ficam

teams, exercises, exercise_team e team_user continuam onde estão, de propósito. Dropar é irreversível e eu não consigo verificar daqui se algo fora deste repositório lê esse banco — um relatório antigo, um script de operação. A tela era a parte que enganava ativamente; removê-la não mexe em dado nenhum.

Se alguém confirmar que nada externo lê, o drop é uma migration de três linhas numa issue própria.

Suíte: 799 verdes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Pvf2R8xtgbWQm1wRvjBqQY

…ads (#99)

Closes #99.

/backend/teams sat in the main admin sidebar and read `DB::table('teams')`,
the Helium table from 2017 -- team_id, teamName, score. The contest's
actual teams are rows in `users` with user_type='team', which is what
SubmitController, Leaderboard, Score, BocaWebcastZipBuilder and the ICPC
report all use.

After #107 removed the other two readers, the audit was unambiguous:
`exercises` has no reader or writer left anywhere, and `teams` had exactly
one consumer -- this screen, which read, wrote and deleted its own table
while nothing else ever looked at what it wrote. Not a screen that had
fallen out of date; a closed loop that was never connected to anything.

Both reference implementations model this the same way, and neither the
way this screen did:

  BOCA has one usertable and one admin/user.php; a team is a user with
  type='team'. There is no teams table and no teams screen.

  CD-MOJ's source of truth is contests/<id>/users/<login>/, one directory
  per account. It does have a "Times" screen, but read what it is:
  "Identidade de cada conta no placar: nome do time, país/bandeira, sede,
  universidade, brasão e foto" -- presentation metadata hanging off
  accounts, with the roster in a separate "Inscrições" screen.

So the menu slot is worth having eventually; what occupied it was not it.
#105 gave account editing a real home in /backend/users, and /site/teams
already lists a site's real teams.

The four legacy tables (teams, exercises, exercise_team, team_user) are
deliberately left in place. Dropping them is irreversible and I cannot
verify from here whether anything outside this repository reads that
database -- an old report, an operations script. The screen is the part
that was actively misleading, and removing it changes no data.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01Pvf2R8xtgbWQm1wRvjBqQY
@matbrgz
matbrgz merged commit 54b019e into master Sep 13, 2026
3 checks passed
@matbrgz
matbrgz deleted the fix/99-remove-legacy-teams-screen branch September 13, 2026 21:51
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